/* fonts.css - generado por scripts/self-host-fonts.js (no editar a mano) */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/barlow-400-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/barlow-500-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/barlow-700-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/big-shoulders-display-800-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* ==========================================================================
   tokens.css — Sistema de diseño (design tokens)
   Fuente única de verdad para color, tipografía, espacio, sombras y motion.
   Color en OKLCH. Tema claro/oscuro por [data-theme] + prefers-color-scheme.

   MARCA = RANURAS, no valores por defecto. El scaffold trae tres marcadores que el build DEBE rellenar
   (scripts/verify-site.ps1 check 10 falla mientras quede alguno):
     "Big Shoulders Display"  familia de titulares entre comillas ("Fraunces") — par de references/type-pairings.md
     "Barlow"     familia de texto entre comillas ("Manrope")
     oklch(41.5% 0.054 83) color de acción de la marca, p. ej. oklch(52% 0.18 250): texto blanco encima >= 4.5:1
   Quién los rellena: node scripts/brand/brand-kit.mjs --site <public_html> --apply N (o en modo logo del
   cliente) escribe las familias y el primario verificado aquí y en partials/head.php, y reemplaza el bloque
   @brand-roles (abajo) con los roles de brand/brand-tokens.css (22 pares WCAG verificados en claro y oscuro).
   scripts/self-host-fonts.js sincroniza después las familias con los woff2 servidos desde assets/fonts/.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* --- Paleta base (raw): neutros tinta + papel --- */
  --ink-900: oklch(18% 0.02 260);
  --ink-800: oklch(24% 0.02 260);
  --ink-700: oklch(34% 0.02 260);
  --ink-500: oklch(50% 0.015 260);  /* texto secundario: >= 5:1 sobre papel y papel-2 (footer, bandas) */
  --ink-300: oklch(72% 0.012 260);
  --paper:   oklch(97.5% 0.006 95);
  --paper-2: oklch(94% 0.008 95);
  --white:   oklch(100% 0 0);

  /* Rampa de la marca derivada de UN valor (la ranura). 600 = relleno con texto blanco. */
  --signal-600: oklch(41.5% 0.054 83);
  --signal-700: color-mix(in oklch, var(--signal-600) 80%, black);
  --signal-500: color-mix(in oklch, var(--signal-600) 82%, white);
  --signal-100: color-mix(in oklch, var(--signal-600) 10%, white);

  /* Acento de datos en vivo (solo métricas / highlights, nunca texto pequeño sobre papel) */
  --amber-500: oklch(78% 0.16 78);
  --amber-300: oklch(88% 0.10 85);

  /* Estados (claro: legibles como TEXTO sobre papel/blanco >= 4.5:1) */
  --good:  oklch(50% 0.13 150);
  --warn:  oklch(80% 0.15 80);     /* fondo de avisos (texto oscuro encima), no color de texto */
  --bad:   oklch(52% 0.19 28);

  /* --- Tokens semánticos (tema CLARO por defecto) --- */
  --bg:            var(--paper);
  --bg-elevated:   var(--white);
  --bg-sunken:     var(--paper-2);
  --bg-inverse:    var(--ink-900);

  --text:          var(--ink-900);
  --text-muted:    var(--ink-500);
  --text-inverse:  var(--paper);

  --border:        oklch(88% 0.01 260);
  --border-strong: oklch(80% 0.015 260);

  --primary:           var(--signal-600);   /* RELLENO (botones, bandas) con --primary-contrast encima */
  --primary-strong:    var(--signal-700);
  --primary-contrast:  var(--white);
  --primary-tint:      var(--signal-100);
  /* TEXTO/ícono con color de marca sobre --bg (enlaces, eyebrow, hover): nunca var(--primary) como color de texto */
  --primary-text:      color-mix(in oklch, var(--primary) 80%, var(--text));

  --accent:        var(--amber-500);

  --focus-ring:    var(--signal-600);

  /* --- Tipografía (ranuras de marca) --- */
  --font-display: "Big Shoulders Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;

  /* Escala tipográfica fluida (clamp) — base 16px, ratio ~1.25 */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.40vw, 1.50rem);
  --step-2:  clamp(1.44rem, 1.30rem + 0.70vw, 2.00rem);
  --step-3:  clamp(1.73rem, 1.50rem + 1.15vw, 2.67rem);
  --step-4:  clamp(2.07rem, 1.70rem + 1.85vw, 3.55rem);
  --step-5:  clamp(2.49rem, 1.95rem + 2.70vw, 4.74rem);

  --leading-tight: 1.08;
  --leading-snug:  1.25;
  --leading-body:  1.6;

  --tracking-tight: -0.02em;
  --tracking-wide:  0.16em;

  /* --- Espacio (escala 4px) --- */
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6.5rem;

  /* --- Layout --- */
  --container:      72rem;   /* 1152px */
  --container-wide: 84rem;
  --container-prose: 42rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* --- Radios --- */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* --- Sombras (suaves, papel) --- */
  --shadow-sm: 0 1px 2px oklch(20% 0.02 260 / 0.06), 0 1px 1px oklch(20% 0.02 260 / 0.04);
  --shadow:    0 4px 14px oklch(20% 0.02 260 / 0.08), 0 1px 3px oklch(20% 0.02 260 / 0.06);
  --shadow-lg: 0 18px 50px oklch(20% 0.02 260 / 0.12), 0 4px 12px oklch(20% 0.02 260 / 0.08);

  /* --- Motion (el perfil de references/motion-profiles.json los ajusta vía <html data-motion>) --- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 140ms;
  --dur:      260ms;
  --dur-slow: 520ms;

  --header-h: 4.5rem;
}

/* --- Tema OSCURO ---
   El RELLENO de marca no cambia (texto blanco encima sigue >= 4.5:1); lo que cambia es el color de marca como
   TEXTO (--primary-text, más claro) y el tinte. Antes --primary subía a 62 % L y el blanco encima quedaba 3.9:1. */
[data-theme="dark"] {
  --bg:            var(--ink-900);
  --bg-elevated:   oklch(22% 0.02 260);
  --bg-sunken:     oklch(15% 0.02 260);
  --bg-inverse:    var(--paper);

  --text:          var(--paper);
  --text-muted:    var(--ink-300);
  --text-inverse:  var(--ink-900);

  --border:        oklch(30% 0.02 260);
  --border-strong: oklch(40% 0.02 260);

  --primary-text:  color-mix(in oklch, var(--primary) 55%, white);
  --primary-tint:  color-mix(in oklch, var(--primary) 28%, var(--ink-900));
  --focus-ring:    var(--primary-text);

  --good: oklch(72% 0.16 152);
  --bad:  oklch(70% 0.17 28);

  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.4);
  --shadow:    0 6px 20px oklch(0% 0 0 / 0.45);
  --shadow-lg: 0 24px 60px oklch(0% 0 0 / 0.55);
}

/* Respeta preferencia del sistema cuando no hay override manual */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            var(--ink-900);
    --bg-elevated:   oklch(22% 0.02 260);
    --bg-sunken:     oklch(15% 0.02 260);
    --bg-inverse:    var(--paper);
    --text:          var(--paper);
    --text-muted:    var(--ink-300);
    --text-inverse:  var(--ink-900);
    --border:        oklch(30% 0.02 260);
    --border-strong: oklch(40% 0.02 260);
    --primary-text:  color-mix(in oklch, var(--primary) 55%, white);
    --primary-tint:  color-mix(in oklch, var(--primary) 28%, var(--ink-900));
    --focus-ring:    var(--primary-text);
    --good: oklch(72% 0.16 152);
    --bad:  oklch(70% 0.17 28);
    --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.4);
    --shadow:    0 6px 20px oklch(0% 0 0 / 0.45);
    --shadow-lg: 0 24px 60px oklch(0% 0 0 / 0.55);
  }
}

/* @brand-roles:start — scripts/brand/brand-kit.mjs --apply reemplaza este bloque con brand/brand-tokens.css
   (roles verificados de la paleta de la marca). No editar a mano entre las marcas. */
/* brand-tokens.css — generado por scripts/brand/brand-kit.mjs. Pares verificados: ver brand/brand.json */
:root {
  --primary-50: oklch(97.5% 0.045 140); /* #e7ffe2 */
  --primary-100: oklch(94% 0.057 140); /* #d8f5d1 */
  --primary-200: oklch(88.5% 0.065 140); /* #c3e4bc */
  --primary-300: oklch(80% 0.078 140); /* #a3cb9b */
  --primary-400: oklch(71% 0.091 140); /* #83b079 */
  --primary-500: oklch(62% 0.098 140); /* #65955b */
  --primary-600: oklch(54% 0.098 140); /* #4e7d44 */
  --primary-700: oklch(46% 0.093 140); /* #3a6431 */
  --primary-800: oklch(40.7% 0.098 140); /* #29561f */
  --primary-900: oklch(30% 0.069 140); /* #193613 */
  --primary-950: oklch(22% 0.057 140); /* #0a2106 */
  --accent-50: oklch(97.5% 0.017 67); /* #fff5eb */
  --accent-100: oklch(94% 0.042 67); /* #ffe6cf */
  --accent-200: oklch(88.5% 0.083 67); /* #ffcf9f */
  --accent-300: oklch(75.6% 0.162 67); /* #f3981b */
  --accent-400: oklch(71% 0.150 67); /* #df8c1b */
  --accent-500: oklch(62% 0.138 67); /* #bc7300 */
  --accent-600: oklch(54% 0.120 67); /* #9c5e00 */
  --accent-700: oklch(46% 0.102 67); /* #7d4b00 */
  --accent-800: oklch(38% 0.084 67); /* #603800 */
  --accent-900: oklch(30% 0.067 67); /* #442600 */
  --accent-950: oklch(22% 0.049 66); /* #291500 */
  --neutral-50: oklch(97.5% 0.013 140); /* #f2f9f1 */
  --neutral-100: oklch(94% 0.014 140); /* #e6eee5 */
  --neutral-200: oklch(88.5% 0.015 140); /* #d4dcd3 */
  --neutral-300: oklch(80% 0.015 140); /* #b9c0b7 */
  --neutral-400: oklch(71% 0.017 140); /* #9ca49a */
  --neutral-500: oklch(62% 0.018 140); /* #81897f */
  --neutral-600: oklch(54% 0.018 140); /* #697168 */
  --neutral-700: oklch(46% 0.017 140); /* #535a52 */
  --neutral-800: oklch(38% 0.016 140); /* #3e453d */
  --neutral-900: oklch(30% 0.015 140); /* #2a3029 */
  --neutral-950: oklch(22% 0.014 140); /* #171c16 */
  /* roles (tema claro) */
  --bg: #f2f9f1;
  --surface: #ffffff;
  --text: #2a3029;
  --text-muted: #535a52;
  --bg-sunken: #e6eee5;
  --border: #d4dcd3;
  --control-border: #81897f;
  --primary: #29561f;
  --on-primary: #ffffff;
  --link: #29561f;
  --focus: #65955b;
  --accent: #bc7300;
  --accent-text: #9c5e00;
  --bg-elevated: #ffffff;
  --border-strong: #81897f;
  --primary-contrast: #ffffff;
  --primary-strong: #193613;
  --primary-tint: #d8f5d1;
  --focus-ring: #65955b;
}
[data-theme="dark"] {
  --bg: #171c16;
  --surface: #2a3029;
  --text: #f2f9f1;
  --text-muted: #9ca49a;
  --bg-sunken: #171c16;
  --border: #3e453d;
  --control-border: #697168;
  --primary: #83b079;
  --on-primary: #171c16;
  --link: #83b079;
  --focus: #65955b;
  --accent: #bc7300;
  --accent-text: #df8c1b;
  --bg-elevated: #2a3029;
  --border-strong: #697168;
  --primary-contrast: #171c16;
  --primary-strong: #a3cb9b;
  --primary-tint: #193613;
  --focus-ring: #65955b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171c16;
    --surface: #2a3029;
    --text: #f2f9f1;
    --text-muted: #9ca49a;
    --bg-sunken: #171c16;
    --border: #3e453d;
    --control-border: #697168;
    --primary: #83b079;
    --on-primary: #171c16;
    --link: #83b079;
    --focus: #65955b;
    --accent: #bc7300;
    --accent-text: #df8c1b;
    --bg-elevated: #2a3029;
    --border-strong: #697168;
    --primary-contrast: #171c16;
    --primary-strong: #a3cb9b;
    --primary-tint: #193613;
    --focus-ring: #65955b;
  }
}
/* @brand-roles:end */
/* ==========================================================================
   base.css — Reset moderno + tipografía base + accesibilidad
   ========================================================================== */

/* Reset acotado y predecible */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* auto, not smooth: on this page's height, CSS smooth-scroll interacts badly with any rapid
     programmatic scrollTo() sequence (QA tooling, some browser extensions) - the animation can be
     left mid-flight, stranding a `position: sticky` element in its "scrolled" visual state while
     the real scroll position is still mid-page. Anchor jumps still land correctly, just instantly. */
  scroll-behavior: auto;
  /* Compensa el header fijo al saltar a anclas */
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-synthesis: none;
  /* Reserva ascendente para evitar CLS al cargar la fuente */
  overflow-x: clip;
}

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; }

/* Titulares — equilibrio de líneas (evita huérfanas) */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
p { text-wrap: pretty; }

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

strong { font-weight: 650; }

::selection {
  background: var(--primary);
  color: var(--primary-contrast);
}

/* Foco visible y consistente para teclado (a11y) */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* Saltar al contenido (a11y) */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100%;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus-visible { top: var(--space-md); }

/* Sólo lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Respeta usuarios que reducen movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Viewport fit — el hero llena la pantalla sin recortar; secciones por contenido.
   Ver references/viewport-fit-system.md. "Caber" nunca significa clipear.
   ========================================================================== */

/* HERO: llena EXACTAMENTE una pantalla bajo el header sticky. El header es position:sticky
   (ocupa --header-h EN EL FLUJO), por eso se RESTA --header-h — NO se suma como padding. Sumarlo
   hace el hero = header + 100svh y se pasa de una pantalla (bug real). Contenido centrado, compacto
   y escalable con la altura. NUNCA height:100vh; NUNCA max-height que recorte el TEXTO. El hero se
   diseña para CABER; si el copy fuera excesivo, el salvavidas JS baja la escala (no crece, no clipea). */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: center;
  gap: clamp(0.8rem, 2svh, 1.75rem);
  padding-block: clamp(1rem, 2.4svh, 2.25rem);
  padding-inline: var(--gutter);
}
/* Tope del titular DELIBERADAMENTE bajo (<=3.6rem): en monitores anchos evita el titular gigante
   que se parte en 4 líneas y empuja los CTA fuera de pantalla. Mezcla ancho (vw) + alto (svh). */
