﻿/* ==========================================================================
   tokens.css — Sistema de diseño · Pupusa Houston (Preview v2)
   Comedor salvadoreño: ROJO PROFUNDO (comal/chile) + AZUL COBALTO (bandera SV)
   + CREMA cálida + maíz/masa. Color en OKLCH. Tema claro por defecto.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* --- Rojo profundo (comal / chile) — PRIMARIO --- */
  --chile-800: oklch(37% 0.135 27);
  --chile-700: oklch(43% 0.155 27);
  --chile-600: oklch(50% 0.178 27);
  --chile-500: oklch(56% 0.190 28);
  --chile-100: oklch(93% 0.040 30);
  --chile-50:  oklch(96.5% 0.020 32);

  /* --- Azul cobalto (bandera salvadoreña) — ACENTO --- */
  --cobalt-800: oklch(35% 0.125 258);
  --cobalt-700: oklch(41% 0.150 258);
  --cobalt-600: oklch(47% 0.160 257);
  --cobalt-500: oklch(53% 0.155 257);
  --cobalt-100: oklch(92% 0.040 255);

  /* --- Maíz / masa (amarillo cálido) — terciario --- */
  --masa-600: oklch(72% 0.140 78);
  --masa-500: oklch(80% 0.135 82);
  --masa-400: oklch(86% 0.120 85);
  --masa-200: oklch(93% 0.065 88);

  /* Alias de compatibilidad (módulos compartidos referencian --amber-*) */
  --amber-500: var(--masa-500);
  --amber-300: var(--masa-400);

  /* Crema / papel cálido */
  --cream:    oklch(96.8% 0.018 84);
  --cream-2:  oklch(93.5% 0.024 80);
  --white:    oklch(100% 0 0);

  /* Tinta (cálida, matiz terracota) */
  --ink-900: oklch(26% 0.032 40);   /* casi negro cálido */
  --ink-700: oklch(38% 0.030 40);
  --ink-500: oklch(50% 0.028 40);   /* texto secundario */
  --ink-300: oklch(74% 0.020 50);

  /* Estados */
  --good:  oklch(66% 0.15 150);
  --warn:  oklch(80% 0.15 80);
  --bad:   oklch(58% 0.19 28);

  /* --- Tokens semánticos (tema CLARO por defecto) --- */
  --bg:            var(--cream);
  --bg-elevated:   var(--white);
  --bg-sunken:     var(--cream-2);
  --bg-inverse:    var(--chile-800);

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

  --border:        oklch(88% 0.016 60);
  --border-strong: oklch(80% 0.024 55);

  --primary:           var(--chile-600);
  --primary-strong:    var(--chile-700);
  --primary-contrast:  var(--white);
  --primary-tint:      var(--chile-100);

  --accent:        var(--cobalt-600);
  --accent-strong: var(--cobalt-700);
  --accent-tint:   var(--cobalt-100);

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

  /* --- Tipografía --- */
  --font-display: "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "Inter", ui-sans-serif, system-ui, sans-serif;

  /* 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.60rem);

  --leading-tight: 1.05;
  --leading-snug:  1.22;
  --leading-body:  1.6;

  --tracking-tight: -0.015em;
  --tracking-wide:  0.18em;

  /* --- 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;
  --container-wide: 84rem;
  --container-prose: 42rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* --- Radios (redondeado y acogedor) --- */
  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* --- Sombras (suaves, cálidas) --- */
  --shadow-sm: 0 1px 2px oklch(30% 0.05 40 / 0.08), 0 1px 1px oklch(30% 0.05 40 / 0.05);
  --shadow:    0 6px 20px oklch(30% 0.06 40 / 0.11), 0 2px 5px oklch(30% 0.05 40 / 0.07);
  --shadow-lg: 0 24px 60px oklch(30% 0.07 40 / 0.18), 0 6px 16px oklch(30% 0.06 40 / 0.10);

  /* --- 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:      280ms;
  --dur-slow: 560ms;

  --header-h: 4.75rem;
}

/* --- Tema OSCURO (respaldo) --- */
[data-theme="dark"] {
  --bg:            oklch(24% 0.028 40);
  --bg-elevated:   oklch(29% 0.030 40);
  --bg-sunken:     oklch(21% 0.026 40);
  --bg-inverse:    var(--cream);

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

  --border:        oklch(38% 0.03 45);
  --border-strong: oklch(48% 0.04 45);

  --primary:           var(--chile-500);
  --primary-strong:    var(--chile-600);
  --primary-contrast:  oklch(98% 0.01 30);
  --primary-tint:      oklch(34% 0.08 30);

  --accent:        var(--cobalt-500);
  --accent-strong: var(--cobalt-600);
  --accent-tint:   oklch(33% 0.07 258);

  --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);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            oklch(24% 0.028 40);
    --bg-elevated:   oklch(29% 0.030 40);
    --bg-sunken:     oklch(21% 0.026 40);
    --bg-inverse:    var(--cream);
    --text:          var(--cream);
    --text-muted:    var(--ink-300);
    --text-inverse:  var(--ink-900);
    --border:        oklch(38% 0.03 45);
    --border-strong: oklch(48% 0.04 45);
    --primary:           var(--chile-500);
    --primary-strong:    var(--chile-600);
    --primary-contrast:  oklch(98% 0.01 30);
    --primary-tint:      oklch(34% 0.08 30);
    --accent:        var(--cobalt-500);
    --accent-strong: var(--cobalt-600);
    --accent-tint:   oklch(33% 0.07 258);
    --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);
  }
}

