/* Portafolio Ximena Pallares
   Formato tomado de portafolios Behance (portada con disco y "Portafolio" en script,
   "¡Hola! Soy…" con recorte de papel rasgado, índice circular, portadas de capítulo con
   pestañas de carpeta, fichas de proyecto y franja de datos) + referencias editoriales
   (texto vertical, acento rojo, líneas punteadas, tipografía condensada). */

:root {
  /* Paleta: Sand · Soft rinse · Tidal depth · Earth · Emberwood + navy (estrellas) y aubergine (OURA) */
  --white: #fbf3e3;      /* sand */
  --paper: #f5ead4;
  --cream: #fdf3e1;
  --ink: #22182a;        /* aubergine */
  --ink-2: #4d4150;
  --muted: #6a5e67; /* AA 5.5:1 sobre papel */
  --line: #ddd0bb;
  --red: #7a2e1f;        /* earth: acento principal (el nombre se queda por compatibilidad) */
  --ember: #520c0b;      /* emberwood */
  --blue: #3f5b8c;       /* tidal depth */
  --rinse: #9db6dd;      /* soft rinse */
  --peri: #6d75f2;       /* periwinkle */
  /* Regla: fondos sólo beige o negro; la paleta va en tipografía, textos y pops de color */
  --dark: #0f0e0e;       /* negro */
  --dark-2b: #171515;
  --dark-ink: #fdf3e1;
  --dark-2: #9db6dd;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;           /* titulares tipo Otto Van Zanden */
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --script: "Playfair Display", "Bodoni 72", Didot, Georgia, serif;          /* itálica con remates tipo Morvella */
  --hand: "Pinyon Script", "Snell Roundhand", cursive;                       /* "have a magical day" */

  --pad: clamp(18px, 3.2vw, 48px);
  --ease: cubic-bezier(.23, 1, .32, 1);      /* ease-out fuerte: entradas y feedback */
  --ease-io: cubic-bezier(.77, 0, .175, 1);  /* ease-in-out: movimiento en pantalla */
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 16px/1.6 var(--display); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--red); color: var(--white); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; }
.small { font-size: 11px; color: var(--muted); }
.red { color: var(--red); }
.script { font-family: var(--script); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.02em; }
.cond { font-family: var(--serif); font-weight: 400; text-transform: none; letter-spacing: -.035em; }
.label { color: var(--muted); margin: 0 0 1.2em; }
.mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font: 600 13px/1 var(--display); letter-spacing: -.04em; text-transform: lowercase; }

/* papel cuadriculado (Behance 1) */
.paper { background-color: var(--paper); background-image: linear-gradient(rgba(34,24,42,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(34,24,42,.06) 1px, transparent 1px); background-size: 30px 30px; }
.paper.tint { background-color: var(--tint); }
.paper.cream { background-color: var(--cream); }
.paper-dark { background-color: var(--dark); color: var(--dark-ink);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .13 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"), url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='360' height='360'><g fill='%23f3e8d2' fill-opacity='.9'><polygon points='0.0,-26.0 2.7,-6.5 18.4,-18.4 6.5,-2.7 26.0,0.0 6.5,2.7 18.4,18.4 2.7,6.5 0.0,26.0 -2.7,6.5 -18.4,18.4 -6.5,2.7 -26.0,0.0 -6.5,-2.7 -18.4,-18.4 -2.7,-6.5'/><polygon points='0.0,334.0 2.7,353.5 18.4,341.6 6.5,357.3 26.0,360.0 6.5,362.7 18.4,378.4 2.7,366.5 0.0,386.0 -2.7,366.5 -18.4,378.4 -6.5,362.7 -26.0,360.0 -6.5,357.3 -18.4,341.6 -2.7,353.5'/><polygon points='360.0,-26.0 362.7,-6.5 378.4,-18.4 366.5,-2.7 386.0,0.0 366.5,2.7 378.4,18.4 362.7,6.5 360.0,26.0 357.3,6.5 341.6,18.4 353.5,2.7 334.0,0.0 353.5,-2.7 341.6,-18.4 357.3,-6.5'/><polygon points='360.0,334.0 362.7,353.5 378.4,341.6 366.5,357.3 386.0,360.0 366.5,362.7 378.4,378.4 362.7,366.5 360.0,386.0 357.3,366.5 341.6,378.4 353.5,362.7 334.0,360.0 353.5,357.3 341.6,341.6 357.3,353.5'/></g></svg>"), conic-gradient(var(--dark-2b) 25%, transparent 0 50%, var(--dark-2b) 0 75%, transparent 0);
  background-size: 180px 180px, 360px 360px, 720px 720px; background-position: 0 0, -180px -180px, -180px -180px; }