.hero__title {
  font-size: clamp(1.9rem, 1.2rem + 2vw + 1.4svh, 3.6rem);
  line-height: 1.05;
  text-wrap: balance;
}
.hero__subtitle { font-size: clamp(1rem, 1.4svh + 0.4vw, 1.3rem); max-width: 46ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Salvavidas opcional: si el contenido excede el alto, encoge la escala (no recorta, no crece). */
[data-hero-fit] > * { font-size: calc(1em * var(--hero-scale, 1)); }

/* Media del hero: en móvil (apilada bajo el texto) se limita para que TEXTO+IMAGEN quepan;
   en escritorio (2 col) se limita para no exceder el alto. object-fit:cover evita deformar. */
/* MÓVIL/TABLET: hero de ALTURA DEFINIDA; el texto va compacto y la 2ª columna apilada (imagen)
   toma SOLO el hueco restante bajo el texto (flex-fill). Así el hero nunca se pasa de una pantalla,
   sin importar el largo del copy — si el texto fuera enorme, la imagen se encoge (no desborda). */
@media (max-width: 59.99rem) {
  /* '.hero .hero-grid' (0,2,0) para GANARLE a layout.css '.hero-grid{display:grid}' (0,1,0), que se
     concatena después; si no, el grid seguiría activo y la imagen no tomaría el hueco restante. */
  .hero { display: flex; height: calc(100svh - var(--header-h)); min-height: 0; align-items: stretch; }
  .hero > .container { display: flex; flex-direction: column; min-height: 0; }
  .hero .hero-grid { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; gap: clamp(0.7rem, 2svh, 1.2rem); align-items: stretch; }
  .hero .hero-grid > :first-child { flex: 0 0 auto; }                                   /* texto: alto natural */
  .hero .hero-grid > :last-child:not(:first-child) { flex: 1 1 auto; min-height: 0; overflow: hidden; aspect-ratio: auto; } /* media: el resto */
  /* !important vence cualquier aspect-ratio/height en línea del autor: la imagen SIEMPRE llena el hueco
     restante y recorta con object-fit (centrado), garantizando que el hero quepa en una pantalla. */
  .hero .hero-grid > :last-child:not(:first-child) img { height: 100% !important; width: 100%; max-height: none !important; object-fit: cover; aspect-ratio: auto !important; }
  .hero__title { font-size: clamp(1.65rem, 5.5vw + 0.4rem, 2.5rem); }
  .hero__lead { font-size: 1rem; line-height: 1.45; }
}
/* ESCRITORIO: 2 columnas; la imagen se limita para no exceder el alto de la pantalla. */
@media (min-width: 60rem) {
  .hero-grid img, .hero-grid > figure, .hero-grid > .hero__media { max-height: calc(100svh - var(--header-h) - 4rem); object-fit: cover; }
}

/* Pantallas de POCA ALTURA: compactar por tramos para caber en laptops cortas / ventanas con
   muchas barras. El desborde real ocurrió a 1920x900 (ancha pero baja), no solo en móvil horizontal. */
@media (max-height: 820px) {
  .hero { padding-block: clamp(0.85rem, 1.8svh, 1.4rem); }
  .hero__title { font-size: clamp(1.7rem, 1.05rem + 1.7vw + 1svh, 2.9rem); }
}
@media (max-height: 660px) {
  .hero__title { font-size: clamp(1.5rem, 1rem + 1.5vw, 2.35rem); line-height: 1.06; }
  .hero__subtitle { font-size: 0.98rem; }
}
@media (max-height: 560px) {
  .hero { min-height: auto; align-content: start; padding-block: clamp(0.75rem, 1.5svh, 1.1rem); }
  .hero__title { font-size: clamp(1.5rem, 6.5vw, 2.2rem); }
}

/* SECCIONES: altura por contenido, NUNCA fija. Padding proporcional. */
.section { padding-block: clamp(3rem, 8vw, 6rem); padding-inline: var(--gutter); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* Sección full-screen SOLO para storytelling deliberado (no de contenido). */
.section--fullscreen {
  min-height: 100svh;      /* NO height:100vh */
  display: grid;
  align-content: center;
}
@media (max-height: 560px) { .section--fullscreen { min-height: auto; } }
/* ==========================================================================
   layout.css — Contenedores, secciones y rejillas
   Layout moderno: grid + flex + container queries + logical properties
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide  { max-width: var(--container-wide); }
.container--prose { max-width: var(--container-prose); }

/* Ritmo vertical por sección */
.section {
  padding-block: var(--space-3xl);
}
.section--tight { padding-block: var(--space-2xl); }
.section--sunken { background: var(--bg-sunken); }
.section--ink {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.section--ink .eyebrow { color: var(--amber-300); }
.section--ink .text-muted { color: var(--ink-300); }

/* Encabezado de sección */
.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-xl);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* Rejilla auto-fit reutilizable (responsive sin media queries) */
.grid {
  display: grid;
  gap: var(--space-lg);
}
.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }

/* Hero: dos columnas que colapsan */
.hero-grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-3xl);
  }
}

/* Cluster (fila flexible con wrap) */
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}
.cluster--between { justify-content: space-between; }

/* Stack (columna con gap) */
.stack { display: flex; flex-direction: column; gap: var(--space-md); }
.stack--lg { gap: var(--space-lg); }

/* Divisor con etiqueta de datos */
.rule {
  height: 1px;
  background: var(--border);
  border: 0;
}

/* Contexto de container query para tarjetas */
.cq { container-type: inline-size; }
/* ==========================================================================
   components.css — Componentes de interfaz
   ========================================================================== */

/* ---------- Eyebrow (etiqueta mono) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--primary-text);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
}
.eyebrow::before {
  content: "";
  inline-size: 1.6rem;
  block-size: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* ---------- Botones ---------- */
.btn {
  --_bg: var(--accent-600, var(--accent));
  /* white, not --primary-contrast: --accent-600 does not change between light/dark modes, but
     --primary-contrast does (calibrated for --primary), so it goes near-black-on-dark-orange in
     dark mode (3.3:1, fails WCAG) - verified white stays >= 4.5:1 against --accent-600 in both modes. */
  --_fg: var(--white, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6ch;
  padding: 0.85rem 1.4rem;
  min-height: 3rem;            /* objetivo táctil >= 48px (INP/a11y) */
  background: var(--_bg);
  color: var(--_fg);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --_bg: transparent;
  --_fg: var(--text);
  border: 1.5px solid var(--border-strong);
}
.btn--ghost:hover { border-color: var(--primary); color: var(--primary-text); }

.btn--lg { padding: 1rem 1.75rem; min-height: 3.4rem; font-size: var(--step-1); }
.btn__arrow { transition: transform var(--dur) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- Header / Navegación ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  block-size: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-block-end: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}
.site-header[data-scrolled="true"] {
  border-block-end-color: var(--border);
  background: color-mix(in oklch, var(--bg) 92%, transparent);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  inline-size: 100%;
  gap: var(--space-lg);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  color: var(--text);
}
.brand__mark {
  inline-size: 2rem; block-size: 2rem;
  display: grid; place-items: center;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
}
.brand__mark span { transform: translateY(-1px); }
/* Logo real (cualquier formato, H8): alto fijo, ancho por proporción intrínseca — nunca deformado. */
.brand__logo { block-size: 2rem; inline-size: auto; max-inline-size: 11rem; object-fit: contain; }

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--step-0);
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  inline-size: 0; block-size: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: inline-size var(--dur) var(--ease-out);
}
.nav-links a:hover::after { inline-size: 100%; }

.nav-actions { display: flex; align-items: center; gap: var(--space-sm); }

@media (min-width: 60rem) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* Toggle de tema */
.icon-btn {
  inline-size: 2.6rem; block-size: 2.6rem;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary-text); }
.icon-btn .sun  { display: none; }
[data-theme="dark"] .icon-btn .sun  { display: block; }
[data-theme="dark"] .icon-btn .moon { display: none; }

/* Menú móvil */
.nav-toggle {
  inline-size: 2.6rem; block-size: 2.6rem;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 99;
  background: var(--bg-elevated);
  border-block-end: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg) var(--gutter) var(--space-xl);
  display: grid;
  gap: var(--space-xs);
  transform: translateY(-110%);
  transition: transform var(--dur) var(--ease-out);
}
.mobile-menu[data-open="true"] { transform: translateY(0); }
.mobile-menu a {
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  padding-block: 0.5rem;
  border-block-end: 1px solid var(--border);
}

/* ---------- HERO ----------
   OJO: la ALTURA/padding del hero los define base.css (viewport-fit: min-height
   calc(100svh - header) + padding compacto). NO volver a poner aquí padding-block
   grande ni min-height:100svh — este archivo se concatena DESPUÉS y ganaría, y el
   hero volvería a pasarse de una pantalla (bug real). Aquí solo estilos visuales. */
.hero { position: relative; }
.hero__title {
  margin-block: 0 var(--space-sm);
}
.hero__title .hl {
  color: var(--primary-text);
  font-style: italic;
}
/* Hero headline accent: one short phrase in a brand-color gradient (kinetic-bold personality). */
.hero__title .hl {
  background: linear-gradient(135deg, var(--primary-400, var(--primary)), var(--accent-500, var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
}
@supports not (background-clip: text) {
  .hero__title .hl { background: none; color: var(--primary-text); }
}
.hero__lead {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: var(--space-xl);
}
.hero__cta { margin-bottom: var(--space-xl); }
.hero__meta {
  display: flex; flex-wrap: wrap;
  gap: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.hero__meta b { color: var(--text); font-weight: 600; }

/* ---------- Instrumento de rendimiento (signature) ---------- */
.instrument {
  position: relative;
  background:
    radial-gradient(120% 120% at 80% 0%, var(--primary-tint) 0%, transparent 55%),
    var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg);
  /* rejilla técnica muy sutil */
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  background-position: -1px -1px;
  overflow: hidden;
}
.instrument::after {
  /* máscara de la rejilla para que se desvanezca */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 30%, var(--bg-elevated) 92%);
  pointer-events: none;
}
.instrument__inner { position: relative; z-index: 1; }
.instrument__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-lg);
}
.instrument__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.live-dot {
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--good);
}
.live-dot::before {
  content: ""; inline-size: 8px; block-size: 8px;
  border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--good) 60%, transparent);
  animation: pulse 2.2s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklch, var(--good) 55%, transparent); }
  70%  { box-shadow: 0 0 0 9px color-mix(in oklch, var(--good) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--good) 0%, transparent); }
}

.gauges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.gauge { text-align: center; }
.gauge__svg { inline-size: 100%; max-inline-size: 7rem; margin-inline: auto; }
.gauge__track { stroke: var(--border); }
.gauge__arc {
  stroke: var(--good);
  stroke-linecap: round;
  transform: rotate(135deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.4s var(--ease-out);
}
.gauge__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--step-1);
  fill: var(--text);
}
.gauge__name {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
}
.gauge__metric { font-weight: 600; color: var(--text); }

.instrument__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.score-badge {
  display: inline-flex; align-items: center; gap: 0.6ch;
  font-weight: 700; color: var(--good);
}
.score-badge b {
  font-size: var(--step-1);
  color: var(--good);
}

/* ---------- Trust / Stats ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  padding: var(--space-xl);
}
.stat { text-align: center; }
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-4);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
}
.stat__num .unit { color: var(--accent); }
.stat__label {
  margin-top: var(--space-xs);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ---------- Tarjetas (con container queries) ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  /* layout+style only, NO paint: .card--glow's halo (effects.css) intentionally
     bleeds outside the box via negative inset — paint containment would clip it. */
  contain: layout style;
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.card__icon {
  inline-size: 2.75rem; block-size: 2.75rem;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--primary-tint);
  color: var(--primary-strong);
  margin-bottom: var(--space-xs);
}
.card__title { font-size: var(--step-1); }
.card__text { color: var(--text-muted); font-size: var(--step-0); }
.card__link {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--primary-text);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5ch;
}
.card__link:hover { gap: 0.9ch; }

/* La tarjeta se adapta a SU contenedor, no al viewport */
@container (min-width: 26rem) {
  .card { flex-direction: row; align-items: flex-start; }
  .card__icon { flex: none; }
}

/* ---------- Proceso (secuencia numerada — el orden SÍ informa) ---------- */
.steps {
  display: grid;
  gap: var(--space-lg);
  counter-reset: step;
}
@media (min-width: 50rem) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}
.step {
  position: relative;
  padding-top: var(--space-lg);
  border-top: 2px solid var(--border);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--primary-text);
}
.step__title { font-size: var(--step-1); margin-block: var(--space-xs); }
.step__text { color: var(--text-muted); font-size: var(--step-0); }
.section--ink .step { border-top-color: var(--ink-700); }

/* ---------- Answer block (AEO: respuesta directa de 40-60 palabras bajo un H2) ----------
   1 por sección con pregunta/tema claro (NO en toda sección, solo donde hay
   una pregunta real que responder). Esto es lo que los motores de IA
   extraen para citar/resumir. Ver references/ai-search-optimization.md. */
.answer-block {
  font-size: 1.05em;
  line-height: 1.6;
  padding: 1.1rem 1.4rem;
  background: var(--bg-elevated);
  border-inline-start: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- FAQ (AEO: pregunta→respuesta, answer-first) ---------- */
/* CONTRATO DE ALINEACION (SKILL.md H7): la seccion FAQ va CENTRADA. Encabezado, intro (.answer-block), acordeon y CTA
   comparten el mismo eje central y el mismo ancho maximo (--faq-w). NUNCA una columna angosta pegada a la izquierda con el
   lado derecho vacio (era el defecto de todos los sitios). Basta con que exista `.faq` dentro de la seccion: el resto se
   centra solo por :has(), sin clases extra. Para un FAQ en 2 columnas, usa .faq-split (mas abajo). */
:root { --faq-w: 50rem; }
.faq { display: grid; gap: var(--space-sm); inline-size: 100%; max-inline-size: var(--faq-w); margin-inline: auto; }
.section:has(.faq) .section-head { margin-inline: auto; text-align: center; max-inline-size: var(--faq-w); }
.section:has(.faq) .answer-block { max-inline-size: var(--faq-w); margin-inline: auto; }
.section:has(.faq) .section-cta { justify-content: center; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}
/* <details class="faq__item"><summary class="faq__q">...</summary> — nativo,
   accesible por teclado/lector de pantalla sin JS, mejor para AEO (más
   citable que un div con JS). list-style:none quita el triángulo nativo. */
.faq__q {
  inline-size: 100%;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  text-align: start;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__question { min-inline-size: 0; text-wrap: pretty; }
.faq__q .chev { transition: transform var(--dur) var(--ease-out); flex: none; margin-block-start: 0.2em; }
.faq__item[open] .chev { transform: rotate(180deg); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease-out);
}
.faq__item[open] .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-muted);
}
/* FAQ en 2 columnas (variante): intro fija a la izquierda y acordeon a la derecha; ambos llenan el contenedor (sin huecos). */
@media (min-width: 60rem) {
  .faq-split { display: grid; grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
  .faq-split > :first-child { position: sticky; inset-block-start: calc(var(--header-h, 4.5rem) + 1.5rem); }
  .faq-split .faq { max-inline-size: none; margin-inline: 0; }
  .section:has(.faq-split) .section-head { text-align: start; margin-inline: 0; }
}


/* ---------- CTA final ---------- */
.cta-band {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 120% at 50% 0%, color-mix(in oklch, var(--primary) 40%, transparent), transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--text-inverse); }
.cta-band p { color: var(--ink-300); max-width: 36rem; margin-inline: auto; }

/* ---------- Formulario ---------- */
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text);
}
.field input, .field textarea {
  inline-size: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--step-0);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  field-sizing: content;          /* CSS 2026: el textarea crece con el contenido */
  min-block-size: 3rem;
}
.field textarea { min-block-size: 7rem; max-block-size: 18rem; }
.field input:focus-visible, .field textarea:focus-visible {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 25%, transparent);
}
.field--error input, .field--error textarea { border-color: var(--bad); }
.field__error {
  font-size: var(--step--1);
  color: var(--bad);
  min-block-size: 1.1em;          /* reserva espacio → sin CLS al validar */
}
.form-status {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.form-status[data-state="ok"]  { background: color-mix(in oklch, var(--good) 18%, transparent); color: var(--good); }
.form-status[data-state="err"] { background: color-mix(in oklch, var(--bad) 16%, transparent); color: var(--bad); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-sunken);
  border-block-start: 1px solid var(--border);
  padding-block: var(--space-2xl) var(--space-xl);
}
.footer-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
}
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.footer-col a:not(.btn) {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  padding-block: 0.35rem;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-col a:not(.btn):hover { color: var(--primary-text); }
.footer-about p { color: var(--text-muted); max-width: 26rem; margin-block: var(--space-md); }
.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: var(--space-md);
  justify-content: space-between; align-items: center;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.footer-nap {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Banner de consentimiento (GA4 Consent Mode v2) ----------
   Oculto por defecto ([hidden] gana la cascada); main.js lo revela solo si
   no hay decisión guardada. Solo se imprime en el HTML si GA4_ID está
   configurado (footer.php) — sin GA4 no hay nada de qué pedir consentimiento. */
.consent-banner {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 180;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: color-mix(in oklch, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-block-start: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.consent-banner p { margin: 0; max-width: 60ch; font-size: var(--step--1); color: var(--text-muted); }
.consent-banner__actions { display: flex; gap: var(--space-sm); flex: none; }
.consent-banner .btn, .consent-banner .btn--ghost { min-height: 2.6rem; padding: 0.6rem 1.2rem; }
@media (max-width: 30rem) {
  .consent-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .consent-banner__actions { justify-content: center; }
}

/* Reveal on scroll: vive en effects.css y solo oculta bajo <html data-reveal-ready> (lo pone motion.js;
   nunca sin JS ni con prefers-reduced-motion). No reintroducir aquí un .reveal { opacity: 0 } incondicional. */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-muted);
  padding-block: var(--space-lg) 0;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-text); }
.breadcrumb [aria-current] { color: var(--text); }

/* Barra de anuncio editable desde /admin (plataforma): aparece solo si hay un anuncio vigente */
.promo-bar { position: relative; z-index: 60; padding: .55rem var(--gutter, 1rem); background: var(--primary); color: var(--primary-contrast, #fff); text-align: center; font-size: var(--step--1, .9rem); font-weight: 600; line-height: 1.35; }
.promo-bar a { color: inherit; text-decoration: underline; text-underline-offset: 3px; margin-inline-start: .5ch; white-space: nowrap; }
/* ==========================================================================
   layouts/_shared.css — base común de la biblioteca de topologías.
   SIEMPRE se incluye en variants.css (antes de las variantes elegidas).
   ========================================================================== */

/* Botón compacto (headers) */
.btn--sm { min-height: 2.6rem; padding: 0.55rem 1.05rem; font-size: var(--step--1); }
.btn--block { inline-size: 100%; }

/* Menú: cerrado = fuera del árbol de foco (antes solo se desplazaba fuera de pantalla y el
   teclado podía enfocar sus enlaces invisibles). visibility se anima con retraso al cerrar. */
.mobile-menu, .menu-overlay { visibility: hidden; transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), visibility 0s linear var(--dur); }
.mobile-menu[data-open="true"], .menu-overlay[data-open="true"] { visibility: visible; transition-delay: 0s; }
.mobile-menu .menu-actions, .menu-overlay .menu-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-block-start: var(--space-md); }
.mobile-menu a[aria-current="page"], .menu-overlay a[aria-current="page"] { color: var(--primary-text); }

/* Menú a pantalla completa (header minimal-menu): tipografía grande, también en escritorio. */
.menu-overlay {
  position: fixed; inset: 0; z-index: 110;
  display: grid; align-content: center; gap: clamp(0.25rem, 1.5svh, 1rem);
  padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
  background: var(--bg);
  opacity: 0;
  overflow-y: auto;
}
.menu-overlay[data-open="true"] { opacity: 1; }
.menu-overlay > a {
  font-family: var(--font-display); font-weight: 600; letter-spacing: var(--tracking-tight);
  font-size: clamp(2rem, 4vw + 1rem, 4.5rem); line-height: 1.05;
  color: var(--text); text-decoration: none; inline-size: fit-content;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur) var(--ease-out);
}
.menu-overlay > a:hover { color: var(--primary-text); transform: translateX(0.4rem); }
.menu-overlay .menu-actions .btn { font-size: var(--step-0); }