/* ==========================================================================
   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%;
  scroll-behavior: smooth;
  /* 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);
  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(--primary);
  --_fg: var(--primary-contrast);
  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); }

.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); }

.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); }
.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);
  font-style: italic;
}
.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);
  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-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);
}
.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); }

/* ---------- FAQ (AEO: pregunta→respuesta, answer-first) ---------- */
.faq { display: grid; gap: var(--space-sm); max-width: 48rem; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}
.faq__q {
  inline-size: 100%;
  display: flex; align-items: center; 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);
}
.faq__q .chev { transition: transform var(--dur) var(--ease-out); flex: none; }
.faq__item[data-open="true"] .chev { transform: rotate(180deg); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease-out);
}
.faq__item[data-open="true"] .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);
}

/* ---------- 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); }
.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;
}

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 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); }
.breadcrumb [aria-current] { color: var(--text); }

/* ==========================================================================
   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); 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); }

/* ==========================================================================
   pupusa.css — estilos a medida · Pupusa Houston (Preview v2)
   Comedor salvadoreño: rojo profundo + azul cobalto + crema. Redondeado, cálido,
   apetitoso. Concatenado al final de app.css (ver _build.txt).
   ========================================================================== */

/* ---------- Tipografía base del sitio ---------- */
h1, h2, h3, .h-sec, .ph-brand { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; }
h1 { line-height: 1.03; }
.h-sec { font-size: var(--step-4); line-height: 1.05; color: var(--text); }
.lead { font-size: var(--step-1); color: var(--text-muted); line-height: 1.45; }
.section-head .eyebrow { margin-bottom: 0.7rem; }
.eyebrow { color: var(--primary); }
.eyebrow--cobalt { color: var(--accent-strong); }
.eyebrow--cobalt::before { background: currentColor; }

