/* ════════════════════════════════════════════════
   JSF® · Portfolio — estilos
   Color: Sanzo Wada, "A Dictionary of Color Combinations", Nº 166
   (Naples Yellow · Grenadine Pink · Deep Slate Green) + dos mezclas
   entre ellos. Contrastes verificados con WCAG: texto ≥ 4.5:1.
   Tipografía: Archivo variable (Omnibus-Type, Argentina)
   ════════════════════════════════════════════════ */

/* Archivo (Omnibus-Type, OFL) variable: peso 400–900 y ancho 75–125 %.
   Recortada a latín básico + Latin-1 (español e inglés). Otros caracteres latinos caen en
   archivo-ext.woff2, que solo se descarga si aparece alguno. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900; font-stretch: 75% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2032, U+2039-203A, U+20AC, U+2122, U+2191, U+2193;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-ext.woff2") format("woff2");
  font-weight: 400 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ═════════ 01 · TOKENS ═════════ */
:root {
  /* Combinación Nº 166 */
  --naples: #FBE6A0;
  --coral:  #F48067;   /* solo como relleno con texto --slate encima (5.5:1) */
  --slate:  #112F2C;
  /* Mezclas de la misma combinación */
  --peach:  #F8B384;   /* coral + naples · texto slate 8.0:1 */
  --sage:   #D1C58B;   /* slate + naples · texto slate 8.2:1 */

  /* Tema claro */
  --bg:      var(--naples);
  --fg:      var(--slate);
  --muted:   #536048;  /* 5.2:1 sobre naples con textura · 5.4:1 sin */
  --line:    var(--slate);
  --rule:    #C9BD86;
  --surface: #EDDB99;
  --shadow:  var(--slate);
  --ink-bg:  var(--slate);
  --ink-fg:  var(--naples);
  --glass:   rgba(251, 230, 160, 0.82);
  --phone:   var(--slate);

  /* Banda oscura (archivo, marquee) */
  --band-bg:    var(--slate);
  --band-fg:    var(--naples);
  --band-muted: #B0AB7B;   /* 6.1:1 sobre slate */
  --band-line:  #4A5F4F;
  --band-hover: #18403B;

  /* Tipografía */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --display-xl: clamp(2.9rem, 13.5vw, 15rem);
  --display-lg: clamp(2.3rem, 7.5vw, 7.5rem);
  --display-md: clamp(1.5rem, 3.6vw, 3rem);
  --body-lg:    clamp(1.05rem, 1.3vw, 1.25rem);
  --small:      0.875rem;
  --tiny:       0.75rem;

  /* Espaciado (base 8) */
  --s-1: 0.5rem; --s-2: 1rem;   --s-3: 1.5rem; --s-4: 2rem;
  --s-5: 3rem;   --s-6: 4.5rem; --s-7: 7rem;   --s-8: 10rem;

  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --max-w: 84rem;
  --nav-h: 5rem;        /* app.js la reemplaza por el borde inferior real de la nav */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;

  /* Papel: grano fino tipo imprenta + fibras muy suaves. SVG en línea (<1 KB),
     va como fondo de cada superficie: nada de capas fijas que traben el scroll. */
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.18 0 0 0 0 0.17 0 0 0 0.5 -0.24'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --paper-fibers: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035 0.22' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.18 0 0 0 0 0.17 0 0 0 0.24 -0.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --paper: var(--paper-grain), var(--paper-fibers);
  /* Sobre fondos oscuros el grano va claro y más tenue */
  --paper-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.98 0 0 0 0 0.9 0 0 0 0 0.63 0 0 0 0.36 -0.16'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");

  /* Movimiento: un solo lenguaje para toda la página.
     Recorridos cortos, arranque firme y asentado breve, como tinta que se apoya en papel. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);     /* expo-out: llega rápido, sin rebote */
  --ease-ui:  cubic-bezier(0.3, 0.7, 0.2, 1);    /* hover y estados */
  --ease-pop: cubic-bezier(0.3, 1.25, 0.5, 1);   /* un toque de resorte, apenas perceptible */
  --t-ui:    0.18s;    /* hover, color */
  --t-press: 0.09s;    /* al apretar */
  --t-in:    0.56s;    /* apariciones */
  --t-stamp: 0.3s;     /* sellos (chips, etiquetas) */
  --stagger: 45ms;
  --shift:   10px;
}

/* Tema oscuro: se invierte la combinación (slate de fondo, naples de texto) */
[data-theme="dark"] {
  --paper: var(--paper-dark);
  --bg:      var(--slate);
  --fg:      var(--naples);
  --muted:   #B0AB7B;
  --line:    var(--naples);
  --rule:    #2F4A44;
  --surface: #18403B;
  --shadow:  #061412;
  --ink-bg:  var(--naples);
  --ink-fg:  var(--slate);
  --glass:   rgba(17, 47, 44, 0.82);
  --phone:   #061412;

  --band-bg:    #0A1F1D;
  --band-line:  #2C4642;
  --band-hover: #123430;
}