.proj.paper-dark, .work.paper-dark { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .13 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"), conic-gradient(var(--dark-2b) 25%, transparent 0 50%, var(--dark-2b) 0 75%, transparent 0); background-size: 180px 180px, 720px 720px; background-position: 0 0, -180px -180px; } /* sin estrellas detrás del texto */
.paper-dark .red, .meta .red { color: var(--rinse); }
.contact .red { color: var(--peri); }

/* ---------- progreso / nav / menú ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 26px; padding: 0 var(--pad); color: #fff; mix-blend-mode: difference; transition: transform .3s var(--ease); }
.nav.hide { transform: translateY(-100%); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-stretch: 85%; text-decoration: none; font-size: 15px; margin-right: auto; }
.nav-brand .mark { background: #fff; color: #000; width: 26px; height: 26px; font-size: 12px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 12.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover::after { transform: scaleX(1); transform-origin: left; } }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; border: 1px solid currentColor; border-radius: 999px; padding: 9px 14px; transition: transform .16s var(--ease); }
.nav-cta svg { width: 15px; height: 15px; }
.nav-cta:active { transform: scale(.97); }
.burger { width: 30px; height: 20px; display: grid; align-content: space-between; }
.burger span { display: block; height: 1.5px; background: currentColor; transition: transform .25s var(--ease), opacity .15s; }
.menu-open .burger span:nth-child(1) { transform: translateY(9.25px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-9.25px) rotate(-45deg); }
.menu-open .nav { mix-blend-mode: normal; }

.menu { position: fixed; inset: 0; z-index: 45; background: var(--dark); color: var(--dark-ink); display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--nav-h) + 4vh) var(--pad) var(--pad); clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .32s var(--ease), visibility 0s .32s; }
.menu-open .menu { clip-path: inset(0); visibility: visible; transition: clip-path .45s var(--ease-io), visibility 0s; }
.menu ol { list-style: none; margin: 0; padding: 0; }
.menu li { overflow: hidden; }
.menu a { display: flex; align-items: baseline; gap: .6em; text-decoration: none; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 7.4vh, 86px); line-height: 1.02; letter-spacing: -.03em; text-transform: none; transform: translateY(105%); transition: transform .45s var(--ease); }
.menu small { font: 400 12px var(--mono); letter-spacing: .1em; color: var(--rinse); }
.menu-open .menu a { transform: none; transition-delay: calc(.12s + var(--i, 0) * 35ms); }
.menu-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.menu-foot a { text-decoration: none; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border-radius: 999px; padding: 13px 18px; border: 1px solid var(--ink); color: var(--ink); background: transparent; transition: transform .16s var(--ease), background-color .15s ease, color .15s ease, border-color .15s ease; -webkit-tap-highlight-color: transparent; user-select: none; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:active { transform: scale(.97); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { border-color: rgba(253,243,225,.35); color: var(--dark-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
  .btn-red:hover { background: var(--ink); border-color: var(--ink); }
  .btn-ghost:hover { background: var(--dark-ink); color: var(--ink); border-color: var(--dark-ink); }
}

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-up { opacity: 0; transform: translateY(40px); transition: opacity .6s ease, transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.reveal-up.is-in { opacity: 1; transform: none; }
.reveal-fade { opacity: 0; filter: blur(6px); transition: opacity .8s ease, filter .8s ease; }
.reveal-fade.is-in { opacity: 1; filter: none; }
.reveal-pop { opacity: 0; transform: translateY(36px) scale(.96); transition: opacity .5s ease, transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms + 60ms); }
.reveal-pop.is-in { opacity: 1; transform: none; }
.reveal-clip { overflow: hidden; }
.reveal-clip img { clip-path: inset(100% 0 0 0); transform: scale(1.12); transition: clip-path .9s var(--ease-io), transform 1.2s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.reveal-clip.is-in img { clip-path: inset(0); transform: scale(1); }
.reveal-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.reveal-words .w > span { display: inline-block; transform: translateY(110%); transition: transform .7s var(--ease); transition-delay: calc(var(--c) * 25ms); }
.reveal-words.is-in .w > span { transform: none; }
.split-chars .ch { display: inline-block; opacity: 0; transform: translateY(.6em); transition: opacity .4s ease, transform .6s var(--ease); transition-delay: calc(var(--c) * 14ms + .1s); white-space: pre; }
.split-chars.is-in .ch { opacity: 1; transform: none; }

/* ---------- papel rasgado (recortes) ---------- */
.torn { position: relative; margin: 0; isolation: isolate; }
.torn img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; clip-path: var(--clip, none); }
.torn::before { content: ""; position: absolute; inset: -9px; z-index: 0; background: #fdf6e9; clip-path: var(--clip-bg, none); filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }
.torn-red::before { inset: -18px; background: var(--red); }

/* ---------- texto vertical ---------- */
.vtext { writing-mode: vertical-rl; margin: 0; white-space: nowrap; }
.vtext-l { transform: rotate(180deg); }

/* ---------- disco (Behance 2) ---------- */
.disc-wrap { position: relative; aspect-ratio: 1; }
.disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.08) 0 1px, transparent 1.6px 5px),
    radial-gradient(circle at 50% 50%, rgba(157,182,221,.7) 0 22%, rgba(63,91,140,.88) 52%, rgba(27,38,66,.97) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 40px 80px -40px rgba(27,38,66,.6);
  animation: spin 22s linear infinite; }