/* Etiquetas abrir/cerrar del botón de menú con texto */
.nav-toggle__lbl-close { display: none; }
[aria-expanded="true"] > .nav-toggle__lbl-open { display: none; }
[aria-expanded="true"] > .nav-toggle__lbl-close { display: inline; }

/* Chip de horario en vivo ("Abierto · cierra 7:00 pm") */
.open-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--step--1); font-weight: 600; color: var(--text-muted); white-space: nowrap;
}
.open-chip__dot { inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: var(--text-muted); }
.open-chip.is-open { color: var(--good, oklch(52% 0.13 150)); }
.open-chip.is-open .open-chip__dot { background: currentColor; box-shadow: 0 0 0 0.2rem color-mix(in oklch, currentColor 22%, transparent); }

/* HERO que crece con su contenido (formularios, reservas, menú, reseñas): el titular + CTA
   siguen visibles en la primera pantalla (H9), pero la sección no se fuerza a una altura fija
   que recortaría el formulario en móvil. */
@media (max-width: 59.99rem) {
  .hero.hero--auto { display: block; height: auto; min-height: 0; align-content: start; padding-block: clamp(1.5rem, 4svh, 2.5rem); }
}

/* HERO oscuro sobre imagen (lo usan full-bleed/mosaic y el header overlay): texto claro garantizado. */
.hero--dark { color: var(--white); }
.hero--dark .eyebrow { color: color-mix(in oklch, var(--white) 85%, var(--primary)); }
.hero--dark .hero__lead, .hero--dark p { color: color-mix(in oklch, var(--white) 88%, transparent); }
.hero--dark .btn--ghost { color: var(--white); border-color: color-mix(in oklch, var(--white) 55%, transparent); }
.hero--dark .btn--ghost:hover { border-color: var(--white); color: var(--white); background: color-mix(in oklch, var(--white) 12%, transparent); }

/* Titular con resaltado [[palabra]] -> <em class="hl"> */
.hl { font-style: normal; color: var(--primary-text); }
.hero--dark .hl { color: color-mix(in oklch, var(--primary) 55%, var(--white)); }
/* .hero__title .hl keeps its own gradient treatment (components.css); higher specificity wins over the rule above. */
.hero--dark .hero__title .hl { background: linear-gradient(135deg, var(--primary-300, var(--primary)), var(--accent-400, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Lista de confianza (bullets con check) */
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.trust-list li { display: flex; gap: 0.55rem; align-items: flex-start; }
.trust-list svg { flex: none; color: var(--primary-text); margin-block-start: 0.15rem; }

/* Tabla de horario (footer contact-map, contacto) */
.hours-table { border-collapse: collapse; inline-size: 100%; font-size: var(--step--1); }
.hours-table th, .hours-table td { padding: 0.3rem 0; text-align: start; font-weight: 500; }
.hours-table td { text-align: end; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Línea legal común a todos los footers (incluye el crédito de estudio, H3) */
.footer-legal {
  display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg);
  align-items: center; justify-content: space-between;
  padding-block-start: var(--space-lg); margin-block-start: var(--space-xl);
  border-block-start: 1px solid var(--border);
  font-size: var(--step--1); color: var(--text-muted);
}
.footer-legal__links { display: flex; gap: var(--space-md); }
.footer-legal a { color: inherit; }
.social { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-md); }
.social a { color: inherit; text-decoration: none; font-weight: 500; }
.social a:hover { color: var(--primary-text); }

/* ---------- Robustez móvil (auditoría 320-390 px, SKILL.md H6) ---------- */
/* Hijos de rejillas del hero: sin min-width:0 un botón largo ensancha la columna y desborda. */
.hero [class*="__grid"] > *, .hero [class*="__in"] > * { min-inline-size: 0; }
/* Botones: pueden partir línea en pantallas muy angostas y siempre en bloque. */
.btn--block { white-space: normal; text-align: center; }
@media (max-width: 22.5rem) { .btn { white-space: normal; text-align: center; } }
/* Marca: nunca empuja las acciones fuera de pantalla; área táctil >= 40 px. */
.site-header .brand { min-inline-size: 0; min-block-size: 2.5rem; }
.brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Menú móvil: filas de 44 px (antes 26 px). */
.mobile-menu > a { display: flex; align-items: center; min-block-size: 2.75rem; }
/* Enlaces de texto del footer y enlaces sueltos de llamada: >= 40 px en pantallas táctiles
   (teléfonos Y tablets: hasta 820 px o cualquier puntero grueso). */
@media (max-width: 51.25rem), (pointer: coarse) {
  .site-footer a:not(.btn), .hv-book__call, .ftr-compact__call { display: inline-flex; align-items: center; min-block-size: 2.5rem; }
  .ftr-cols__col, .ftr-dir__col { gap: 0.1rem; }
}
/* Campo trampa anti-spam: <div class="sr-only hp-field" aria-hidden="true"> (oculto a la vista Y a lectores de pantalla). */

/* header: utility-stack — 2 filas; --header-h cubre ambas para que el hero siga cabiendo (H9) */
:root:has(.hdr-util) { --header-h: 7rem; }
.hdr-util { display: block; block-size: var(--header-h); }
.hdr-util__top { background: var(--bg-inverse, var(--ink-900)); color: var(--text-inverse, var(--paper)); font-size: var(--step--1); }
.hdr-util__top-in { display: flex; align-items: center; gap: var(--space-lg); min-block-size: 2.5rem; }
.hdr-util__top a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; min-block-size: 2.5rem; }
.hdr-util__top .open-chip { color: color-mix(in oklch, currentColor 80%, transparent); }
.hdr-util__top .open-chip.is-open { color: oklch(80% 0.15 150); }
.hdr-util__phone { margin-inline-start: auto; font-weight: 700; }
.hdr-util__bar { block-size: calc(var(--header-h) - 2.5rem); }
.hdr-util .nav-links { margin-inline: auto; }
.hdr-util + .mobile-menu { inset-block-start: var(--header-h); }
@media (max-width: 25rem) { .hdr-util__top .open-chip { display: none; } }
@media (max-width: 47.99rem) {
  .hdr-util__area { display: none; }
  .hdr-util__top-in { justify-content: space-between; gap: var(--space-sm); }
}

/* hero: full-bleed-overlay */
.hv-bleed { position: relative; isolation: isolate; overflow: hidden; }
.hv-bleed__media { position: absolute; inset: 0; z-index: -2; }
.hv-bleed__img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 32% 42%; } /* biased toward the grinder + stump action (left-of-center in the source photo) so a narrow mobile crop does not push it off-frame */
.hv-bleed::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, oklch(12% 0.01 260 / 0.82) 0%, oklch(12% 0.01 260 / 0.35) 55%, oklch(12% 0.01 260 / 0.15) 100%); }
/* data-parallax opt-in (effects.css defines it for .hero__media; this hero uses .hv-bleed__media instead) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero[data-parallax] .hv-bleed__media { animation: hero-parallax-scroll linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  }
}
@media (prefers-reduced-motion: reduce) { .hero[data-parallax] .hv-bleed__media { animation: none !important; } }
.hv-bleed__copy { display: grid; gap: clamp(0.7rem, 2svh, 1.2rem); max-inline-size: 48rem; margin-inline: 0; }
.hv-bleed--bottom { align-content: end; padding-block-end: clamp(2rem, 7svh, 4.5rem); }
.hv-bleed--center { text-align: center; }
.hv-bleed--center .hv-bleed__copy { margin-inline: auto; justify-items: center; }
.hv-bleed .hero__title { font-size: clamp(2.1rem, 1.3rem + 3vw + 1svh, 4.6rem); text-shadow: 0 2px 24px oklch(0% 0 0 / 0.35); }
@media (max-width: 59.99rem) {
  .hv-bleed--bottom { align-items: flex-end; }
  .hv-bleed--center { align-items: center; }
  .hv-bleed .hero__title { font-size: clamp(1.8rem, 6vw + 0.6rem, 2.8rem); }
}

/* footer: service-directory */
.ftr-dir__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-lg); padding-block-end: var(--space-xl); border-block-end: 1px solid var(--border); }
.ftr-dir__cta { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.ftr-dir__grid { display: grid; gap: var(--space-xl); padding-block-start: var(--space-xl); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.ftr-dir__col { display: grid; gap: 0.45rem; align-content: start; }
.ftr-dir__col a { color: var(--text-muted); text-decoration: none; }
.ftr-dir__col a:hover { color: var(--primary-text); }
.ftr-dir__h { font-size: var(--step-0); font-family: var(--font-display); margin: 0 0 0.3rem; }
.ftr-dir__areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ftr-dir__areas li { padding: 0.25rem 0.65rem; border-radius: var(--radius-pill); border: 1px solid var(--border); font-size: var(--step--1); }

/* mobile: callbar */
.m-callbar { display: none; }
@media (max-width: 47.99rem) {
  .m-callbar {
    position: fixed; inset: auto 0 0 0; z-index: 170; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom)); background: var(--bg-elevated); border-block-start: 1px solid var(--border); box-shadow: 0 -8px 24px oklch(0% 0 0 / 0.1);
  }
  .m-callbar a { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-block-size: 3rem; border-radius: var(--radius-pill); font-weight: 700; text-decoration: none; }
  .m-callbar__call { background: var(--text); color: var(--bg); }
  .m-callbar__cta { background: var(--primary); color: var(--primary-contrast); }
  body:has(.m-callbar) { padding-block-end: calc(4.2rem + env(safe-area-inset-bottom)); }
  body:has(.m-callbar) .consent-banner { inset-block-end: calc(4.2rem + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   layouts/sections/_base.css — base común de la biblioteca de SECCIONES.
   apply-layout.js la incluye SIEMPRE que haya secciones elegidas (antes de cada arquetipo).
   Solo estructura + tonos: color, tipografía y radios salen de tokens.css (Design DNA).
   ========================================================================== */

/* Ritmo vertical: cada arquetipo fija su propia densidad con --sx-pad (no todas las secciones miden lo mismo). */
.sx { position: relative; padding-block: var(--sx-pad, clamp(3.5rem, 7vw, 6.5rem)); }
.sx > .container, .sx__in { position: relative; }
.sx :where(h2, h3, p, li, dd, dt, figcaption, blockquote) { min-inline-size: 0; overflow-wrap: break-word; }
.sx :where(img) { block-size: auto; }

/* Tonos (el ritmo de la página alterna tonos Y geometrías; el color solo no es variedad).
   --sx-bg = fondo real de la sección (lo usan muescas, puntos y rellenos que deben "perforar" el fondo). */
.sx { --sx-bg: var(--bg); }
.sx--sunken { --sx-bg: var(--bg-sunken); background: var(--bg-sunken); }
.sx--tint { --sx-bg: var(--primary-tint); background: var(--primary-tint); }
.sx--ink { --sx-bg: var(--bg-inverse); }
.sx--primary { --sx-bg: var(--primary); }
.sx--ink, .sx--primary {
  --text: var(--text-inverse);
  --text-muted: color-mix(in oklch, var(--text-inverse) 74%, var(--bg-inverse));
  --border: color-mix(in oklch, var(--text-inverse) 18%, var(--bg-inverse));
  --border-strong: color-mix(in oklch, var(--text-inverse) 32%, var(--bg-inverse));
  --bg-elevated: color-mix(in oklch, var(--text-inverse) 7%, var(--bg-inverse));
  --bg-sunken: color-mix(in oklch, var(--bg-inverse) 88%, black);
  background: var(--bg-inverse); color: var(--text-inverse);
}
.sx--primary {
  --text: var(--primary-contrast);
  --text-muted: color-mix(in oklch, var(--primary-contrast) 82%, var(--primary));
  --border: color-mix(in oklch, var(--primary-contrast) 28%, var(--primary));
  --bg-elevated: color-mix(in oklch, var(--primary-contrast) 10%, var(--primary));
  background: var(--primary); color: var(--primary-contrast);
}
/* Acento para TEXTO pequeno (metadatos, enlaces, cifras): el primario mezclado con el color de texto de la superficie,
   para llegar a 4.5:1 en claro, oscuro y tint aunque el primario de la marca sea medio. Fondos y bordes siguen en --primary. */
.sx, main { --sx-ink-accent: color-mix(in oklab, var(--primary) 62%, var(--text)); }
.sx .eyebrow { color: var(--sx-ink-accent); }
.sx--primary { --sx-ink-accent: var(--text); } /* sobre el color de marca el acento no se distingue: texto pleno */
.sx--ink .eyebrow, .sx--ink .hl { color: color-mix(in oklch, var(--primary) 50%, var(--text-inverse)); }
.sx--primary .eyebrow, .sx--primary .hl { color: var(--primary-contrast); }
.sx--primary .eyebrow::before { background: currentColor; }
.sx--ink .btn--ghost, .sx--primary .btn--ghost { color: var(--text); border-color: var(--border-strong, currentColor); }
.sx--primary .btn:not(.btn--ghost) { background: var(--primary-contrast); color: var(--primary-strong, var(--primary)); }
.sx--ink :focus-visible, .sx--primary :focus-visible { outline-color: currentColor; }

/* Encabezado de sección */
.sx-head { display: grid; gap: var(--space-sm); max-inline-size: 46rem; margin-block-end: clamp(1.75rem, 4vw, 3.25rem); }
.sx-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.sx-title { font-size: var(--sx-title, var(--step-4)); }
.sx-lead { color: var(--text-muted); font-size: var(--step-1); line-height: 1.5; max-inline-size: 62ch; }
.sx-ctas { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }

/* Estrellas recortadas al valor real */
.sx-stars { display: inline-flex; color: var(--accent, oklch(78% 0.16 78)); -webkit-mask: linear-gradient(90deg, #000 var(--pct), oklch(0% 0 0 / 0.22) var(--pct)); mask: linear-gradient(90deg, #000 var(--pct), oklch(0% 0 0 / 0.22) var(--pct)); }
.sx-stars svg { fill: currentColor; }

/* Controles de carril horizontal (sections.js los muestra) */
.sx-railctl { display: flex; gap: var(--space-xs); }
.sx-railctl[hidden] { display: none; }
.sx-railctl__btn { inline-size: 2.9rem; block-size: 2.9rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--text); background: var(--bg-elevated); transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.sx-railctl__btn:hover { border-color: var(--primary); }
.sx-railctl__btn:disabled { opacity: 0.4; cursor: default; }
.sx-flip { transform: scaleX(-1); }

/* Carril con desplazamiento propio: alineado al contenedor, sin desbordar la página (H6). */
.sx .sx-rail { /* .sx + clase: gana al reset ul[role="list"] { padding: 0 } de base.css */
  display: flex; gap: var(--sx-rail-gap, clamp(0.75rem, 2vw, 1.25rem));
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  padding-block: 0.25rem 1rem; scrollbar-width: thin;
}
.sx-rail > * { flex: 0 0 auto; scroll-snap-align: start; min-inline-size: 0; }
.sx-rail:focus-visible { outline-offset: -3px; }

/* Fachada de mapa */
.sx-map { position: relative; display: grid; place-items: center; gap: var(--space-sm); min-block-size: 16rem; border-radius: var(--radius-lg); background: repeating-linear-gradient(45deg, var(--bg-sunken) 0 12px, var(--bg-elevated) 12px 24px); border: 1px solid var(--border); overflow: hidden; }
.sx-map iframe { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; }
.sx-map__load { display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 2.9rem; padding: 0.6rem 1.1rem; border-radius: var(--radius-pill); background: var(--bg-elevated); border: 1px solid var(--border-strong); font-weight: 600; color: var(--text); }
.sx-map__link { font-size: var(--step--1); color: var(--text-muted); min-block-size: 2.5rem; display: inline-flex; align-items: center; }

/* Formularios de lead dentro de secciones (sx_lead_fields): honeypot del kit oculto y casilla SMS opcional */
.sx .hp-field { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sx-consent { display: grid; cursor: pointer; font-weight: 400; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; font-size: var(--step--1); line-height: 1.45; color: var(--text-muted); }
.sx-consent input { appearance: none; -webkit-appearance: none; display: grid; place-content: center; inline-size: 1.5rem; block-size: 1.5rem; margin: 0.1rem 0 0; border: 2px solid currentColor; border-radius: 0.3rem; background: transparent; color: inherit; cursor: pointer; }
.sx-consent input::before { content: ""; inline-size: 0.8rem; block-size: 0.8rem; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); background: var(--primary-contrast, #fff); transform: scale(0); }
.sx-consent input:checked { background: var(--primary); border-color: var(--primary); }
.sx-consent input:checked::before { transform: scale(1); }
.sx-consent input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Migas de pan de páginas interiores */
.sx-crumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: var(--step--1); color: var(--text-muted); }
.sx-crumbs li + li::before { content: "/"; margin-inline-end: 0.5rem; opacity: 0.5; }
.sx-crumbs a { color: inherit; text-decoration: none; display: inline-flex; min-block-size: 2.75rem; min-inline-size: 2.75rem; align-items: center; }
.sx-crumbs a:hover { color: var(--sx-ink-accent); }
.sx-crumbs [aria-current] { display: inline-flex; min-block-size: 2.5rem; align-items: center; }

/* Movimiento: toda animación de sección es opcional y se apaga con reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  .sx *, .sx *::before, .sx *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* section: answer-lede — pregunta + respuesta directa a gran tamaño + ficha de datos al margen */
.sx-ans { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.sx-ans__main { display: grid; gap: 1rem; max-inline-size: 46rem; }
.sx-ans__q { --sx-title: var(--step-3); }
.sx-ans__a.answer-block { margin: 0; padding: 0; border: 0; background: none; font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem); line-height: 1.45; font-weight: 500; color: var(--text); }
.sx-ans__more { display: grid; gap: 0.9rem; color: var(--text-muted); max-inline-size: 62ch; }
.sx-ans__facts { border-block-start: 3px solid var(--primary); padding-block-start: 1rem; }
.sx-ans__facts dl { margin: 0; display: grid; }
.sx-ans__facts dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding-block: 0.7rem; border-block-end: 1px solid var(--border); }
.sx-ans__facts dt { color: var(--text-muted); font-size: var(--step--1); }
.sx-ans__facts dd { margin: 0; font-weight: 700; text-align: end; }
.sx-ans__updated { margin-block-start: 0.75rem; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); }
@media (min-width: 60rem) {
  .sx-ans { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .sx-ans__facts { position: sticky; inset-block-start: calc(var(--header-h) + 1.5rem); }
}

/* section: case-spread — foto a sangre (izq.) + historia del caso (der.), estilo revista */
.sx-case-spread { --sx-pad: 0; }
.sx-case { display: grid; }
.sx-case__media { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-sunken); }
.sx-case__img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.sx-case__body { display: grid; align-content: center; gap: clamp(1rem, 2vw, 1.5rem); padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); }
.sx-case__title { --sx-title: var(--step-4); max-inline-size: 18ch; }
.sx-case__meta { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.sx-case__story { display: grid; gap: 1.1rem; margin: 0; }
.sx-case__story > div { display: grid; gap: 0.3rem; padding-inline-start: 1rem; border-inline-start: 2px solid var(--border-strong); }
.sx-case__story > div:last-child { border-color: var(--primary); }
.sx-case__story dt { font-weight: 700; font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.sx-case__story dd { margin: 0; line-height: 1.6; }
.sx-case__facts { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 0; padding-block-start: 1.25rem; border-block-start: 1px solid var(--border); }
.sx-case__facts > div { display: grid; }
.sx-case__facts dt { font-size: var(--step--1); color: var(--text-muted); order: 2; }
.sx-case__facts dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--step-3); line-height: 1.1; order: 1; }
.sx-case__quote { margin: 0; font-style: italic; color: var(--text-muted); }
.sx-case__quote figcaption { font-style: normal; font-size: var(--step--1); margin-block-start: 0.35rem; }
.sx-case__link { display: inline-flex; align-items: center; gap: 0.5ch; min-block-size: 2.75rem; font-weight: 600; color: var(--sx-ink-accent); text-decoration: none; }
.sx-case__link:hover { gap: 0.9ch; }
@media (min-width: 64rem) {
  .sx-case { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-block-size: min(46rem, 90svh); }
  .sx-case__media { aspect-ratio: auto; }
  .sx-case__body { padding-inline: clamp(2.5rem, 5vw, 5rem) max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); }
}

/* section: decision-table — opciones como columnas con cabecera grande; en móvil cada fila se lee como ficha */
.sx-dec { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-elevated); overflow: hidden; }
.sx-dec__table { inline-size: 100%; border-collapse: collapse; table-layout: fixed; }
.sx-dec__table th, .sx-dec__table td { padding: 1rem clamp(0.75rem, 2vw, 1.5rem); text-align: start; vertical-align: top; border-block-end: 1px solid var(--border); }
.sx-dec__table tbody tr:last-child > * { border-block-end: 0; }
.sx-dec__table thead th { background: var(--bg-sunken); vertical-align: bottom; }
.sx-dec__table thead th + th { border-inline-start: 1px solid var(--border); }
.sx-dec__table tbody td { border-inline-start: 1px solid var(--border); }
.sx-dec__opt { display: block; font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.1; }
.sx-dec__sub { display: block; margin-block-start: 0.3rem; font-size: var(--step--1); font-weight: 500; color: var(--text-muted); }
.sx-dec__table tbody th { font-weight: 600; }
.sx-dec__yes { display: inline-grid; place-items: center; inline-size: 1.9rem; block-size: 1.9rem; border-radius: 50%; background: var(--primary-tint); color: var(--sx-ink-accent); }
.sx-dec__no { color: var(--text-muted); }
.sx-dec__verdict { display: flex; gap: 0.75rem; align-items: flex-start; margin-block: 1.5rem; padding: 1.1rem 1.25rem; border-inline-start: 4px solid var(--primary); background: var(--bg-sunken); border-radius: 0 var(--radius) var(--radius) 0; font-size: var(--step-1); line-height: 1.45; }
.sx-dec__verdict svg { flex: none; color: var(--sx-ink-accent); margin-block-start: 0.2rem; }
@media (min-width: 48rem) {
  .sx-dec__table thead .sx-dec__corner { inline-size: 32%; background: var(--bg-sunken); }
}
/* Móvil: cada criterio es una ficha con "opción: valor" (sin scroll horizontal). */
@media (max-width: 47.99rem) {
  .sx-dec__table, .sx-dec__table tbody, .sx-dec__table tr, .sx-dec__table th, .sx-dec__table td { display: block; }
  .sx-dec__table thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .sx-dec__table tbody tr { padding-block: 0.5rem; border-block-end: 1px solid var(--border); }
  .sx-dec__table tbody tr:last-child { border-block-end: 0; }
  .sx-dec__table tbody th { border: 0; padding-block-end: 0.25rem; font-family: var(--font-display); font-size: var(--step-1); }
  .sx-dec__table tbody td { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 0.75rem; border: 0; padding-block: 0.4rem; }
  .sx-dec__table tbody td::before { content: attr(data-label); font-size: var(--step--1); font-weight: 600; color: var(--text-muted); }
}

/* section: sticky-steps — índice fijo a la izquierda + pasos a gran escala a la derecha */
.sx-steps { display: grid; gap: clamp(1.5rem, 4vw, 4rem); }
.sx-steps__index { display: none; }
.sx-steps__list { display: grid; gap: clamp(2.5rem, 6vw, 5rem); counter-reset: none; }
.sx-steps__step { display: grid; gap: 1rem; scroll-margin-block-start: calc(var(--header-h) + 2rem); }
.sx-steps__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 2rem + 5vw, 6rem); line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px var(--border-strong); letter-spacing: -0.04em; }
.sx-steps__txt { display: grid; gap: 0.6rem; }
.sx-steps__meta { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--sx-ink-accent); }
.sx-steps__title { font-size: var(--step-3); }
.sx-steps__txt p { color: var(--text-muted); max-inline-size: 58ch; }
.sx-steps__img { inline-size: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-lg); }
@media (min-width: 60rem) {
  .sx-steps { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
  .sx-steps__aside { position: sticky; inset-block-start: calc(var(--header-h) + 2rem); display: grid; gap: 1.5rem; }
  .sx-steps__aside .sx-head { margin: 0; }
  .sx-steps__index { display: grid; gap: 0.1rem; border-inline-start: 1px solid var(--border); }
  .sx-steps__index a { display: flex; gap: 0.9rem; align-items: baseline; min-block-size: 2.5rem; padding: 0.45rem 0 0.45rem 1rem; margin-inline-start: -1px; border-inline-start: 2px solid transparent; color: var(--text-muted); text-decoration: none; transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
  .sx-steps__index a span { font-family: var(--font-mono); font-size: var(--step--1); }
  .sx-steps__index a:hover, .sx-steps__index a[aria-current] { color: var(--text); border-inline-start-color: var(--primary); }
  .sx-steps__step { grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 1.5rem; min-block-size: 36svh; align-content: start; padding-block-start: 1.5rem; border-block-start: 1px solid var(--border); }
  .sx-steps__step .sx-steps__img { grid-column: 2; }
}

/* section: index-list — filas tipográficas a todo el ancho, separadas por filetes */
.sx-idx__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-block-end: clamp(1.5rem, 3vw, 2.5rem); }
.sx-idx__top .sx-head { margin: 0; }
.sx-idx { border-block-start: 1px solid var(--border-strong); }
.sx-idx > li { border-block-end: 1px solid var(--border-strong); }
.sx-idx__row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "n name go" ". desc desc" ". meta meta";
  column-gap: clamp(0.75rem, 2vw, 1.5rem); row-gap: 0.3rem; align-items: baseline;
  padding-block: clamp(1rem, 2.4vw, 1.6rem); color: var(--text); text-decoration: none;
  transition: background var(--dur) var(--ease-out), padding var(--dur) var(--ease-out);
}
.sx-idx__n { grid-area: n; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); }
.sx-idx__name { grid-area: name; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.45rem, 1.1rem + 2vw, 2.6rem); line-height: 1.05; letter-spacing: var(--tracking-tight); }
.sx-idx__desc { grid-area: desc; color: var(--text-muted); font-size: var(--step--1); max-inline-size: 48ch; }
.sx-idx__meta { grid-area: meta; font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600; color: var(--sx-ink-accent); white-space: nowrap; }
.sx-idx__go { grid-area: go; align-self: center; display: grid; place-items: center; inline-size: 2.6rem; block-size: 2.6rem; border-radius: 50%; border: 1px solid var(--border-strong); transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
a.sx-idx__row:hover .sx-idx__go, a.sx-idx__row:focus-visible .sx-idx__go { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); transform: rotate(-45deg); }
a.sx-idx__row:hover { background: color-mix(in oklch, var(--primary) 5%, transparent); }
@media (min-width: 56rem) {
  .sx-idx__row { grid-template-columns: 3rem minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.45fr) 2.6rem; grid-template-areas: "n name desc meta go"; align-items: center; }
  .sx-idx__meta { text-align: end; white-space: normal; }
  a.sx-idx__row:hover { padding-inline: 0.75rem; }
}