/* ═════════ 02 · BASE ═════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  background-image: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color 0.3s var(--ease-ui), color 0.3s var(--ease-ui);
}

::selection { background: var(--coral); color: var(--slate); }

img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { overflow-wrap: break-word; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: var(--s-2); top: -100%;
  background: var(--fg); color: var(--bg);
  padding: var(--s-1) var(--s-2); z-index: 400; text-decoration: none;
  border-radius: 999px; font-weight: 800;
}
.skip-link:focus { top: var(--s-2); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.label {
  font-size: var(--small); font-weight: 700; font-stretch: 80%;
  text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.35;
}

.display {
  font-weight: 900; font-stretch: 125%;
  text-transform: uppercase; letter-spacing: -0.025em; line-height: 0.9;
}

/* Solo con JS (filtros, vistas). Sin JS el archivo queda como lista de links. */
.js-only { display: none !important; }
.has-js .js-only { display: flex !important; }

/* ═════════ 03 · COMPONENTES ═════════ */

/* ---------- Etiquetas (chips) ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-size: var(--tiny); font-weight: 800; font-stretch: 90%;
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1;
  padding: 0.55em 0.85em;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--slate);
}
.tag--lg   { font-size: 0.82rem; padding: 0.65em 1.05em; }
.tag--ink  { background: var(--ink-bg); color: var(--ink-fg); }
.tag--coral { background: var(--coral); }
.tag--peach { background: var(--peach); }
.tag--sage  { background: var(--sage); }
.tag--naples { background: var(--naples); }
.tag--line { background: transparent; color: currentColor; box-shadow: inset 0 0 0 1.5px currentColor; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Punto "en vivo" con pulso */
.dot {
  position: relative; display: inline-block; flex: none;
  width: 0.55em; height: 0.55em; border-radius: 50%;
  background: currentColor;
}
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: currentColor; animation: ping 1.8s var(--ease-out) infinite;
}
@keyframes ping { 70%, 100% { transform: scale(2.6); opacity: 0; } from { opacity: 0.5; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 3rem; padding: 0.6rem 1.4rem;
  font-weight: 800; font-size: 0.95rem; text-decoration: none; line-height: 1.2;
  background: var(--fg); color: var(--bg);
  border: 2px solid var(--fg);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--coral);
  transition: translate var(--t-ui) var(--ease-ui), box-shadow var(--t-ui) var(--ease-ui), background-color var(--t-ui), color var(--t-ui);
}
.btn:hover, .btn:focus-visible { translate: -2px -2px; box-shadow: 6px 6px 0 var(--coral); }
.btn:active { translate: 2px 2px; box-shadow: 1px 1px 0 var(--coral); transition-duration: var(--t-press); }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: none; }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--sage); color: var(--slate); border-color: var(--fg); box-shadow: 4px 4px 0 var(--fg); }

.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35em;
  min-height: 2.75rem; padding: 0 1.1rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px currentColor;
  font-size: 0.9rem; font-weight: 700; line-height: 1; white-space: nowrap;
  transition: background-color var(--t-ui), color var(--t-ui), box-shadow var(--t-ui), translate var(--t-ui) var(--ease-ui), scale var(--t-ui) var(--ease-ui);
}
.pill-btn:hover { translate: 0 -2px; }
.pill-btn:active { translate: 0; scale: 0.96; transition-duration: var(--t-press); }
.pill-btn.is-on { background: var(--coral); color: var(--slate); box-shadow: inset 0 0 0 1.5px var(--coral); }
.pill-btn--ink { background: var(--slate); color: var(--naples); box-shadow: none; }
.pill-btn--ink.is-copied { background: var(--naples); color: var(--slate); }

.icon-btn {
  display: grid; place-items: center; flex: none;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  box-shadow: inset 0 0 0 2px currentColor;
  font-size: 1rem; font-weight: 900;
  transition: background-color var(--t-ui), color var(--t-ui), rotate 0.28s var(--ease-out), scale var(--t-press) var(--ease-ui);
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--coral); color: var(--slate); box-shadow: inset 0 0 0 2px var(--coral); rotate: 90deg; }
.icon-btn:active { scale: 0.92; }

/* ---------- Badge circular giratorio ---------- */
.badge { display: block; width: clamp(6.5rem, 11vw, 9.5rem); aspect-ratio: 1; }
.badge svg { display: block; width: 100%; height: 100%; }
/* Gira una capa HTML y no el <svg>: rotar un svg obliga a recalcular el layout en cada frame. */
.badge__spin { position: absolute; inset: 0; animation: spin 18s linear infinite; }
.badge__mid { position: absolute; inset: 0; }
.badge__text { font-size: 17.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.badge__center { font-size: 42px; font-weight: 900; }
@keyframes spin { to { rotate: 1turn; } }

/* ---------- Marquees ---------- */
.marquee { overflow: hidden; }
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 26s linear infinite;
  font-size: var(--display-md);
  font-weight: 800; font-stretch: 118%;
  text-transform: uppercase; letter-spacing: -0.01em;
  white-space: nowrap; line-height: 1.15;
  will-change: transform;
}
.marquee__track--reverse { animation-direction: reverse; }
.marquee__track i { font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

.marquee--ink {
  background: var(--band-bg);
  background-image: var(--paper-dark);
  border-block: 3px solid var(--line);
  padding: var(--s-2) 0;
}
.c-naples { color: var(--naples); } .c-coral { color: var(--coral); }
.c-sage { color: var(--sage); }     .c-peach { color: var(--peach); }

.marquee--outline { padding: var(--s-4) 0; }
.marquee--outline .marquee__track {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  font-size: var(--display-lg);
  font-weight: 600; font-stretch: 100%; letter-spacing: 0.02em;
}
@supports not (-webkit-text-stroke: 2px black) {
  .marquee--outline .marquee__track { color: var(--muted); }
}

/* ---------- Franja de chips ---------- */
.band {
  background: var(--coral);
  background-image: var(--paper-grain), var(--paper-fibers);
  border-block: 3px solid var(--line);
  padding: 1rem 0;
  overflow: hidden;
}
.band__track { display: flex; width: max-content; animation: marquee 44s linear infinite; }
.band__track > span { display: flex; gap: 0.6rem; padding-right: 0.6rem; }
.band .tag { font-size: 0.85rem; padding: 0.7em 1.05em; box-shadow: inset 0 0 0 1.5px var(--slate); }
.band .tag--ink { background: var(--slate); color: var(--naples); }

/* ---------- Onda (divisor) ---------- */
.wave { padding: var(--s-6) var(--gutter) 0; max-width: var(--max-w); margin-inline: auto; box-sizing: content-box; }
.wave svg { width: 100%; height: auto; color: var(--fg); }

/* ---------- Cursor (solo puntero fino) ---------- */
.cursor { display: none; }
@media (pointer: fine) and (min-width: 901px) {
  .js .cursor {
    display: block; position: fixed; top: -8px; left: -8px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--naples); mix-blend-mode: difference;
    pointer-events: none; z-index: 500;
  }
}