/* ---------- Botón de llamada — rojo apetitoso ---------- */
.btn--call {
  background: linear-gradient(180deg, var(--chile-500), var(--chile-600));
  color: #fff;
  box-shadow: 0 10px 24px oklch(50% 0.178 27 / 0.32);
  position: relative; overflow: hidden;
}
.btn--call::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, color-mix(in oklch, #fff 30%, transparent) 50%, transparent 80%);
  transform: translateX(-120%); transition: transform 0.6s var(--ease-out);
}
.btn--call:hover::after { transform: translateX(120%); }
.btn--call:hover { background: linear-gradient(180deg, var(--chile-600), var(--chile-700)); color: #fff; }
[data-theme="dark"] .btn--call { color: oklch(99% 0.01 30); }

/* ---------- Chips / tags ---------- */
.p-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1.3rem; }
.p-tag {
  display: inline-flex; align-items: center; gap: 0.45ch;
  font-family: var(--font-body); font-weight: 600; font-size: var(--step--1);
  padding: 0.4rem 0.85rem; border-radius: var(--radius-pill);
  background: var(--primary-tint); color: var(--primary-strong);
  border: 1px solid color-mix(in oklch, var(--primary) 20%, transparent);
}
.p-tag svg { color: var(--primary); }

/* ==========================================================================
   HEADER a medida (comedor)
   ========================================================================== */
.site-header--food { background: color-mix(in oklch, var(--bg) 84%, transparent); }
.site-header--food[data-scrolled="true"] { background: color-mix(in oklch, var(--bg) 95%, transparent); border-block-end-color: var(--border); box-shadow: 0 4px 20px oklch(30% 0.06 40 / 0.06); }
.ph-nav { display: flex; align-items: center; justify-content: space-between; inline-size: 100%; gap: 1.25rem; }
.ph-brand { display: inline-flex; align-items: center; text-decoration: none; }
.ph-brand img { height: 2.35rem; width: auto; }
.ph-brand__text { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); color: var(--primary); }

.ph-nav__links { display: none; align-items: center; gap: 1.6rem; margin-inline: auto; }
.ph-nav__links a {
  text-decoration: none; color: var(--text); font-weight: 600; font-size: var(--step-0);
  position: relative; padding-block: 0.3rem; transition: color var(--dur-fast) var(--ease-out);
}
.ph-nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; inline-size: 0; block-size: 2.5px;
  background: var(--primary); border-radius: 2px; transition: inline-size var(--dur) var(--ease-out);
}
.ph-nav__links a:hover { color: var(--primary); }
.ph-nav__links a:hover::after { inline-size: 100%; }

.ph-nav__actions { display: flex; align-items: center; gap: 0.6rem; }

/* Conmutador de idioma */
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700;
  padding: 0.3rem 0.7rem; border: 1.5px solid var(--border); border-radius: var(--radius-pill);
}
.lang-switch a { text-decoration: none; color: var(--text-muted); letter-spacing: 0.04em; }
.lang-switch a.is-on { color: var(--primary); }
.lang-switch__sep { color: var(--border-strong); }

.ph-nav__cta { min-height: 2.7rem; padding: 0.55rem 1.1rem; font-size: 0.95rem; }

@media (min-width: 62rem) { .ph-nav__links { display: flex; } }
@media (max-width: 61.99rem) { .ph-nav__cta span { display: none; } .ph-nav__cta { padding: 0.55rem 0.85rem; } }
@media (max-width: 30rem) { .ph-nav__cta { display: none; } }

/* ==========================================================================
   1. HERO
   ========================================================================== */
