/*
Theme Name: Yarnoz
Theme URI: https://yarnoz.com
Author: Pablo Yarnoz
Description: Portfolio de dirección. Oscuro, tipográfico, con el vídeo como protagonista.
Version: 1.4.0
Requires PHP: 7.4
Text Domain: yarnoz
*/

:root {
	--bg: #0b0b0b;
	--bg-2: #141414;
	--line: #262626;
	--fg: #ecebe8;
	--muted: #8a8a86;
	--accent: #e4202a;
	--display: "Anton", "Oswald", Impact, "Arial Narrow", sans-serif;
	--text: "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
	--gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 400 16px/1.6 var(--text);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, iframe { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- Cabecera ---------- */
.yz-header {
	position: fixed; inset: 0 0 auto 0; z-index: 50;
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px var(--gutter);
	mix-blend-mode: difference;
}
.yz-logo {
	display: inline-flex; align-items: center; gap: 12px;
	font: 400 22px/1 var(--display);
	letter-spacing: .04em; text-transform: uppercase;
}
.yz-logo__mark { width: 30px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: miter; }
.yz-nav { display: flex; gap: clamp(14px, 3vw, 36px); align-items: center; }
.yz-nav a, .yz-lang a {
	font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
	opacity: .75; transition: opacity .2s;
}
.yz-nav a:hover, .yz-nav a[aria-current] { opacity: 1; }
.yz-lang { display: flex; gap: 10px; margin-left: clamp(10px, 2vw, 24px); }
.yz-lang a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Portada ---------- */
.yz-hero {
	position: relative; height: 100vh; height: 100svh; min-height: 520px;
	overflow: hidden; background: #000;
}
.yz-hero__media { position: absolute; inset: 0; }
.yz-hero__media img, .yz-hero__media iframe {
	position: absolute; top: 50%; left: 50%;
	width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.78vh;
	transform: translate(-50%, -50%); object-fit: cover; border: 0; pointer-events: none;
}
.yz-hero::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.15) 60%, rgba(0,0,0,.85) 100%);
}
.yz-hero__text {
	position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 6vh, 64px);
}
.yz-kicker {
	display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
	color: var(--fg); opacity: .8; margin-bottom: 18px;
}
.yz-kicker b { color: var(--accent); font-weight: 500; }
.yz-hero h1 {
	margin: 0; font: 400 clamp(56px, 13vw, 210px)/.86 var(--display);
	text-transform: uppercase; letter-spacing: -.005em;
}
.yz-hero__sub {
	margin: 18px 0 0; max-width: 560px; color: #cfcfcb; font-size: clamp(15px, 1.4vw, 18px);
}
.yz-hero__cta {
	display: inline-flex; gap: 10px; align-items: center; margin-top: 26px;
	font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
	border-bottom: 1px solid var(--fg); padding-bottom: 6px;
}
.yz-hero__cta:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Índice de trabajos (capítulos) ---------- */
.yz-section { padding: clamp(64px, 10vw, 140px) var(--gutter); }
.yz-section__head {
	display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
	border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: clamp(28px, 4vw, 48px);
}
.yz-section__head h2 {
	margin: 0; font: 400 clamp(36px, 6vw, 84px)/.9 var(--display); text-transform: uppercase;
}
.yz-count { font: 500 12px/1 var(--mono); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }

.yz-grid {
	display: grid; gap: clamp(28px, 3.5vw, 52px) clamp(16px, 2vw, 28px);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.yz-card { display: block; }
.yz-card:nth-child(6n+1) { grid-column: span 2; }
.yz-card__img {
	position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2);
}
.yz-card__img img {
	width: 100%; height: 100%; object-fit: cover;
	filter: grayscale(1) contrast(1.08) brightness(.88);
	transform: scale(var(--crop, 1));
	transition: filter .5s ease, transform 1.2s cubic-bezier(.2,.7,.2,1);
}
/* Toque Warhol: duotono de serigrafía que se revela en color */
.yz-card__img::after {
	content: ""; position: absolute; inset: 0;
	background: var(--accent); mix-blend-mode: multiply; opacity: 0;
	transition: opacity .35s ease;
}
.yz-card:hover .yz-card__img::after, .yz-card:focus-visible .yz-card__img::after { opacity: .55; }
.yz-card:hover .yz-card__img img, .yz-card:focus-visible .yz-card__img img {
	filter: grayscale(0) contrast(1.05) brightness(1); transform: scale(calc(var(--crop, 1) * 1.035));
}
.yz-card__meta {
	display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: baseline;
	margin-top: 14px;
}
.yz-card__num { font: 500 12px/1 var(--mono); color: var(--accent); letter-spacing: .1em; }
.yz-card__title {
	margin: 0; font: 400 clamp(22px, 2.4vw, 34px)/1 var(--display); text-transform: uppercase;
}
.yz-card:nth-child(6n+1) .yz-card__title { font-size: clamp(28px, 3.6vw, 52px); }
.yz-card__sub { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.yz-card__type { font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }

/* ---------- Ficha de trabajo ---------- */
.yz-work { padding-top: 84px; }
.yz-work__video { background: #000; }
.yz-work__video .yz-ratio { position: relative; aspect-ratio: 16 / 9; max-height: calc(100vh - 84px); margin: 0 auto; }
.yz-work__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yz-work__extra { display: grid; gap: 24px; padding: 24px var(--gutter) 0; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.yz-work__extra .yz-ratio { position: relative; aspect-ratio: 16/9; background: #000; }
.yz-work__extra iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yz-work__body {
	display: grid; gap: clamp(32px, 6vw, 96px);
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	padding: clamp(40px, 6vw, 88px) var(--gutter);
}
.yz-work__num { font: 500 12px/1 var(--mono); color: var(--accent); letter-spacing: .14em; text-transform: uppercase; }
.yz-work h1 {
	margin: 14px 0 0; font: 400 clamp(48px, 9vw, 140px)/.88 var(--display); text-transform: uppercase;
}
.yz-work__sub { margin: 14px 0 0; font-size: clamp(17px, 1.8vw, 22px); color: #cfcfcb; }
.yz-work__text { margin-top: 32px; max-width: 640px; color: #c4c4bf; }
.yz-work__text p { margin: 0 0 1em; }
.yz-facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.yz-facts li {
	display: grid; grid-template-columns: 140px 1fr; gap: 16px;
	padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.yz-facts span { font: 500 11px/1.9 var(--mono); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.yz-facts a { border-bottom: 1px solid var(--muted); }
.yz-facts a:hover { color: var(--accent); border-color: var(--accent); }
.yz-facts-title { margin: 36px 0 0; font: 500 11px/1 var(--mono); color: var(--fg); letter-spacing: .16em; text-transform: uppercase; padding-bottom: 12px; }

.yz-pager {
	display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line);
}
.yz-pager a { padding: clamp(28px, 5vw, 60px) var(--gutter); display: block; transition: background .3s; }
.yz-pager a + a { border-left: 1px solid var(--line); text-align: right; }
.yz-pager a:hover { background: var(--bg-2); }
.yz-pager small { display: block; font: 500 11px/1 var(--mono); letter-spacing: .16em; color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }
.yz-pager strong { font: 400 clamp(26px, 4vw, 56px)/.95 var(--display); text-transform: uppercase; font-weight: 400; }
.yz-pager a:hover strong { color: var(--accent); }

/* ---------- Sobre mí / Contacto ---------- */
.yz-about { display: grid; gap: clamp(32px, 6vw, 96px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.yz-about h2 { margin: 0; font: 400 clamp(44px, 8vw, 120px)/.88 var(--display); text-transform: uppercase; }
.yz-about__text { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: #d6d6d1; }
.yz-about__text p { margin: 0 0 1.1em; }
.yz-clients {
	margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line);
	font: 500 12px/2 var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase;
}
.yz-contact { border-top: 1px solid var(--line); }
.yz-contact__big {
	display: block; margin-top: 18px;
	font: 400 clamp(34px, 7.5vw, 128px)/.9 var(--display); text-transform: uppercase; word-break: break-word;
	transition: color .2s;
}
.yz-contact__big:hover { color: var(--accent); }
.yz-contact__row { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 32px; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.yz-contact__row a:hover { color: var(--fg); }

.yz-footer {
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
	padding: 28px var(--gutter); border-top: 1px solid var(--line);
	font: 500 11px/1.6 var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase;
}
.yz-footer a:hover { color: var(--fg); }

/* Páginas genéricas */
.yz-page { padding: 140px var(--gutter) 80px; max-width: 860px; }
.yz-page h1 { font: 400 clamp(40px, 7vw, 96px)/.9 var(--display); text-transform: uppercase; margin: 0 0 32px; }

/* ---------- Animación de entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
	.js .yz-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
	.js .yz-reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
	.yz-nav { gap: 14px; }
	.yz-nav .yz-hide-sm { display: none; }
	.yz-grid { grid-template-columns: 1fr; }
	.yz-card:nth-child(6n+1) { grid-column: auto; }
	.yz-card__meta { grid-template-columns: 1fr; }
	.yz-card__type { grid-column: 1; }
	.yz-work__body, .yz-about { grid-template-columns: 1fr; }
	.yz-facts li { grid-template-columns: 110px 1fr; }
	.yz-pager { grid-template-columns: 1fr; }
	.yz-pager a + a { border-left: 0; border-top: 1px solid var(--line); text-align: left; }
}

/* Barra de administración (solo con sesión iniciada) */
.admin-bar .yz-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .yz-header { top: 46px; } }

/* ---------- Reel de portada ---------- */
.yz-reel { position: absolute; inset: 0; }
.yz-reel iframe { opacity: 0; transition: opacity .12s linear; }
.yz-reel iframe.is-on { opacity: 1; }
.yz-reel__hit { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.yz-hero__text { pointer-events: none; }
.yz-hero__text a { pointer-events: auto; }
.yz-reelbar {
	position: absolute; z-index: 3; right: var(--gutter); bottom: calc(clamp(28px, 6vh, 64px) + 64px);
	display: flex; align-items: center; gap: 14px; max-width: min(46vw, 520px);
	font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.yz-reelbar[hidden] { display: none; }
.yz-reelbar__btn {
	flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6);
	background: rgba(0,0,0,.35); color: var(--fg); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.yz-reelbar__btn:hover, .yz-reelbar__btn:focus-visible { border-color: var(--accent); background: var(--accent); }
.yz-reelbar__icon { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.yz-reelbar.is-paused .yz-reelbar__icon { border: 0; width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.yz-reelbar__now { display: block; color: var(--fg); text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.yz-reelbar__label { opacity: .6; }
.yz-reelbar__title { font: 400 clamp(18px, 1.8vw, 26px)/1 var(--display); letter-spacing: .02em; margin: 0 4px; }
.yz-reelbar__sub { opacity: .75; text-transform: none; letter-spacing: .02em; font-family: var(--text); }
.yz-reelbar__go { display: block; margin-top: 6px; color: var(--fg); opacity: 0; transition: opacity .2s; }
.yz-reelbar.is-paused .yz-reelbar__go, .yz-reelbar__now:hover .yz-reelbar__go { opacity: 1; color: var(--accent); }
.yz-reelbar__now:hover .yz-reelbar__title { color: var(--accent); }
@media (max-width: 760px) {
	.yz-reelbar { left: var(--gutter); right: var(--gutter); top: 84px; bottom: auto; max-width: none; }
	.yz-reelbar__go { opacity: 1; }
}

/* ---------- Productora que me representa ---------- */
.yz-rep { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 28px; padding: 14px 18px; border: 1px solid var(--line); font: 400 clamp(20px, 2vw, 28px)/1 var(--display); text-transform: uppercase; letter-spacing: .02em; transition: border-color .2s, color .2s; }
.yz-rep span { font: 500 11px/1 var(--mono); letter-spacing: .16em; color: var(--muted); }
.yz-rep:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Retrato (Sobre mí) ---------- */
.yz-about__side { display: flex; flex-direction: column; gap: clamp(32px, 5vw, 64px); }
.yz-portrait { position: relative; margin: 0; width: min(72%, 300px); aspect-ratio: 432 / 412; overflow: hidden; background: #111; }
.yz-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; display: block; filter: grayscale(1) contrast(1.05); transition: transform .6s ease; }
.yz-portrait::after { content: ""; position: absolute; inset: 0; background: var(--accent); mix-blend-mode: multiply; opacity: 0; transition: opacity .35s ease; }
.yz-portrait:hover::after { opacity: .55; }
.yz-portrait:hover img { transform: scale(1.03); }

/* ---------- Portada: «Ver todos» ---------- */
.yz-count--link { transition: color .2s; }
.yz-count--link:hover { color: var(--accent); }
.yz-more { display: flex; justify-content: center; margin-top: clamp(44px, 5vw, 76px); }
.yz-more__btn {
	display: inline-flex; align-items: center; gap: 14px; padding: 18px 30px;
	border: 1px solid var(--line); font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
	transition: border-color .2s, color .2s;
}
.yz-more__btn span { transition: transform .25s ease; }
.yz-more__btn:hover { border-color: var(--accent); color: var(--accent); }
.yz-more__btn:hover span { transform: translateX(4px); }

/* ---------- Portfolio (todos los trabajos) ---------- */
.yz-portfolio { padding-top: clamp(112px, 12vw, 170px); }
.yz-section__head h1 { margin: 0; font: 400 clamp(44px, 8vw, 120px)/.88 var(--display); text-transform: uppercase; }
.yz-filter { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: -10px 0 clamp(28px, 3.5vw, 44px); }
.yz-filter button {
	background: none; border: 0; border-bottom: 1px solid transparent; padding: 6px 0; cursor: pointer;
	color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; transition: color .2s, border-color .2s;
}
.yz-filter button:hover { color: var(--fg); }
.yz-filter button.is-on { color: var(--fg); border-color: var(--accent); }
.yz-grid--all { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(26px, 2.6vw, 40px) clamp(14px, 1.4vw, 22px); }
.yz-grid--all .yz-card:nth-child(6n+1) { grid-column: auto; }
.yz-grid--all .yz-card__title, .yz-grid--all .yz-card:nth-child(6n+1) .yz-card__title { font-size: clamp(18px, 1.5vw, 24px); }
.yz-grid--all .yz-card__meta { grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.yz-grid--all .yz-card__type { grid-row: 1; font-size: 10px; }
.yz-grid--all .yz-card__sub { font-size: 13px; line-height: 1.4; }
.yz-card[hidden] { display: none; }
@media (max-width: 1200px) { .yz-grid--all { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .yz-grid--all { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
	.yz-grid--all .yz-card__sub { display: none; }
	.yz-grid--all .yz-card__title, .yz-grid--all .yz-card:nth-child(6n+1) .yz-card__title { font-size: 17px; }
}

/* ---------- Píldora de vídeo al pasar por encima de un trabajo ---------- */
.yz-card__clip { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.yz-card.is-playing .yz-card__clip { opacity: 1; }
.yz-card.is-playing .yz-card__img::after { opacity: 0 !important; }