/* ---------- Fit-text ---------- */
.fit-line { display: block; white-space: nowrap; width: 100%; }
.js .fit-line { overflow: hidden; }
.fit-line .char { display: inline-block; }

/* ---------- Apariciones (las maneja js/motion.js) ----------
   Solo opacity/transform/scale: corren en el compositor, sin tocar el layout.
   Recorrido corto (10px), arranque firme y asentado breve. Al terminar, motion.js
   quita las clases y cada elemento vuelve a sus propias transiciones. */
.rv {
  opacity: 0;
  transform: translate3d(0, var(--shift), 0);
  transition: opacity var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.rv--down  { transform: translate3d(0, calc(var(--shift) * -1), 0); }
.rv--media { transform: translate3d(0, calc(var(--shift) * 1.8), 0); transition-duration: 0.7s; }
/* Sello (hanko): se apoya de golpe y asienta. Para chips, etiquetas y badges. */
.rv--stamp { transform: scale(1.12); transition-duration: 0.14s, var(--t-stamp); }
/* Letras de los títulos: suben desde la línea base, enmascaradas por su renglón */
.rv--char  { opacity: 1; transform: translate3d(0, 104%, 0); transition-duration: 0s, 0.62s; }
/* Cinta del hero: se despliega desde la izquierda (scale, no transform: el skew usa transform) */
.rv--wipe  { opacity: 1; transform: none; scale: 0 1; transform-origin: left center;
             transition: scale 0.6s var(--ease-out) var(--d, 0ms); }
.rv.is-in  { opacity: 1; transform: none; }
.rv--wipe.is-in { scale: 1 1; }
.rv-now, .rv-now::before { transition: none !important; }

/* El bloque de color detrás de las capturas se apoya primero, después las capturas encima */
.case__media.rv-paper::before { opacity: 0; scale: 0.96; transition: opacity 0.3s var(--ease-out), scale 0.6s var(--ease-out); }
.case__media.rv-paper.is-in::before { opacity: 1; scale: 1; }

/* Hasta que motion.js prepara el hero, no se pinta (evita un destello del texto sin animar).
   Si el script no llegara a correr, a los 2,5 s se muestra igual. */
.js:not(.rv-ready) .hero > *, .js:not(.rv-ready) .nav { opacity: 0; animation: rv-safety 0s 2.5s both; }
@keyframes rv-safety { to { opacity: 1; } }

/* Parallax de capturas: motion.js mueve --py (translate, independiente del transform del reveal) */
@property --py { syntax: "<length>"; inherits: false; initial-value: 0px; }
.shot-d, .shot-m { translate: 0 var(--py); }

/* Cintas que se inclinan con la velocidad del scroll: capa propia, sin repintar */
.marquee, .band, .hero__strip { will-change: transform; }

/* ---------- Teléfono (marco de las capturas mobile) ---------- */
.phone {
  border: 7px solid var(--phone);
  border-radius: 1.9rem;
  background: var(--ph, var(--slate));
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--shadow);
}
[data-theme="dark"] .phone { box-shadow: 0 0 0 2px var(--line), 6px 6px 0 var(--shadow); }
.phone img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 390 / 844; object-fit: cover; object-position: top;
  border-radius: 1.3rem;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem;
  transform: translate(-50%, calc(100% + 2rem));
  visibility: hidden;
  background: var(--slate); color: var(--naples);
  box-shadow: inset 0 0 0 2px var(--coral), 4px 4px 0 var(--coral);
  border-radius: 999px;
  font-size: var(--small); font-weight: 800; letter-spacing: 0.02em;
  padding: 0.8rem 1.3rem; z-index: 450;
  transition: transform 0.32s var(--ease-out);
  pointer-events: none; max-width: min(92vw, 30rem); text-align: center;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; }