.hero--pupusa { position: relative; overflow: clip; background:
  radial-gradient(120% 80% at 90% -10%, var(--primary-tint) 0%, transparent 52%),
  radial-gradient(90% 70% at -5% 112%, var(--accent-tint) 0%, transparent 50%);
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 0.6ch; }
.hero-eyebrow::before { display: none; }
.hero-dot { inline-size: 0.7rem; block-size: 0.7rem; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px color-mix(in oklch, var(--primary) 26%, transparent); animation: masaPulse 2.8s var(--ease-out) infinite; }
.hero__title { margin-block: 0 var(--space-sm); }
.hero__title .hl { color: var(--primary); position: relative; font-style: normal; }
.hero__title .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.26em;
  background: color-mix(in oklch, var(--accent) 55%, transparent); z-index: -1; border-radius: 4px;
  transform: scaleX(0); transform-origin: left; animation: underGrow 0.9s var(--ease-out) 0.35s forwards;
}
.hero__lead { max-width: 40ch; color: var(--text-muted); margin-bottom: 0; }
.hero-media--pupusa { position: relative; }
.hero-media--pupusa img {
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 5px solid var(--white);
  animation: kenburns 14s ease-out both;
}
.hero-badge {
  position: absolute; left: -0.6rem; bottom: 1.1rem;
  display: inline-flex; align-items: center; gap: 0.6ch;
  background: var(--bg-elevated); color: var(--text);
  padding: 0.7rem 1.05rem; border-radius: var(--radius-pill);
  box-shadow: var(--shadow); font-weight: 700; font-family: var(--font-display); font-size: 0.98rem;
  border: 1px solid var(--border);
}
.hero-badge svg { color: var(--primary); }

/* ==========================================================================
   2. SIGNATURE PUPUSAS — photo menu
   ========================================================================== */
.menu-grid { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.dish {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.dish:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in oklch, var(--primary) 30%, var(--border)); }
.dish__img { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: var(--bg-sunken); }
.dish__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.dish:hover .dish__img img { transform: scale(1.06); }
.dish__body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.35rem; }
.dish__body h3 { font-size: var(--step-1); color: var(--text); }
.dish__body p { color: var(--text-muted); font-size: 0.97rem; line-height: 1.5; }
.dish--note { background: linear-gradient(160deg, var(--accent-tint), var(--bg-elevated)); border-style: dashed; align-items: flex-start; justify-content: center; }
.dish--note .dish__body { justify-content: center; height: 100%; }
.dish__note-ico { inline-size: 2.6rem; block-size: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; margin-bottom: 0.4rem; }
.menu-note {
  margin-top: var(--space-lg); display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center;
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.3rem; color: var(--text-muted); font-size: 0.98rem;
}
.menu-note svg { color: var(--good); flex: 0 0 auto; }
.menu-note b { color: var(--text); font-weight: 700; font-family: var(--font-display); }

/* ==========================================================================
   3. BUILD YOUR PUPUSA — STAR MOMENT
   ========================================================================== */
.builder {
  display: grid; gap: var(--space-xl); align-items: stretch;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow-lg);
}
@media (min-width: 56rem) { .builder { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-2xl); } }

.builder__controls { display: grid; gap: var(--space-lg); align-content: start; }
.builder__group { border: 0; padding: 0; margin: 0; }
.builder__group legend {
  display: flex; align-items: center; gap: 0.6ch; padding: 0;
  font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); color: var(--text);
  margin-bottom: 0.85rem;
}
.builder__step {
  inline-size: 1.7rem; block-size: 1.7rem; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.9rem; font-weight: 800;
}
.builder__served { display: inline-flex; align-items: center; gap: 0.5ch; color: var(--text-muted); font-size: 0.95rem; }
.builder__served svg { color: var(--good); }

/* Segmented control (masa) */
.seg { display: inline-flex; gap: 0.4rem; background: var(--bg-sunken); padding: 0.35rem; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg__opt span {
  display: block; padding: 0.6rem 1.4rem; border-radius: var(--radius-pill);
  font-weight: 700; font-family: var(--font-display); color: var(--text-muted); transition: color var(--dur-fast), background var(--dur-fast);
}
.seg__opt input:checked + span { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Chips (filling) */
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 0.6rem 1.05rem; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong); background: var(--bg-elevated);
  font-weight: 600; color: var(--text); transition: all var(--dur-fast) var(--ease-out);
}
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px oklch(47% 0.16 257 / 0.28); }
.chip input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.chip:hover span { border-color: var(--accent); }