/* section: area-map-list — mapa cuadrado + lista de zonas en columnas con tiempo de traslado */
.sx-areas { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.sx-areas__map { margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; background: var(--bg-sunken); border: 1px solid var(--border); }
.sx-areas__img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.sx-areas__body { display: grid; gap: 1.25rem; }
.sx-areas__body .sx-head { margin: 0; }
.sx-areas__base { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--text-muted); }
.sx-areas__base svg { flex: none; color: var(--sx-ink-accent); margin-block-start: 0.15rem; }
.sx-areas__base strong { color: var(--text); }
.sx-areas__list { columns: 2 12rem; column-gap: 1.5rem; }
.sx-areas__list li { break-inside: avoid; }
.sx-areas__item { display: flex; align-items: center; gap: 0.6rem; min-block-size: 2.75rem; padding-block: 0.35rem; border-block-end: 1px solid var(--border); color: var(--text); text-decoration: none; }
.sx-areas__item > span { font-weight: 600; min-inline-size: 0; }
.sx-areas__item small { margin-inline-start: auto; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); white-space: nowrap; }
.sx-areas__item svg { flex: none; color: var(--sx-ink-accent); transition: transform var(--dur-fast) var(--ease-out); }
.sx-areas__item.is-link:not(:has(small)) svg { margin-inline-start: auto; }
.sx-areas__item.is-link:hover svg { transform: translateX(3px); }
.sx-areas__item.is-link:hover > span { color: var(--sx-ink-accent); }
.sx-areas:not(.has-map) .sx-areas__list { columns: 3 12rem; }
@media (min-width: 60rem) {
  .sx-areas.has-map { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }
}

/* section: masonry — columnas de alturas libres; cada foto conserva su proporción (width/height reales = sin CLS) */
.sx-mas { columns: 1; column-gap: clamp(0.6rem, 1.6vw, 1rem); }
.sx-mas__item { break-inside: avoid; margin-block-end: clamp(0.6rem, 1.6vw, 1rem); }
.sx-mas__fig { margin: 0; display: grid; gap: 0.45rem; }
.sx-mas__img { inline-size: 100%; block-size: auto; border-radius: var(--radius); background: var(--bg-sunken); }
.sx-mas__link { display: block; border-radius: var(--radius); overflow: hidden; }
.sx-mas__link .sx-mas__img { transition: transform var(--dur-slow) var(--ease-out); }
.sx-mas__link:hover .sx-mas__img { transform: scale(1.03); }
.sx-mas__fig figcaption { font-size: var(--step--1); color: var(--text-muted); line-height: 1.4; }
.sx-mas__ctas { margin-block-start: 1.5rem; }
@media (min-width: 36rem) { .sx-mas { columns: 2; } }
@media (min-width: 64rem) { .sx-mas { columns: 3; } }
@media (min-width: 100rem) { .sx-mas { columns: 4; } }
@media (prefers-reduced-motion: reduce) { .sx-mas__link:hover .sx-mas__img { transform: none; } }

/* section: founder-letter — columna estrecha de lectura + remitente al margen + firma */
.sx-letter { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); }
.sx-letter__from { display: flex; align-items: center; gap: 1rem; }
.sx-letter__photo { inline-size: 5rem; block-size: 5rem; border-radius: 50%; object-fit: cover; flex: none; }
.sx-letter__from p { display: grid; font-size: var(--step--1); color: var(--text-muted); }
.sx-letter__from strong { font-size: var(--step-0); color: var(--text); }
.sx-letter__paper { display: grid; gap: 1.1rem; max-inline-size: 38rem; }
.sx-letter__title { --sx-title: var(--step-3); }
.sx-letter__salute { font-family: var(--font-display); font-style: italic; font-size: var(--step-2); line-height: 1.2; }
.sx-letter__text { display: grid; gap: 1rem; }
.sx-letter__text p { font-size: var(--step-1); line-height: 1.65; }
.sx-letter__text p:first-child::first-letter { float: inline-start; font-family: var(--font-display); font-weight: 700; font-size: 3.4em; line-height: 0.8; padding-inline-end: 0.08em; margin-block-start: 0.08em; color: var(--sx-ink-accent); }
.sx-letter__sign { display: grid; gap: 0.35rem; padding-block-start: 1rem; }
.sx-letter__name { font-family: var(--font-display); font-style: italic; font-size: var(--step-3); line-height: 1.1; }
.sx-letter__sig { inline-size: auto; max-inline-size: 13rem; block-size: auto; }
.sx-letter__date { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); }
@media (min-width: 60rem) {
  .sx-letter { grid-template-columns: 14rem minmax(0, 38rem); justify-content: center; column-gap: clamp(3rem, 6vw, 6rem); }
  .sx-letter__from { position: sticky; inset-block-start: calc(var(--header-h) + 2rem); flex-direction: column; align-items: flex-start; align-self: start; }
  .sx-letter__photo { inline-size: 14rem; block-size: auto; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); }
}