/* ---------- Panel de contacto ---------- */
.mailsheet {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  padding: var(--s-3);
}
.mailsheet[hidden] { display: none; }
.mailsheet__backdrop { position: absolute; inset: 0; background: rgba(10, 31, 29, 0.72); backdrop-filter: blur(4px); }
.mailsheet__panel {
  position: relative;
  width: 100%; max-width: 28rem;
  background: var(--bg); color: var(--fg);
  border: 3px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 8px 8px 0 var(--coral);
  padding: var(--s-4) var(--s-3) var(--s-3);
  animation: popIn 0.3s var(--ease-out);
}
@keyframes popIn { from { transform: translateY(8px) scale(0.985); opacity: 0; } }
.mailsheet__eyebrow { color: var(--muted); margin-bottom: var(--s-1); padding-right: 3rem; }
.mailsheet__mail {
  font-weight: 900; font-stretch: 110%;
  font-size: clamp(1.1rem, 4.6vw, 1.5rem);
  letter-spacing: -0.01em; overflow-wrap: anywhere;
  margin-bottom: var(--s-3);
}
.mailsheet__actions { display: grid; gap: 0.6rem; }
.mailsheet__actions .btn { width: 100%; justify-content: space-between; }
.mailsheet__close { position: absolute; top: 0.9rem; right: 0.9rem; }
html.is-locked, html.is-locked body { overflow: hidden; }

/* ═════════ 04 · SECCIONES ═════════ */

/* ---------- Nav flotante ---------- */
.nav {
  position: fixed; z-index: 100;
  top: max(0.75rem, env(safe-area-inset-top));
  left: 0; right: 0; margin-inline: auto;
  width: min(100% - 2 * clamp(0.75rem, 3vw, 2rem), var(--max-w));
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.35rem 0.35rem 1.1rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: translate 0.36s var(--ease-out), background-color 0.3s, border-color 0.3s;
}
.nav.is-hidden { translate: 0 calc(-100% - 2rem); }
.nav__logo {
  margin-right: auto;
  font-weight: 900; font-stretch: 125%; font-size: 1.2rem;
  text-decoration: none; letter-spacing: -0.02em; padding: 0.4rem 0;
  white-space: nowrap;
}
.nav__logo sup { font-size: 0.55em; }
.nav__links { display: flex; gap: 0.15rem; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  padding: 0 0.85rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 800; font-stretch: 85%;
  text-transform: uppercase; letter-spacing: 0.08em;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-ui), color var(--t-ui);
}
.nav__link:hover, .nav__link:focus-visible { background: var(--sage); color: var(--slate); }
.nav__tools { display: flex; gap: 0.35rem; }
.tool {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  color: var(--slate);
  box-shadow: inset 0 0 0 2px var(--slate);
  font-weight: 900; font-size: 0.8rem; letter-spacing: 0.04em;
  transition: rotate 0.3s var(--ease-out), scale var(--t-ui) var(--ease-pop);
}
.tool--theme { background: var(--sage); font-size: 1.1rem; }
.tool--lang  { background: var(--coral); }
.tool:hover, .tool:focus-visible { scale: 1.08; }
.tool--theme:hover { rotate: -25deg; }
.tool:active { scale: 0.92; transition-duration: var(--t-press); }

@media (max-width: 420px) {
  .nav { padding-left: 0.9rem; gap: 0.25rem; }
  .nav__link--hide-xs { display: none; }
}

/* Anclas: que los títulos no queden bajo la nav fija */
.section-head, .work, .archive, .skills, .footer, .case { scroll-margin-top: var(--nav-h); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + clamp(7.5rem, 11vw, 10rem)) var(--gutter) var(--s-5);
}
.hero__top {
  position: absolute; top: calc(var(--nav-h) + 1.25rem); left: var(--gutter);
  right: calc(var(--gutter) + clamp(6.5rem, 10vw, 8.5rem) + 1rem);
  display: flex; justify-content: flex-start; align-items: center; gap: 0.75rem 1.5rem; flex-wrap: wrap;
}
.avail {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--slate); color: var(--naples);
  rotate: -1.5deg;
}
[data-theme="dark"] .avail { background: var(--naples); color: var(--slate); }
.hero__coords { color: var(--muted); }

.hero__badge { position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 0.75rem); z-index: 2; width: clamp(6.5rem, 10vw, 8.5rem); }
.hero__badge circle { fill: var(--coral); stroke: var(--slate); stroke-width: 3; }
.hero__badge .badge__text, .hero__badge .badge__center { fill: var(--slate); }

.hero__title { font-size: var(--display-xl); margin-bottom: var(--s-5); }
.hero__line { display: block; }
/* El nombre ya sale con su tamaño final desde el primer pintado: --fit-k es la proporción
   tamaño/ancho que mide fit.js con Archivo. Así nada se corre cuando corre fit.js o llega la fuente. */
.hero__title { container-type: inline-size; }
.hero__line[style*="--fit-k"] { font-size: calc(var(--fit-k) * 100cqi); }
.hero__line--alt { text-shadow: 0.035em 0.035em 0 var(--coral); }
.hero__line .char { display: inline-block; }

.hero__strip {
  display: block; overflow: hidden;
  font-size: clamp(1rem, 2.3vw, 1.8rem); line-height: 1;
  background: var(--coral); color: var(--slate);
  rotate: -1.6deg;
  margin: 0.14em calc(var(--gutter) * -1);
  border-block: 3px solid var(--slate);
  text-shadow: none;
}
.hero__strip-inner {
  display: inline-block; white-space: nowrap;
  font-size: 1em; line-height: 1.2;
  font-weight: 800; font-stretch: 110%; letter-spacing: 0.02em;
  text-transform: none;
  padding: 0.35em 0;
  animation: marquee 18s linear infinite;
}

