/* Nacho Spínola — estilos. Inspirado en la estructura de lisasorgini.com:
   barra lateral fija, columna central, mucho blanco. Espaciado en múltiplos de 4px. */
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #f1e9de;
  --ink: #1d1c1a;
  --muted: #8a867f;
  --accent: #b03a3a;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s24: 96px;
  --side: 224px;
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, p, figure, ul { margin: 0; padding: 0; font-weight: 400; }
ul { list-style: none; }

/* ---------- Barra lateral ---------- */
.side { display: grid; grid-template-rows: auto 1fr auto; gap: var(--s6); padding: var(--s6) var(--s4); }
.menu { display: grid; gap: 0; font-size: 13px; line-height: 1.35; align-content: start; }
.menu a { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .menu a:hover { color: var(--accent); } }
.menu a[aria-current="page"] { color: var(--muted); }
.menu .sec { font-style: italic; }
.menu .gap { height: var(--s3); }
.menu .group { display: grid; }
.menu .sub { display: grid; gap: 1px; padding: var(--s1) 0 var(--s3) var(--s3); font-size: 12px; line-height: 1.35; max-width: 168px; }
.menu .sub a { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .menu .sub a:hover, .menu .sub a[aria-current="page"] { color: var(--accent); } }
@media (max-width: 899px) { .menu .sub { display: none; } .menu .group { display: block; } }
.brand { color: var(--accent); font-weight: 400; font-size: 28px; letter-spacing: -.035em; line-height: 1; }
.side .brand { align-self: center; position: relative; z-index: 3; white-space: nowrap; font-size: clamp(40px, 6vw, 92px); line-height: .95; letter-spacing: -.01em; }
.pager { display: flex; gap: var(--s4); font-style: italic; color: var(--accent); font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .pager a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.side-bottom { display: contents; }
.pager { grid-row: 3; align-self: end; }

@media (min-width: 900px) {
  .side { position: fixed; inset: 0 auto 0 0; width: var(--side); padding: var(--s10) var(--s8); z-index: 2; }
  .page { padding-left: var(--side); }
}
@media (max-width: 899px) {
  .side { display: grid; gap: var(--s4); padding-top: var(--s6); }
  .side .brand { order: -1; font-size: 40px; }
  .pager { grid-row: auto; }
  .menu { grid-auto-flow: column; justify-content: start; gap: var(--s4); }
  .menu .gap { display: none; }
}

/* ---------- Contenido ---------- */
.content { display: grid; gap: var(--s12); justify-items: center; align-content: start; padding: var(--s6) var(--s4) var(--s24); }
@media (min-width: 900px) { .content { padding: var(--s10) var(--s8) var(--s24); } }
.caption { text-align: center; font-size: 13px; color: var(--ink); }
.caption .y { color: var(--muted); }
.mosaic-wrap { container-type: inline-size; width: 100%; max-width: 1100px; }
.mosaic { --gap: 4px; display: grid; gap: var(--gap); grid-auto-flow: dense; }
.mosaic.film { grid-template-columns: repeat(3, 1fr); grid-auto-rows: calc((100cqw - 2 * var(--gap)) / 3 * 9 / 16); }
.mosaic.photo { grid-template-columns: repeat(5, 1fr); grid-auto-rows: calc((100cqw - 4 * var(--gap)) / 5 * 1.25); }
.tile { display: block; overflow: hidden; background: #eee; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) { .tile:hover img { opacity: .82; } }
.tile.big { grid-column: span 2; grid-row: span 2; }
.tile.w2 { grid-column: span 2; }
@media (max-width: 599px) {
  .mosaic.film { grid-template-columns: repeat(2, 1fr); grid-auto-rows: calc((100cqw - var(--gap)) / 2 * 9 / 16); }
  .mosaic.photo { grid-template-columns: repeat(3, 1fr); grid-auto-rows: calc((100cqw - 2 * var(--gap)) / 3 * 1.25); }
}

.title-top { text-align: center; font-size: 13px; padding-top: var(--s2); }

/* PHOTO: 6 portadas 3:4, 3 columnas, sin texto */
.content.wide { grid-template-columns: minmax(0, 1fr); justify-items: stretch; padding-inline: 3vw; }
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 3vw; width: 100%; }
.work a { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #eee; }
.work img { width: 100%; height: 100%; object-fit: cover; }
.work a { position: relative; overflow: hidden; }

/* Al pasar el cursor (solo con ratón): la foto se acerca despacio, aparece un marco fino interior y el título con una flecha.
   Sin esquinas redondas, sin elevar el recuadro y sin rayas. */
.work:not(.film) a img { transform: scale(1); transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .5s ease; }
.work:not(.film) a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 48%); outline: 1px solid rgba(255, 255, 255, .85); outline-offset: -14px; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.work .nm { position: absolute; left: var(--s6); bottom: var(--s6); z-index: 1; color: #fff; font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1); pointer-events: none; text-align: left; max-width: calc(100% - 48px); }
.work .nm::after { content: " \2192"; letter-spacing: 0; }
@media (hover: hover) and (pointer: fine) {
  .work:not(.film) a:hover img, .work:not(.film) a:focus-visible img { transform: scale(1.05); transition: transform 8s cubic-bezier(.12, .5, .3, 1), filter .5s ease; filter: brightness(.9); }
  .work:not(.film) a:hover::after, .work:not(.film) a:focus-visible::after { opacity: 1; }
  .work a:hover .nm, .work a:focus-visible .nm { opacity: 1; transform: none; }
}
@media (hover: hover) and (pointer: fine) { .work.film a:hover img { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .work a, .work a img, .work a::after, .work .nm, .work .nm::before { transition: none !important; } @media (hover: hover) and (pointer: fine) { .work:not(.film) a:hover img { transform: none; } } @media (hover: hover) and (pointer: fine) { .work:not(.film) a:hover { transform: none; } } }
@media (max-width: 599px) { .work { grid-template-columns: repeat(2, 1fr); gap: var(--s3); } }
.cq { container-type: inline-size; width: 100%; }
.work.film { --g: 3vw; gap: var(--g); grid-auto-flow: dense; grid-auto-rows: calc((100cqw - 2 * var(--g)) / 3 * 9 / 16); }
.work.film a { aspect-ratio: auto; }
.work.film a.big { grid-column: span 2; grid-row: span 2; }
.work.film a.w2 { grid-column: span 2; }
@media (max-width: 599px) { .work.film { --g: 12px; grid-auto-rows: calc((100cqw - var(--g)) / 2 * 9 / 16); } }

/* Portadas de PHOTO: una por sesión (antiguo) */
.covers { display: grid; grid-template-columns: 1fr; gap: var(--s12) var(--s12); width: 100%; max-width: 1100px; align-items: start; }
@media (min-width: 700px) { .covers { grid-template-columns: repeat(3, 1fr); gap: var(--s12); } }
.cover { display: grid; gap: var(--s3); justify-items: center; }
.cover img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cover .cap { color: var(--accent); font-size: 13px; text-align: center; }
@media (hover: hover) and (pointer: fine) { .cover:hover img { opacity: .85; } }

/* Montaje de sesión: composiciones sueltas sobre blanco */
.book { display: grid; gap: var(--s24); width: 100%; max-width: 1180px; padding-top: var(--s8); }
@media (min-width: 900px) { .book { gap: 128px; } }
.scene { display: flex; align-items: flex-start; gap: var(--s2); width: var(--w); justify-self: var(--a); }
.scene figure { flex: var(--ar) 1 0; min-width: 0; }
.scene img { width: 100%; height: auto; }
.scene .bw img { filter: grayscale(1) contrast(1.06); }
@media (max-width: 699px) {
  .scene { width: 100%; }
  .scene.single { width: calc(var(--w) + (100% - var(--w)) * .35); }
}

/* Vídeo */
.embed { width: 100%; max-width: 960px; aspect-ratio: 16 / 9; background: rgba(28, 27, 25, .07); overflow: hidden; }
/* El reproductor aparece con un fundido cuando ya está listo (la página lo marca con la clase "on" 0,35 s después de cargar), así no se ve el
   marco negro de un instante que dibuja Vimeo al arrancar. Está ampliado un 1,2 % para que no asome ningún borde. Sin JavaScript: aparece a los 4 s. */
.embed iframe { width: 100%; height: 100%; border: 0; display: block; transform: scale(1.012); opacity: 0; transition: opacity .6s ease; animation: embed-in .01s linear 4s forwards; }
.embed iframe.on { opacity: 1; animation: none; }
@keyframes embed-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .embed iframe { transition: none; } }

/* About: retrato en blanco y negro a un lado y texto al otro */
.about { display: grid; grid-template-columns: 1fr; gap: var(--s8); width: 100%; max-width: 980px; align-items: start; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s16); } .about .portrait { position: sticky; top: var(--s10); } }
.portrait { position: relative; width: 100%; max-width: 420px; background: #111; overflow: hidden; }
.portrait img { display: block; width: 100%; height: auto; } /* el blanco y negro ya viene en el archivo de Nacho (sin filtro) */
/* al pasar el cursor: la foto de Nacho solo, a color, encima y con un fundido */
.portrait img.alt { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
@media (hover: hover) and (pointer: fine) { .portrait:hover img.alt { opacity: 1; } }
/* Elegida por Nacho (2026-11-18): LUPA. Al pasar el cursor, un círculo de color (la foto de Nacho solo) sigue al cursor
   sobre la foto en blanco y negro; el script de aboutBlock pone --x/--y. Con "reducir movimiento", queda el fundido. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .portrait { cursor: none; }
  .portrait img.alt { opacity: 1; clip-path: circle(0 at var(--x, 50%) var(--y, 50%)); transition: clip-path .45s cubic-bezier(.2,.7,.2,1); }
  .portrait:hover img.alt { clip-path: circle(24% at var(--x, 50%) var(--y, 50%)); }
}
.about .prose h1 { font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.about .prose { max-width: 480px; }

/* Texto (About / Contact) */
.prose { display: grid; gap: var(--s4); max-width: 520px; width: 100%; font-size: 15px; line-height: 1.55; }
.prose h1 { font-size: 15px; font-weight: 500; }
.prose a { border-bottom: 1px solid var(--ink); }
@media (hover: hover) and (pointer: fine) { .prose a:hover { color: var(--accent); border-color: var(--accent); } }
.note { color: var(--muted); font-size: 12px; }

/* ---------- Portada: recuadro | nombre | recuadro ---------- */
.home { min-height: 100svh; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0; padding: var(--s8) var(--s8); position: relative; }
.home .brand { font-size: clamp(36px, 6vw, 96px); text-align: center; line-height: .95; letter-spacing: -.01em; position: relative; z-index: 3; margin-inline: calc(clamp(36px, 6vw, 96px) * -1); white-space: nowrap; }
.home .lang { position: absolute; top: var(--s10); right: var(--s8); font-size: 13px; font-style: italic; }
@media (hover: hover) and (pointer: fine) { .home .lang:hover { color: var(--accent); } }
.box { position: relative; width: 100%; max-width: 640px; aspect-ratio: 4 / 3; overflow: hidden; display: grid; align-items: end; justify-items: start; padding: var(--s4) var(--s6); background: #eee; }
.box.film { justify-self: end; }
.box.photo { justify-self: start; }
.box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.box span { position: relative; color: #fff; font-weight: 600; font-size: clamp(16px, 1.6vw, 22px); letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
@media (hover: hover) and (pointer: fine) { .box:hover span { color: var(--accent); text-shadow: none; } }
@media (max-width: 799px) {
  .home { grid-template-columns: 1fr; justify-items: center; align-content: center; padding: var(--s16) var(--s4) var(--s8); gap: var(--s6); }
  .home .brand { order: -1; margin-inline: 0; font-size: 44px; }
  .box, .box.film, .box.photo { justify-self: stretch; max-width: none; }
  .home .lang { top: var(--s4); right: var(--s4); }
}


/* ---------- Portada v2: nombre animado + dos ventanas con fotogramas ---------- */
:root { --display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }

.home2 { position: relative; min-height: 100svh; overflow: hidden; }
.home2 .lang { position: absolute; top: var(--s10); right: var(--s8); z-index: 5; font-size: 13px; font-style: italic; }
@media (hover: hover) and (pointer: fine) { .home2 .lang:hover { color: var(--accent); } }

.home2 .name { position: absolute; z-index: 3; left: 5vw; top: 50%; transform: translateY(-50%); margin: 0; font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(64px, 11.5vw, 190px); line-height: .86; letter-spacing: -.045em; color: var(--accent); }
.home2 .name .ln { display: block; overflow: hidden; padding: .06em .08em .1em 0; }
.home2 .name .ln span { display: block; transform: translateY(112%); animation: name-rise 1.3s cubic-bezier(.2, .75, .1, 1) .1s forwards; }
.home2 .name .ln:nth-child(2) span { animation-delay: .26s; margin-left: .55em; }
@keyframes name-rise { to { transform: none; } }

.win { position: absolute; z-index: 2; display: block; opacity: 0; animation: win-in 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.win.film { right: 5vw; top: 9vh; width: 41vw; animation-delay: .75s; }
.win.photo { left: 35vw; bottom: 7vh; width: 17vw; animation-delay: 1s; }
@keyframes win-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.win .shape { position: relative; overflow: hidden; background: #e9e9e9; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.win.film .shape { aspect-ratio: 16 / 10; border-radius: 30px; }
.win.photo .shape { aspect-ratio: 3 / 4; border-radius: 999px 999px 18px 18px; }   /* arco */
@media (hover: hover) and (pointer: fine) { .win:hover .shape { transform: translateY(-6px); } }
.win .word { display: flex; align-items: baseline; gap: var(--s3); margin-top: var(--s3); font-family: var(--display); font-style: italic; font-size: clamp(30px, 3.2vw, 56px); line-height: 1; letter-spacing: -.02em; }
.win .word em { font-family: var(--font); font-size: 11px; font-style: normal; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .win:hover .word { color: var(--accent); } }

.frames { position: absolute; inset: 0; }
.frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation-duration: calc(var(--n) * var(--slot)); animation-iteration-count: infinite; animation-delay: calc(var(--i) * var(--slot)); animation-timing-function: linear; }
/* VÍDEO: cortes secos, como un montaje; cada fotograma avanza un poco */
.frames.cut img { animation-name: frame-cut; }
@keyframes frame-cut { 0% { opacity: 1; transform: scale(1); } calc(100% / 11 - .1%) { opacity: 1; transform: scale(1.06); } calc(100% / 11) { opacity: 0; } 100% { opacity: 0; } }
/* FOTO: fundidos lentos y tranquilos */
.frames.dissolve img { animation-name: frame-dissolve; }
@keyframes frame-dissolve { 0% { opacity: 0; } 4% { opacity: 1; } 19% { opacity: 1; } 24% { opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 799px) {
  .home2 { display: grid; gap: var(--s8); align-content: start; padding: var(--s16) var(--s4) var(--s12); }
  .home2 .name, .win { position: static; transform: none; }
  .home2 .name { font-size: 24vw; margin-top: var(--s4); }
  .home2 .lang { top: var(--s4); right: var(--s4); }
  .win.film, .win.photo { width: 100%; }
  .win.photo { width: 66%; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  .home2 .name .ln span, .win { animation: none; transform: none; opacity: 1; }
  .frames img { animation: none; }
  .frames img:first-child { opacity: 1; }
}


/* ---------- Portada v3: minimal, dos fotos verticales pegadas ---------- */
.home3 { --h: min(76svh, 46vw); position: relative; min-height: 100svh; display: grid; place-items: center; padding: var(--s8) var(--s8) var(--s8) calc(var(--s8) + 160px); }
.home3 .lang { position: absolute; top: var(--s10); right: var(--s8); font-size: 13px; font-style: italic; }
@media (hover: hover) and (pointer: fine) { .home3 .lang:hover { color: #6d1a2b; } }
.name3 { position: absolute; left: var(--s8); top: 50%; transform: translateY(-50%); margin: 0; z-index: 2; font-size: clamp(22px, 2.1vw, 32px); font-weight: 600; line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; color: #6d1a2b; }
.name3 a { display: block; }
.pair { display: grid; grid-template-columns: repeat(2, calc(var(--h) * .75)); gap: var(--s3); }
.cell { display: grid; gap: var(--s3); }
.cell .ph { aspect-ratio: 3 / 4; overflow: hidden; background: #eee; }
.cell .ph img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) and (pointer: fine) { .cell:hover .ph img { transform: scale(1.04); transition: transform 8s cubic-bezier(.12, .5, .3, 1); } }
.cell .lbl { font-size: 12px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; }
@media (hover: hover) and (pointer: fine) { .cell:hover .lbl { color: #6d1a2b; } }
@media (max-width: 799px) {
  .home3 { --h: calc((100vw - 44px) / 2 / .75); place-items: start center; align-content: center; padding: var(--s16) var(--s4) var(--s8); gap: var(--s6); }
  .name3 { position: static; transform: none; justify-self: start; font-size: 22px; }
  .home3 .lang { top: var(--s4); right: var(--s4); }
}
@media (prefers-reduced-motion: reduce) { @media (hover: hover) and (pointer: fine) { .cell .ph img, .cell:hover .ph img { transition: none; transform: none; } } }


/* ---------- Portada v4 (laboratorio): estructura de las pruebas de Nacho ---------- */
body.home-body { --ink: #1c1b19; --nc: var(--accent); }
body[data-theme="paper"] { --bg: #efece6; --ink: #1c1b19; }
body[data-theme="sand"]  { --bg: #d4cabc; --ink: #1c1b19; }
body[data-theme="ink"]   { --bg: #1a1a19; --ink: #ecebe6; }
body[data-theme="olive"] { --bg: #565c4e; --ink: #ecebe3; }
body[data-theme="mist"]  { --bg: #d3dae0; --ink: #1c1b19; }
body[data-theme="cream"] { --bg: #f1e9de; --ink: #1c1b19; }
body[data-accent="red"] { --nc: #b03a3a; }
body[data-accent="ink"] { --nc: var(--ink); }
body.home-body { color: var(--ink); }

.home4 { --w: min(calc((100vw - 18vw - 28px) / 3), 56svh); min-height: 100svh; display: grid; grid-template-columns: repeat(3, var(--w)); column-gap: 14px; justify-content: center; align-content: center; align-items: start; padding: var(--s8) 0; position: relative; }
.home4 .lang { position: absolute; top: var(--s10); right: var(--s8); font-size: 13px; font-style: italic; color: var(--ink); }
.nm { position: relative; color: var(--nc); display: grid; gap: var(--s6); justify-items: start; align-content: start; }
.nm a { display: grid; gap: 2px; font-size: clamp(17px, 1.75vw, 26px); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; line-height: 1.15; width: max-content; }
.nm .r1 { display: flex; align-items: center; gap: var(--s3); }
.nm .r1 b { font-weight: 500; }
.nm .cl { display: none; height: 1px; background: currentColor; width: 5vw; }
body[data-deco="connect"] .nm .cl { display: block; }
.nm .d { display: block; background: currentColor; }
body[data-deco="none"] .nm .d { display: none; }
body[data-deco="under"] .nm .d { width: 56px; height: 1px; }
body[data-deco="double"] .nm .d { width: 56px; height: 5px; background: none; border-block: 1px solid currentColor; }
body[data-deco="vline"] .nm .d { width: 1px; height: 22svh; transform-origin: top; animation: draw-down 1.6s cubic-bezier(.6, 0, .2, 1) .5s both; }
@keyframes draw-down { from { transform: scaleY(0); } to { transform: scaleY(1); } }
body[data-deco="slash"] .nm .d { width: 1px; height: 30px; transform: rotate(24deg); transform-origin: top left; margin-left: 12px; }
body[data-deco="connect"] .nm .d { display: none; }

.pair4 { display: contents; }
.cell4 { display: grid; gap: var(--s4); }
.cell4 .ph { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: rgba(128, 128, 128, .2); }
.cell4 .ph img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) and (pointer: fine) { .cell4:hover .ph img, .cell4:focus-visible .ph img { transform: scale(1.035); filter: grayscale(1); transition: transform 8s cubic-bezier(.12, .5, .3, 1), filter var(--dur-enter) ease; } }
.cell4 .lbl { font-size: 11px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: var(--nc); }
.cell4 .ph img { transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter var(--dur-enter) ease; }

.lab { position: fixed; left: var(--s4); bottom: var(--s4); z-index: 20; display: grid; gap: var(--s2); padding: var(--s3) var(--s3) var(--s3); background: rgba(255, 255, 255, .88); backdrop-filter: blur(6px); border: 1px solid rgba(0, 0, 0, .12); border-radius: 12px; color: #1c1b19; font-size: 11px; max-width: calc(100vw - 32px); }
.lab p { margin: 0; letter-spacing: .18em; text-transform: uppercase; color: #77726b; font-size: 10px; }
.lab .row { display: flex; flex-wrap: wrap; gap: 6px; }
.lab button { all: unset; cursor: pointer; box-sizing: border-box; }
.lab .row:not(.txt) button { width: 22px; height: 22px; border-radius: 50%; background: var(--s); border: 1px solid rgba(0, 0, 0, .25); }
.lab .row:not(.txt) button.on { outline: 2px solid #1c1b19; outline-offset: 2px; }
.lab .row.txt button { padding: 3px 8px; border: 1px solid rgba(0, 0, 0, .2); border-radius: 999px; }
.lab .row.txt button.on { background: #1c1b19; color: #fff; }

@media (max-width: 799px) {
  .home4 { --w: calc((100vw - 32px - 14px) / 2); grid-template-columns: repeat(2, var(--w)); padding: var(--s16) var(--s4) 120px; row-gap: var(--s6); justify-content: start; align-content: start; }
  .home4 .nm { grid-column: 1 / -1; }
  .home4 .lang { top: var(--s4); right: var(--s4); }
  body[data-deco="vline"] .nm .d { height: 56px; }
}
@media (prefers-reduced-motion: reduce) { body[data-deco="vline"] .nm .d { animation: none; } @media (hover: hover) and (pointer: fine) { .cell4 .ph img, .cell4:hover .ph img, body.home-body { transition: none; transform: none; } } }

/* Opciones del panel de pruebas */
body[data-near="near"] .nm { padding-left: calc(var(--w) * .10); }
body[data-size="s"] .nm a { font-size: clamp(15px, 1.5vw, 22px); }
.cell4 .ph { position: relative; }
.cell4.c-film .ph img { position: absolute; inset: 0; }
.cell4.c-film .ph img.alt { display: none; }
body[data-film="wc"] .cell4.c-film .ph img.a { display: none; }
body[data-film="wc"] .cell4.c-film .ph img.alt { display: block; }
.lab .lg { margin-top: 2px; letter-spacing: .1em; text-transform: none; font-size: 10px; color: #77726b; }
.lab { max-height: calc(100svh - 32px); overflow: auto; }
@media (max-width: 799px) { body[data-near="near"] .nm { padding-left: 0; } }

/* Detalle (misma forma que el del nombre) junto a FILM y PHOTO: al lado o debajo */
.cell4 .lbl { display: inline-flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.cell4 .lbl .ld { display: none; background: currentColor; width: 1px; height: 14px; }
body[data-deco="slash"] .cell4 .lbl .ld { transform: rotate(24deg); }
body[data-deco="none"] .cell4 .lbl .ld { width: 20px; height: 1px; }
body[data-lbl="beside"] .cell4 .lbl .ld { display: inline-block; }
body[data-lbl="below"] .cell4 .lbl { display: grid; gap: var(--s3); justify-items: start; }
body[data-lbl="below"] .cell4 .lbl .ld { display: block; }
body[data-lbl="below"][data-deco="vline"] .cell4 .lbl .ld { height: 24px; }
body[data-lbl="below"][data-deco="slash"] .cell4 .lbl .ld { height: 22px; margin-left: 6px; transform-origin: top left; }


/* ---------- Portada: trabajo visible al hacer scroll ---------- */
.home4 { padding-bottom: 96px; }
.cue { position: absolute; left: 50%; bottom: var(--s6); transform: translateX(-50%); color: var(--accent); font-size: 18px; line-height: 1; }
.home-body .cue { position: absolute; top: calc(100svh - 56px); bottom: auto; }
.below { --w: min(calc((100vw - 18vw - 28px) / 3), 56svh); width: calc(var(--w) * 3 + 28px); margin: 0 auto; padding-bottom: 128px; display: grid; gap: 96px; }
.hp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s4); font-size: 12px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.hp-head a { font-weight: 500; letter-spacing: .12em; }
@media (hover: hover) and (pointer: fine) { .hp-head a:hover { text-decoration: underline; text-underline-offset: 4px; } }
.hp-photo, .hp-film { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hp-photo a, .hp-film a { position: relative; display: block; overflow: hidden; background: rgba(128, 128, 128, .2); }
.hp-photo a { aspect-ratio: 4 / 5; }
.hp-filmwrap { container-type: inline-size; }
.hp-film { grid-auto-flow: dense; grid-auto-rows: calc((100cqw - 28px) / 3 * 9 / 16); }
.hp-film a.big { grid-column: span 2; grid-row: span 2; }
.hp-film a.w2 { grid-column: span 2; }
.hp-photo img, .hp-film img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.hp-photo a::after, .hp-film a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,0) 45%); opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.hp-photo .nm, .hp-film .nm { position: absolute; left: var(--s4); bottom: var(--s4); z-index: 1; color: #fff; font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); pointer-events: none; text-align: left; max-width: calc(100% - 32px); }
@media (hover: hover) and (pointer: fine) { .hp-photo a:hover img, .hp-film a:hover img { transform: scale(1.04); transition: transform 8s cubic-bezier(.12, .5, .3, 1); } }
@media (hover: hover) and (pointer: fine) { .hp-photo a:hover::after, .hp-film a:hover::after { opacity: 1; } }
@media (hover: hover) and (pointer: fine) { .hp-photo a:hover .nm, .hp-film a:hover .nm { opacity: 1; transform: none; } }
@media (max-width: 799px) {
  .below { --w: calc((100vw - 32px - 14px) / 2); width: calc(100% - 32px); gap: 64px; }
  .hp-photo { grid-template-columns: repeat(2, 1fr); }
  .hp-film { grid-template-columns: repeat(2, 1fr); grid-auto-rows: calc((100cqw - 14px) / 2 * 9 / 16); }
}
@media (prefers-reduced-motion: reduce) { @media (hover: hover) and (pointer: fine) { .hp-photo img, .hp-film img, .hp-photo a:hover img, .hp-film a:hover img { transition: none; transform: none; } } }


/* Portada → FILM: el menú aparece al bajar; "FILM" y el scroll llevan al mismo sitio */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.home-page .side { opacity: 0; pointer-events: none; transition: opacity .6s ease; }
body.scrolled .home-page .side { opacity: 1; pointer-events: auto; }
.home-page { position: relative; }
@media (max-width: 899px) { .home-page .side { opacity: 1; pointer-events: auto; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .home-page .side { transition: none; } }


/* ---------- Portada: el nombre entra suave, letra a letra de izquierda a derecha (fundido + deslizamiento) ----------
   Después se dibuja la raya diagonal y aparece la flecha. */
.home-body .nm .ch { display: inline-block; animation: soft-in 1.1s cubic-bezier(.22, .8, .2, 1) both; animation-delay: calc(.05s + var(--i) * 38ms); }
@keyframes soft-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.home-body[data-deco="slash"] .nm .d { transform-origin: top left; animation: soft-draw .7s cubic-bezier(.4, 0, .2, 1) .95s both; }
@keyframes soft-draw { from { scale: 1 0; opacity: 0; } to { scale: 1 1; opacity: 1; } }
.home-body .cue { opacity: 0; animation: cue-in .8s ease 1.3s forwards, cue-bob 2.6s ease-in-out 2.1s infinite; }
@keyframes cue-in { to { opacity: 1; } }
@keyframes cue-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 7px; } }
@media (prefers-reduced-motion: reduce) {
  .home-body .nm .ch, .home-body[data-deco="slash"] .nm .d, .home-body .cue { animation: none; opacity: 1; }
}

/* ---------- FILM: reel reproduciéndose y proyectos con el estilo de PHOTO ---------- */
.film-block { display: grid; gap: var(--s8); width: 78%; margin-inline: auto; }
.reel-embed { aspect-ratio: 16 / 9; background: #000; width: 100%; overflow: hidden; }
.reel-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.work.vfilm { --cols: 2; grid-template-columns: repeat(var(--cols), 1fr); gap: var(--s6); }
.work.vfilm a { aspect-ratio: 16 / 9; }
@media (max-width: 599px) { .work.vfilm { grid-template-columns: 1fr; gap: var(--s6); } }


/* ---------- Portada continua: Film, Photo, About, Contact en una sola página ---------- */
.chapter { min-height: 100svh; }
.chapter .content { padding-top: var(--s16); }
@media (min-width: 900px) { .chapter .content { padding-top: var(--s12); } }

/* Reel más pequeño y alineado a la izquierda de la rejilla */
.reel-embed { width: 100%; }
@media (max-width: 899px) { .film-block { width: 100%; } }

/* Proyectos de FILM en composición editorial: formas horizontales y verticales con desplazamientos */
.work.fcomp { grid-template-columns: repeat(12, 1fr); gap: var(--s12) 1.4vw; align-items: start; }
.work.fcomp a { grid-column: var(--s) / span var(--w); aspect-ratio: var(--ar); margin-top: var(--t); }
.work.fcomp a img { object-position: var(--op); }
@media (max-width: 699px) {
  .work.fcomp { grid-template-columns: 1fr; gap: var(--s6); }
  .work.fcomp a { grid-column: 1 / -1; margin-top: 0; }
  .work.fcomp a[data-shape="v"] { width: 78%; }
  .work.fcomp a[data-shape="v"]:nth-of-type(even) { justify-self: end; }
}

/* Móvil: en la portada continua el menú queda fijo arriba, compacto, y las secciones dejan hueco bajo él */
@media (max-width: 899px) {
  .home-page .side { position: sticky; top: 0; z-index: 8; background: var(--bg); padding: var(--s3) var(--s4); gap: 0; }
  .home-page .side .brand, .home-page .side .pager { display: none; }
  .home-page .side .menu { gap: var(--s4); flex-wrap: wrap; }
  .chapter { scroll-margin-top: 44px; }
  .chapter .content { padding-top: var(--s8); }
}


/* Símbolo de PLAY en las portadas de vídeo (para distinguirlas de las fotos) */
.work.vfilm a::before { content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; z-index: 1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .9); background: rgba(20, 16, 14, .38) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") 54% 50% / 22px no-repeat; pointer-events: none; transition: transform .45s cubic-bezier(.2, .7, .2, 1), background-color .35s ease, border-color .35s ease; }
@media (hover: hover) and (pointer: fine) {
  .work.vfilm a:hover::before { transform: scale(1.12); background-color: var(--accent); border-color: var(--accent); }
}


/* ==== Tarjetas de Film y Photo (versión final de esta ronda) ====
   La foto va dentro de .ph; el nombre (.cap) vive DEBAJO, fuera del marco, y aparece al pasar el cursor
   con la barrita diagonal al lado. La foto se pone en blanco y negro y mantiene su zoom lento. */
.work a { display: grid; align-content: start; gap: var(--s3); aspect-ratio: auto; overflow: visible; background: none; }
.work.vfilm a { aspect-ratio: auto; }
.work a::after { content: none !important; }
.work .ph { display: block; position: relative; overflow: hidden; background: rgba(128, 128, 128, .2); aspect-ratio: 3 / 4; }
.work.vfilm .ph { aspect-ratio: 16 / 9; }
.work .ph img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); filter: none; transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .5s ease; }
.work .cap { display: flex; align-items: center; gap: var(--s3); min-height: 18px; color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; opacity: 0; transform: translateY(-4px); transition: opacity .4s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.work .cap::after { content: ""; width: 1px; height: 14px; flex: none; background: currentColor; transform: rotate(24deg); }
@media (hover: hover) and (pointer: fine) {
  .work a:hover .ph img, .work a:focus-visible .ph img { transform: scale(1.05); filter: grayscale(1); transition: transform 8s cubic-bezier(.12, .5, .3, 1), filter .5s ease; }
  .work a:hover .cap, .work a:focus-visible .cap { opacity: 1; transform: none; }
}
@media (hover: none) { .work .cap { opacity: 1; transform: none; } }

/* Símbolo de play: pequeño, sin círculo y en una esquina (abajo a la izquierda), no en el centro */
.work.vfilm a::before { content: none; }
.work.vfilm .ph::before { content: ""; position: absolute; left: 12px; bottom: 11px; width: 18px; height: 18px; z-index: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M7 4.5v15l13-7.5z'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .work .ph img, .work .cap { transition: none; } }


/* ==== Ajustes finos: sin barrita en los títulos, play aún más pequeño, zoom algo más suave ==== */
.work .cap::after { content: none; }
.work.vfilm .ph::before { width: 12px; height: 12px; left: 10px; bottom: 9px; }
@media (hover: hover) and (pointer: fine) {
  .work a:hover .ph img, .work a:focus-visible .ph img { transform: scale(1.035); }
}


/* ==== Panel de pruebas de menús (Film y Photo): variantes ==== */
.lab.right { left: auto; right: var(--s4); bottom: var(--s4); width: min(300px, calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow: auto; }
.lab-toggle { all: unset; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s3); width: 100%; box-sizing: border-box; letter-spacing: .14em; text-transform: uppercase; color: #77726b; font-size: 10px; }
.lab.closed .lab-body { display: none; }
.lab-body { display: grid; gap: var(--s2); margin-top: var(--s2); }

/* Tamaño: columnas */
.work:not(.vfilm) { --cols: 3; grid-template-columns: repeat(var(--cols), 1fr); }
body[data-gsize="s"] .work:not(.vfilm) { --cols: 4; }
body[data-gsize="l"] .work:not(.vfilm) { --cols: 2; }
body[data-gsize="s"] .work.vfilm { --cols: 3; }
body[data-gsize="l"] .work.vfilm { --cols: 1; }
/* Espacio */
body[data-ggap="tight"] .work { gap: 10px; }
body[data-ggap="wide"] .work { gap: 72px 5vw; }
/* Color de los títulos */
body[data-gink="ink"] .work .cap { color: var(--ink); }
body[data-gink="olive"] .work .cap { color: #5d6b3b; }
/* Letra de los títulos */
body[data-gtype="lower"] .work .cap, body[data-gtype="italic"] .work .cap { font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 500; }
body[data-gtype="italic"] .work .cap { font-style: italic; }
/* Título siempre visible */
body[data-gcap="always"] .work .cap { opacity: 1; transform: none; }
/* Efecto al pasar el cursor */
@media (hover: hover) and (pointer: fine) {
  body[data-ghover="color"] .work a:hover .ph img, body[data-ghover="color"] .work a:focus-visible .ph img { filter: none; }
  body[data-ghover="dim"] .work a:hover .ph img, body[data-ghover="dim"] .work a:focus-visible .ph img { filter: brightness(.72); }
  body[data-ghover="none"] .work a:hover .ph img, body[data-ghover="none"] .work a:focus-visible .ph img { filter: none; transform: none; }
}
/* Disposición escalonada */
body[data-glay="stagger"] .work { align-items: start; }
body[data-glay="stagger"] .work.vfilm a:nth-child(even) { margin-top: 64px; }
body[data-glay="stagger"][data-gsize="m"] .work:not(.vfilm) a:nth-child(3n+2) { margin-top: 64px; }
body[data-glay="stagger"][data-gsize="s"] .work:not(.vfilm) a:nth-child(even), body[data-glay="stagger"][data-gsize="l"] .work:not(.vfilm) a:nth-child(even) { margin-top: 64px; }
body[data-glay="stagger"][data-gsize="s"] .work.vfilm a:nth-child(3n+2) { margin-top: 64px; }
body[data-glay="stagger"][data-gsize="s"] .work.vfilm a:nth-child(even) { margin-top: 0; }
/* Disposición en tira horizontal */
body[data-glay="strip"] .work { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 20px; scrollbar-width: thin; }
body[data-glay="strip"] .work a { flex: 0 0 var(--sw, 280px); scroll-snap-align: start; margin-top: 0; }
body[data-glay="strip"] .work.vfilm { --sw: min(46vw, 460px); }
body[data-glay="strip"] .work:not(.vfilm) { --sw: min(28vw, 300px); }
/* Disposición en lista tipográfica: el nombre manda y la portada aparece a la derecha al pasar el cursor */
.work { counter-reset: wk; }
.work a { counter-increment: wk; }
body[data-glay="list"] .work { display: block; }
body[data-glay="list"] .work a { position: relative; display: block; margin-top: 0; padding: var(--s4) 0; border-bottom: 1px solid rgba(128, 128, 128, .35); }
body[data-glay="list"] .work .cap { opacity: 1; transform: none; min-height: 0; gap: var(--s6); align-items: baseline; font-size: clamp(20px, 2.4vw, 36px); letter-spacing: -.02em; text-transform: none; font-weight: 400; }
body[data-glay="list"] .work .cap::before { content: counter(wk, decimal-leading-zero); font-size: 12px; letter-spacing: .2em; color: var(--muted); flex: none; }
body[data-glay="list"] .work .ph { position: absolute; right: 0; top: 50%; width: 220px; transform: translateY(-50%); opacity: 0; pointer-events: none; z-index: 3; transition: opacity .3s ease; }
body[data-glay="list"] .work.vfilm .ph { width: 280px; }
@media (hover: hover) and (pointer: fine) { body[data-glay="list"] .work a:hover .ph { opacity: 1; } body[data-glay="list"] .work a:hover .cap { color: var(--accent); } }
@media (hover: none) { body[data-glay="list"] .work .ph { display: none; } }
@media (max-width: 699px) {
  .work.vfilm { --cols: 1; }
  body[data-gsize="s"] .work:not(.vfilm), body[data-gsize="m"] .work:not(.vfilm), body[data-gsize="l"] .work:not(.vfilm) { --cols: 2; }
  body[data-glay="strip"] .work.vfilm, body[data-glay="strip"] .work:not(.vfilm) { --sw: 70vw; }
}

/* ==== Sistema de movimiento (guía web-motion): tiempos, respuesta al toque, movimiento reducido y transición entre páginas ==== */
:root {
  --dur-press: 120ms;   /* una pulsación responde */
  --dur-leave: 180ms;   /* lo que se va; fundidos */
  --dur-enter: 320ms;   /* lo que llega */
  --ease-enter: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
}
html, body { overflow-x: clip; }
body { -webkit-tap-highlight-color: transparent; }   /* lo sustituyen nuestros estados al pulsar */

/* Responder en el primer fotograma al tocar: las tarjetas (grandes) se encogen poco, los textos algo más */
:where(.work a, .cell4) { transition: transform var(--dur-press) var(--ease-out); }
:where(.work a, .cell4):active { transform: scale(.985); }
:where(.menu a, .lang, .back, .pager a) { transition: transform var(--dur-press) var(--ease-out), color var(--dur-press) ease; transform-origin: left center; }
:where(.menu a, .lang, .back, .pager a):active { transform: scale(.97); }

/* Zonas táctiles de al menos 44 px en pantallas táctiles */
@media (pointer: coarse) {
  .menu a, .pager a, .back, .lang { padding-block: 13px; }
  .home-page .side { padding-block: var(--s2); }
}

/* Transición entre páginas (navegadores que la soportan): fundido suave; el menú se queda quieto */
@view-transition { navigation: auto; }
.side { view-transition-name: side; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
::view-transition-old(root) { animation: vt-out var(--dur-leave) var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in var(--dur-enter) var(--ease-enter) both; }

/* Movimiento reducido: un solo interruptor que apaga TODA animación y transición, incluso las futuras */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* La flecha de scroll: zona táctil cómoda en pantallas táctiles */
@media (pointer: coarse) { .home-body .cue { padding: 14px 16px; top: calc(100svh - 74px); } }

/* ==== Barrita diagonal junto a FILM, PHOTO y los títulos de proyectos: al pasar el cursor se dibuja de abajo a arriba ==== */
.cell4 .lbl::after, .work .cap::after { content: ""; display: inline-block; flex: none; width: 1px; height: 14px; margin-left: 12px; background: currentColor; transform-origin: 50% 100%; transform: rotate(24deg) scaleY(0); transition: transform var(--draw-dur) var(--draw-ease); }
@media (hover: hover) and (pointer: fine) {
  .cell4:hover .lbl::after, .cell4:focus-visible .lbl::after, .work a:hover .cap::after, .work a:focus-visible .cap::after { transform: rotate(24deg) scaleY(1); }
}
@media (hover: none) { .work .cap::after { transform: rotate(24deg) scaleY(1); } }


/* ==== Un solo gesto para todas las barritas: se dibujan de abajo a arriba, igual de lentas y suaves ==== */
:root { --draw-dur: 560ms; --draw-ease: cubic-bezier(.35, .05, .2, 1); }
.home-body[data-deco="slash"] .nm .d {
  margin-left: 0; transform: rotate(24deg) scaleY(0); transform-origin: 50% 100%;
  animation: draw-up var(--draw-dur) var(--draw-ease) .95s forwards;
}
@keyframes draw-up { to { transform: rotate(24deg) scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .home-body[data-deco="slash"] .nm .d { transform: rotate(24deg) scaleY(1); } }


/* ==== Entrada del nombre: cada línea SUBE de abajo a arriba desde detrás de una máscara (mismo gesto, tiempo y curva que las barritas) ==== */
.home-body .nm a .r1, .home-body .nm a .r2 { display: block; overflow: hidden; padding-top: .45em; margin-top: -.45em; }
.home-body .nm .ch { display: inline-block; transform: translateY(120%); animation: rise-in var(--draw-dur) var(--draw-ease) .1s both; }
.home-body .nm .r2 .ch { animation-delay: .22s; }
@keyframes rise-in { from { transform: translateY(120%); } to { transform: none; } }
.home-body[data-deco="slash"] .nm .d { animation-delay: .85s; }

/* ==== Contact: 3 diseños conmutables (data-cv en el body) ==== */
.contact { width: 100%; max-width: 1100px; }
.contact .cv { display: none; }
.contact .cv3 { display: grid; }
.contact h1 { color: var(--accent); font-weight: 400; letter-spacing: -.035em; line-height: .95; font-size: clamp(44px, 7vw, 92px); }
.contact p { font-size: 15px; line-height: 1.55; max-width: 34ch; }
.contact a { transition: color var(--dur-enter) ease; }
.cv { grid-template-columns: 1fr; gap: var(--s8); align-items: center; }
.cv-text { display: grid; gap: var(--s6); align-content: center; }
.cv-photo, .cv-strip { margin: 0; }
.cv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dash { display: block; width: 24px; height: 1px; background: var(--accent); }
@media (min-width: 900px) { .cv { gap: var(--s16); min-height: min(76svh, 640px); } .cv1 { grid-template-columns: 5fr 6fr; } .cv3 { grid-template-columns: 5fr 6fr; } .cv4 { grid-template-columns: 5fr 6fr; } }
/* 1 · foto y texto */
.cv1 .cv-photo { aspect-ratio: 4 / 5; }
@media (min-width: 900px) { .cv1 .cv-photo { aspect-ratio: auto; height: min(76svh, 640px); } }
.cv-arrow { font-size: 22px; color: var(--accent); width: 44px; }
.cv1 dl { display: grid; gap: var(--s4); margin-top: var(--s4); }
.cv1 dl a { display: grid; grid-template-columns: 84px 1fr; gap: var(--s4); align-items: baseline; font-size: 14px; }
.cv1 dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.cv1 dd { margin: 0; }
/* 3 · información en vertical */
.cv3 .cv-photo { aspect-ratio: 3 / 4; max-width: 340px; width: 100%; }
@media (min-width: 900px) { .cv3 .cv-photo { max-width: none; } .cv3 .cv-text { border-left: 1px solid rgba(28,27,25,.18); padding-left: var(--s16); } }
.cv3 .contact h1, .cv3 h1 { font-size: clamp(36px, 4.4vw, 56px); }
.cv3 ul { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; }
.cv3 li { border-bottom: 1px solid rgba(28,27,25,.14); }
.cv3 li:last-child { border-bottom: 0; }
.cv3 li a { display: flex; align-items: center; gap: var(--s6); padding: var(--s4) 0; color: var(--ink); min-height: 44px; }
.cv3 li svg { color: var(--accent); flex: none; }
.cv3 li span { display: grid; gap: 2px; font-size: 14px; }
.cv3 li small { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
/* 4 · hoja de contactos */
.cv4 .words { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; line-height: 1.7; }
.cv4 .plain { display: grid; gap: var(--s2); font-size: 14px; }
.cv4 .plain a { min-height: 28px; }
.cv-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #0c0c0b; padding: 8px 14px; }
.cv-strip img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; filter: grayscale(1) contrast(1.05); display: block; }
@media (hover: hover) and (pointer: fine) {
  .cv1 dl a:hover, .cv3 li a:hover, .cv4 .plain a:hover, .cv-arrow:hover { color: var(--ink); }
}
/* panel de pruebas (temporal) */
.cv-pick { position: fixed; right: var(--s4); bottom: var(--s4); z-index: 20; display: flex; align-items: center; gap: var(--s2); background: var(--bg); border: 1px solid rgba(28,27,25,.25); padding: 6px 10px; font-size: 12px; }
.cv-pick span { color: var(--accent); margin-right: 4px; }
.cv-pick button { font: inherit; min-width: 32px; min-height: 32px; border: 1px solid rgba(28,27,25,.25); background: none; color: var(--ink); cursor: pointer; }
.cv-pick button[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.home-page .cv-pick { display: none; }
body.scrolled .home-page .cv-pick { display: flex; }
@media (min-width: 900px) { .contact { padding-left: 6vw; } }

.cv3 .cv-photo { aspect-ratio: 4 / 5; max-width: 420px; } .cv3 .cv-photo img { object-position: 30% 50%; }

/* Contact v2: foto ancha entera y los tres datos en fila debajo */
.contact .cv3 { grid-template-columns: 1fr; gap: var(--s8); min-height: 0; align-items: start; }
.cv3 .cv-photo { aspect-ratio: 16 / 9; max-width: none; width: 100%; }
.cv3 .cv-photo img { object-position: 50% 50%; }
.cv3 .cv-text { border-left: 0; padding-left: 0; gap: var(--s8); }
.cv3 .cv-head { display: grid; gap: var(--s4); align-content: start; }
@media (min-width: 900px) {
  .contact .cv3 { gap: var(--s10); }
  .cv3 .cv-text { grid-template-columns: 4fr 7fr; gap: var(--s16); align-items: start; }
  .cv3 ul { grid-template-columns: repeat(3, 1fr); gap: var(--s6); margin: 0; }
  .cv3 li { border-bottom: 0; border-top: 1px solid rgba(28,27,25,.18); }
  .cv3 li a { align-items: flex-start; flex-direction: column; gap: var(--s3); padding: var(--s4) 0 0; }
  .cv3 li span { overflow-wrap: anywhere; }
}

/* Contact: la foto llega hasta el borde derecho de la pantalla */
.content:has(.contact) { padding-right: 0; justify-items: stretch; }
.contact { max-width: none; padding-left: 0; }
.cv3 .cv-photo { max-height: 82svh; }
.cv3 .cv-text { padding-right: var(--s4); max-width: 1100px; }
@media (min-width: 900px) { .cv3 .cv-text { padding-right: 3vw; padding-left: 0; } .content:has(.contact) { padding-left: 3vw; } }

/* Contact: los tres datos uno debajo del otro */
@media (min-width: 900px) {
  .cv3 ul { grid-template-columns: 1fr; gap: 0; }
  .cv3 li { border-top: 0; border-bottom: 1px solid rgba(28,27,25,.14); }
  .cv3 li:first-child { border-top: 1px solid rgba(28,27,25,.14); }
  .cv3 li a { flex-direction: row; align-items: center; gap: var(--s6); padding: var(--s4) 0; }
}

/* Contact: raya diagonal (la misma del nombre) y texto algo más ancho */
.cv3 .dash { width: 1px; height: 28px; margin: var(--s2) 0 var(--s2) var(--s3); transform: rotate(24deg); }
.contact .cv3 p { max-width: 40ch; }

/* Contact: "Hablemos." en cursiva */
.cv3 h1 { font-style: italic; font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.02em; }

/* Contact: bloque izquierdo y derecho con la misma altura (arriba y abajo alineados) */
@media (min-width: 900px) {
  .cv3 .cv-text { align-items: stretch; }
  .cv3 .cv-head { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s4); }
  .cv3 ul { grid-auto-rows: 1fr; }
  .cv3 li:last-child { border-bottom: 1px solid rgba(28,27,25,.14); }
}

/* Pie de página discreto */
.foot { font-size: 11px; letter-spacing: .08em; color: rgba(28,27,25,.55); padding-top: var(--s16); text-align: left; width: 100%; }
.content > .foot, .content.wide > .foot { justify-self: stretch; }

/* Contact: el pie no debe empujar el contenido hacia arriba (así "Hablemos." no choca con el nombre) */
.content:has(.contact) { padding-bottom: 0; }
.content:has(.contact) > .foot { padding-top: 0; padding-bottom: var(--s6); }
.foot { text-align: center; }

/* Anterior / siguiente (solo texto) al final de cada proyecto */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); width: 100%; max-width: 980px; padding-top: var(--s8); border-top: 1px solid rgba(28,27,25,.14); }
.pn a { display: grid; gap: 4px; align-content: center; min-height: 44px; font-size: 14px; line-height: 1.3; }
.pn .next { text-align: right; }
.pn small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.pn .t { display: grid; gap: 4px; }
@media (hover: hover) and (pointer: fine) { .pn a:hover .t { color: var(--accent); } }
@media (max-width: 599px) { .pn { grid-template-columns: 1fr; } .pn .next { text-align: left; } }

/* Anterior · Galería · Siguiente */
.pn { grid-template-columns: 1fr auto 1fr; align-items: center; }
.pn .gal { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); padding: 0 var(--s3); text-align: center; }
@media (hover: hover) and (pointer: fine) { .pn .gal:hover { color: var(--ink); } }
@media (max-width: 599px) { .pn { grid-template-columns: 1fr auto 1fr; gap: var(--s3); } .pn .next { text-align: right; } .pn a { font-size: 13px; } }

/* About: dos pesos (titular grande y en negrita, raya diagonal, párrafos más pequeños) */
.about .prose { max-width: 500px; gap: var(--s4); }
.about .prose h1 { font-size: clamp(26px, 2.5vw, 34px); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }
.about .prose .dash { display: block; width: 1px; height: 28px; background: var(--accent); transform: rotate(24deg); margin: var(--s2) 0 var(--s2) var(--s3); }
.about .prose p { font-size: 14px; line-height: 1.6; }
.about .prose h1 { font-size: clamp(22px, 2vw, 28px); color: var(--accent); }
.about .prose h1 { font-size: clamp(19px, 1.6vw, 23px); }

/* Reel: portada con botón de play (no se reproduce solo) */
.reel-play { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.reel-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 2s ease, filter .6s ease; }
.reel-play .tri { position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin: -22px 0 0 -14px; border-left: 36px solid #fff; border-top: 22px solid transparent; border-bottom: 22px solid transparent; opacity: .92; transition: transform .3s ease; }
@media (hover: hover) and (pointer: fine) { .reel-play:hover img { transform: scale(1.008); filter: brightness(.93); } .reel-play:hover .tri { transform: scale(1.04); } }
.reel-play:active .tri { transform: scale(.94); }

/* Film: clip corto en bucle al pasar el cursor (solo con ratón) */
.work .ph video.clip, .cell4 .ph video.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.work .ph video.clip.on, .cell4 .ph video.clip.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .work .ph video.clip, .cell4 .ph video.clip, .ph img.seq { display: none; } }

/* PHOTO: al pasar el cursor, fotos del proyecto por CORTE (sin fundido), en blanco y negro como la foto de portada */
.ph img.seq { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; filter: grayscale(1); transform: none; transition: none !important; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .work a:hover .ph[data-seq] img:not(.seq), .cell4:hover .ph[data-seq] img:not(.seq) { transform: none; } }

/* PHOTO pase: NINGÚN cambio de escala (ni zoom del hover ni salto entre foto y foto) */
.ph[data-seq] img, .ph[data-seq] img.seq { transform: none !important; transition: none !important; }
.ph[data-seq] img:not(.seq) { transition: filter .3s ease !important; }

/* Film: sin símbolo de play en las tarjetas (solo el reel lo lleva) y sin zoom en las tarjetas con clip (para no notar cambio de escala) */
.work.vfilm .ph::before { content: none !important; }
.work a:hover .ph:has(video.clip) img, .cell4:hover .ph:has(video.clip) img { transform: none !important; transition: filter .3s ease !important; }

/* Proyecto de FILM con ficha: título enorme, vídeo a todo el ancho (hasta el borde derecho) y debajo frase grande + texto + ficha */
.proj { width: 100%; max-width: 1560px; display: grid; gap: calc(var(--s8) * 1.15); }
.proj-head { display: grid; gap: var(--s4); }
.proj .meta { color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }
.proj h1 { font-size: clamp(44px, 7vw, 120px); font-weight: 400; letter-spacing: -.045em; line-height: .92; }
.proj h1 .sub { display: block; margin-top: .12em; color: var(--accent); font-size: .5em; letter-spacing: -.03em; line-height: 1; }
.proj-body { display: grid; gap: calc(var(--s10) * 1.15); }
.proj .embed { max-width: none; }
.proj-text { display: grid; gap: calc(var(--s8) * 1.15); }
.proj .lead { font-size: clamp(21px, 2.3vw, 34px); line-height: 1.14; letter-spacing: -.02em; }
.proj-cols { display: grid; gap: var(--s6); align-content: start; font-size: 15px; line-height: 1.6; }
.facts { display: grid; margin: var(--s2) 0 0; }
.facts > div:last-child { border-bottom: 1px solid rgba(28, 27, 25, .14); }
.facts > div { display: grid; grid-template-columns: 9em 1fr; gap: var(--s4); padding: var(--s3) 0; border-top: 1px solid rgba(28, 27, 25, .14); }
.facts dt { color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; align-self: center; }
.facts dd { margin: 0; font-size: 14px; }
/* "Más información": la barrita diagonal se dibuja al pasar el cursor (siempre visible en táctil), como en FILM / PHOTO */
.proj .more { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }
.proj .more::after { content: ""; flex: none; width: 1px; height: 14px; margin-left: 12px; background: currentColor; transform-origin: 50% 100%; transform: rotate(24deg) scaleY(0); transition: transform var(--draw-dur) var(--draw-ease); }
@media (hover: hover) and (pointer: fine) { .proj .more:hover::after, .proj .more:focus-visible::after { transform: rotate(24deg) scaleY(1); } }
@media (hover: none) { .proj .more::after { transform: rotate(24deg) scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .proj .more::after { transition: none; } }
@media (min-width: 900px) {
  .proj-body { margin-left: 4vw; } /* separado del nombre grande de la barra lateral; vídeo, texto, ficha y vídeos extra comparten el mismo borde derecho */
  .proj-text { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: var(--s16); align-items: start; }
}
.content > .proj + .pn { max-width: 1560px; }

/* Organización con enlace: la barrita diagonal se dibuja al pasar el cursor (siempre visible en táctil, donde no hay cursor) */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.facts a.ext { display: inline; color: var(--ink); text-decoration: none; }
.facts a.ext::after { content: ""; display: inline-block; vertical-align: -2px; width: 1px; height: 14px; margin-left: 10px; background: var(--accent); transform-origin: 50% 100%; transform: rotate(24deg) scaleY(0); transition: transform var(--draw-dur) var(--draw-ease); }
@media (hover: hover) and (pointer: fine) { .facts a.ext:hover { color: var(--accent); } .facts a.ext:hover::after, .facts a.ext:focus-visible::after { transform: rotate(24deg) scaleY(1); } }
@media (hover: none) { .facts a.ext::after { transform: rotate(24deg) scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .facts a.ext::after { transition: none; } }

/* Vídeos extra del proyecto: uno al lado del otro y más pequeños */
.proj-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
.xv { margin: 0; }
.xv figcaption { margin-top: var(--s3); color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }
@media (max-width: 599px) { .proj-extra { grid-template-columns: 1fr; } }

/* Fotogramas de referencia bajo el texto: 4 imágenes (2x2) con el ancho del vídeo principal, como si fueran 4 vídeos */
.proj-frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
.proj-frames img { width: 100%; height: auto; display: block; background: #000; }
@media (max-width: 599px) { .proj-frames { grid-template-columns: 1fr; } }

/* Vídeos con franjas negras dentro del propio vídeo (Vimeo no las puede quitar): la caja tiene la proporción de la imagen real ("ratio" en
   content/film-text.json) y el reproductor, que es 16:9, se coloca centrado y más alto que la caja, de modo que las franjas quedan recortadas. */
.embed.pano { position: relative; }
.embed.pano iframe { position: absolute; left: 0; top: 50%; height: calc(var(--k) * 100%); transform: translateY(-50%) scale(1.012); }

/* Proyecto combinado (PERSONAL): varios vídeos en 2 columnas, cada uno con título, lugar/año y explicación */
.proj-coll { row-gap: calc(var(--s10) * 1.15); }
.xi .xm { margin: var(--s2) 0 0; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.xi .xt { margin: var(--s3) 0 0; font-size: 14px; line-height: 1.55; }

/* ==== Menú compacto en páginas de proyecto (prueba, ideas de Javi) ==== */
.lang-top { position: fixed; top: var(--s4); right: var(--s4); z-index: 6; font-size: 13px; font-style: italic; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .lang-top:hover { color: var(--accent); } }
.menu .crumb { display: none; }
@media (min-width: 900px) {
  .lang-top { top: var(--s10); right: var(--s8); }
  .has-compact .side { grid-template-rows: auto auto 1fr; align-content: start; gap: var(--s6); }
  .has-compact .side .brand { order: -1; align-self: start; font-size: 22px; line-height: 1.02; letter-spacing: -.01em; transform-origin: 0 0; animation: brand-settle 1.1s cubic-bezier(.35,.05,.2,1) .25s both; position: relative; z-index: 4; }
  .menu .crumb { display: grid; gap: 1px; margin: 3px 0 7px 1px; padding-left: 10px; border-left: 1px solid rgba(28,27,25,.28); font-size: 11px; line-height: 1.35; }
  .menu .crumb b { font-weight: 500; color: var(--ink); }
  .menu .crumb em { font-style: normal; color: var(--accent); }
}
@keyframes brand-settle { from { transform: translateY(38vh) scale(3.4); } to { transform: none; } }
@media (max-width: 899px) { .has-compact .side .brand { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .has-compact .side .brand { animation: none; } }

html.brand-done .has-compact .side .brand { animation: none; }

/* Video poster: el reproductor se carga ENCIMA de la imagen (invisible) y solo se muestra cuando el vídeo ya está en marcha; mientras tanto se ve la portada, sin saltos a blanco */
.vposter { position: relative; }
.vposter iframe { position: absolute; inset: 0; }
.vposter .reel-play.loading .tri { opacity: 0; transition: opacity .25s ease; }
.vposter .reel-play.loading { cursor: progress; }

/* Film: al pasar el cursor se salta DIRECTAMENTE al clip (sin poner antes la foto en blanco y negro): la foto se queda a color y el vídeo entra casi de golpe */
.work a:hover .ph:has(video.clip) img, .work a:focus-visible .ph:has(video.clip) img, .cell4:hover .ph:has(video.clip) img { filter: none !important; }
.work .ph video.clip, .cell4 .ph video.clip { transition: opacity .3s ease; }
.work .ph video.clip.on, .cell4 .ph video.clip.on { transition: opacity .08s linear; }

/* Sesiones de PHOTO con el diseño de los proyectos de FILM: nombre grande arriba y solo las fotos */
.proj-body .book { padding-top: 0; max-width: none; }

/* PHOTO: título fino y discreto (el número pequeño en rojo encima y el nombre en un tamaño sobrio); las fotos son las protagonistas */
.proj-photo { gap: var(--s8); }
.proj-photo .proj-head { gap: var(--s2); }
.proj-photo h1 { font-size: clamp(32px, 4.2vw, 64px); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.proj-photo .meta { letter-spacing: .3em; }

/* PHOTO: 4 proyectos en grande, 2 por fila */
.work.p2 { grid-template-columns: repeat(2, 1fr); gap: var(--s6) 3vw; }
.work.p2 .ph { aspect-ratio: 4 / 5; }

/* Montaje: foto recortada a una proporción más cuadrada (campo "crop" en layouts.json) */
.scene figure.crop img { aspect-ratio: var(--ar); object-fit: cover; }

/* Montaje B (por estancias) + panel de pruebas A/B (TEMPORAL) */
.vA, .vB { display: contents; }
body[data-pv="a"] .vB, body:not([data-pv]) .vB { display: none; }
body[data-pv="b"] .vA { display: none; }
body[data-pv="b"] .book { gap: 64px; }
@media (min-width: 900px) { body[data-pv="b"] .book { gap: 72px; } }
.chap { width: var(--w); justify-self: var(--a); }
.chap .scene { width: 100%; }
.room { margin-bottom: 14px; color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }
.ab-pick { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; gap: 6px; align-items: center; padding: 8px 10px; background: var(--bg); border: 1px solid rgba(0,0,0,.2); font-size: 11px; }
.ab-pick button { font: inherit; padding: 4px 10px; border: 1px solid rgba(0,0,0,.3); background: none; cursor: pointer; }
.ab-pick button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Las parejas del montaje no deben heredar la rejilla antigua ".pair" */
.scene.pair { display: flex; grid-template-columns: none; }
/* Montaje: menos aire entre composiciones para no bajar tanto */
@media (min-width: 900px) { .book { gap: 72px; } }

/* Pestaña "Todas las fotos" al final de un proyecto de PHOTO: lleva a la galería privada (con contraseña) */
.all-photos { margin: 40px 0 0; display: flex; justify-content: center; }
.all-photos a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--accent); color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; transition: background-color .25s ease, color .25s ease; }
@media (hover: hover) and (pointer: fine) { .all-photos a:hover { background: var(--accent); color: var(--bg); } }
.all-photos a:active { transform: scale(.97); }

/* Montaje: una fila puede SUBIR para compartir altura con la anterior, que queda al otro lado (campo `up` en layouts.json,
   en % del ancho del montaje). Solo en pantallas anchas: en móvil las fotos van una debajo de otra. */
@media (min-width: 700px) { .scene.up { margin-top: calc(var(--up) * -1%); } }

/* VÍDEO en una sesión de PHOTO (p. ej. "Despierta" en Pablo & Marco): al final, sin texto, a PANTALLA COMPLETA de lado a lado
   (el script lo saca de la columna con margin-left), en bucle sin sonido; al pulsar el play, desde el principio con sonido. */
.pvid { position: relative; width: 100vw; max-width: none; margin: var(--s24) 0 0; }
@media (min-width: 900px) { .pvid { margin-top: 128px; } }
.pv-frame { position: relative; height: 100vh; height: 100svh; background: #000; overflow: hidden; }
.pv-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pvid.playing video { object-fit: contain; }
.pv-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: 0; padding: 0; background: transparent; cursor: pointer; }
.pv-play .tri { width: 0; height: 0; border-left: 26px solid #fff; border-top: 16px solid transparent; border-bottom: 16px solid transparent; filter: drop-shadow(0 1px 10px rgba(0,0,0,.35)); transition: transform .3s ease; }
@media (hover: hover) and (pointer: fine) { .pv-play:hover .tri { transform: scale(1.12); } }
.pvid.playing .pv-play { display: none; }
/* mientras el vídeo ocupa la pantalla, el menú lateral (y ES/EN) se desvanece */
.side { transition: opacity .4s ease; }
body.vid-on .side { opacity: 0; pointer-events: none; }

/* Contact: la foto (fotograma de la familia india) es más panorámica: recortada un 20 % por arriba (1920x864) */
.cv3 .cv-photo { aspect-ratio: 1920 / 864; }

/* Vídeo de PHOTO con portada diseñada: en pantallas verticales (móvil) el marco es 16:9 para que la portada y su texto se vean enteros */
@media (max-aspect-ratio: 1/1) { .pv-frame { height: auto; aspect-ratio: 16 / 9; } }

/* Botón fijo "Ver vídeo ↓" (páginas de PHOTO con vídeo), elegido por Nacho: rojo redondeado abajo a la derecha; baja hasta el vídeo y se oculta mientras se ve. */
.pv-jump { position: fixed; right: 24px; bottom: 24px; z-index: 800; display: flex; align-items: center; gap: 14px; padding: 15px 22px 15px 24px; border-radius: 999px; background: var(--accent); color: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.18); text-decoration: none; font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; transition: opacity .4s ease, background-color .3s ease; }
.pv-jump .ar { letter-spacing: 0; font-size: 14px; }
@media (hover: hover) and (pointer: fine) { .pv-jump:hover { background: var(--ink); } }
body.vid-on .pv-jump { opacity: 0; pointer-events: none; }
@media (max-width: 899px) { .pv-jump { right: 16px; bottom: 16px; padding: 12px 18px 12px 20px; } }

/* Móvil: el vídeo a pantalla completa (100vw) ensanchaba la columna del proyecto y las fotos se quedaban sin margen derecho. La columna no crece por su contenido. */
.proj, .proj-body { grid-template-columns: minmax(0, 1fr); }

/* Flecha "volver arriba": aparece al llegar al final de la página (abajo a la derecha); sube rápido y suave. Mientras se ve, el botón "Ver vídeo" se oculta. */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 810; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--bg); color: var(--accent); border: 1px solid var(--accent); font-size: 18px; line-height: 1; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.10); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease, background-color .3s ease, color .3s ease; }
body.near-end .to-top { opacity: 1; pointer-events: auto; transform: none; }
body.near-end .pv-jump { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .to-top:hover { background: var(--accent); color: #fff; } }
@media (max-width: 899px) { .to-top { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; transform: none; } }

/* Páginas legales (Aviso legal, Privacidad): texto sencillo, columna estrecha. Enlaces discretos en el pie. */
.legal { width: 100%; max-width: 720px; justify-self: start; display: grid; gap: var(--s3); font-size: 14px; line-height: 1.65; color: var(--ink); }
.legal h1 { margin: 0 0 var(--s6); font-size: clamp(28px, 3.6vw, 44px); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.legal h2 { margin: var(--s8) 0 0; color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }
.legal p { margin: 0; }
.legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.foot a { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--accent); } }
@media (min-width: 900px) { .content:has(.legal) { justify-items: start; } .legal { margin-left: 4vw; } }
/* En las páginas de proyecto la flecha va dentro de la página, a la derecha, justo encima de la línea de "Anterior · Siguiente", y siempre visible */
.pn { position: relative; }
.to-top.inflow { position: absolute; right: 0; bottom: calc(100% + 18px); opacity: 1; pointer-events: auto; transform: none; box-shadow: none; }

/* Aviso de cookies (Google Analytics solo con permiso): tarjeta pequeña abajo a la izquierda; "Aceptar" y "Rechazar" igual de visibles. */
.ck { position: fixed; left: 24px; bottom: 24px; z-index: 950; width: min(380px, calc(100vw - 32px)); padding: 18px 20px; background: var(--bg); border: 1px solid rgba(28,27,25,.18); box-shadow: 0 8px 28px rgba(0,0,0,.12); font-size: 13px; line-height: 1.5; color: var(--ink); }
.ck[hidden] { display: none; }
.ck p { margin: 0 0 14px; }
.ck p a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ck-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ck-b button { min-height: 44px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; transition: background-color .25s ease, color .25s ease; }
@media (hover: hover) and (pointer: fine) { .ck-b button:hover { background: var(--accent); color: #fff; } }
@media (max-width: 899px) { .ck { left: 16px; bottom: 16px; } }