.disc-label { position: absolute; inset: 33%; border-radius: 50%; overflow: hidden; background: #111; border: 8px solid #111; }
.disc-label img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: opacity .25s ease; }
.disc-label::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9%; height: 9%; margin: -4.5% 0 0 -4.5%; border-radius: 50%; background: var(--white); }
.disc-gloss { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: conic-gradient(from 210deg, transparent 0 8%, rgba(255,255,255,.4) 13%, transparent 21% 54%, rgba(255,255,255,.28) 60%, transparent 68%); mix-blend-mode: soft-light; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- PORTADA ---------- */
.cover { position: relative; min-height: 100svh; display: grid; place-items: center; padding: calc(var(--nav-h) + 20px) var(--pad) 130px; background: var(--white); overflow: hidden; }
.cover > .vtext { position: absolute; top: 50%; translate: 0 -50%; font-size: 11px; }
.cover > .vtext-l { left: var(--pad); }
.cover > .vtext-r { right: var(--pad); }
.cover-stage { position: relative; width: min(62svh, 74vw); aspect-ratio: 1; }
.cover-stage .disc-wrap { position: absolute; inset: 0; opacity: 0; transform: scale(.92); transition: opacity .8s ease, transform 1.2s var(--ease); }
.is-ready .cover-stage .disc-wrap { opacity: 1; transform: none; }
.cover-title { position: absolute; left: 50%; top: 46%; margin: 0; translate: -50% -50%; rotate: -8deg; font-size: clamp(72px, 14vw, 236px); line-height: .9; white-space: nowrap; color: var(--ink); z-index: 2; pointer-events: none; }
.cover-title .script { display: block; padding: .1em .15em .25em; clip-path: inset(0 100% 0 0); transition: clip-path 1.5s var(--ease-io) .35s; }
.is-ready .cover-title .script { clip-path: inset(-20% -10% -20% -10%); }
.orbit { position: absolute; z-index: 3; text-decoration: none; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; padding: 8px 2px; opacity: 0; transition: opacity .5s ease, color .15s ease; transition-delay: calc(.9s + var(--k) * 70ms); }
.orbit b { color: var(--red); font-weight: 500; margin-right: 4px; }
.is-ready .orbit { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .orbit:hover { color: var(--red); } }
.o1 { --k: 0; left: -14%; top: 12%; }
.o2 { --k: 1; right: -6%; top: 2%; }
.o3 { --k: 2; right: -24%; top: 56%; }
.o4 { --k: 3; right: 8%; bottom: -4%; }
.o5 { --k: 4; left: -20%; bottom: 14%; }
.cover-role { display: none; position: absolute; right: -34%; top: 30%; margin: 0; font-size: 14px; line-height: 1.35; font-weight: 500; opacity: 0; transition: opacity .6s ease 1.3s; }
.cover-role span { color: var(--muted); font-weight: 400; }
.is-ready .cover-role { opacity: 1; }
.cover-foot { position: absolute; left: var(--pad); right: var(--pad); bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cover-foot p { margin: 0; font-size: clamp(16px, 1.6vw, 22px); line-height: 1.1; letter-spacing: -.02em; }
.cover-ctas { display: flex; gap: 8px; }
.cover-next { font-size: clamp(16px, 1.6vw, 22px); letter-spacing: -.02em; text-decoration: none; }

/* ---------- SOBRE MÍ ---------- */
.about { position: relative; padding: clamp(90px, 10vw, 140px) var(--pad); overflow: hidden; }
.about-contour { position: absolute; left: -6%; bottom: -4%; width: min(520px, 40vw); opacity: .22; pointer-events: none; }
.about-in { position: relative; display: grid; grid-template-columns: .85fr 1.25fr 1.15fr; gap: clamp(28px, 4vw, 64px); align-items: start; max-width: 1500px; margin: 0 auto; }
.about-photo { position: relative; padding: 18px; }
.about-photo .torn { aspect-ratio: 6 / 7; rotate: -3deg; }
.about-photo .torn img { filter: grayscale(1) contrast(1.05); }
.stamp { position: absolute; right: -6px; top: 34px; z-index: 3; rotate: 8deg; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--red); border: 1.5px solid var(--red); border-radius: 999px; padding: 8px 12px; background: var(--paper); }
.hello { margin: 0 0 .5em; font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 6.4vw, 100px); line-height: .92; letter-spacing: -.035em; }
.hello .w:last-child span { color: var(--red); }
.about-main p { color: var(--ink-2); font-size: 15px; margin: 0 0 1em; max-width: 58ch; }
.about-main .lead { color: var(--ink); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.45; letter-spacing: -.01em; }
.polaroids { display: flex; gap: clamp(10px, 1.6vw, 22px); margin-top: 34px; }
.pola { display: block; width: 32%; background: #fff; padding: 8px 8px 0; text-decoration: none; rotate: var(--r); box-shadow: 0 14px 28px -14px rgba(0,0,0,.35); transition: rotate .2s var(--ease), translate .2s var(--ease); }
.pola img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.pola span { display: block; text-align: center; font: 400 26px/1.6 var(--hand); color: var(--ink); }
.pola:active { translate: 0 2px; }
@media (hover: hover) and (pointer: fine) { .pola:hover { rotate: 0deg; translate: 0 -6px; } }
.about-cv { display: grid; gap: 26px; }
.cv-block h3 { margin: 0 0 10px; color: var(--red); font-weight: 500; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tl li { display: grid; grid-template-columns: 82px 1fr; gap: 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.tl b { font: 500 11px/1.6 var(--mono); letter-spacing: .04em; color: var(--ink); }
.tl em { font-style: normal; color: var(--ink); font-weight: 600; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 12.5px; line-height: 1; padding: 7px 10px; border: 1px solid currentColor; border-radius: 999px; opacity: .85; }
.tools { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.tools li { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.tools i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--ink); color: var(--rinse); font: 600 11px/1 var(--display); font-style: normal; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; background: var(--dark); color: var(--white); padding: 14px 0; }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: marq 36s linear infinite; font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2.6vw, 34px); text-transform: uppercase; align-items: center; }
.marquee-track i { font-style: normal; color: var(--red); font-size: .7em; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- ÍNDICE ---------- */
.toc { background: var(--white); min-height: 100svh; display: grid; place-items: center; padding: clamp(90px, 10vw, 140px) var(--pad); overflow: hidden; }
.toc-stage { position: relative; width: min(64svh, 70vw); aspect-ratio: 1; }
.toc-disc { position: absolute; inset: 12%; }
.toc-title { position: absolute; left: 50%; top: 0; translate: -50% -30%; margin: 0; z-index: 2; text-align: center; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6vw, 88px); line-height: .9; letter-spacing: -.04em; white-space: nowrap; }
.toc-title .script { font-size: 1.2em; padding: 0 .05em; }
.toc-item { position: absolute; z-index: 3; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; text-decoration: none; font-size: clamp(18px, 1.8vw, 26px); font-weight: 500; letter-spacing: -.02em; transition: color .15s ease, translate .2s var(--ease); }
.toc-item b { font: 500 12px var(--mono); color: var(--red); }
.toc-item small { grid-column: 2; font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc-item:active { translate: 0 1px; }
@media (hover: hover) and (pointer: fine) { .toc-item:hover { color: var(--red); translate: 4px 0; } }
.t1 { left: -10%; top: 30%; }
.t2 { left: -18%; top: 62%; }
.t3 { left: 26%; bottom: -6%; }
.t4 { right: -16%; top: 44%; }
.t5 { right: -4%; bottom: 8%; }

/* ---------- PORTADA DE CAPÍTULO ---------- */
.chapter { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--nav-h) + 30px) var(--pad) 0; overflow: hidden; }
.chapter-in { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.chapter-text .tag { color: var(--dark-2); margin: 0 0 10px; }
.chapter-text h2 { margin: 0; display: flex; flex-direction: column; }
.chapter-text .script { font-size: clamp(60px, 8.4vw, 150px); line-height: 1; margin-left: -.05em; }
.chapter-text .cond { font-size: clamp(60px, 9vw, 150px); line-height: .9; color: var(--dark-ink); }
.chapter-text .pill { display: inline-block; margin-top: 22px; border: 1px solid var(--dark-2); color: var(--dark-ink); border-radius: 999px; padding: 8px 14px; }
.chapter-photo { width: min(100%, 520px); aspect-ratio: 4 / 5; justify-self: center; rotate: 3deg; }
.tabs { display: flex; gap: 6px; margin-top: 40px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 1 0 auto; min-width: 120px; text-align: center; text-decoration: none; font-size: 13px; font-weight: 600; padding: 12px 18px 10px; color: var(--ink); background: #efe2c8; border-radius: 14px 14px 0 0; translate: 0 6px; transition: translate .2s var(--ease), background-color .15s ease, color .15s ease; }
.tabs a.on { background: var(--blue); color: #fff; translate: 0 0; }
.tabs a:active { translate: 0 8px; }
@media (hover: hover) and (pointer: fine) { .tabs a:hover { translate: 0 0; } }

/* ---------- FICHA DE PROYECTO (Behance 1) ---------- */
.proj { position: relative; padding: calc(var(--nav-h) + 6px) var(--pad) clamp(60px, 7vw, 100px); }
.proj-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(24px, 4vw, 48px); }
.proj-bar .pill { border: 1px solid currentColor; border-radius: 999px; padding: 7px 12px; }
.proj-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 90px); align-items: center; max-width: 1500px; margin: 0 auto; }
.proj-grid.flip .collage { order: 2; }
.collage { position: relative; aspect-ratio: 1 / 1.02; }
.collage .torn { position: absolute; transition: translate .2s var(--ease), scale .2s var(--ease); }
.c-main { left: 4%; top: 7%; width: 60%; height: 78%; rotate: -2.5deg; z-index: 2; }
.c-a { right: 1%; top: 0; width: 38%; height: 44%; rotate: 4deg; z-index: 1; }
.c-b { right: 7%; bottom: 2%; width: 42%; height: 42%; rotate: -5deg; z-index: 3; }
@media (hover: hover) and (pointer: fine) { .collage .torn:hover { translate: 0 -8px; scale: 1.02; z-index: 4; } }
.proj-info { max-width: 560px; }
.proj-info .kicker { color: var(--muted); margin: 0 0 12px; }
.proj-title { margin: 0 0 12px; line-height: .85; }
.proj-title .logo { width: min(280px, 70%); height: auto; mix-blend-mode: multiply; }
.proj-title .cond { font-size: clamp(64px, 8vw, 128px); }
.proj-title .script { font-size: clamp(58px, 7vw, 116px); line-height: 1; }
.proj-title .serif-spaced { font-family: "Iowan Old Style", "Palatino", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: .32em; text-transform: uppercase; font-size: clamp(32px, 4vw, 60px); }
.proj-info h3 { margin: 0 0 14px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.proj-info p { margin: 0 0 1em; font-size: 15px; color: var(--ink-2); }
.proj-info .small { margin: 22px 0 8px; }
.note { margin-top: 22px; border: 1.5px dashed currentColor; border-radius: 12px; padding: 14px 16px; opacity: .9; }
.note .mono { margin: 0 0 6px; color: var(--accent); }
.note p:last-child { margin: 0; font-size: 14px; }
.palette { display: flex; gap: 8px; margin-top: 22px; }
.palette i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-weight: 500; }
.ticks li::before { content: "✳ "; color: var(--accent); }
.proj.paper-dark .proj-info p { color: #c9d2e4; }
.proj.paper-dark .proj-info .kicker { color: var(--dark-2); }
.proj.paper-dark .torn::before { background: #efe2c8; }

/* franja de datos (Behance 2) */
.meta { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; background: var(--dark); color: var(--white); }
.meta div { padding: 22px var(--pad) 24px; border-left: 1px solid rgba(253,243,225,.14); }
.meta div:first-child { border-left: 0; }
.meta dt { font: 400 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dark-2); margin-bottom: 8px; }
.meta dd { margin: 0; font-size: 14.5px; line-height: 1.35; }

/* ---------- MEDIA ---------- */
.media { background: var(--white); padding: clamp(50px, 7vw, 100px) var(--pad); display: grid; gap: clamp(40px, 6vw, 90px); }
.dark-media { background: var(--dark); color: var(--dark-ink); }
.cream-media { background: var(--cream); }
.cinema { width: 100%; max-width: 1240px; margin: 0 auto; }
.vid { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.vid video { width: 100%; height: 100%; object-fit: cover; }
.cap { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; color: var(--ink-2); }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.grid-6 figure { margin: 0; aspect-ratio: 2 / 3; }
.grid-6 figure.wide { aspect-ratio: 6 / 5; }
.grid-6 img { width: 100%; height: 100%; object-fit: cover; }

.snd { position: absolute; right: 16px; bottom: 16px; z-index: 5; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgba(13,12,11,.55); border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 8px 12px 8px 26px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background-color .15s ease, border-color .15s ease, transform .16s var(--ease); }
.snd::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; border: 1.5px solid currentColor; }
.snd:active { transform: scale(.96); }
.snd[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.snd[aria-pressed="true"]::before { background: currentColor; }

.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 250px)); justify-content: center; gap: clamp(14px, 4vw, 60px); }
.phones-title { grid-column: 1 / -1; text-align: center; margin: 0 0 clamp(10px, 2vw, 24px); color: var(--red); }
.phone { position: relative; aspect-ratio: 9 / 19; border-radius: 36px; padding: 10px; background: #111; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.phone::before { content: ""; position: absolute; left: 50%; top: 18px; width: 34%; height: 20px; border-radius: 20px; background: #111; translate: -50% 0; z-index: 2; }
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; background: #222; }
.phone .snd { right: 50%; translate: 50% 0; bottom: 22px; white-space: nowrap; }
.phone:nth-of-type(2) { margin-top: clamp(0px, 5vw, 70px); }

.cover-img { height: 92vh; overflow: hidden; margin-inline: calc(-1 * var(--pad)); margin-top: calc(-1 * clamp(50px, 7vw, 100px)); }
.cover-img img { width: 100%; height: 116%; object-fit: cover; margin-top: -8%; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.4vw, 20px); }
.duo figure { margin: 0; aspect-ratio: 4 / 5; }
.duo img { width: 100%; height: 100%; object-fit: cover; }
.textile { display: grid; grid-template-columns: auto 1.3fr 1fr .9fr; gap: clamp(20px, 3vw, 50px); align-items: center; }
.textile .vtext-chapter { color: var(--dark-2); letter-spacing: .4em; transform: rotate(180deg); }
.textile figure { margin: 0; }
.textile img { width: 100%; height: auto; }
.textile-text p { color: #c9d2e4; font-size: 15px; margin: 0 0 1.2em; }
.textile-text .quote { color: var(--dark-ink); font-size: clamp(20px, 2vw, 28px); line-height: 1.25; letter-spacing: -.015em; }
.textile-text .quote em { color: var(--rinse); }
.process { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 32px); }
.process figure { margin: 0; }
.process img { width: 100%; height: auto; border-radius: 4px; }
.process figcaption { margin-top: 12px; text-transform: none; letter-spacing: .02em; color: var(--dark-2); }
.pull { margin: 0; }
.pull p { margin: 0 auto; max-width: 22ch; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.6vw, 70px); line-height: 1.03; letter-spacing: -.03em; text-align: center; }
.pull p .w:nth-last-child(-n+13) span { color: var(--rinse); }
.editorial { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(12px, 2vw, 28px); align-items: start; padding-bottom: 40px; }
.editorial figure { margin: 0; }
.editorial img { width: 100%; height: auto; }
.editorial .e1 { grid-column: 1 / span 5; }
.editorial .e2 { grid-column: 6 / span 3; margin-top: 30%; }
.editorial .e3 { grid-column: 9 / span 4; }