.hero__bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: var(--s-4); flex-wrap: wrap;
}
.hero__intro { max-width: 34rem; font-size: var(--body-lg); line-height: 1.5; }
.hero__stats { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.stat {
  display: inline-flex; align-items: baseline; gap: 0.4em;
  padding: 0.55rem 1.1rem 0.6rem 0.9rem;
  border-radius: 999px;
  color: var(--slate);
  box-shadow: inset 0 0 0 2px var(--slate), 4px 4px 0 var(--shadow);
  font-size: var(--small); font-weight: 800; font-stretch: 90%;
  text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}
.stat__n { font-size: 1.55em; font-weight: 900; font-stretch: 118%; line-height: 1; }
.stat--sage  { background: var(--sage);  rotate: -2deg; }
.stat--peach { background: var(--peach); rotate: 1.5deg; }
.stat--coral { background: var(--coral); rotate: -1deg; }

/* trama de historieta (decorativa) */
.hero::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: clamp(6rem, 16vw, 14rem); height: clamp(3rem, 8vw, 7rem);
  background-image: radial-gradient(var(--muted) 1.3px, transparent 1.3px);
  background-size: 11px 11px;
  -webkit-mask-image: linear-gradient(45deg, black 30%, transparent 75%);
  mask-image: linear-gradient(45deg, black 30%, transparent 75%);
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero {
    min-height: 0; justify-content: flex-start;
    padding-top: calc(var(--nav-h) + 1.25rem);
    padding-bottom: var(--s-6);
  }
  .hero__top { position: static; margin-bottom: var(--s-5); }
  .hero__badge { display: none; }
}
@media (max-width: 560px) {
  .hero__badge, .hero__coords { display: none; }
  .hero__top { margin-bottom: var(--s-4); }
  .hero__stats { gap: 0.6rem; }
}

/* ---------- Manifiesto ---------- */
.manifesto {
  padding: var(--s-8) var(--gutter);
  max-width: var(--max-w); margin-inline: auto; box-sizing: content-box;
}
.manifesto__text {
  font-size: var(--display-md);
  font-weight: 700; font-stretch: 105%;
  line-height: 1.25; letter-spacing: -0.015em;
  max-width: 60rem;
}
.manifesto__text .word { display: inline-block; }
.js .manifesto__text .word { opacity: 0.14; }
.no-gsap .manifesto__text .word { opacity: 1; }
.mk {
  padding: 0.02em 0.18em; color: var(--slate);
  border-radius: 0.22em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.mk--coral { background: var(--coral); }
.mk--sage  { background: var(--sage); }
.mk--peach { background: var(--peach); }
@media (max-width: 700px) { .manifesto { padding-block: var(--s-7); } }

/* ---------- Encabezado de sección ---------- */
.section-head {
  width: min(100% - 2 * var(--gutter), var(--max-w)); margin-inline: auto;
  padding-block: var(--s-3);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.section-head__tag { color: var(--muted); }
.section-head__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.giant-title {
  font-size: var(--display-xl);
  width: min(100% - 2 * var(--gutter), var(--max-w)); margin-inline: auto;
  padding-bottom: var(--s-4);
}
.giant-title .char { display: inline-block; }

/* ---------- Proyectos destacados ---------- */
.work { padding-bottom: var(--s-6); }

.case {
  width: min(100% - 2 * var(--gutter), var(--max-w)); margin-inline: auto;
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  border-top: 3px solid var(--line);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3.5vw, 3.5rem);
  row-gap: 2.75rem;
  align-items: start;
}

.case__info  { grid-column: 1 / span 5; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.case__media { grid-column: 6 / -1;     grid-row: 1; min-width: 0; position: relative; padding-bottom: clamp(3rem, 5vw, 5rem); }
.case:nth-of-type(even) .case__info  { grid-column: 8 / -1; }
.case:nth-of-type(even) .case__media { grid-column: 1 / span 7; }

@media (min-width: 1024px) and (min-height: 700px) {
  .case__media { position: sticky; top: calc(var(--nav-h) + 2.5rem); }
}

/* Bloque de color detrás de las capturas */
.case__media::before {
  content: ""; position: absolute; z-index: 0;
  inset: 12% -2.5% 1.5rem 14%;
  background: var(--accent);
  background-image: var(--paper-grain), var(--paper-fibers);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 2px var(--slate);
  rotate: 2.5deg;
}
.case:nth-of-type(even) .case__media::before { inset: 12% 14% 1.5rem -2.5%; rotate: -2.5deg; }

.shot-d {
  position: relative; z-index: 1;
  border: 3px solid var(--line);
  border-radius: var(--r);
  background: var(--ph, var(--slate));
  box-shadow: 6px 6px 0 var(--shadow);
}
.shot-d img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: calc(var(--r) - 3px);
}
.shot-btn { display: block; width: 100%; padding: 0; cursor: zoom-in; text-align: left; transition: scale var(--t-press) var(--ease-ui); }
.shot-btn:active { scale: 0.992; }
.shot-btn img { transition: scale 0.4s var(--ease-out), filter var(--t-ui); }
.shot-d .shot-btn { overflow: hidden; border-radius: calc(var(--r) - 3px); }
.shot-d .shot-btn:hover img { scale: 1.025; }
.phone.shot-btn { overflow: hidden; }
.phone.shot-btn:hover img { scale: 1.03; }
.shot-btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.shot-label { position: absolute; z-index: 3; top: -0.85rem; left: 1rem; box-shadow: inset 0 0 0 1.5px var(--slate); }
.shot-m {
  position: absolute; z-index: 2;
  right: -0.75rem; bottom: 0;
  width: clamp(8.5rem, 13.5vw, 12.5rem);
}
.case:nth-of-type(even) .shot-m { right: auto; left: -0.75rem; }
.shot-m .shot-label { top: -0.85rem; left: -0.6rem; }

.case__head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.case__num {
  font-size: clamp(3.5rem, 7vw, 6.25rem);
  font-weight: 900; font-stretch: 125%; line-height: 0.8; letter-spacing: -0.04em;
}
.case__kicker { color: var(--muted); }
.case__title {
  font-size: clamp(2.3rem, 4.3vw, 4.1rem);
  font-weight: 850; font-stretch: 100%;
  line-height: 0.95; letter-spacing: -0.035em;
  text-wrap: balance;
}
.case__context { font-size: var(--body-lg); line-height: 1.55; max-width: 40rem; }
.case__solved ol { margin-top: 0.75rem; border-top: 2px solid var(--line); }
.case__solved li {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.5rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--rule);
  line-height: 1.45;
}
.case__n { font-weight: 900; font-variant-numeric: tabular-nums; }
.case__note {
  background: var(--peach); color: var(--slate);
  padding: 0.85rem 1rem; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 2px var(--slate);
  font-size: 0.95rem; line-height: 1.5;
}
.case__stack { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.case__stack > .label { color: var(--muted); margin-right: 0.25rem; }
.stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stack li {
  font-size: 0.8rem; font-weight: 700; line-height: 1;
  padding: 0.5em 0.85em; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  white-space: nowrap;
}
.case__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: 0.25rem; }