/* section: faq-split — intro + ayuda humana a la izquierda, acordeón a la derecha (usa .faq-split de components.css) */
.sx-faqs { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.sx-faqs__intro { display: grid; gap: 1.5rem; align-content: start; }
.sx-faqs__intro .sx-head { margin: 0; }
.sx-faqs__help { display: grid; gap: 0.75rem; padding: 1.25rem; border-radius: var(--radius-lg); background: var(--bg-sunken); border: 1px solid var(--border); }
.sx-faqs__help > p { font-weight: 600; }
.sx-faqs .faq { max-inline-size: none; margin-inline: 0; }
.sx-faqs .faq__a p + p { padding-block-start: 0; }

/* section: call-close — el número de teléfono a escala de titular es la acción */
.sx-call-close { --sx-pad: clamp(4rem, 10vw, 8rem); }
.sx-cclose { display: grid; justify-items: center; text-align: center; gap: 1.25rem; }
.sx-cclose .sx-head { margin-block-end: 0.5rem; }
.sx-cclose__num {
  display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.2em 0.35em; max-inline-size: 100%;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
  font-size: clamp(2.1rem, 0.9rem + 7vw, 6.5rem); color: var(--text); text-decoration: none;
  padding: 0.2em 0.45em; border-radius: var(--radius-lg); border: 2px solid color-mix(in oklch, currentColor 35%, transparent);
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.sx-cclose__num svg { inline-size: 0.6em; block-size: 0.6em; flex: none; }
.sx-cclose__num span { white-space: nowrap; }
.sx-cclose__num:hover { border-color: currentColor; background: color-mix(in oklch, currentColor 8%, transparent); }
.sx-cclose__chip { color: var(--text); }
.sx-cclose__chip.is-open { color: var(--text); }
.sx-cclose__promises { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.75rem; }
.sx-cclose__promises li { display: inline-flex; gap: 0.45rem; align-items: center; font-weight: 600; }
.sx-cclose__alt { justify-content: center; }
.sx-cclose__alt .btn svg { flex: none; }
@media (max-width: 23rem) { .sx-cclose__num span { white-space: normal; } }

/* section: form-close — promesa + pasos + alternativas | tarjeta de formulario clara sobre fondo de tono */
.sx-fclose { display: grid; gap: clamp(1.75rem, 4vw, 4rem); align-items: start; }
.sx-fclose__copy { display: grid; gap: 1.5rem; }
.sx-fclose__copy .sx-head { margin: 0; }
.sx-fclose__next { display: grid; gap: 0.9rem; }
.sx-fclose__next li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.8rem; align-items: start; }
.sx-fclose__next li span { display: grid; place-items: center; inline-size: 2.25rem; block-size: 2.25rem; border-radius: 50%; border: 1px solid var(--border-strong); font-family: var(--font-mono); font-weight: 700; font-size: var(--step--1); }
.sx-fclose__next li p { padding-block-start: 0.35rem; }
.sx-fclose__alt { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; padding-block-start: 1rem; border-block-start: 1px solid var(--border); }
.sx-fclose__link { display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 2.75rem; color: var(--text); font-weight: 600; text-decoration: none; min-inline-size: 0; overflow-wrap: anywhere; }
.sx-fclose__link:hover { text-decoration: underline; }
/* La tarjeta del formulario siempre en tono claro (legibilidad de campos) aunque la sección sea ink. */
.sx-fclose__form {
  --text: var(--ink-900, oklch(18% 0.02 260)); --text-muted: var(--ink-500, oklch(52% 0.015 260)); --border: oklch(88% 0.01 260); --border-strong: oklch(78% 0.015 260); --bg-elevated: var(--white, #fff);
  display: grid; gap: 0.9rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius-lg); background: var(--white, #fff); color: var(--text); box-shadow: var(--shadow-lg);
}
.sx-fclose__form .field input, .sx-fclose__form .field select, .sx-fclose__form .field textarea { color: var(--text); background: var(--white, #fff); border-color: var(--border-strong); }
.sx-fclose__form .field select { min-block-size: 3rem; padding: 0.6rem 0.8rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.sx-fclose__form :focus-visible { outline-color: var(--primary); }
.sx-fclose__ftitle { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); line-height: 1.15; }
.sx-fclose__note { font-size: var(--step--1); color: var(--text-muted); }
@media (min-width: 60rem) {
  .sx-fclose { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }
}

/* section: visit-block — fachada | dirección + horario | mapa (tres columnas en escritorio) */
.sx-visit { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); align-items: stretch; }
.sx-visit__photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-elevated); }
.sx-visit__img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.sx-visit__info { display: grid; align-content: start; gap: 1.1rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); }
.sx-visit__addr { display: grid; gap: 0.2rem; font-style: normal; }
.sx-visit__addr a { display: flex; gap: 0.6rem; align-items: flex-start; min-block-size: 2.75rem; padding-block: 0.4rem; color: var(--text); text-decoration: none; font-weight: 600; }
.sx-visit__addr a:hover span { color: var(--sx-ink-accent); }
.sx-visit__addr svg { flex: none; color: var(--sx-ink-accent); margin-block-start: 0.15rem; }
.sx-visit__notes { display: grid; gap: 0.6rem; margin: 0; padding-block-start: 1rem; border-block-start: 1px solid var(--border); }
.sx-visit__notes dt { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.sx-visit__notes dd { margin: 0; }
.sx-visit__map { min-block-size: 18rem; }
@media (min-width: 48rem) {
  .sx-visit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sx-visit.has-photo .sx-visit__photo { aspect-ratio: auto; min-block-size: 22rem; }
  .sx-visit.has-photo .sx-visit__map { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .sx-visit.has-photo { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1.15fr); }
  .sx-visit.has-photo .sx-visit__map { grid-column: auto; }
}

/* section: faq-search — buscador grande + chips de tema + grupos; todo sobre el eje --faq-w (H7) */
.sx-faqsearch { display: grid; justify-items: center; }
.sx-faqsearch > * { inline-size: 100%; max-inline-size: var(--faq-w, 50rem); }
.sx-faqsearch__field { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 1rem; border-radius: var(--radius-pill); border: 2px solid var(--border-strong); background: var(--bg-elevated); }
.sx-faqsearch__field[hidden] { display: none; }
.sx-faqsearch__field:focus-within { border-color: var(--primary); }
.sx-faqsearch__field svg { flex: none; color: var(--text-muted); }
.sx-faqsearch__field input { flex: 1 1 auto; min-inline-size: 0; min-block-size: 2.9rem; border: 0; background: transparent; font-size: var(--step-1); color: var(--text); }
.sx-faqsearch__field input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm, 4px); }
.sx-faqsearch__count { flex: none; font-size: var(--step--1); color: var(--text-muted); white-space: nowrap; }
.sx-faqsearch__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-block: 1.25rem 0.5rem; }
.sx-faqsearch__chips a { display: inline-flex; align-items: center; min-block-size: 2.5rem; padding: 0.3rem 0.95rem; border-radius: var(--radius-pill); background: var(--bg-sunken); color: var(--text); font-size: var(--step--1); font-weight: 600; text-decoration: none; }
.sx-faqsearch__chips a:hover { background: var(--primary-tint); }
.sx-faqsearch__group { margin-block-start: clamp(1.5rem, 3vw, 2.25rem); scroll-margin-block-start: calc(var(--header-h) + 1.5rem); }
.sx-faqsearch__group[hidden] { display: none; }
.sx-faqsearch__gh { font-size: var(--step-1); margin-block-end: 0.75rem; padding-block-end: 0.5rem; border-block-end: 1px solid var(--border); }
.sx-faqsearch .faq__item[hidden] { display: none; }
.sx-faqsearch__empty { margin-block-start: 1.5rem; display: grid; gap: 0.75rem; justify-items: center; text-align: center; }
.sx-faqsearch__empty[hidden] { display: none; }

/* section: single-hero-quote — una cita a escala de titular, centrada, mucho aire */
.sx-single-hero-quote { --sx-pad: clamp(4.5rem, 12vw, 10rem); }
.sx-bigquote { display: grid; justify-items: center; text-align: center; gap: clamp(1.5rem, 3vw, 2.5rem); }
.sx-bigquote__fig { margin: 0; display: grid; justify-items: center; gap: clamp(1.5rem, 3vw, 2.25rem); }
.sx-bigquote__text { margin: 0; max-inline-size: 22ch; }
.sx-bigquote__text p {
  font-family: var(--font-display); font-weight: 500; letter-spacing: var(--tracking-tight);
  font-size: clamp(1.7rem, 1.1rem + 3.4vw, 4rem); line-height: 1.1; text-wrap: balance;
}
.sx-bigquote__text p::before { content: "\201C"; }
.sx-bigquote__text p::after { content: "\201D"; }
.sx-bigquote__by { display: inline-flex; align-items: center; gap: 0.85rem; text-align: start; }
.sx-bigquote__by > span { display: grid; gap: 0.1rem; font-size: var(--step--1); color: var(--text-muted); }
.sx-bigquote__by strong { font-size: var(--step-0); color: var(--text); }
.sx-bigquote__by a { color: inherit; display: inline-flex; min-block-size: 2.5rem; align-items: center; }
.sx-bigquote__photo { inline-size: 3.5rem; block-size: 3.5rem; border-radius: 50%; object-fit: cover; }
@media (min-width: 64rem) { .sx-bigquote__text { max-inline-size: 24ch; } }

/* section: review-river — calificación a la derecha del título + carril de citas de ancho variable */
.sx-review-river { --sx-pad: clamp(3.5rem, 7vw, 6rem); overflow: hidden; }
.sx-river__top { display: grid; gap: var(--space-lg); align-items: end; margin-block-end: clamp(1.5rem, 3vw, 2.5rem); }
.sx-river__top .sx-head { margin: 0; }
.sx-river__rating { display: inline-flex; align-items: center; gap: 0.9rem; inline-size: fit-content; padding: 0.75rem 1.1rem 0.75rem 0.9rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); text-decoration: none; }
.sx-river__score { font-family: var(--font-display); font-weight: 700; font-size: var(--step-4); line-height: 1; letter-spacing: var(--tracking-tight); }
.sx-river__meta { display: grid; gap: 0.25rem; font-size: var(--step--1); color: var(--text-muted); }
.sx-river__track { --sx-rail-gap: clamp(0.75rem, 1.6vw, 1.1rem); align-items: stretch; }
.sx-river__item { inline-size: min(84%, 21rem); }
.sx-river__quote { position: relative; block-size: 100%; margin: 0; display: flex; flex-direction: column; gap: 0.9rem; padding: clamp(1.25rem, 2.4vw, 1.75rem); border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); }
.sx-river__quote::before { content: "\201C"; position: absolute; inset-block-start: -0.1em; inset-inline-end: 0.9rem; font-family: var(--font-display); font-size: 5rem; line-height: 1; color: color-mix(in oklch, var(--primary) 30%, transparent); pointer-events: none; }
.sx-river__tag { font-size: var(--step--1); font-weight: 600; color: var(--sx-ink-accent); }
.sx-river__quote blockquote { margin: 0; }
.sx-river__quote blockquote p { font-size: var(--step-0); line-height: 1.55; }
.sx-river__quote figcaption { display: grid; gap: 0.1rem; margin-block-start: auto; font-size: var(--step--1); color: var(--text-muted); padding-block-start: 0.8rem; border-block-start: 1px solid var(--border); }
.sx-river__quote figcaption strong { color: var(--text); }
.sx-river__quote figcaption a { color: inherit; display: inline-flex; min-block-size: 2.5rem; align-items: center; }
.sx-river__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); margin-block-start: var(--space-md); }
@media (min-width: 48rem) {
  .sx-river__top { grid-template-columns: minmax(0, 1fr) auto; }
  .sx-river__item { inline-size: 20rem; }
  .sx-river__item.is-long { inline-size: 30rem; }
  .sx-river__quote blockquote p { font-size: var(--step-1); line-height: 1.45; }
  .sx-river__item:not(.is-long) .sx-river__quote blockquote p { font-size: var(--step-0); }
}

/* section: zip-checker — un campo gigante centrado + respuesta + zonas como chips */
.sx-zip-checker { --sx-pad: clamp(3.5rem, 8vw, 6.5rem); }
.sx-zip { display: grid; justify-items: center; text-align: center; }
.sx-zip__form { display: flex; align-items: stretch; inline-size: min(100%, 30rem); padding: 0.4rem; border-radius: var(--radius-pill); background: var(--bg-elevated); border: 2px solid var(--border-strong); box-shadow: var(--shadow); }
.sx-zip__form:focus-within { border-color: var(--primary); }
.sx-zip__input { flex: 1 1 auto; min-inline-size: 0; inline-size: 100%; border: 0; background: transparent; padding: 0.3rem 1.1rem; font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); letter-spacing: 0.12em; color: var(--text); font-variant-numeric: tabular-nums; }
.sx-zip__input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm, 4px); }
.sx-zip__input::placeholder { color: color-mix(in oklch, var(--text-muted) 55%, transparent); }
.sx-zip__btn { flex: none; }
.sx-zip__out { min-block-size: 1.6em; margin-block: 1.1rem 0.5rem; font-size: var(--step-1); font-weight: 600; max-inline-size: 40ch; }
.sx-zip__out.is-yes { color: var(--good, oklch(52% 0.13 150)); }
.sx-zip__out.is-no, .sx-zip__out.is-bad { color: var(--text); }
.sx-zip__next { margin-block-end: 0.5rem; }
.sx-zip__next[hidden] { display: none; }
.sx-zip__areas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-block-start: 1.25rem; max-inline-size: 48rem; }
.sx-zip__areas a, .sx-zip__areas span { display: inline-flex; align-items: center; min-block-size: 2.5rem; padding: 0.35rem 0.95rem; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); font-size: var(--step--1); font-weight: 600; text-decoration: none; color: var(--text); }
.sx-zip__areas a:hover { border-color: var(--primary); color: var(--sx-ink-accent); }
@media (max-width: 26rem) {
  .sx-zip__form { flex-direction: column; border-radius: var(--radius-lg); gap: 0.4rem; }
  .sx-zip__input { text-align: center; }
}