/* Summary panel */
.builder__summary {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.builder__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.builder__media img { width: 100%; height: 100%; object-fit: cover; }
.builder__out { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.builder__label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; color: var(--text-muted); }
.builder__combo { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.1; color: var(--text); }
.builder__combo b { color: var(--primary); }
.builder__combo [data-out-masa] { color: var(--accent-strong); }
.builder__on { color: var(--text-muted); font-weight: 600; }
.builder__desc { color: var(--text-muted); font-size: 1rem; }
.builder__with { display: inline-flex; align-items: center; gap: 0.5ch; color: var(--text); font-weight: 600; font-size: 0.95rem; margin-top: 0.1rem; }
.builder__with svg { color: var(--good); }
.builder__cta { margin-top: 0.7rem; align-self: flex-start; }
.builder__fine { color: var(--text-muted); font-size: 0.8rem; }
@media (prefers-reduced-motion: no-preference) {
  [data-builder-summary] .builder__combo, [data-builder-summary] .builder__desc { transition: opacity var(--dur) var(--ease-out); }
  .builder--flash .builder__combo, .builder--flash .builder__desc { opacity: 0.35; }
}

/* ==========================================================================
   4. ANTOJITOS
   ========================================================================== */
.antojitos-grid { display: grid; gap: var(--space-xl); align-items: center; }
@media (min-width: 58rem) { .antojitos-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-2xl); } }
.antojitos-list { display: grid; gap: var(--space-md); }
.antojito {
  display: flex; gap: 1rem; align-items: flex-start; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.25rem;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.antojito:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.antojito__ico { flex: 0 0 auto; inline-size: 2.9rem; block-size: 2.9rem; display: grid; place-items: center; border-radius: 14px; background: var(--primary-tint); color: var(--primary-strong); }
.antojito h3 { font-size: var(--step-1); margin-bottom: 0.15rem; }
.antojito p { color: var(--text-muted); font-size: 0.96rem; line-height: 1.45; }
.antojitos-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; }
.antojitos-media img { width: 100%; height: 100%; object-fit: cover; }
.antojitos-media__tag { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; background: var(--bg-elevated); color: var(--text); padding: 0.55rem 0.95rem; border-radius: var(--radius-pill); font-weight: 700; font-family: var(--font-display); font-size: 0.9rem; box-shadow: var(--shadow); display: inline-flex; gap: 0.5ch; align-items: center; }
.antojitos-media__tag svg { color: var(--good); }

/* ==========================================================================
   5. THE VIBE — comal band (rojo profundo full bleed)
   ========================================================================== */