.h-scroll { position: relative; height: 300vh; margin-inline: calc(-1 * var(--pad)); }
.h-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.h-label { padding: 0 var(--pad); color: var(--red); margin: 0; }
.h-track { display: flex; gap: clamp(14px, 2vw, 28px); padding: 0 var(--pad); width: max-content; will-change: transform; }
.h-track figure { margin: 0; height: 66vh; aspect-ratio: 3 / 4; overflow: hidden; }
.h-track figure:nth-child(even) { margin-top: 6vh; height: 56vh; }
.h-track img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- CONTACTO ---------- */
.contact { background: var(--dark); background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .13 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); color: var(--white); padding: clamp(90px, 12vw, 170px) var(--pad); }
.contact .label { color: var(--muted); }
.contact h2 { margin: 0 0 clamp(36px, 5vw, 64px); display: flex; flex-direction: column; }
.contact h2 .script { font-size: clamp(60px, 8vw, 140px); line-height: 1; }
.contact h2 .cond { font-size: clamp(54px, 8vw, 132px); line-height: .9; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(253,243,225,.14); border: 1px solid rgba(253,243,225,.14); }
.c-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 220px; padding: clamp(22px, 3vw, 40px); background: var(--dark); text-decoration: none; overflow: hidden; transition: transform .16s var(--ease); }
.c-card::before { content: ""; position: absolute; inset: 0; background: var(--red); clip-path: inset(100% 0 0 0); transition: clip-path .25s var(--ease); }
.c-card > * { position: relative; }
.c-card:active { transform: scale(.985); }
.c-card .mono { color: var(--dark-2); display: flex; justify-content: space-between; gap: 12px; }
.c-card .val { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3.2vw, 46px); line-height: 1.05; letter-spacing: -.025em; overflow-wrap: anywhere; }
.c-card .arrow { transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .c-card:hover::before { clip-path: inset(0); }
  .c-card:hover .mono { color: #fff; }
  .c-card:hover .arrow { transform: translate(4px, -4px); }
}
.contact-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.copy .txt { display: inline-block; transition: filter .2s ease, opacity .2s ease; }
.copy.swap .txt { filter: blur(2px); opacity: .4; }
.copy.done { background: var(--red); border-color: var(--red); color: #fff; }

.wa-float { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 44; display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px 12px 13px; border-radius: 999px; background: var(--red); color: #fff; text-decoration: none; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none; transition: opacity .2s ease, transform .25s var(--ease); }
.wa-float svg { width: 18px; height: 18px; }
.wa-float.show { opacity: 1; transform: none; pointer-events: auto; }
.wa-float:active { transform: scale(.96); }

/* ---------- FOOTER ---------- */
.contour { width: 100%; height: auto; overflow: visible; }
.contour path.dash { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 4 5; stroke-linecap: round; }
.contour mask path { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 2.4s var(--ease); transition-delay: calc(var(--k, 0) * 110ms); }
.foot { position: relative; background: var(--dark); color: var(--dark-ink); padding: clamp(60px, 8vw, 120px) var(--pad) 28px; overflow: hidden; }
.foot-contour { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.foot-contour path.dash { stroke: #fff; }
.foot-big { position: relative; margin: 0; display: flex; flex-direction: column; font-family: var(--serif); font-weight: 400; text-transform: lowercase; font-size: clamp(64px, 17vw, 300px); line-height: .82; letter-spacing: -.06em; }
.foot-big span:last-child { align-self: flex-end; }
.foot-row { position: relative; display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; margin-top: clamp(40px, 6vw, 80px); padding-top: 18px; border-top: 1px solid rgba(255,255,255,.4); }
.foot-row a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot-row a:hover { text-decoration: underline; text-underline-offset: 4px; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .about-in { grid-template-columns: .9fr 1.3fr; }
  .about-cv { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .cover-role { display: none; }
}
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .cover { padding-bottom: 190px; }
  .cover-stage { width: min(78vw, 52svh); }
  .cover > .vtext { display: none; }
  .o1 { left: -6%; top: -4%; } .o2 { right: -4%; top: -4%; } .o3 { right: -6%; top: 100%; } .o4 { display: none; } .o5 { left: -6%; top: 100%; bottom: auto; }
  .cover-foot { flex-direction: column; align-items: flex-start; }
  .cover-next { display: none; }
  .about-in { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
  .about-cv { grid-template-columns: 1fr; }
  .toc { display: block; }
  .toc-stage { width: 100%; aspect-ratio: auto; display: flex; flex-direction: column; }
  .toc-title { position: static; translate: none; order: -1; white-space: normal; }
  .toc-disc { position: relative; inset: auto; width: min(72vw, 340px); margin: 28px auto 30px; }
  .toc-item { position: static; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .chapter-in { grid-template-columns: 1fr; padding-bottom: 20px; }
  .chapter-photo { width: 78%; }
  .proj-grid { grid-template-columns: 1fr; }
  .proj-grid.flip .collage { order: 0; }
  .meta { grid-template-columns: 1fr 1fr; }
  .meta div { border-left: 0; border-top: 1px solid rgba(253,243,225,.14); }
  .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .phone { border-radius: 22px; padding: 6px; }
  .phone video { border-radius: 17px; }
  .phone::before { top: 10px; height: 12px; }
  .phone .snd { padding: 6px 8px 6px 20px; font-size: 11px; bottom: 12px; }
  .phone .snd::before { left: 8px; width: 6px; height: 6px; margin-top: -3px; }
  .duo, .process { grid-template-columns: 1fr; }
  .textile { grid-template-columns: 1fr; }
  .textile .vtext-chapter { writing-mode: horizontal-tb; transform: none; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .editorial .e1 { grid-column: 1 / span 7; }
  .editorial .e2 { grid-column: 8 / span 5; margin-top: 40%; }
  .editorial .e3 { grid-column: 3 / span 8; }
  .contact-grid { grid-template-columns: 1fr; }
  .c-card { min-height: 160px; }
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
  .h-track figure { height: 54vh; }
  .h-track figure:nth-child(even) { height: 46vh; }
}

@media (prefers-reduced-motion: reduce) {
  /* Menos movimiento, no cero: se conservan los fundidos. */
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .reveal, .reveal-up, .reveal-pop { transform: none !important; transition: opacity .25s ease !important; }
  .reveal-words .w > span, .split-chars .ch { transform: none !important; }
  .reveal-clip img { clip-path: none !important; transform: none !important; }
  .cover-title .script { clip-path: none !important; }
  .cover-stage .disc-wrap { transform: none !important; }
  .menu { clip-path: none; opacity: 0; transition: opacity .2s ease, visibility 0s .2s !important; }
  .menu-open .menu { opacity: 1; transition: opacity .2s ease !important; }
  .menu a { transform: none !important; }
  .wa-float { transform: none !important; }
}

/* Evita que la galería horizontal ensanche la columna de la grilla en móvil */
html { overflow-x: clip; }
.media > * { min-width: 0; }
.h-scroll { min-width: 0; max-width: calc(100% + 2 * var(--pad)); }

@media (max-width: 900px) {
  /* estrellas en los bordes para que no choquen con el titular */
  .chapter.paper-dark { background-position: 0 0, -24px -180px, -24px -180px; }
}

/* Pops de color sobre negro */
.foot-big { color: var(--rinse); }
@media (hover: hover) and (pointer: fine) { .menu a:hover { color: var(--rinse); } }
.menu a:focus-visible { color: var(--rinse); }
.menu-foot a { font-size: clamp(20px, 2.4vw, 32px); text-transform: none; }

/* ---------- BRANDING Y PUBLICIDAD (cap. 04) ---------- */
.t6 { right: -6%; top: 10%; }
.collage-2 .c-a { top: 16%; width: 40%; height: 58%; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; background: #222; }
.grid-6 .span-all { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.proj-title .cond.long { font-size: clamp(48px, 5.6vw, 96px); line-height: .92; }
.proj-title .logo.logo-julieta { width: min(520px, 100%); margin: -6% 0 -6% -8%; height: auto; mix-blend-mode: normal; }
.q-mocks.q-slides { grid-template-columns: 1fr 1fr; }
.q-mocks.q-slides .q-wide { grid-column: 1 / -1; }
.q-mocks.q-slides img, .q-mocks.q-slides .q-wide img { aspect-ratio: 16 / 9; object-fit: cover; }

/* Ficha de cotización (sin precios): formato editorial tipo cartel, filas en mono */
.q-sheet { border-top: 1px solid var(--ink); padding-top: clamp(20px, 2.4vw, 32px); }
.q-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 40px); }
.q-head .mono { margin: 0; color: var(--red); order: 2; }
.q-title { margin: 0; font: 400 clamp(44px, 7vw, 120px)/.9 var(--serif); letter-spacing: -.035em; }
.q-title em { font-family: var(--script); font-style: italic; color: var(--red); letter-spacing: -.02em; }
.q-body { display: grid; gap: clamp(28px, 4vw, 56px); }
.q-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.q-rows li { display: grid; grid-template-columns: 52px minmax(0, 1.3fr) 150px minmax(0, 1.5fr); gap: 8px 18px; align-items: baseline; padding: 16px 0 15px; border-bottom: 1px solid var(--line); }
.q-item { font: 400 clamp(20px, 2vw, 28px)/1.15 var(--serif); letter-spacing: -.015em; }
.q-n, .q-qty { color: var(--red); }
.q-spec { color: var(--ink-2); }
.q-mocks { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: clamp(10px, 1.4vw, 20px); align-items: start; }
.q-mocks figure { margin: 0; }
.q-mocks img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #fff; }
.q-mocks .q-wide img { aspect-ratio: 3 / 2; object-fit: contain; }
.q-mocks figcaption { margin-top: 10px; color: var(--muted); }
.q-dark { border-top-color: rgba(253,243,225,.5); }
.q-dark .q-head .mono, .q-dark .q-n, .q-dark .q-qty, .q-dark .q-title em { color: var(--rinse); }
.q-dark .q-rows, .q-dark .q-rows li { border-color: rgba(253,243,225,.14); }
.q-dark .q-spec, .q-dark figcaption { color: #c9d2e4; }
.q-dark .q-mocks .q-wide img { object-fit: cover; }
@media (max-width: 900px) {
  .q-rows li { grid-template-columns: 34px minmax(0, 1fr); }
  .q-qty, .q-spec { grid-column: 2; }
  .q-mocks { grid-template-columns: 1fr 1fr; }
  .q-mocks .q-wide { grid-column: 1 / -1; }
}

/* ================= TODO EN 1 MINUTO ================= */
.skip { position: fixed; left: 12px; top: 12px; z-index: 100; background: var(--ink); color: var(--cream); font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 12px 16px; border-radius: 999px; text-decoration: none; transform: translateY(-160%); transition: transform .2s var(--ease); }
.skip:focus { transform: none; }

.work { position: relative; padding: calc(var(--nav-h) + 3vh) var(--pad) clamp(28px, 4vh, 48px); min-height: 100svh; display: flex; flex-direction: column; gap: clamp(18px, 3vh, 32px); }
.work-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 32px; }
.work-head .tag { grid-column: 1 / -1; color: var(--dark-2); margin: 0; }
.work-head h2 { margin: 0; font-weight: 400; line-height: .95; }
.work-head h2 .script { font-size: clamp(40px, 5.2vw, 88px); }
.work-head h2 .cond { font-size: clamp(40px, 5.2vw, 88px); color: var(--dark-ink); }
.work-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chip { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dark-ink); background: transparent; border: 1px solid rgba(253,243,225,.3); border-radius: 999px; padding: 11px 14px; min-height: 40px; cursor: pointer; transition: transform .16s var(--ease), background-color .15s ease, color .15s ease, border-color .15s ease; -webkit-tap-highlight-color: transparent; }
.chip b { font-weight: 500; color: var(--rinse); margin-left: 4px; }
.chip:active { transform: scale(.97); }
.chip.on { background: var(--rinse); border-color: var(--rinse); color: var(--dark); }
.chip.on b { color: var(--dark); }
@media (hover: hover) and (pointer: fine) { .chip:not(.on):hover { border-color: var(--rinse); } }

.work-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 22px); flex: 1; }
.w-card[hidden] { display: none; }
.w-card { transition: opacity .3s ease, transform .3s var(--ease); }
.w-card a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--dark-ink); height: 100%; transition: transform .16s var(--ease); }
.w-card a:active { transform: scale(.98); }
.w-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--dark-2b); max-height: 34vh; width: 100%; }
.w-media img, .w-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .25s ease; }
.w-media video { opacity: 0; }
.w-card.playing .w-media video { opacity: 1; }
.w-play { position: absolute; left: 8px; bottom: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(15,14,14,.6); border-radius: 999px; padding: 6px 9px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.w-n { font-size: 11px; color: var(--rinse); margin-top: 4px; }
.w-t { font-family: var(--serif); font-size: clamp(22px, 1.9vw, 32px); line-height: 1; letter-spacing: -.02em; }
.w-c { font-size: 11px; line-height: 1.4; letter-spacing: .04em; text-transform: uppercase; color: rgba(253,243,225,.72); }
@media (hover: hover) and (pointer: fine) {
  .w-card a:hover .w-media img, .w-card a:hover .w-media video { transform: scale(1.04); }
  .w-card a:hover .w-t { color: var(--rinse); }
}
.w-card a:focus-visible { outline: 2px solid var(--rinse); outline-offset: 4px; border-radius: 6px; }
.w-card a:focus-visible .w-t { color: var(--rinse); }
.work-foot { display: flex; justify-content: space-between; gap: 16px; margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(253,243,225,.72); }
.work-foot a { color: var(--dark-ink); }
@starting-style { .w-card:not([hidden]).is-in { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ================= HUD entre proyectos ================= */
.hud { position: fixed; left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 44; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--dark); color: var(--dark-ink); box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); border: 1px solid rgba(253,243,225,.14); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .25s var(--ease); }
.hud.show { opacity: 1; transform: none; pointer-events: auto; }
.hud-b { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 16px; cursor: pointer; transition: transform .16s var(--ease), background-color .15s ease; }
.hud-b:active { transform: scale(.94); }
.hud-b:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .hud-b:not(:disabled):hover { background: rgba(253,243,225,.1); } }
.hud-now { display: flex; align-items: baseline; gap: 8px; padding: 0 8px; text-decoration: none; color: inherit; min-width: 150px; justify-content: center; }
.hud-now b { font-size: 11px; font-weight: 500; color: var(--rinse); letter-spacing: .06em; }
.hud-now span { font-family: var(--serif); font-size: 19px; line-height: 1; white-space: nowrap; }
.hud-b:focus-visible, .hud-now:focus-visible { outline: 2px solid var(--rinse); outline-offset: 2px; }