/* section: timeline-scroll — eje vertical; hitos alternados en escritorio, a un lado en móvil */
.sx .sx-tl { --axis: 0.6rem; position: relative; display: grid; gap: clamp(1.75rem, 4vw, 3rem); padding-inline-start: 2.25rem; }
.sx-tl::before, .sx-tl::after { content: ""; position: absolute; inset-block: 0.4rem 0; inset-inline-start: var(--axis); inline-size: 2px; background: var(--border-strong); }
.sx-tl::after { background: var(--primary); transform-origin: top; transform: scaleY(1); }
.sx-tl__ev { position: relative; display: grid; gap: 0.6rem; }
.sx-tl__ev::before { content: ""; position: absolute; inset-inline-start: calc(-2.25rem + var(--axis) - 0.45rem + 1px); inset-block-start: 0.45rem; inline-size: 0.9rem; block-size: 0.9rem; border-radius: 50%; background: var(--sx-bg, var(--bg)); border: 3px solid var(--primary); z-index: 1; }
.sx-tl__when { font-family: var(--font-display); font-weight: 700; font-size: var(--step-3); line-height: 1; color: var(--sx-ink-accent); font-variant-numeric: tabular-nums; }
.sx-tl__card { display: grid; gap: 0.6rem; padding: clamp(1.1rem, 2.5vw, 1.6rem); border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); }
.sx-tl__title { font-size: var(--step-1); }
.sx-tl__card p { color: var(--text-muted); }
.sx-tl__img { inline-size: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 56rem) {
  .sx .sx-tl { --axis: 50%; padding-inline-start: 0; }
  .sx-tl::before, .sx-tl::after { inset-inline-start: calc(50% - 1px); }
  .sx-tl__ev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 4rem; align-items: start; }
  .sx-tl__ev::before { inset-inline-start: calc(50% - 0.45rem); }
  .sx-tl__ev:nth-child(odd) .sx-tl__when { grid-column: 1; grid-row: 1; text-align: end; }
  .sx-tl__ev:nth-child(odd) .sx-tl__card { grid-column: 2; grid-row: 1; }
  .sx-tl__ev:nth-child(even) .sx-tl__when { grid-column: 2; grid-row: 1; }
  .sx-tl__ev:nth-child(even) .sx-tl__card { grid-column: 1; grid-row: 1; }
  .sx-tl__when { font-size: var(--step-4); }
}
/* Relleno de la línea con el scroll: CSS puro, solo con soporte y sin reduced-motion. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sx-tl { view-timeline-name: --sx-tl; }
    .sx-tl::after { animation: sx-tl-fill linear both; animation-timeline: --sx-tl; animation-range: entry 30% exit 60%; }
    @keyframes sx-tl-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  }
}

/* section: editorial-stat — cifra protagonista + secundarias entre filetes + notas al pie */
.sx-editorial-stat { --sx-pad: clamp(3rem, 7vw, 6rem); }
.sx-estat__head { margin-block-end: clamp(1.5rem, 3vw, 2.5rem); }
.sx-estat__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); border-block-start: 2px solid var(--text); padding-block-start: clamp(1.25rem, 3vw, 2rem); }
.sx-estat__lead { display: grid; align-content: start; gap: 0.5rem; }
.sx-estat__big { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; line-height: 0.85; font-size: clamp(4rem, 2rem + 11vw, 11rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sx-estat__big sup, .sx-estat__row sup { font-size: 0.8rem; font-weight: 600; letter-spacing: 0; vertical-align: super; margin-inline-start: 0.2em; }
.sx-estat__big sup a, .sx-estat__row sup a { color: var(--text-muted); text-decoration: none; padding-inline: 0.15em; }
.sx-estat__label { font-size: var(--step-1); max-inline-size: 26ch; color: var(--text-muted); }
.sx-estat__list { margin: 0; display: grid; align-content: start; }
.sx-estat__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 1rem; padding-block: 1rem; border-block-end: 1px solid var(--border-strong); }
.sx-estat__row:first-child { padding-block-start: 0; }
.sx-estat__row dt { font-size: var(--step-0); color: var(--text-muted); }
.sx-estat__row dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--step-4); line-height: 1; font-variant-numeric: tabular-nums; }
.sx-estat__notes { margin-block-start: clamp(1.5rem, 3vw, 2.5rem); padding-inline-start: 1.25rem; display: grid; gap: 0.25rem; font-size: var(--step--1); color: var(--text-muted); }
.sx-estat__notes a { color: inherit; }
.sx-estat__notes li:target { color: var(--text); }
@media (min-width: 56rem) {
  .sx-estat__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

/* section: giant-type — frase a escala de cartel de borde a borde + una acción */
.sx-giant-type { --sx-pad: clamp(3rem, 8vw, 7rem); overflow: hidden; }
.sx-giant { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.sx-giant__title {
  padding-inline: var(--gutter);
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em; line-height: 0.88;
  font-size: clamp(2.6rem, 0.8rem + 10.5vw, 13rem); text-wrap: balance; overflow-wrap: break-word; hyphens: auto;
}
.sx-giant-type.is-caps .sx-giant__title { text-transform: uppercase; letter-spacing: -0.03em; }
.sx-giant__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block-start: clamp(1rem, 2vw, 1.5rem); border-block-start: 1px solid var(--border-strong); }
.sx-giant__sub { font-size: var(--step-1); max-inline-size: 40ch; color: var(--text-muted); }
@media (min-width: 64rem) { .sx-giant__title { padding-inline: max(var(--gutter), calc((100% - var(--container-wide, 84rem)) / 2 + var(--gutter))); } }

/* section: before-after-grid — pares con comparador; recorte por clip-path (sin mover el layout) */
.sx-bag { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.sx-bag__fig { margin: 0; display: grid; gap: 0.7rem; }
.sx-bag__ba { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-sunken); touch-action: pan-y; }
.sx-bag__img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.sx-bag__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.sx-bag__handle { position: absolute; inset-block: 0; inset-inline-start: var(--pos, 50%); inline-size: 3px; margin-inline-start: -1.5px; background: var(--white, #fff); box-shadow: 0 0 0 1px oklch(0% 0 0 / 0.2); pointer-events: none; }
.sx-bag__handle::after { content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: 50%; inline-size: 2.6rem; block-size: 2.6rem; translate: -50% -50%; border-radius: 50%; background: var(--white, #fff); box-shadow: var(--shadow); background-image: linear-gradient(90deg, transparent 38%, var(--ink-700, #555) 38% 44%, transparent 44% 56%, var(--ink-700, #555) 56% 62%, transparent 62%); }
.sx-bag__tag { position: absolute; inset-block-start: 0.75rem; padding: 0.25rem 0.65rem; border-radius: var(--radius-pill); font-size: var(--step--1); font-weight: 700; background: oklch(12% 0.01 260 / 0.7); color: var(--white, #fff); pointer-events: none; }
.sx-bag__tag--b { inset-inline-start: 0.75rem; }
.sx-bag__tag--a { inset-inline-end: 0.75rem; }
.sx-bag__range { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.sx-bag__range:focus-visible + *, .sx-bag__ba:has(.sx-bag__range:focus-visible) { outline: 3px solid var(--primary); outline-offset: 3px; }
.sx-bag__fig figcaption { display: grid; gap: 0.15rem; }
.sx-bag__fig figcaption span { font-size: var(--step--1); color: var(--text-muted); }
.sx-bag__ctas { margin-block-start: 1.5rem; }
@media (min-width: 56rem) { .sx-bag { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   layouts/pages/_pages.css — cabeceras y bloques propios de las páginas interiores.
   apply-layout.js lo añade a variants.css cuando se instala al menos una página (--pages).
   Cada topología tiene una cabecera DISTINTA (split, a sangre, centrada, editorial, tipográfica,
   rutas, caso); nada de "banner con título" repetido en todas las páginas.
   ========================================================================== */

.pg-head { position: relative; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4.5rem); }
.pg-head .sx-crumbs { margin-block-end: 0.75rem; }
.pg-head__title { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.2rem); line-height: 1.04; max-inline-size: 20ch; }
.pg-head__lead { font-size: var(--step-1); line-height: 1.5; color: var(--text-muted); max-inline-size: 58ch; }
.pg-head__stack { display: grid; gap: 1rem; }
.pg-head .sx-ctas { margin-block-start: 0.5rem; }
.pg-sec-title { font-size: var(--step-3); margin-block-end: clamp(1.25rem, 3vw, 2rem); max-inline-size: 26ch; }
.pg-read { max-inline-size: 44rem; display: grid; gap: 1rem; }
.pg-read h2 { font-size: var(--step-3); margin-block-start: 1rem; }
.pg-read p { font-size: var(--step-1); line-height: 1.65; }

/* --- split: título + ficha fija (service-detail-answer) --- */
.pg-head--split .pg-head__grid { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.pg-head--split .pg-head__copy { display: grid; gap: 1rem; }
.pg-head--split .pg-head__img { inline-size: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); margin-block-start: 0.5rem; }
.pg-facts { display: grid; gap: 0.75rem; padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); box-shadow: var(--shadow); }
.pg-facts dl { margin: 0 0 0.5rem; display: grid; }
.pg-facts dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding-block: 0.65rem; border-block-end: 1px solid var(--border); }
.pg-facts dt { color: var(--text-muted); font-size: var(--step--1); }
.pg-facts dd { margin: 0; font-weight: 700; text-align: end; }
@media (min-width: 64rem) {
  .pg-head--split .pg-head__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .pg-facts { position: sticky; inset-block-start: calc(var(--header-h) + 1.25rem); }
}

/* --- bleed: foto REAL a sangre con título encima (service-detail-proof) --- */
.pg-head--bleed { display: grid; align-items: end; min-block-size: min(40rem, calc(88svh - var(--header-h))); padding-block: clamp(4rem, 12vw, 8rem) clamp(2rem, 5vw, 3.5rem); color: var(--white, #fff); isolation: isolate; overflow: hidden; }
.pg-head--bleed .pg-head__bg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; z-index: -2; }
.pg-head--bleed::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, oklch(12% 0.01 260 / 0.9), oklch(12% 0.01 260 / 0.35) 55%, oklch(12% 0.01 260 / 0.15)); }
.pg-head__over { display: grid; gap: 1rem; }
.pg-head--bleed .pg-head__lead, .pg-head--bleed .sx-crumbs ol { color: color-mix(in oklch, var(--white, #fff) 86%, transparent); }
.pg-head--bleed .eyebrow { color: color-mix(in oklch, var(--white, #fff) 85%, var(--primary)); }
.pg-head--bleed .hl { color: color-mix(in oklch, var(--primary) 50%, var(--white, #fff)); }
.pg-head--bleed .btn--ghost { color: var(--white, #fff); border-color: color-mix(in oklch, var(--white, #fff) 55%, transparent); }

/* --- center: compacta y centrada (service-detail-menu, area-hub, faq-hub, pricing) --- */
.pg-head--center { text-align: center; }
.pg-head--center .pg-head__stack { justify-items: center; }
.pg-head--center .pg-head__title { margin-inline: auto; }
.pg-head--center .sx-crumbs ol { justify-content: center; }
.pg-head--tight { padding-block-end: clamp(0.5rem, 2vw, 1rem); }
.pg-head__price { display: inline-flex; padding: 0.4rem 1rem; border-radius: var(--radius-pill); background: var(--primary-tint); font-family: var(--font-mono); font-weight: 700; }
.pg-head__updated { display: inline-flex; gap: 0.4rem; align-items: center; font-size: var(--step--1); color: var(--text-muted); }

/* --- editorial: título enorme + panorámica (about-story) --- */
.pg-head--editorial { padding-block-end: 0; }
.pg-head--editorial .pg-head__title { font-size: clamp(2.6rem, 1rem + 7vw, 7.5rem); line-height: 0.95; letter-spacing: -0.035em; max-inline-size: 14ch; margin-block-end: 1.25rem; }
.pg-head--editorial .pg-head__lead { margin-block-end: clamp(2rem, 5vw, 3.5rem); }
.pg-head__pano { aspect-ratio: 21 / 9; overflow: hidden; background: var(--bg-sunken); }
.pg-head__pano .pg-head__img { inline-size: 100%; block-size: 100%; object-fit: cover; }
@media (max-width: 40rem) { .pg-head__pano { aspect-ratio: 4 / 3; } }

/* --- type: tipográfica a la izquierda con filete (about-team) --- */
.pg-head--type .pg-head__title { font-size: clamp(2.4rem, 1.2rem + 5vw, 5.5rem); max-inline-size: 16ch; }
.pg-head--type .pg-head__stack { padding-block-end: clamp(1.5rem, 4vw, 2.5rem); border-block-end: 2px solid var(--text); }

/* --- local (location-evidence) --- */
.pg-head--local { background: linear-gradient(180deg, var(--primary-tint), transparent); }
.pg-local__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pg-local__chips li { display: inline-flex; gap: 0.45rem; align-items: center; padding: 0.4rem 0.9rem; border-radius: var(--radius-pill); background: var(--bg-elevated); border: 1px solid var(--border); font-size: var(--step--1); font-weight: 600; }
.pg-local__chips svg { color: var(--sx-ink-accent); flex: none; }
.pg-jobs__list { display: grid; gap: 0.75rem; }
.pg-jobs__item { display: grid; gap: 0.9rem; align-items: center; padding: 1rem; border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); }
.pg-jobs__item.has-img { grid-template-columns: 6rem minmax(0, 1fr); }
.pg-jobs__img { inline-size: 6rem; block-size: 6rem; object-fit: cover; border-radius: var(--radius); }
.pg-jobs__when { font-family: var(--font-mono); font-size: var(--step--1); color: var(--sx-ink-accent); }
.pg-jobs__txt h3 { font-size: var(--step-1); }
.pg-jobs__txt a { color: inherit; }
@media (min-width: 48rem) { .pg-jobs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pg-localrev__grid { display: grid; gap: 1rem; }
.pg-localrev__q { margin: 0; padding: 1.25rem 1.5rem; border-inline-start: 4px solid var(--primary); background: var(--bg-sunken); border-radius: 0 var(--radius) var(--radius) 0; }
.pg-localrev__q p { font-size: var(--step-1); }
.pg-localrev__q figcaption { margin-block-start: 0.5rem; font-size: var(--step--1); color: var(--text-muted); }
@media (min-width: 48rem) { .pg-localrev__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pg-localfacts__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.pg-localfacts__list { display: grid; gap: 1rem; }
.pg-localfacts__list li { display: grid; gap: 0.25rem; padding-block-end: 1rem; border-block-end: 1px solid var(--border); }
.pg-localfacts__list a { font-size: var(--step--1); color: var(--text-muted); inline-size: fit-content; display: inline-flex; min-block-size: 2.5rem; align-items: center; }
.pg-localfacts__hoods h3 { font-size: var(--step-1); margin-block-end: 0.75rem; }
.pg-localfacts__hoods ul { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pg-localfacts__hoods li { padding: 0.3rem 0.8rem; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); font-size: var(--step--1); }
@media (min-width: 60rem) { .pg-localfacts__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

/* --- routes: contacto enrutado por intención --- */
.pg-routes { display: grid; gap: 0.9rem; margin-block-start: clamp(1.5rem, 4vw, 2.5rem); }
.pg-routes__item { display: grid; gap: 0.6rem; align-content: start; padding: clamp(1.1rem, 2.5vw, 1.5rem); border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); }
.pg-routes__label { font-size: var(--step-1); }
.pg-routes__item p { color: var(--text-muted); font-size: var(--step--1); }
.pg-routes__go { display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 2.75rem; margin-block-start: auto; font-weight: 700; color: var(--sx-ink-accent); text-decoration: none; overflow-wrap: anywhere; }
.pg-routes__go:hover { text-decoration: underline; }
@media (min-width: 48rem) { .pg-routes { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }

/* --- case: título, foto a todo el ancho, ficha técnica --- */
.pg-head--case { padding-block-end: 0; }
.pg-head--case .pg-head__title { max-inline-size: 22ch; margin-block-end: clamp(1.25rem, 3vw, 2rem); }
.pg-case__hero { aspect-ratio: 16 / 7; overflow: hidden; background: var(--bg-sunken); }
.pg-case__hero .pg-head__img { inline-size: 100%; block-size: 100%; object-fit: cover; }
@media (max-width: 40rem) { .pg-case__hero { aspect-ratio: 4 / 3; } }
.pg-case__sheet { display: grid; gap: 1.5rem; padding-block-start: clamp(1.5rem, 4vw, 2.5rem); }
.pg-case__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 1rem 1.5rem; margin: 0; padding-block-start: 1rem; border-block-start: 1px solid var(--border-strong); }
.pg-case__meta dt { font-size: var(--step--1); color: var(--text-muted); }
.pg-case__meta dd { margin: 0; font-weight: 700; }
.pg-case__meta a { color: inherit; }
.pg-case__meta .is-fact dd { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.1; }
@media (min-width: 60rem) { .pg-case__sheet { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }
.pg-case__result-text { font-size: var(--step-2) !important; line-height: 1.4 !important; font-family: var(--font-display); }
.pg-next { padding-block: clamp(2rem, 5vw, 3.5rem); }
.pg-next a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.25rem 1rem; padding-block: 1.5rem; border-block: 1px solid var(--border-strong); color: var(--text); text-decoration: none; }
.pg-next span { grid-column: 1; font-size: var(--step--1); color: var(--text-muted); }
.pg-next strong { grid-column: 1; font-family: var(--font-display); font-size: var(--step-3); line-height: 1.1; }
.pg-next svg { grid-column: 2; grid-row: 1 / span 2; transition: transform var(--dur) var(--ease-out); }
.pg-next a:hover svg { transform: translateX(6px); }

/* --- bloques compartidos --- */
.pg-incl__grid { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); }
.pg-incl__title { font-size: var(--step-3); }
.pg-incl__yes { display: grid; gap: 0.6rem; }
.pg-incl__yes li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: var(--step-1); }
.pg-incl__yes svg { flex: none; color: var(--sx-ink-accent); margin-block-start: 0.25rem; }
.pg-incl__no { padding: 1.25rem; border-radius: var(--radius-lg); border: 1px dashed var(--border-strong); }
.pg-incl__no h3 { font-size: var(--step-0); margin-block-end: 0.5rem; }
.pg-incl__no ul { display: grid; gap: 0.35rem; color: var(--text-muted); padding-inline-start: 1.1rem; }
@media (min-width: 60rem) { .pg-incl__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr) minmax(0, 0.9fr); align-items: start; } }

.pg-problem__grid { display: grid; gap: clamp(1.5rem, 4vw, 4rem); }
.pg-problem__title { font-size: var(--step-4); max-inline-size: 18ch; margin-block-end: 1rem; }
.pg-problem__text { font-size: var(--step-1); line-height: 1.6; color: var(--text-muted); max-inline-size: 56ch; }
.pg-problem__signs h3 { font-size: var(--step-0); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); margin-block-end: 0.75rem; }
.pg-problem__signs ol { display: grid; }
.pg-problem__signs li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.5rem; padding-block: 0.85rem; border-block-end: 1px solid var(--border); font-size: var(--step-1); }
.pg-problem__signs li span { font-family: var(--font-mono); font-size: var(--step--1); color: var(--sx-ink-accent); padding-block-start: 0.3rem; }
@media (min-width: 60rem) { .pg-problem__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }

.pg-factors__title { font-size: var(--step-3); margin-block-end: clamp(1.25rem, 3vw, 2rem); }
.pg-factors__list { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.pg-factors__list li { display: grid; gap: 0.4rem; align-content: start; padding: clamp(1.1rem, 2.5vw, 1.6rem); background: var(--bg); }
.pg-factors__n { font-family: var(--font-display); font-weight: 700; font-size: var(--step-3); line-height: 1; color: var(--sx-ink-accent); }
.pg-factors__list h3 { font-size: var(--step-1); }
.pg-factors__list p { color: var(--text-muted); font-size: var(--step--1); line-height: 1.55; }
@media (min-width: 48rem) { .pg-factors__list { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }

.pg-values__list { display: grid; gap: 0; margin: 0; border-block-start: 2px solid var(--text); }
.pg-values__list > div { display: grid; gap: 0.4rem; padding-block: 1.25rem; border-block-end: 1px solid var(--border-strong); }
.pg-values__list dt { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); line-height: 1.1; }
.pg-values__list dd { margin: 0; color: var(--text-muted); max-inline-size: 60ch; }
@media (min-width: 56rem) { .pg-values__list > div { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 2rem; align-items: baseline; } }

.pg-how__grid { display: grid; gap: clamp(1.25rem, 3vw, 3rem); }
.pg-how__list { display: grid; gap: 1.25rem; counter-reset: how; }
.pg-how__list li { counter-increment: how; display: grid; gap: 0.35rem; padding-inline-start: 3rem; position: relative; }
.pg-how__list li::before { content: counter(how); position: absolute; inset-inline-start: 0; inset-block-start: 0; display: grid; place-items: center; inline-size: 2.1rem; block-size: 2.1rem; border-radius: 50%; background: var(--primary); color: var(--primary-contrast); font-weight: 700; font-size: var(--step--1); }
.pg-how__list h3 { font-size: var(--step-1); }
.pg-how__list p { color: var(--text-muted); }
@media (min-width: 60rem) { .pg-how__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); } .pg-how__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2.5rem; } }
/* ==========================================================================
   effects.css — Menú de efectos premium + motor de movimiento por perfil
   ==========================================================================
   ESTO ES UN MENÚ, NO UN CHECKLIST. La restricción es la señal de "caro":
   elige 1 "momento estrella" por página + 2-3 acentos de apoyo, nunca los
   apila todos. Ver web-standards-2026.md + card-system-glass-glow.md.

   PERFILES DE MOVIMIENTO (references/motion-profiles.json): <html data-motion="id">
   cambia easing, duraciones, estilo de reveal, lenguaje de hover, presión,
   scroll y View Transitions con tokens. El bloque de tokens de cada perfil está
   GENERADO (components/interactive/motion-sync.js); el resto de este archivo solo lee
   tokens. Sin data-motion todo funciona con los tokens de tokens.css.

   REGLAS DE SEGURIDAD (auditoría 2026-09-24):
   - El contenido NUNCA se oculta sin JS: el estado oculto del reveal solo existe
     con <html data-reveal-ready> (lo pone motion.js tras observar) y sin
     prefers-reduced-motion. Sin JS, sin app.css o con movimiento reducido: visible.
   - Transformaciones con propiedades individuales (translate/scale): el reveal,
     el parallax de scroll y el del mouse ya no se pisan entre sí.
   - Todo es GPU (transform/opacity/filter/clip-path) y los efectos de puntero
     están gateados por (hover:hover) and (pointer:fine).

   Gating por nicho (aplica al elegir, no al archivo):
   - Nichos de confianza (dental/médico/legal/financiero/servicios del hogar/
     automotriz): usa card--glow o card--spotlight con moderación (máx 1-2
     tarjetas destacadas), evita card--spotlight con cursor-tracking si el
     nicho es muy conservador. NUNCA .btn--glow en más de un CTA por página.
   - Nichos expresivos (agencia/SaaS/moda/fitness/restaurante): libertad para
     combinar 2-3 efectos, incluida .text-gradient en el titular hero.
   - allowed_effects / forbidden_effects de cada perfil mandan sobre esta lista.
   ========================================================================== */

/* ---------- Tokens de movimiento por defecto (especificidad 0: tokens.css y el perfil ganan) ---------- */
:where(:root) {
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-reveal: var(--dur-slow, 520ms);
  --dur-vt: 300ms;
  --stagger: 80ms;
  --rv-o0: 0;
  --rv-x: 0px;
  --rv-y: 18px;
  --rv-scale: 1;
  --rv-blur: 0px;
  --rv-clip: inset(0 0 0 0);
  --rv-anim: none;
  --rv-o-ratio: 1;
  --hover-lift: 4px;
  --hover-scale: 1;
  --hover-shadow: var(--shadow-lg);
  --media-zoom: 1.04;
  --arrow-nudge: 3px;
  --press-scale: 0.97;
  --parallax-y: 3.5%;
  --scrub-anim: none;
  --vt-out: vt-fade-out;
  --vt-in: vt-fade-in;
  --motion-intensity: 1;
}

/* @motion-profiles:start -- GENERADO por components/interactive/motion-sync.js desde references/motion-profiles.json. No editar a mano. */
/* clinical-precise: reveal fade-up, hover tint, intensidad 1 */
[data-motion="clinical-precise"] {
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 360ms;
  --dur-reveal: 420ms;
  --dur-vt: 220ms;
  --stagger: 50ms;
  --rv-o0: 0;
  --rv-x: 0px;
  --rv-y: 10px;
  --rv-scale: 1;
  --rv-blur: 0px;
  --rv-clip: inset(0 0 0 0);
  --rv-anim: none;
  --rv-o-ratio: 1;
  --hover-lift: 0px;
  --hover-scale: 1;
  --hover-shadow: var(--shadow-sm);
  --media-zoom: 1.02;
  --arrow-nudge: 2px;
  --press-scale: 0.985;
  --parallax-y: 0%;
  --scrub-anim: none;
  --vt-out: vt-fade-out;
  --vt-in: vt-fade-in;
  --motion-intensity: 1;
}
/* warm-organic: reveal blur-in, hover lift, intensidad 2 */
[data-motion="warm-organic"] {
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
  --dur-fast: 160ms;
  --dur: 300ms;
  --dur-slow: 600ms;
  --dur-reveal: 760ms;
  --dur-vt: 360ms;
  --stagger: 90ms;
  --rv-o0: 0;
  --rv-x: 0px;
  --rv-y: 22px;
  --rv-scale: 0.985;
  --rv-blur: 6px;
  --rv-clip: inset(0 0 0 0);
  --rv-anim: none;
  --rv-o-ratio: 0.8;
  --hover-lift: 3px;
  --hover-scale: 1;
  --hover-shadow: var(--shadow);
  --media-zoom: 1.04;
  --arrow-nudge: 3px;
  --press-scale: 0.97;
  --parallax-y: 5%;
  --scrub-anim: none;
  --vt-out: vt-fade-out;
  --vt-in: vt-fade-in;
  --motion-intensity: 2;
}
/* kinetic-bold: reveal clip-up, hover shift, intensidad 3 */
[data-motion="kinetic-bold"] {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 110ms;
  --dur: 220ms;
  --dur-slow: 460ms;
  --dur-reveal: 640ms;
  --dur-vt: 320ms;
  --stagger: 60ms;
  --rv-o0: 0;
  --rv-x: 0px;
  --rv-y: 40px;
  --rv-scale: 1;
  --rv-blur: 0px;
  --rv-clip: inset(100% 0 0 0);
  --rv-anim: rv-clip;
  --rv-o-ratio: 0.35;
  --hover-lift: 4px;
  --hover-scale: 1;
  --hover-shadow: var(--shadow-lg);
  --media-zoom: 1.06;
  --arrow-nudge: 6px;
  --press-scale: 0.95;
  --parallax-y: 8%;
  --scrub-anim: rv-scrub;
  --vt-out: vt-slide-out;
  --vt-in: vt-slide-in;
  --motion-intensity: 3;
}
/* luxe-slow: reveal mask-wipe, hover zoom, intensidad 2 */
[data-motion="luxe-slow"] {
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring: cubic-bezier(0.19, 1, 0.22, 1);
  --dur-fast: 220ms;
  --dur: 420ms;
  --dur-slow: 900ms;
  --dur-reveal: 1100ms;
  --dur-vt: 600ms;
  --stagger: 140ms;
  --rv-o0: 0;
  --rv-x: 0px;
  --rv-y: 0px;
  --rv-scale: 1.04;
  --rv-blur: 0px;
  --rv-clip: inset(0 100% 0 0);
  --rv-anim: rv-clip;
  --rv-o-ratio: 0.4;
  --hover-lift: 0px;
  --hover-scale: 1;
  --hover-shadow: none;
  --media-zoom: 1.06;
  --arrow-nudge: 4px;
  --press-scale: 0.99;
  --parallax-y: 6%;
  --scrub-anim: none;
  --vt-out: vt-scale-out;
  --vt-in: vt-scale-in;
  --motion-intensity: 2;
}
/* playful-spring: reveal scale-in, hover bounce, intensidad 3 */
[data-motion="playful-spring"] {
  --ease-out: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.68, -0.25, 0.32, 1.25);
  --ease-spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --dur-fast: 150ms;
  --dur: 280ms;
  --dur-slow: 520ms;
  --dur-reveal: 620ms;
  --dur-vt: 380ms;
  --stagger: 70ms;
  --rv-o0: 0;
  --rv-x: 0px;
  --rv-y: 12px;
  --rv-scale: 0.86;
  --rv-blur: 0px;
  --rv-clip: inset(0 0 0 0);
  --rv-anim: none;
  --rv-o-ratio: 0.5;
  --hover-lift: 5px;
  --hover-scale: 1.02;
  --hover-shadow: var(--shadow);
  --media-zoom: 1.05;
  --arrow-nudge: 5px;
  --press-scale: 0.93;
  --parallax-y: 0%;
  --scrub-anim: none;
  --vt-out: vt-scale-out;
  --vt-in: vt-scale-in;
  --motion-intensity: 3;
}
/* industrial-snappy: reveal slide-x, hover nudge, intensidad 1 */
[data-motion="industrial-snappy"] {
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.25, 1, 0.5, 1);
  --dur-fast: 90ms;
  --dur: 160ms;
  --dur-slow: 300ms;
  --dur-reveal: 380ms;
  --dur-vt: 180ms;
  --stagger: 40ms;
  --rv-o0: 0;
  --rv-x: -20px;
  --rv-y: 0px;
  --rv-scale: 1;
  --rv-blur: 0px;
  --rv-clip: inset(0 0 0 0);
  --rv-anim: none;
  --rv-o-ratio: 1;
  --hover-lift: 2px;
  --hover-scale: 1;
  --hover-shadow: none;
  --media-zoom: 1.03;
  --arrow-nudge: 4px;
  --press-scale: 0.96;
  --parallax-y: 0%;
  --scrub-anim: none;
  --vt-out: vt-slide-out;
  --vt-in: vt-slide-in;
  --motion-intensity: 1;
}
/* editorial-calm: reveal fade, hover underline, intensidad 1 */
[data-motion="editorial-calm"] {
  --ease-out: cubic-bezier(0.37, 0, 0.63, 1);
  --ease-in-out: cubic-bezier(0.37, 0, 0.63, 1);
  --ease-spring: cubic-bezier(0.37, 0, 0.63, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 640ms;
  --dur-reveal: 900ms;
  --dur-vt: 420ms;
  --stagger: 110ms;
  --rv-o0: 0;
  --rv-x: 0px;
  --rv-y: 0px;
  --rv-scale: 1;
  --rv-blur: 0px;
  --rv-clip: inset(0 0 0 0);
  --rv-anim: none;
  --rv-o-ratio: 1;
  --hover-lift: 0px;
  --hover-scale: 1;
  --hover-shadow: none;
  --media-zoom: 1.02;
  --arrow-nudge: 3px;
  --press-scale: 0.99;
  --parallax-y: 0%;
  --scrub-anim: none;
  --vt-out: vt-fade-out;
  --vt-in: vt-fade-in;
  --motion-intensity: 1;
}
/* still: reveal none, hover tint, intensidad 0 */
[data-motion="still"] {
  --ease-out: linear;
  --ease-in-out: linear;
  --ease-spring: linear;
  --dur-fast: 80ms;
  --dur: 120ms;
  --dur-slow: 160ms;
  --dur-reveal: 0ms;
  --dur-vt: 0ms;
  --stagger: 0ms;
  --rv-o0: 1;
  --rv-x: 0px;
  --rv-y: 0px;
  --rv-scale: 1;
  --rv-blur: 0px;
  --rv-clip: inset(0 0 0 0);
  --rv-anim: none;
  --rv-o-ratio: 1;
  --hover-lift: 0px;
  --hover-scale: 1;
  --hover-shadow: none;
  --media-zoom: 1;
  --arrow-nudge: 0px;
  --press-scale: 1;
  --parallax-y: 0%;
  --scrub-anim: none;
  --vt-out: none;
  --vt-in: none;
  --motion-intensity: 0;
}
/* @motion-profiles:end */

/* ---------- Texto — impacto tipográfico ---------- */

/* Titular sobredimensionado — escala "Exaggerated Minimalism". Máx 1 por página. */
.h-giant {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  /* mínimo bajo para que palabras largas no se corten en 390px */
  font-size: clamp(2.4rem, 4.5vw + 1.9rem, 7.5rem);
  text-wrap: balance;
}

/* Texto en gradiente — usar en UNA palabra/frase corta del titular, no en párrafos. */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent, var(--amber-500)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Tarjetas premium (variantes; mezclar 2-3 por página, no todas) ---------- */

/* Glass — acento, NUNCA a página completa ni en una grilla de 6 tarjetas.
   backdrop-filter cuesta FPS en Android gama media: máx 1 superficie glass
   visible a la vez (el header ya es glass; evita duplicar en cards al mismo tiempo). */
.card--glass {
  background: color-mix(in oklch, var(--bg-elevated) 62%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid color-mix(in oklch, var(--white) 14%, var(--border));
}
[data-theme="dark"] .card--glass {
  background: color-mix(in oklch, var(--bg-elevated) 55%, transparent);
  border-color: color-mix(in oklch, var(--white) 8%, var(--border));
}

/* Glow — anillo de borde en gradiente + halo difuso, solo al hover.
   CSS-only (mask-composite); si el navegador no lo soporta, degrada a card
   normal sin anillo — no rompe nada. Ideal para la tarjeta "recomendada". */
.card--glow {
  position: relative;
  isolation: isolate;
}
.card--glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--accent, var(--amber-500)), var(--primary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  z-index: -1;
  pointer-events: none;
}
.card--glow::after {
  content: "";
  position: absolute;
  inset: -18%;
  background: radial-gradient(closest-side, color-mix(in oklch, var(--primary) 32%, transparent), transparent 72%);
  opacity: 0;
  filter: blur(18px);
  transition: opacity var(--dur-slow) var(--ease-out);
  z-index: -2;
  pointer-events: none;
}
.card--glow:hover::before,
.card--glow:hover::after,
.card--glow.is-featured::before,
.card--glow.is-featured::after { opacity: 1; }
.card--glow.is-featured { border-color: transparent; } /* siempre "on": para el plan/tarjeta destacada */

/* Spotlight — resalte radial que sigue el cursor (motion.js pone --sx/--sy EN la tarjeta).
   Gateado a puntero fino; en touch simplemente no hace nada (no rompe). */
.card--spotlight { position: relative; --sx: 50%; --sy: 50%; }
.card--spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--sx) var(--sy),
    color-mix(in oklch, var(--primary) 16%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .card--spotlight:hover::before { opacity: 1; }
}

/* Tilt 3D sutil (motion.js aplica --rx/--ry vía transform). Combinar con spotlight con criterio. */
.card--tilt {
  transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform var(--dur) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .card--glow::before, .card--glow::after, .card--spotlight::before { transition: none; }
  .card--tilt { transform: none; }
}

/* ---------- Botón con glow — máx 1 CTA por página lo usa ---------- */
.btn--glow {
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--primary) 45%, transparent);
  animation: btn-glow-pulse 2.6s var(--ease-out) infinite;
}
@keyframes btn-glow-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklch, var(--primary) 45%, transparent); }
  70%  { box-shadow: 0 0 0 14px color-mix(in oklch, var(--primary) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--primary) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .btn--glow { animation: none; } }

/* ---------- Marquee — franja de scroll horizontal continuo ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding-block: 1rem;
  background: var(--bg-elevated);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 3rem;
  animation: marquee-scroll 28s linear infinite;
}
.marquee__item {
  font-family: var(--font-mono);
  font-size: var(--step-0);
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.marquee__item::after { content: "\2022"; color: var(--primary-text); }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; } /* WCAG 2.2.2 */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; }
}

/* ---------- Bento grid — celdas de tamaño mixto, no uniforme ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}
.bento > * { grid-column: span 6; min-width: 0; }
.bento__lg { grid-column: span 6; }
.bento__md { grid-column: span 6; }
.bento__sm { grid-column: span 6; }
@media (min-width: 48rem) {
  .bento__lg { grid-column: span 4; }
  .bento__md { grid-column: span 2; }
  .bento__sm { grid-column: span 2; }
}
.bento-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  contain: layout style paint;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.bento-card:hover { transform: translateY(calc(var(--hover-lift) * -1)); border-color: var(--primary); box-shadow: var(--hover-shadow); }
.bento-card--feature {
  background: linear-gradient(145deg, var(--signal-700), var(--signal-600));
  color: var(--white);
  border: none;
  justify-content: flex-end;
  min-height: 18rem;
}
.bento-card--feature .card__title { color: var(--white); font-size: var(--step-2); }
.bento-card--feature .card__text { color: oklch(92% 0.01 264 / 0.85); }
.bento-card--image { padding: 0; overflow: hidden; min-height: 14rem; position: relative; }
.bento-card--image img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.bento-card--image__label {
  position: relative; z-index: 1; margin-top: auto; padding: 1.5rem;
  background: linear-gradient(0deg, oklch(10% 0.02 260 / 0.85), transparent 80%);
  color: var(--white); width: 100%;
}

/* ---------- Decorativos con moderación ---------- */

/* Elemento que rompe deliberadamente el contenedor (foto + chip flotante encima). */
.overlap-frame { position: relative; }
.overlap-chip {
  position: absolute;
  z-index: 3;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

/* Divisor diagonal en gradiente entre secciones — usar como máximo 1-2 veces. */
.color-block-divider {
  height: clamp(3rem, 8vw, 6rem);
  background: linear-gradient(135deg, var(--signal-600), var(--signal-700));
  clip-path: polygon(0 0, 100% 0, 100% 60%, 0 100%);
}

/* Numeral fantasma gigante de fondo (proceso/sección numerada). */
.ghost-numeral {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(8rem, 22vw, 22rem);
  line-height: 1;
  color: var(--text);
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   MOTOR DE MOVIMIENTO — lee los tokens del perfil activo
   ========================================================================== */

/* ---------- Reveal al hacer scroll (motion.js + IntersectionObserver) ----------
   Marcado: .reveal | [data-reveal] | [data-reveal="fade|up|left|right|scale|blur|clip|wipe|none"]
   | [data-reveal-step="1..8"] | .reveal-stagger / [data-stagger] (hijos en cascada)
   | legado .reveal--left/.reveal--right/.reveal--scale.
   motion.js marca .is-in al entrar; lo que YA está en pantalla al cargar se muestra
   sin animar (sin parpadeo). Para una entrada coreografiada del primer pantallazo
   usa [data-enter] (CSS puro, abajo). */
.reveal--left  { --rv-x: -24px; --rv-y: 0px; }
.reveal--right { --rv-x: 24px; --rv-y: 0px; }
.reveal--scale { --rv-scale: 0.94; --rv-y: 0px; }
[data-reveal="fade"]  { --rv-x: 0px; --rv-y: 0px; --rv-scale: 1; --rv-blur: 0px; --rv-anim: none; }
[data-reveal="up"]    { --rv-x: 0px; --rv-y: 24px; --rv-anim: none; }
[data-reveal="left"]  { --rv-x: -28px; --rv-y: 0px; --rv-anim: none; }
[data-reveal="right"] { --rv-x: 28px; --rv-y: 0px; --rv-anim: none; }
[data-reveal="scale"] { --rv-scale: 0.9; --rv-y: 0px; --rv-anim: none; }
[data-reveal="blur"]  { --rv-blur: 8px; --rv-y: 14px; --rv-anim: none; }
[data-reveal="clip"]  { --rv-clip: inset(100% 0 0 0); --rv-anim: rv-clip; --rv-o-ratio: 0.3; --rv-y: 24px; }
[data-reveal="wipe"]  { --rv-clip: inset(0 100% 0 0); --rv-anim: rv-clip; --rv-o-ratio: 0.3; --rv-y: 0px; }
[data-reveal="none"]  { --rv-o0: 1; --rv-x: 0px; --rv-y: 0px; --rv-scale: 1; --rv-blur: 0px; --rv-anim: none; }

@media (prefers-reduced-motion: no-preference) {
  /* La transición solo existe al ENTRAR (.is-in): ocultar lo que está fuera de pantalla es
     instantáneo (sin trabajo de animación invisible ni estados intermedios). */
  [data-reveal-ready] :is(.reveal, .reveal--left, .reveal--right, .reveal--scale, [data-reveal], [data-reveal-step]).is-in:not(.rv-done),
  [data-reveal-ready] :is(.reveal-stagger, [data-stagger]).is-in > :not(.rv-done) {
    --rv-delay: calc(var(--rv-i, 0) * var(--stagger));
    transition:
      opacity calc(var(--dur-reveal) * var(--rv-o-ratio)) var(--ease-out) var(--rv-delay),
      translate var(--dur-reveal) var(--ease-out) var(--rv-delay),
      scale var(--dur-reveal) var(--ease-out) var(--rv-delay),
      filter var(--dur-reveal) var(--ease-out) var(--rv-delay),
      transform var(--dur) var(--ease-out),
      box-shadow var(--dur) var(--ease-out),
      border-color var(--dur) var(--ease-out),
      background-color var(--dur) var(--ease-out);
  }
  [data-reveal-ready] :is(.reveal, .reveal--left, .reveal--right, .reveal--scale, [data-reveal], [data-reveal-step]):not(.is-in),
  [data-reveal-ready] :is(.reveal-stagger, [data-stagger]):not(.is-in) > * {
    opacity: var(--rv-o0);
    translate: var(--rv-x) var(--rv-y);
    scale: var(--rv-scale);
    filter: blur(var(--rv-blur));
  }
  [data-reveal-ready] :is(.reveal, .reveal--left, .reveal--right, .reveal--scale, [data-reveal], [data-reveal-step]).is-in:not(.rv-done),
  [data-reveal-ready] :is(.reveal-stagger, [data-stagger]).is-in > :not(.rv-done) {
    animation: var(--rv-anim) var(--dur-reveal) var(--ease-out) var(--rv-delay) both;
  }
}
/* components.css (legado) oculta .reveal SIN condición (opacity:0 + transform): se neutraliza
   con la misma especificidad (este archivo va después). El estado oculto real es el de arriba,
   que solo existe con [data-reveal-ready]. .card:hover (0,2,0) sigue ganando al transform. */
.reveal { opacity: 1; transform: none; }
:is(.card, .bento-card).reveal.is-in:not(.card--tilt):hover { transform: translateY(calc(var(--hover-lift) * -1)) scale(var(--hover-scale)); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--right, .reveal--scale, [data-reveal], [data-reveal-step],
  :is(.reveal-stagger, [data-stagger]) > * { opacity: 1 !important; transform: none !important; translate: none !important; scale: none !important; filter: none !important; }
}
@media print {
  .reveal, .reveal--left, .reveal--right, .reveal--scale, [data-reveal], [data-reveal-step],
  :is(.reveal-stagger, [data-stagger]) > * { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; }
}
@keyframes rv-clip {
  from { clip-path: var(--rv-clip); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ---------- Entrada del primer pantallazo — CSS puro, sin depender de JS ----------
   <p data-enter>, <h1 data-enter="2">…: anima UNA vez al cargar (fill backwards) y
   termina visible aunque JS falle. No usarlo en la imagen LCP. Para evitar el
   parpadeo con app.css asíncrono, head.php copia esta regla al CSS crítico. */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] {
    animation: rv-enter var(--dur-reveal) var(--ease-out) backwards;
    animation-delay: calc(var(--enter-i, 0) * var(--stagger));
  }
  [data-enter="2"] { --enter-i: 1; } [data-enter="3"] { --enter-i: 2; } [data-enter="4"] { --enter-i: 3; }
  [data-enter="5"] { --enter-i: 4; } [data-enter="6"] { --enter-i: 5; } [data-enter="7"] { --enter-i: 6; }
}
@keyframes rv-enter {
  from { opacity: var(--rv-o0); translate: var(--rv-x) var(--rv-y); scale: var(--rv-scale); filter: blur(var(--rv-blur)); }
}

/* ---------- Lenguaje de hover y presión del perfil (solo con data-motion) ---------- */
[data-motion] .btn {
  transition: transform var(--dur-fast) var(--ease-spring), scale var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) {
  [data-motion] .btn:hover { transform: translateY(calc(var(--hover-lift) * -1)) scale(var(--hover-scale)); box-shadow: var(--hover-shadow); }
  [data-motion] .card:not(.card--tilt):hover { transform: translateY(calc(var(--hover-lift) * -1)) scale(var(--hover-scale)); box-shadow: var(--hover-shadow); }
  [data-motion] :is(.btn, .card__link, a):hover .btn__arrow { transform: translateX(var(--arrow-nudge)); }
  :is(a, .card, .bento-card):hover .media-zoom img,
  .media-zoom:hover img { scale: var(--media-zoom); }
}
[data-motion] .btn:active { transform: none; scale: var(--press-scale); }
.media-zoom { overflow: hidden; border-radius: inherit; }
.media-zoom img { transition: scale var(--dur-slow) var(--ease-out); }

/* Subrayado que se dibuja (lenguaje "underline"/"shift") */
.link-draw {
  text-decoration: none;
  background: linear-gradient(currentColor 0 0) 0 100% / 0 1px no-repeat;
  transition: background-size var(--dur) var(--ease-out);
}
.link-draw:hover, .link-draw:focus-visible { background-size: 100% 1px; }

/* ---------- Estados de botón: cargando / éxito (form.js + motion.js) ----------
   motion.js pone aria-busy="true" mientras form.js deshabilita el botón de envío,
   y data-state="success" durante 2.4 s tras lead:submitted. */
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::after {
  content: "";
  inline-size: 1em; block-size: 1em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
.btn[data-state="success"] { --_bg: var(--good); background: var(--good); color: var(--bg); } /* verde 50 % L + papel (claro) / 72 % L + tinta (oscuro): >= 4.5:1 */
.btn[data-state="success"]::after {
  content: "";
  inline-size: 0.55em; block-size: 1em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  rotate: 45deg;
  translate: 0 -0.1em;
  animation: btn-check var(--dur) var(--ease-spring) both;
}
@keyframes btn-spin { to { rotate: 360deg; } }
@keyframes btn-check { from { scale: 0.2; opacity: 0; } }

/* ---------- Barra de progreso de scroll — CSS scroll() donde existe; main.js solo como respaldo ---------- */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--primary), var(--accent, var(--amber-500)));
  z-index: 150;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }
  @media (prefers-reduced-motion: no-preference) { .scroll-progress { animation: sp-grow linear both; animation-timeline: scroll(root block); } }
  @keyframes sp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- Contadores animados (JS anima el número; esto evita el salto de layout) ---------- */
[data-counter] { font-variant-numeric: tabular-nums; }

/* ---------- Scroll-driven (CSS animation-timeline; sin soporte = estático y legible) ---------- */
@property --step-on { syntax: "<number>"; inherits: true; initial-value: 1; }

/* Línea de progreso para procesos/timelines: <ol data-progress-line> */
[data-progress-line] { position: relative; padding-inline-start: 1.75rem; }
[data-progress-line]::before,
[data-progress-line]::after {
  content: "";
  position: absolute;
  inset-block: 0.25rem;
  inset-inline-start: 0.4rem;
  inline-size: 2px;
  border-radius: 2px;
  background: var(--border);
}
[data-progress-line]::after { background: var(--primary); transform-origin: 50% 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-progress-line]::after {
      animation: pl-fill linear both;
      animation-timeline: view();
      animation-range: entry 60% exit 40%;
    }
  }
}
@keyframes pl-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Pasos que se activan al pasar por el centro: <ol data-sticky-steps> + hijos.
   Se anima un marcador (nunca la opacidad del texto: el contraste se mantiene). */