/* ≤1023px: una columna, capturas primero */
@media (max-width: 1023px) {
  .case { grid-template-columns: minmax(0, 1fr); }
  .case .case__media, .case .case__info,
  .case:nth-of-type(even) .case__media, .case:nth-of-type(even) .case__info { grid-column: 1 / -1; }
  .case__media { grid-row: 1; max-width: 44rem; width: 100%; }
  .case__info { grid-row: 2; }
}

/* ≤700px: la captura mobile del proyecto ocupa el bloque completo.
   La versión desktop queda a un toque, en "Ver capturas". */
@media (max-width: 700px) {
  .case { padding-top: var(--s-5); row-gap: 2rem; }
  .case__media {
    padding: 0;
    overflow: hidden;
    border: 3px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--ph, var(--slate));
    box-shadow: 6px 6px 0 var(--accent);
  }
  .case__media::before { display: none; }
  .shot-d { display: none; }
  .shot-m, .case:nth-of-type(even) .shot-m {
    position: relative; left: auto; right: auto; bottom: auto;
    width: 100%; margin: 0;
  }
  .shot-m .phone, [data-theme="dark"] .shot-m .phone {
    border: 0; border-radius: 0; box-shadow: none;
  }
  .shot-m .phone img { aspect-ratio: 4 / 5; border-radius: 0; }
  .shot-m .shot-label { top: 0.85rem; left: 0.85rem; }
  .case__actions .btn { flex: 1 1 auto; }
  /* Modal: la captura mobile llena el ancho */
  .pd .pd__m { width: 100%; height: auto; max-height: none; aspect-ratio: auto; border: 0; border-radius: var(--r-sm); }
  .pd .pd__m img { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--r-sm); }
}

/* ---------- Archivo ---------- */
.archive { background: var(--band-bg); background-image: var(--paper-dark); color: var(--band-fg); }
.archive__inner {
  width: min(100% - 2 * var(--gutter), var(--max-w)); margin-inline: auto;
  padding-block: clamp(4rem, 9vw, 7.5rem);
}
.archive__eyebrow { color: var(--band-muted); }
.archive__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1.5rem; flex-wrap: wrap;
  margin: 1rem 0 2.25rem;
}
.archive__title { font-size: clamp(2.4rem, 7.2vw, 6.5rem); font-stretch: 100%; }
.view-switch { gap: 0.5rem; }

.archive .tag--ink { background: var(--naples); color: var(--slate); }
.archive .pill-btn { color: var(--naples); }
.archive .pill-btn.is-on { color: var(--slate); }

.filters { flex-direction: column; gap: 0.9rem; margin-bottom: 2rem; }
.filters__row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.filters__label { color: var(--band-muted); min-width: 5.5rem; }
.filters__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fchip__c { font-weight: 500; font-variant-numeric: tabular-nums; }
.fchip--focus { color: var(--sage) !important; box-shadow: none; outline: 1.5px dashed var(--band-muted); outline-offset: -1.5px; }
.fchip--focus.is-on { background: var(--naples); color: var(--slate) !important; outline: 0; box-shadow: inset 0 0 0 1.5px var(--naples); }
.fchip--focus:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.filters__count { color: var(--band-muted); font-size: 0.9rem; }

