/* ==========================================================================
   tokens.css — Design tokens · Boss Bully BBQ
   Client brief: red / white / blue, dark background. Dark is the site default
   (not just a toggle option); a light theme exists for users who switch it.
   Color in OKLCH with warm (non-blue-gray) dark neutrals — never pure #000.
   ========================================================================== */

:root {
  color-scheme: dark light;

  /* --- Raw palette --- */
  --smoke-950: oklch(14% 0.014 55);   /* near-black warm charcoal (default bg) */
  --smoke-900: oklch(18% 0.015 55);
  --smoke-800: oklch(24% 0.016 55);
  --smoke-700: oklch(32% 0.016 55);
  --smoke-500: oklch(58% 0.01 60);
  --smoke-300: oklch(76% 0.01 70);
  --cream:     oklch(96% 0.014 80);   /* warm off-white (never pure #fff) */
  --cream-2:   oklch(91% 0.016 78);
  --white:     oklch(99% 0.004 90);

  /* Signal primary — BBQ red */
  --red-700: oklch(42% 0.17 25);
  --red-600: oklch(50% 0.19 25);
  --red-500: oklch(57% 0.20 27);
  --red-100: oklch(93% 0.03 30);

  /* Secondary accent — Americana blue (used sparingly) */
  --blue-700: oklch(38% 0.13 262);
  --blue-600: oklch(45% 0.15 262);
  --blue-500: oklch(52% 0.16 262);
  --blue-100: oklch(92% 0.025 262);

  /* Estados */
  --good:  oklch(70% 0.15 155);
  --warn:  oklch(80% 0.15 80);
  --bad:   oklch(62% 0.20 25);

  /* --- Tokens semánticos (DEFAULT = tema oscuro, pedido explícito por el cliente) --- */
  --bg:            var(--smoke-950);
  --bg-elevated:   var(--smoke-900);
  --bg-sunken:     oklch(11% 0.013 50);
  --bg-inverse:    var(--cream);

  --text:          var(--cream);
  --text-muted:    var(--smoke-300);
  --text-inverse:  var(--smoke-950);

  /* Lightened from the raw smoke-700/40% originals (1.56:1 / 2.15:1 on smoke-950 —
     under the 3:1 WCAG non-text/UI-component threshold, borders were nearly
     invisible). Now 3.0:1 / 4.3:1. */
  --border:        oklch(48% 0.016 55);
  --border-strong: oklch(56% 0.018 55);

  --primary:           var(--red-500);
  --primary-strong:    var(--red-600);
  --primary-contrast:  var(--white);
  --primary-tint:      oklch(28% 0.07 25);
  /* Text/icon-safe tint: --primary is tuned as a BUTTON FILL (white text on it
     passes AA). Used directly as small TEXT on a dark surface it only hits
     ~3.8-4.0:1 (verified) — fails AA 4.5:1. --primary-text is a lighter, still
     clearly "brand red" tone reserved for text/icons/links on dark surfaces. */
  --primary-text:      oklch(68% 0.17 27);

  --accent:        var(--blue-500);
  --accent-contrast: var(--white);
  --accent-tint:   oklch(26% 0.06 262);
  /* Same fix as --primary-text, for the blue accent used as text/icons. */
  --accent-text:   oklch(68% 0.14 258);

  --focus-ring:    var(--red-500);

  /* --- Tipografía ---
     Display: Bricolage Grotesque (bold, condensed-leaning, great for smokehouse
     signage energy). Body: Manrope. Mono: JetBrains Mono (labels/eyebrows). */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;

  /* Escala tipográfica fluida (clamp) */
  --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 --- */
  --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 --- */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* --- Sombras (oscuras por defecto) --- */
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.35);
  --shadow:    0 6px 20px oklch(0% 0 0 / 0.42);
  --shadow-lg: 0 22px 56px oklch(0% 0 0 / 0.5);

  /* --- 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 CLARO (opcional, activado por el toggle) --- */