[data-sticky-steps] > * {
  position: relative;
  border-inline-start: 3px solid color-mix(in oklch, var(--primary) calc(var(--step-on) * 100%), var(--border));
  padding-inline-start: var(--space-md);
  background: color-mix(in oklch, var(--primary-tint, transparent) calc(var(--step-on) * 60%), transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
[data-sticky-steps] [data-sticky] { position: sticky; inset-block-start: calc(var(--header-h) + 1rem); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-sticky-steps] > :not([data-sticky]) {
      animation: step-focus linear both;
      animation-timeline: view();
      animation-range: cover 25% cover 75%;
    }
  }
}
@keyframes step-focus { 0% { --step-on: 0; } 30%, 70% { --step-on: 1; } 100% { --step-on: 0; } }

/* Reveal ligado al scroll (perfiles con scroll "scrub"): <div data-scrub>. Rango
   acotado a la entrada del elemento: siempre termina visible en su sitio. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-scrub] {
      animation: var(--scrub-anim) linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}
@keyframes rv-scrub {
  from { opacity: 0.001; translate: 0 var(--rv-y, 24px); clip-path: inset(30% 0 0 0); }
  to   { opacity: 1; translate: none; clip-path: inset(0 0 0 0); }
}

/* ==========================================================================
   ELITE — capas opt-in de alto impacto. Cada una se activa con UN atributo
   data-* que el build añade SOLO si design-dna.json lo justifica (firma,
   personalidad de movimiento, nicho). Sin el atributo, coste cero: nada de
   esto aplica por defecto. Ninguna es obligatoria (SKILL.md §1.5).
   ========================================================================== */