.arc-list { border-bottom: 1px solid var(--band-line); }
.arc-item[hidden] { display: none; }
.arc-row {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) 8rem 10.5rem 2.5rem;
  grid-template-areas: "num main type thumbs go";
  align-items: center; gap: 1.5rem;
  padding: 1.35rem 0.75rem;
  border-top: 1px solid var(--band-line);
  text-decoration: none; color: inherit;
  transition: background-color var(--t-ui) var(--ease-ui);
}
.arc-row:hover { background: var(--band-hover); }
.arc-row:focus-visible { outline-offset: -3px; }
.arc-row__num { grid-area: num; color: var(--band-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.arc-row__main { grid-area: main; display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.arc-row__name {
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  font-weight: 850; letter-spacing: -0.025em; line-height: 1.02;
}
.arc-row__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.arc-row__type { grid-area: type; }
.arc-row__thumbs { grid-area: thumbs; position: relative; display: block; width: 10.5rem; aspect-ratio: 16 / 10.5; }
.arc-row__d {
  width: 86%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: 8px; background: var(--ph);
  box-shadow: 0 0 0 1.5px var(--naples);
  transition: scale 0.32s var(--ease-out);
}
.arc-row__m {
  position: absolute; right: 0; bottom: 0;
  width: 30%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; object-position: top;
  border-radius: 9px; background: var(--ph);
  border: 3px solid var(--naples);
  transition: translate 0.32s var(--ease-out);
}
.arc-row:hover .arc-row__d { scale: 1.04; }
.arc-row:hover .arc-row__m { translate: 0 -6px; }
.arc-row__go { grid-area: go; font-size: 1.6rem; font-weight: 800; color: var(--coral); text-align: right; transition: translate 0.24s var(--ease-out); }
.arc-row:hover .arc-row__go { translate: 0.25rem -0.25rem; }

/* Vista grilla */
.arc-list.is-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem 2rem; border-bottom: 0;
}
.arc-list.is-grid .arc-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "thumbs thumbs" "main main" "type num";
  align-items: start; gap: 1rem;
  padding: 0; border-top: 0;
}
.arc-list.is-grid .arc-row:hover { background: none; }
.arc-list.is-grid .arc-row__thumbs { width: 100%; }
.arc-list.is-grid .arc-row__go { display: none; }
.arc-list.is-grid .arc-row__num { justify-self: end; }
.arc-list.is-grid .arc-row__name { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }

@media (max-width: 1023px) {
  .arc-row { grid-template-columns: 2.5rem minmax(0, 1fr) 8.5rem; grid-template-areas: "num main thumbs"; gap: 1rem; }
  .arc-row__type, .arc-row__go { display: none; }
  .arc-row__thumbs { width: 8.5rem; }
  .arc-list.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arc-list.is-grid .arc-row__type { display: block; }
}
@media (max-width: 700px) {
  .filters__row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .filters__chips {
    flex-wrap: nowrap; overflow-x: auto;
    width: calc(100% + var(--gutter)); padding: 0.2rem var(--gutter) 0.4rem 0.2rem; margin-left: -0.2rem;
    scroll-snap-type: x proximity; scrollbar-width: none;
  }
  .filters__chips::-webkit-scrollbar { display: none; }
  .filters__chips > * { flex: none; scroll-snap-align: start; }
  .arc-row { grid-template-columns: 3.9rem minmax(0, 1fr); grid-template-areas: "thumbs main"; padding: 1rem 0.25rem; }
  .arc-row__num { display: none; }
  .arc-row__thumbs { width: 3.9rem; aspect-ratio: auto; }
  .arc-row__d { display: none; }
  .arc-row__m { position: static; width: 100%; border-radius: 12px; }
  .arc-list.is-grid { grid-template-columns: minmax(0, 1fr); }
  .arc-list.is-grid .arc-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "thumbs thumbs" "main main" "type num"; }
  .arc-list.is-grid .arc-row__num { display: block; }
  .arc-list.is-grid .arc-row__thumbs { aspect-ratio: 16 / 10.5; }
  .arc-list.is-grid .arc-row__d { display: block; }
  .arc-list.is-grid .arc-row__m { position: absolute; width: 30%; border-radius: 9px; }
}

/* ---------- Skills + Experiencia ---------- */
.skills { padding-block: var(--s-6) var(--s-7); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: var(--s-6) var(--s-4);
  width: min(100% - 2 * var(--gutter), var(--max-w)); margin-inline: auto;
  padding-top: var(--s-6);
}
.skills-col .tag { margin-bottom: var(--s-3); box-shadow: inset 0 0 0 2px var(--slate), 3px 3px 0 var(--shadow); }
.skills-col:nth-child(odd) .tag { rotate: -2deg; }
.skills-col:nth-child(even) .tag { rotate: 1.5deg; }
.skills-col li { padding: 0.55rem 0; border-bottom: 1.5px solid var(--line); font-weight: 500; }