@media (max-width: 1100px) { .work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .w-media { max-height: none; } .work { min-height: 0; } }
@media (max-width: 900px) {
  .work-head { grid-template-columns: 1fr; }
  .work-filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad); scrollbar-width: none; }
  .work-filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-foot { flex-direction: column; }
  .hud-now { min-width: 0; } .hud-now span { font-size: 16px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: reduce) {
  .hud, .skip { transform: none !important; }
  .w-media img, .w-media video { transition: opacity .2s ease !important; transform: none !important; }
}
@media (min-width: 1101px) {
  .work-head h2 { white-space: nowrap; }
  .work-head h2 .script, .work-head h2 .cond { font-size: clamp(40px, 4.4vw, 76px); }
  .w-media { aspect-ratio: auto; height: 27vh; max-height: none; }
  .w-c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.work-grid, .w-card { overflow-anchor: none; } /* el filtro no debe mover el scroll */

/* Onírica: énfasis de tesis */
.thesis { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 26px; padding: 18px 20px; border: 1px solid var(--rinse); border-radius: 14px; }
.thesis-tag { align-self: flex-start; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dark); background: var(--rinse); border-radius: 999px; padding: 7px 12px; }
.thesis-line { font-family: var(--serif); font-size: clamp(22px, 2vw, 30px); line-height: 1.3; letter-spacing: -.015em; color: var(--dark-ink); }
.thesis-line b { font-weight: 400; color: var(--rinse); font-style: italic; }
.w-badge { font-style: normal; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; color: var(--dark); background: var(--rinse); border-radius: 999px; padding: 4px 7px; margin-left: 4px; }
.tl a { color: var(--red); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .tl a:hover { color: var(--ink); } }
/* Green Corner: 4 mockups por producto cotizado */
.q-mocks.q-mocks-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.q-mocks .q-tile img { object-fit: contain; padding: 6%; background: #fff; }
@media (max-width: 900px) { .q-mocks.q-mocks-4 { grid-template-columns: 1fr 1fr; } }
/* Posts de campaña (Amelie Buen Fin) */
.posts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 24px); max-width: 1100px; margin: 0 auto; }
.posts figure { margin: 0; }
.posts img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; box-shadow: 0 18px 36px -20px rgba(0,0,0,.4); }
.q-mocks.q-mocks-4 figure:not(.q-tile) img { object-position: 50% 78%; }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr 1fr; } }
.posts img, .q-mocks img { height: auto; } /* los atributos width/height no deben anular aspect-ratio */