/* ---------- View Transitions — entre páginas (MPA) y de estado (misma página) ----------
   Progressive enhancement puro: sin soporte, no-op. La animación de la raíz sale
   del perfil (--vt-out/--vt-in/--dur-vt); los elementos compartidos (vt_name() en
   inc/tools.php: tarjeta -> detalle) usan el easing del perfil. */
@view-transition {
  navigation: auto;
}
::view-transition-group(*) {
  animation-duration: var(--dur-vt);
  animation-timing-function: var(--ease-in-out);
}
::view-transition-old(root) { animation: var(--dur-vt) var(--ease-in-out) both var(--vt-out); }
::view-transition-new(root) { animation: var(--dur-vt) var(--ease-in-out) both var(--vt-in); }
@keyframes vt-fade-out  { to   { opacity: 0; } }
@keyframes vt-fade-in   { from { opacity: 0; } }
@keyframes vt-slide-out { to   { opacity: 0; translate: -2.5% 0; } }
@keyframes vt-slide-in  { from { opacity: 0; translate: 2.5% 0; } }
@keyframes vt-scale-out { to   { opacity: 0; scale: 0.985; } }
@keyframes vt-scale-in  { from { opacity: 0; scale: 1.015; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- Header morfo — cápsula flotante al hacer scroll ----------
   Opt-in: <header data-header data-morph>. Reutiliza [data-scrolled] que
   main.js YA pone en el header — cero JS nuevo. */
.site-header[data-morph] {
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out),
              inline-size var(--dur) var(--ease-out), margin-block-start var(--dur) var(--ease-out),
              border-radius var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
@media (min-width: 48rem) {
  .site-header[data-morph][data-scrolled="true"] {
    inline-size: min(92%, 74rem);
    margin-inline: auto;
    margin-block-start: 0.6rem;
    border-radius: 999px;
    border-block-end-color: transparent;
    box-shadow: var(--shadow);
  }
}

/* ---------- Reveal orquestado — secuencia manual (pasos sueltos) ----------
   data-reveal-step="1".."8": motion.js convierte el número en --rv-i (retraso =
   paso x --stagger del perfil). Las reglas de estado viven en el motor de arriba. */

/* ---------- Hero scroll-bound / parallax ----------
   Opt-in: <section class="hero" data-parallax> sobre un hero con .hero__media.
   Dos capas que ya NO chocan (antes ambas escribían `transform`):
   1) Scroll: animation-timeline view() sobre .hero__media con translate/scale.
   2) Mouse: motion.js escribe `translate` en el hijo directo (.hero__media > *),
      gateado hover:hover + puntero fino + sin movimiento reducido. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero[data-parallax] .hero__media {
      animation: hero-parallax-scroll linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
  }
}
@keyframes hero-parallax-scroll {
  from { translate: 0 0; scale: 1; }
  to   { translate: 0 var(--parallax-y); scale: 1.06; }
}
.hero[data-parallax] .hero__media > * { transition: translate 0.2s var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .hero[data-parallax] .hero__media { animation: none !important; }
  .hero[data-parallax] .hero__media > * { translate: none !important; }
}

/* ---------- Cursor a medida — SOLO nichos premium/agencia/creativos ----------
   Opt-in: <body data-custom-cursor>. El cursor nativo solo se oculta con puntero
   fino, hover y SIN movimiento reducido (antes quedaba cursor:none con el punto
   oculto: el usuario se quedaba sin cursor). motion.js mueve cada punto con
   `translate` en un rAF (antes escribía --cx/--cy en :root e invalidaba todo el árbol). */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body[data-custom-cursor][data-cursor-ready],
  body[data-custom-cursor][data-cursor-ready] a,
  body[data-custom-cursor][data-cursor-ready] button { cursor: none; }
  .cursor-dot, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 200;
    translate: -100px -100px;
    will-change: translate;
  }
  .cursor-dot {
    width: 6px; height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: var(--primary);
  }
  .cursor-ring {
    width: 34px; height: 34px;
    margin: -17px 0 0 -17px;
    border-radius: 50%;
    border: 1px solid color-mix(in oklch, var(--primary) 55%, transparent);
    transition: scale 0.25s var(--ease-out), border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
  }
  body[data-custom-cursor] .cursor-ring.is-link {
    scale: 1.55;
    border-color: var(--primary);
    background: color-mix(in oklch, var(--primary) 10%, transparent);
  }
}
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}
/* ==========================================================================
   utilities.css — Utilidades atómicas (último en la cascada)
   ========================================================================== */

.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.text-balance { text-wrap: balance; }
.mono         { font-family: var(--font-mono); }

.lead { font-size: var(--step-1); color: var(--text-muted); }

.mt-0  { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.hidden { display: none; }

/* Tag / chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  padding: 0.3rem 0.7rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  background: var(--bg-elevated);
}
.tag--accent { color: var(--primary-text); border-color: color-mix(in oklch, var(--primary) 40%, var(--border)); }

/* Prose (contenido largo legible) */
.prose { max-width: var(--container-prose); }
.prose p { margin-block: var(--space-md); }
.prose h2 { margin-block: var(--space-xl) var(--space-md); }
.prose h3 { margin-block: var(--space-lg) var(--space-sm); }
.prose ul { margin-block: var(--space-md); padding-inline-start: 1.25rem; }
.prose li { margin-block: 0.4rem; }
.prose a { color: var(--primary-text); }

/* Ocultar en móvil (< 48rem). Lo usan los headers para el CTA secundario: en móvil la acción
   vive en el menú y en la barra fija inferior. Faltaba en el scaffold (el CTA se veía apretado
   junto a la hamburguesa en 320-390 px). */
@media (max-width: 47.99rem) { .hidden-sm { display: none !important; } }