[data-theme="light"] {
  --bg:            var(--cream);
  --bg-elevated:   var(--white);
  --bg-sunken:     var(--cream-2);
  --bg-inverse:    var(--smoke-950);

  --text:          var(--smoke-950);
  --text-muted:    oklch(42% 0.02 55);
  --text-inverse:  var(--cream);

  /* Darkened from 85%/76% (1.4:1 / 1.9:1 on cream — under the 3:1 UI-component
     threshold) to 63%/55% (3.1:1 / 4.3:1). */
  --border:        oklch(63% 0.018 65);
  --border-strong: oklch(55% 0.02 62);

  --primary:           var(--red-600);
  --primary-strong:    var(--red-700);
  --primary-tint:      var(--red-100);
  /* Light theme has no dark-surface problem: red-600 already clears 4.5:1 on
     cream/white, so the text-safe token can just be --primary itself. */
  --primary-text:      var(--red-600);

  --accent:        var(--blue-600);
  --accent-tint:   var(--blue-100);
  --accent-text:   var(--blue-600);

  --shadow-sm: 0 1px 2px oklch(20% 0.02 55 / 0.08);
  --shadow:    0 4px 14px oklch(20% 0.02 55 / 0.10);
  --shadow-lg: 0 18px 50px oklch(20% 0.02 55 / 0.14);
}

/* Sin preferencia manual: sigue el sistema, pero DARK es el tema de marca —
   solo se aclara si el sistema pide explícitamente "light". */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg:            var(--cream);
    --bg-elevated:   var(--white);
    --bg-sunken:     var(--cream-2);
    --bg-inverse:    var(--smoke-950);
    --text:          var(--smoke-950);
    --text-muted:    oklch(42% 0.02 55);
    --text-inverse:  var(--cream);
    --border:        oklch(63% 0.018 65);
    --border-strong: oklch(55% 0.02 62);
    --primary:           var(--red-600);
    --primary-strong:    var(--red-700);
    --primary-tint:      var(--red-100);
    --primary-text:      var(--red-600);
    --accent:        var(--blue-600);
    --accent-tint:   var(--blue-100);
    --accent-text:   var(--blue-600);
    --shadow-sm: 0 1px 2px oklch(20% 0.02 55 / 0.08);
    --shadow:    0 4px 14px oklch(20% 0.02 55 / 0.10);
    --shadow-lg: 0 18px 50px oklch(20% 0.02 55 / 0.14);
  }
}
/* ==========================================================================
   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;
  /* Smooths the light/dark toggle so surfaces fade between palettes instead of
     snapping; cheap (2 properties) and auto-disabled by the reduced-motion
     override below (transition-duration -> 0.001ms). */
  transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out);
}
.site-header, .site-footer, .faq__item, .mobile-menu {
  transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out);
}

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 inverts to --bg-inverse/--text-inverse (which theme-swap correctly);
   these two rules used to reference undefined --amber-300/--ink-300 tokens left
   over from an earlier palette, so they silently fell back to inherited color
   instead of a real accent/muted treatment. Derive from --text-inverse instead,
   so both stay correct in dark AND light mode. */
.section--ink .eyebrow { color: color-mix(in oklch, var(--primary-text) 75%, var(--text-inverse)); }
.section--ink .text-muted { color: color-mix(in oklch, var(--text-inverse) 72%, var(--bg-inverse)); }

/* 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(--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) scale(0.97); transition-duration: var(--dur-fast); }

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

.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),
              transform var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary-text); }
.icon-btn:active { transform: scale(0.9) rotate(-8deg); }
.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 entrance (one of the 12 baseline animations) ----------
   Above-the-fold content, so this runs immediately on load rather than via
   the scroll IntersectionObserver. transform/opacity only; short, staggered,
   one-shot. Fully disabled under reduced-motion (the whole block is gated). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes heroIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .hero .eyebrow        { animation: heroIn 620ms var(--ease-out) both; }
  .hero .hero__title     { animation: heroIn 620ms var(--ease-out) 60ms both; }
  .hero .hero__subtitle,
  .hero .hero__lead      { animation: heroIn 620ms var(--ease-out) 120ms both; }
  .hero .hero__ctas,
  .hero .hero__cta       { animation: heroIn 620ms var(--ease-out) 180ms both; }
  .hero .hero__meta      { animation: heroIn 620ms var(--ease-out) 240ms both; }
  .hero .hero__media     { animation: heroIn 700ms var(--ease-out) 140ms both; }
}

/* ---------- 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__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-text);
  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 inverts bg/text (var(--bg-inverse)/var(--text-inverse)), so its
   border must derive from --text-inverse too, not a fixed dark shade — a fixed
   --ink-700 would vanish (or worse, was previously an undefined var()) once
   the section is light in dark mode / dark in light mode. */