.xp {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-4);
  width: min(100% - 2 * var(--gutter), var(--max-w)); margin-inline: auto;
  padding-top: var(--s-6);
  align-items: start;
}
.xp__when { justify-self: start; padding: 0.5rem 0.9rem; border-radius: 999px; background: var(--sage); color: var(--slate); rotate: -1.5deg; }
.xp__role { font-size: var(--display-md); font-weight: 900; font-stretch: 118%; text-transform: uppercase; line-height: 1; margin-bottom: var(--s-3); }
.xp__list li { padding: var(--s-2) 0 var(--s-2) var(--s-4); border-top: 2px solid var(--line); position: relative; }
.xp__list li::before {
  content: "→"; position: absolute; left: 0; top: 1.05rem;
  display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--coral); color: var(--slate); font-weight: 900; font-size: 0.8rem; line-height: 1;
}
@media (max-width: 700px) {
  .skills-grid { gap: var(--s-5) var(--s-3); }
  .xp { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: var(--coral); color: var(--slate);
  background-image: var(--paper-grain), var(--paper-fibers);
  padding: var(--s-7) var(--gutter) var(--s-4);
  border-top: 3px solid var(--slate);
}
.footer__badge { position: absolute; right: var(--gutter); top: calc(var(--s-6) * -0.55); }
.footer__badge circle { fill: var(--sage); stroke: var(--slate); stroke-width: 3; }
.footer__badge .badge__text, .footer__badge .badge__center { fill: var(--slate); }
.footer__eyebrow { margin-bottom: var(--s-4); max-width: 40rem; padding-right: 7rem; }

.footer__cta { display: flex; align-items: baseline; gap: 0.05em; text-decoration: none; width: 100%; overflow: hidden; }
.footer__cta-text { font-size: var(--display-xl); display: inline-block; }
.footer__cta-text .char { display: inline-block; }
.footer__cta-arrow { font-size: var(--display-lg); font-weight: 900; transition: transform 0.3s var(--ease-pop); }
.footer__cta:hover .footer__cta-arrow,
.footer__cta:focus-visible .footer__cta-arrow { transform: translate(0.14em, -0.14em) rotate(8deg); }

.footer__contact { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-5) 0 var(--s-3); }
.footer__mail { font-weight: 800; font-size: 1.1rem; text-decoration: none; border-bottom: 3px solid var(--slate); padding-bottom: 2px; overflow-wrap: anywhere; }
.footer__links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: var(--s-6); }
.footer__links a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  padding: 0 1.1rem; border-radius: 999px;
  font-weight: 800; text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--slate);
  transition: background-color var(--t-ui), color var(--t-ui), scale var(--t-press) var(--ease-ui);
}
.footer__links a:active { scale: 0.96; }
.footer__links a:hover, .footer__links a:focus-visible { background: var(--slate); color: var(--naples); }
.footer :focus-visible { outline-color: var(--slate); }
.footer__base {
  display: flex; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap;
  border-top: 1.5px solid var(--slate);
  padding-top: var(--s-3); font-size: var(--small);
}
.footer__fin { text-align: center; margin-top: var(--s-4); font-weight: 900; font-stretch: 125%; letter-spacing: 0.3em; font-size: var(--tiny); }

@media (max-width: 560px) {
  .footer__badge { width: 5.75rem; top: calc(var(--s-5) * -0.9); }
  .footer__eyebrow { padding-right: 0; margin-top: var(--s-3); }
  .footer__base { flex-direction: column; }
}

/* ---------- Modal de proyecto ---------- */
.pd {
  margin: auto; padding: 0;
  width: min(100% - 2rem, 76rem);
  max-height: min(100dvh - 2rem, 52rem);
  max-width: none;
  background: var(--bg); color: var(--fg);
  border: 3px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 8px 8px 0 var(--coral);
  overflow: hidden;
}
.pd::backdrop { background: rgba(10, 31, 29, 0.74); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.pd[open] { animation: popIn 0.32s var(--ease-out); }
.pd__inner {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  height: min(100dvh - 2rem - 6px, 52rem - 6px);
}
.pd__gallery {
  background: #0A1F1D; color: var(--naples);
  padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; min-height: 0;
}
.pd__switch { display: flex; gap: 0.5rem; }
.pd__stage { flex: 1; min-height: 0; display: grid; place-items: center; }
.pd__d {
  width: 100%; height: auto; max-height: 100%;
  aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: var(--r-sm); background: var(--ph, var(--slate));
}
.pd__d[hidden] { display: none; }
.pd .phone { border-color: var(--naples); box-shadow: none; }
.pd__m { width: auto; height: 100%; max-height: 40rem; aspect-ratio: 390 / 858; }
.pd__m[hidden] { display: none; }
.pd__m img { height: 100%; width: auto; aspect-ratio: 390 / 844; }
.pd__info {
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1.75rem 1.75rem 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.pd__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pd__title { font-size: clamp(2rem, 3.4vw, 3rem); }
.pd .case__context { font-size: 1rem; }
.pd__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; border-top: 2px solid var(--line); }
.pd__step { min-height: 2.75rem; font-weight: 800; text-align: left; line-height: 1.2; max-width: 48%; }
.pd__step--next { text-align: right; margin-left: auto; }
.pd__step:hover .pd__step-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .pd {
    width: 100%; max-height: none; height: 100dvh;
    border: 0; border-radius: 0; box-shadow: none;
  }
  .pd__inner { display: block; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  .pd__gallery { padding: 1rem var(--gutter) 1.25rem; padding-top: max(1rem, env(safe-area-inset-top)); }
  .pd__switch { padding-right: 3.5rem; }
  .pd__stage { flex: none; min-height: 0; }
  .pd__close { position: absolute; top: max(0.85rem, env(safe-area-inset-top)); right: var(--gutter); color: var(--naples); background: #0A1F1D; z-index: 2; }
  .pd__m { height: min(56vh, 30rem); }
  .pd__info { overflow: visible; padding: 1.5rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom)); }
}

/* ---------- Sin motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    /* 0s y no 0.01ms: con 0.01ms TODA propiedad pasa a tener transición (incluido el
       tamaño de letra) y fit.js medía en medio de ella, dejando el nombre cortado. */
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  .rv { opacity: 1 !important; transform: none !important; scale: none !important; }
  .js .manifesto__text .word { opacity: 1; }
}