/* ================= Evidencia (sustituye a las cotizaciones) ================= */
.evidence { border-top: 1px solid var(--ink); padding-top: clamp(20px, 3vw, 36px); display: grid; gap: clamp(20px, 3vw, 36px); }
.ev-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px clamp(24px, 4vw, 64px); align-items: end; }
.ev-head > .mono { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.ev-head .q-title { margin: 0; }
.ev-text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 52ch; }
@media (max-width: 900px) { .ev-head { grid-template-columns: 1fr; } }

/* ================= Imágenes y videos completos, sin recortar ================= */
.grid-6 { align-items: start; }
.grid-6 figure, .grid-6 figure.wide, .grid-6 .span-all { aspect-ratio: auto; }
.grid-6 img { height: auto; object-fit: fill; }
.duo { align-items: start; }
.duo figure { aspect-ratio: auto; }
.duo img { height: auto; object-fit: fill; }
.pola img { aspect-ratio: auto; }
.posts { align-items: start; }
.posts img { aspect-ratio: auto; }
.q-mocks { align-items: end; }
.q-mocks img, .q-mocks .q-wide img { aspect-ratio: auto; height: auto; object-fit: fill; }
.q-mocks .q-tile img { padding: 0; background: none; } /* PNG sin fondo blanco */
.q-mocks.q-mocks-4 figure:not(.q-tile) img { object-position: center; }
.cover-img { height: auto; overflow: visible; }
.cover-img img { height: auto; margin-top: 0; object-fit: fill; }
.h-track figure, .h-track figure:nth-child(even) { aspect-ratio: auto; height: 62vh; overflow: visible; }
.h-track figure:nth-child(even) { margin-top: 6vh; height: 54vh; }
.h-track img { width: auto; height: 100%; object-fit: fill; }
/* teléfonos: el contenido entero dentro del marco (barras negras si no coincide la proporción) */
.phone img, .phone video { object-fit: contain; background: #111; }
/* recortes de papel: la caja toma la proporción real de la foto (ver app.js) */
.torn.fit img { height: auto; object-fit: fill; }
/* Teléfonos: el video/imagen llena toda la pantalla del marco */
.phone > video, .phone img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); max-width: none; object-fit: cover; border-radius: 27px; background: #111; }
@media (max-width: 900px) {
  .phone > video, .phone img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 17px; }
}
/* thinner black meta strip between projects */
.meta div { padding: 11px var(--pad) 12px; }
.meta dt { font-size: 11px; margin-bottom: 3px; }
.meta dd { font-size: 13.5px; line-height: 1.3; }
@media (max-width: 900px) {
  .meta div { padding: 9px var(--pad) 10px; }
}
.phones + .phones { margin-top: clamp(40px, 6vw, 90px); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #111; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
/* LUUM: title-only intro + event videos */
.proj-grid.solo { grid-template-columns: 1fr; max-width: 900px; }
.proj-grid.solo .proj-info { max-width: none; }
.ev-luum { margin-bottom: clamp(40px, 6vw, 90px); }
.ev-vids { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: clamp(10px, 1.4vw, 20px); align-items: center; }
.ev-vids figure { margin: 0; }
.ev-vids video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #111; }
.ev-vids .ev-wide video { aspect-ratio: 960 / 514; }
@media (max-width: 900px) { .ev-vids { grid-template-columns: 1fr 1fr; } .ev-vids .ev-wide { grid-column: 1 / -1; } }
/* Casa Julieta documentary chapters */
.cj-docs figure { position: relative; }
.cj-docs video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #111; }
.cj-docs .snd { bottom: auto; top: 12px; right: 12px; }
.cj-docs figcaption { margin-top: 10px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-2); }
/* cover: all projects grouped by discipline */
.orbits { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.og { position: absolute; display: grid; gap: 2px; pointer-events: auto; width: max-content; max-width: 40%; }
.og-h { margin: 0 0 6px; font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); opacity: 0; transition: opacity .5s ease 0.85s; }
.is-ready .og-h { opacity: 1; }
.orbits .orbit { position: static; padding: 5px 0; }
.og1 { left: -44%; top: 4%; text-align: right; justify-items: end; }
.og2 { right: -44%; top: 4%; }
.og3 { right: -44%; bottom: 2%; }
@media (max-width: 1100px) { .og1 { left: -34%; } .og2, .og3 { right: -34%; } }
@media (max-width: 900px) {
  .cover-stage { margin-bottom: 0; }
  .orbits { position: relative; inset: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: calc(min(78vw, 52svh) + 18px); }
  .og { position: static; max-width: none; width: auto; text-align: left; justify-items: start; }
  .orbits .orbit { white-space: normal; font-size: 11px; line-height: 1.25; }
}
.grid-6.cj-docs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) {
  .cj-docs .snd { top: 6px; right: 6px; padding: 6px 7px 6px 18px; font-size: 11px; }
  .cj-docs .snd::before { left: 7px; width: 6px; height: 6px; margin-top: -3px; }
  .cj-docs figcaption { font-size: 11px; letter-spacing: .04em; }
}
.chapter-in.solo { grid-template-columns: 1fr; }
/* chapter intros: compact title panel only */
.chapter { min-height: 0; height: clamp(340px, 50vw, 624px); justify-content: center; padding: 0 var(--pad); }
.chapter-in { flex: 0 1 auto; grid-template-columns: 1fr; }
.chapter .tabs { display: none; }
@media (max-width: 900px) { .chapter { height: auto; padding: 72px var(--pad); } .chapter-in { padding-bottom: 0; } }
picture { display: contents; }
/* polish: faster reveals so media reads as instant (< 1 s incl. stagger) */
.reveal { transition: opacity .4s ease, transform .5s var(--ease); transition-delay: calc(var(--d, 0) * 50ms); }
.reveal-up { transform: translateY(28px); transition: opacity .4s ease, transform .55s var(--ease); transition-delay: calc(var(--d, 0) * 50ms); }
.reveal-fade { filter: blur(4px); transition: opacity .5s ease, filter .5s ease; }
.reveal-pop { transform: translateY(24px) scale(.97); transition: opacity .4s ease, transform .55s var(--ease); transition-delay: calc(var(--d, 0) * 60ms); }
.reveal-clip img, .reveal-clip video { clip-path: inset(100% 0 0 0); transform: scale(1.06); transition: clip-path .6s var(--ease-io), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 50ms); }
.reveal-clip.is-in img, .reveal-clip.is-in video { clip-path: inset(0); transform: scale(1); }
/* soft placeholder while media decodes, instead of an empty hole */
.grid-6 img, .collage img, .posts img, .pola img, .w-media img { background-color: rgba(34, 24, 42, .06); }
.paper-dark .grid-6 img, .dark-media img { background-color: rgba(253, 243, 225, .05); }
@media (prefers-reduced-motion: reduce) {
  .reveal-clip img, .reveal-clip video { clip-path: none; transform: none; transition: opacity .2s ease; }
}
/* cover intro: everything settled in under ~1 s */
.cover-stage .disc-wrap { transition: opacity .5s ease, transform .8s var(--ease); }
.cover-title .script { transition: clip-path .9s var(--ease-io) .15s; }
.orbit { transition: opacity .35s ease, color .15s ease; transition-delay: calc(.45s + var(--k) * 35ms); }
.og-h { transition: opacity .35s ease .4s; }
.og1 { left: -50%; }
.og2, .og3 { right: -54%; }
.og2 { top: 0; }
@media (max-width: 1100px) { .og1 { left: -34%; } .og2, .og3 { right: -34%; } }