.section--ink .step { border-top-color: color-mix(in oklch, var(--text-inverse) 30%, transparent); }

/* ---------- 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: color-mix(in oklch, var(--text-inverse) 72%, var(--bg-inverse)); 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);
  /* Functional UI-component boundary (WCAG 1.4.11, >=3:1) — uses --border-strong
     rather than the more decorative --border used for card outlines/dividers. */
  border: 1.5px solid var(--border-strong);
  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;
}

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

/* ---------- Menu card (menú HTML, no PDF — precio + etiquetas) ---------- */
.menu-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.menu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.menu-card__media { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.menu-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.menu-card:hover .menu-card__media img { transform: scale(1.06); }
.menu-card__pick {
  position: absolute; top: 0.75rem; left: 0.75rem;
  background: var(--primary); color: var(--primary-contrast);
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 700;
  padding: 0.3rem 0.7rem; border-radius: var(--radius-pill);
}
.menu-card__body { padding: var(--space-lg); display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.menu-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.menu-card__row h3 { font-size: var(--step-1); }
.menu-card__price { font-family: var(--font-mono); font-weight: 700; color: var(--primary-text); white-space: nowrap; }
.menu-card__desc { color: var(--text-muted); font-size: var(--step-0); flex: 1; }
.menu-card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }

/* ---------- Ribbon banner (usado en badge visual, y como acento seccional) ---------- */
.ribbon-divider {
  display: flex; align-items: center; gap: 1rem;
  color: var(--text-muted); font-family: var(--font-mono); font-size: var(--step--1);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.ribbon-divider::before, .ribbon-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Sticky mobile action bar (Call / Menu / Directions — zona del pulgar) ---------- */
.mobile-actionbar {
  position: fixed; inset: auto 0 0 0; z-index: 90;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: color-mix(in oklch, var(--bg-elevated) 96%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-actionbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.2rem; padding: 0.6rem 0.25rem; min-height: 3.4rem;
  text-decoration: none; color: var(--text); font-size: var(--step--1); font-weight: 600;
  border-inline-end: 1px solid var(--border);
}
.mobile-actionbar a:last-child { border-inline-end: none; }
.mobile-actionbar a[data-primary] { color: var(--primary-text); }
@media (max-width: 59.99rem) { body { padding-bottom: calc(3.4rem + env(safe-area-inset-bottom, 0)); } }
@media (min-width: 60rem) { .mobile-actionbar { display: none; } }

/* ---------- Horizontal scroll-snap row (anti-PDF spatial pattern) ---------- */
.hscroll {
  display: flex; gap: var(--space-lg);
  overflow-x: auto; scroll-snap-type: x proximity;
  padding-block: 0.25rem 1rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  scrollbar-width: thin;
}
.hscroll > * { scroll-snap-align: start; flex: 0 0 min(20rem, 82vw); }

/* ---------- Gallery masonry-ish grid ---------- */
.gallery-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 40rem) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; position: relative; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; transition: transform var(--dur-slow) var(--ease-out); }
.gallery-grid a:hover img, .gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid figure:nth-child(3n+2) img { aspect-ratio: 1/1; }

/* ---------- Trust micro-bar (rule 35 — señales dispersas, no todo en un bloque) ---------- */
.trust-bar { display: flex; flex-wrap: wrap; gap: var(--space-lg); align-items: center; justify-content: center; }
.trust-bar__item { display: inline-flex; align-items: center; gap: 0.6ch; color: var(--text-muted); font-size: var(--step--1); font-family: var(--font-mono); }
.trust-bar__item svg { color: var(--primary-text); flex: none; }

/* ---------- Quote / pull testimonial scattered block ---------- */
.pull-quote {
  border-inline-start: 3px solid var(--primary);
  padding-inline-start: var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.3;
  max-width: 40rem;
}
.pull-quote cite { display: block; margin-top: var(--space-sm); font-family: var(--font-mono); font-style: normal; font-size: var(--step--1); color: var(--text-muted); }

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