.comal-band { background: var(--bg-inverse); color: var(--text-inverse); position: relative; overflow: clip; }
.comal-band__grid { display: grid; gap: var(--space-2xl); align-items: center; }
@media (min-width: 60rem) { .comal-band__grid { grid-template-columns: 0.92fr 1.08fr; gap: var(--space-3xl); } }
.comal-band .eyebrow { color: var(--masa-400); }
.comal-band .eyebrow::before { background: var(--masa-400); }
.comal-band h2 { color: var(--text-inverse); font-size: var(--step-4); line-height: 1.05; }
.comal-band p { color: color-mix(in oklch, var(--cream) 84%, transparent); font-size: var(--step-1); line-height: 1.5; max-width: 42ch; }
.comal-band__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 5 / 4; }
.comal-band__media img { width: 100%; height: 100%; object-fit: cover; }
.comal-steps { display: grid; gap: 0.9rem; margin-top: var(--space-lg); }
.comal-step { display: flex; gap: 0.9rem; align-items: flex-start; }
.comal-step__n { flex: 0 0 auto; inline-size: 2.1rem; block-size: 2.1rem; display: grid; place-items: center; border-radius: 50%; background: var(--masa-500); color: oklch(30% 0.06 45); font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; }
.comal-step p { margin: 0; font-size: 1rem; color: color-mix(in oklch, var(--cream) 90%, transparent); max-width: none; }
.comal-step b { color: #fff; font-family: var(--font-display); font-weight: 700; }
.comal-wisp { position: absolute; top: -12%; right: 8%; inline-size: 42%; block-size: 60%; pointer-events: none; opacity: 0.18;
  background: radial-gradient(60% 60% at 50% 50%, var(--masa-400), transparent 70%); filter: blur(30px); animation: wisp 9s ease-in-out infinite; }

/* ==========================================================================
   6. VISITA
   ========================================================================== */
.visita-grid { display: grid; gap: var(--space-2xl); align-items: start; }
@media (min-width: 58rem) { .visita-grid { grid-template-columns: 1fr 1fr; } }
.visita-facts { display: grid; gap: var(--space-md); }
.vfact { display: flex; gap: 1rem; align-items: flex-start; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.vfact__ico { flex: 0 0 auto; inline-size: 2.6rem; block-size: 2.6rem; display: grid; place-items: center; border-radius: 12px; background: var(--accent-tint); color: var(--accent-strong); }
.vfact__k { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }
.vfact__v { color: var(--text-muted); font-size: 0.98rem; line-height: 1.5; }
.vfact__v a { color: var(--primary); font-weight: 700; text-decoration: none; }
.vfact__v a:hover { text-decoration: underline; }
.visita-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: var(--space-lg); }

/* ==========================================================================
   7. FINAL CALL BAND
   ========================================================================== */
.call-band { position: relative; overflow: clip; background:
  linear-gradient(135deg, var(--chile-700), var(--chile-600));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(2.4rem, 6vw, 4rem) var(--gutter); text-align: center; }
.call-band::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(55% 90% at 12% 15%, color-mix(in oklch, var(--accent) 45%, transparent), transparent 60%),
  radial-gradient(50% 80% at 90% 100%, color-mix(in oklch, var(--masa-500) 35%, transparent), transparent 60%); opacity: 0.7; }
.call-band > * { position: relative; z-index: 1; }
.call-band .eyebrow { color: var(--masa-400); justify-content: center; }
.call-band .eyebrow::before { background: var(--masa-400); }
.call-band h2 { color: #fff; font-size: var(--step-4); line-height: 1.05; margin-bottom: 0.6rem; }
.call-band p { color: color-mix(in oklch, #fff 90%, transparent); max-width: 46ch; margin: 0 auto var(--space-lg); font-size: var(--step-1); }
.call-band .btn--call { background: #fff; color: var(--chile-700); box-shadow: 0 12px 30px oklch(20% 0.05 30 / 0.4); }
.call-band .btn--call:hover { background: var(--cream); color: var(--chile-800); }

/* ==========================================================================
   FOOTER a medida
   ========================================================================== */
.ph-footer { background: var(--bg-sunken); border-block-start: 1px solid var(--border); }
.ph-footer__cta { background: linear-gradient(135deg, var(--cobalt-700), var(--cobalt-600)); color: #fff; }
.ph-footer__cta-in { display: flex; flex-wrap: wrap; gap: var(--space-lg); align-items: center; justify-content: space-between; padding-block: clamp(1.8rem, 4vw, 2.6rem); }
.ph-footer__eyebrow { color: var(--masa-400); }
.ph-footer__eyebrow::before { background: var(--masa-400); }
.ph-footer__h { color: #fff; font-size: var(--step-2); line-height: 1.12; max-width: 22ch; }
.ph-footer__cta .btn--call { background: #fff; color: var(--cobalt-700); }
.ph-footer__cta .btn--call:hover { background: var(--cream); color: var(--cobalt-800); }

.ph-footer__body { padding-block: var(--space-2xl) var(--space-xl); }
.ph-footer__grid { display: grid; gap: var(--space-xl); grid-template-columns: 1fr; }
@media (min-width: 48rem) { .ph-footer__grid { grid-template-columns: 1.5fr 1fr 0.8fr 1.1fr; gap: var(--space-2xl); } }
.ph-footer__about .ph-brand img { height: 2.6rem; }
.ph-footer__tag { color: var(--text-muted); max-width: 30rem; margin-block: 0.9rem 1rem; line-height: 1.5; }
.ph-footer__social { display: inline-flex; align-items: center; gap: 0.55ch; color: var(--primary); font-weight: 700; text-decoration: none; }
.ph-footer__social svg { color: var(--accent); }
.ph-footer__social:hover { text-decoration: underline; }
.ph-footer__col h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); color: var(--text); margin-bottom: 0.85rem; }
.ph-footer__col a:not(.btn) { display: block; text-decoration: none; color: var(--text-muted); padding-block: 0.32rem; transition: color var(--dur-fast); }
.ph-footer__col a:not(.btn):hover { color: var(--primary); }
.ph-footer__nap { font-style: normal; color: var(--text-muted); line-height: 1.6; margin-bottom: 0.8rem; }
.ph-footer__hours { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; margin-bottom: 0.7rem; }
.ph-footer__hk { display: inline-flex; align-items: center; gap: 0.45ch; font-weight: 700; color: var(--text); font-family: var(--font-display); }
.ph-footer__hk svg { color: var(--accent); }
.ph-footer__phone { display: inline-flex; align-items: center; gap: 0.5ch; color: var(--primary) !important; font-weight: 800; font-family: var(--font-display); }

/* Mapa lazy facade */
.map-facade {
  position: relative; display: flex; gap: 0.85rem; align-items: center; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  padding: 0.9rem 1rem; min-height: 6.5rem;
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--accent-tint) 60%, var(--bg-elevated)) 0%, var(--bg-elevated) 100%);
  background-image:
    linear-gradient(color-mix(in oklch, var(--border) 70%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklch, var(--border) 70%, transparent) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.map-facade:hover, .map-facade:focus-visible { border-color: var(--accent); box-shadow: var(--shadow); outline: none; }
.map-facade__pin { flex: 0 0 auto; inline-size: 3rem; block-size: 3rem; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.map-facade__meta { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.92rem; }
.map-facade__meta b { font-family: var(--font-display); color: var(--text); }
.map-facade__meta span { color: var(--text-muted); }
.map-facade__go { color: var(--primary) !important; font-weight: 700; }
.map-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-facade.is-live { cursor: default; min-height: 12rem; }
.map-facade.is-live .map-facade__pin, .map-facade.is-live .map-facade__meta { display: none; }
.ph-footer__maplink { display: inline-flex !important; align-items: center; gap: 0.4ch; color: var(--accent-strong) !important; font-weight: 700; margin-top: 0.7rem; }

.ph-footer__bottom {
  margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 0.5rem var(--space-md); justify-content: space-between; align-items: center;
  font-size: var(--step--1); color: var(--text-muted);
}
.studio-credit { color: var(--text-muted); }
.studio-credit__link { color: var(--primary); font-weight: 700; text-decoration: none; }
.studio-credit__link:hover { text-decoration: underline; }

/* ==========================================================================
   Sticky call bar (móvil)
   ========================================================================== */
.sticky-call {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; align-items: center; justify-content: center; gap: 0.6ch;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, var(--chile-500), var(--chile-600)); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; text-decoration: none;
  box-shadow: 0 -6px 20px oklch(30% 0.06 40 / 0.18);
}
@media (max-width: 46rem) {
  .sticky-call { display: flex; }
  body { padding-bottom: 4rem; }
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes masaPulse { 0%,100% { box-shadow: 0 0 0 4px color-mix(in oklch, var(--primary) 26%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in oklch, var(--primary) 6%, transparent); } }
@keyframes underGrow { to { transform: scaleX(1); } }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes wisp { 0%,100% { transform: translateY(0) scale(1); opacity: 0.14; } 50% { transform: translateY(-14px) scale(1.08); opacity: 0.24; } }
@media (prefers-reduced-motion: reduce) {
  .hero-dot, .comal-wisp, .btn--call::after { animation: none; }
  .hero-media--pupusa img { animation: none; }
  .hero__title .hl::after { animation: none; transform: scaleX(1); }
}
