/* ==========================================================================
   BMR Garaje · styles.css
   Un único archivo para todo el sitio. Sin dependencias, sin build de CSS.
   Dirección: panel de boxes de carreras de resistencia (azul noche, números
   grandes, tipografía de señal viaria) con el rojo de la marca como única
   alarma. Estrategia de color: Committed (el azul carga ~40% de la superficie).
   ========================================================================== */

/* ---------- Fuentes (autoalojadas; ver tools/get-assets.sh) ---------- */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal; font-weight: 800; font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/barlow-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/barlow-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/barlow-latin-600-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  /* Azules de marca (#040d29 ≈ navy-950). Neutros teñidos hacia el mismo tono. */
  --navy-950: oklch(0.155 0.055 265);
  --navy-900: oklch(0.20 0.06 265);
  --navy-800: oklch(0.26 0.07 265);
  --navy-700: oklch(0.33 0.075 265);

  --paper:   oklch(0.975 0.006 265);
  --paper-2: oklch(0.94 0.011 265);
  --line:    oklch(0.87 0.016 265);
  --white:   oklch(0.99 0.004 265);

  --ink:      oklch(0.19 0.045 265);
  --ink-soft: oklch(0.43 0.035 265);
  --ink-mute: oklch(0.50 0.03 265);

  /* Rojo de marca (#f30000). 600 para rellenos con texto blanco (5,15:1);
     "on-navy" para texto rojo sobre fondos oscuros (6,75:1). */
  --red-brand:   oklch(0.605 0.255 29);
  --red-600:     oklch(0.55 0.235 29);
  --red-700:     oklch(0.49 0.215 29);
  --red-on-navy: oklch(0.70 0.19 27);

  --f-display: "Barlow Condensed", "Arial Narrow", "Liberation Sans Narrow", "DejaVu Sans Condensed", sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala tipográfica (razón ≥ 1,25 entre pasos) */
  --fs-s: 0.9375rem;
  --fs-0: 1.125rem;
  --fs-1: clamp(1.3rem, 1.12rem + 0.7vw, 1.6rem);
  --fs-2: clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem);
  --fs-3: clamp(2.2rem, 1.4rem + 3vw, 3.4rem);
  --fs-4: clamp(2.8rem, 1.4rem + 5vw, 5rem);
  --fs-hero: clamp(3.5rem, 1.2rem + 9.4vw, 7.4rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --space-4: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --space-5: clamp(3.25rem, 2rem + 5vw, 6.5rem);
  --space-6: clamp(4.5rem, 2.5rem + 8vw, 9rem);

  --wrap: 75rem;
  --gutter: clamp(1.1rem, 0.6rem + 2.4vw, 2.5rem);
  --radius: 0.5rem;
  --header-h: 4.5rem;

  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);       /* ease-out-quart */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"], .reset { list-style: none; padding: 0; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Base ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-0);
  line-height: 1.6;
  font-weight: 400;
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
h1 { font-size: var(--fs-4); }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-2); }
h4 { font-size: var(--fs-1); font-weight: 700; }
p { max-width: 68ch; text-wrap: pretty; }
strong, b { font-weight: 600; }

a { text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
:focus-visible { outline: 3px solid var(--red-600); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .consent :focus-visible { outline-color: var(--red-on-navy); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  background: var(--ink); color: var(--white); padding: 0.75rem 1.1rem; border-radius: var(--radius);
  transition: top 0.2s var(--ease-out);
}
.skip:focus { top: 0.75rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--space-5); }

/* ---------- Botones ---------- */
.btn {
  --_bg: var(--red-600); --_fg: var(--white); --_bd: var(--red-600);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.7rem 1.6rem;
  background: var(--_bg); color: var(--_fg);
  border: 2px solid var(--_bd); border-radius: var(--radius);
  font-family: var(--f-display); font-weight: 700; font-size: 1.3rem;
  letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; line-height: 1;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.btn:hover { --_bg: var(--red-700); --_bd: var(--red-700); }
.btn:active { transform: translateY(1px); }
.btn--ghost { --_bg: transparent; --_fg: currentColor; --_bd: currentColor; }
.btn--ghost:hover { --_bg: var(--ink); --_fg: var(--white); --_bd: var(--ink); }
.on-dark .btn--ghost { --_fg: var(--white); --_bd: oklch(0.99 0.004 265 / 0.55); }
.on-dark .btn--ghost:hover { --_bg: var(--white); --_fg: var(--navy-950); --_bd: var(--white); }
.btn--sm { min-height: 2.75rem; padding: 0.5rem 1.1rem; font-size: 1.15rem; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 0.1rem;
}
.link-arrow:hover { color: var(--red-600); }
.link-arrow svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center;
  grid-template-rows: minmax(var(--header-h), auto) auto; column-gap: var(--space-2);
}
.brand { display: block; line-height: 0; width: 3.4rem; }
.brand img { width: 100%; height: auto; }
.header-call { justify-self: end; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.4rem 0.9rem;
  background: transparent; border: 2px solid var(--ink); border-radius: var(--radius);
  font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-toggle__bars { width: 1.1rem; height: 0.8rem; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
  transition: transform 0.25s var(--ease-out), top 0.25s var(--ease-out);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: calc(100% - 2px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: calc(50% - 1px); transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: calc(50% - 1px); transform: rotate(-45deg); }

/* Menú móvil: se despliega animando grid-template-rows, no la altura */
.nav { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease-out); }
.nav.is-open { grid-template-rows: 1fr; }
.nav__inner { overflow: hidden; min-height: 0; }
.nav ul { list-style: none; margin: 0; padding: 0 0 var(--space-2); display: grid; }
.nav a {
  display: flex; align-items: center; min-height: 3.25rem;
  font-family: var(--f-display); font-weight: 700; font-size: 1.7rem; letter-spacing: 0.02em; text-transform: uppercase;
  text-decoration: none; border-top: 1px solid var(--line);
}
.nav a[aria-current="page"] { color: var(--red-600); }
html:not(.js) .nav { grid-template-rows: 1fr; }
html:not(.js) .nav-toggle { display: none; }

@media (min-width: 75em) {
  :root { --header-h: 5rem; }
  .header-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(var(--header-h), auto); }
  .brand { grid-column: 1; grid-row: 1; justify-self: start; }
  .nav-toggle { display: none; }
  .nav { grid-column: 2; grid-row: 1; display: block; transition: none; justify-self: end; }
  .header-call { grid-column: 3; grid-row: 1; }
  .nav__inner { overflow: visible; }
  .nav ul { display: flex; gap: clamp(0.9rem, 0.1rem + 1.6vw, 2.2rem); padding: 0; }
  .nav a { min-height: 0; border: 0; font-size: clamp(1.15rem, 0.7rem + 0.5vw, 1.3rem); padding-block: 0.4rem; position: relative; white-space: nowrap; }
  .nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -0.15rem; height: 3px; background: var(--red-600);
    transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out);
  }
  .nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
  .nav a[aria-current="page"] { color: inherit; }
}

/* ---------- Hero ---------- */
.hero { background: var(--navy-950); color: var(--white); padding-block: var(--space-5) var(--space-6); overflow: clip; }
.hero__grid { display: grid; gap: var(--space-5); align-items: center; }
.eyebrow {
  font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--red-on-navy); margin-bottom: var(--space-2);
}
.hero h1 { font-size: var(--fs-hero); line-height: 0.9; letter-spacing: 0; }
.hero h1 span { display: block; }
.hero__slogan {
  margin-top: var(--space-3); max-width: 34ch;
  font-size: var(--fs-1); line-height: 1.35; font-weight: 500; color: oklch(0.93 0.01 265);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.status {
  display: inline-flex; align-items: center; gap: 0.7rem; margin-top: var(--space-3);
  font-weight: 500; font-size: var(--fs-s); color: oklch(0.86 0.015 265);
}
.status__dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: oklch(0.62 0.03 265); flex: none; }
.status[data-state="open"] .status__dot { background: oklch(0.78 0.2 150); box-shadow: 0 0 0 4px oklch(0.78 0.2 150 / 0.2); }
.status[data-state="closed"] .status__dot { background: var(--red-on-navy); }

/* El marco evoca las líneas pintadas de una plaza de taller */
.bay { position: relative; padding: clamp(0.9rem, 2.5vw, 1.6rem); background: var(--navy-800); }
.bay::before, .bay::after { content: ""; position: absolute; width: 3.2rem; height: 3.2rem; border: 0 solid var(--red-brand); pointer-events: none; }
.bay::before { top: -0.7rem; left: -0.7rem; border-top-width: 4px; border-left-width: 4px; }
.bay::after { bottom: -0.7rem; right: -0.7rem; border-bottom-width: 4px; border-right-width: 4px; }
.bay img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.bay__tag {
  position: absolute; right: 1.1rem; top: -1.1rem; background: var(--paper); color: var(--ink);
  font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 2px;
}
.bay__link { display: block; }

@media (min-width: 62em) {
  .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: var(--space-4); }
}

/* Entrada orquestada (solo transform/opacity) */
@keyframes rise { from { opacity: 0; transform: translateY(1.4rem); } to { opacity: 1; transform: none; } }
.js .rise { animation: rise 0.8s var(--ease-out-expo) both; animation-delay: calc(var(--i, 0) * 90ms); }
.d1 { --i: 1; } .d2 { --i: 2; } .d3 { --i: 3; } .d4 { --i: 4; }

/* ---------- Intro ---------- */
.intro__grid { display: grid; gap: var(--space-4); }
.intro__lead { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; line-height: 1.02; font-size: var(--fs-2); }
.intro__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.intro__body p:first-child { font-size: var(--fs-1); line-height: 1.45; font-weight: 500; }
@media (min-width: 62em) {
  .intro__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-5); align-items: start; }
  .intro__lead { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/* ---------- Reseñas (resumen) ---------- */
.rating { background: var(--paper-2); }
.rating__grid { display: grid; gap: var(--space-4); align-items: center; }
.rating__score {
  font-family: var(--f-display); font-weight: 800; line-height: 0.8; font-size: clamp(7rem, 4rem + 14vw, 13rem);
  color: var(--navy-950); letter-spacing: -0.01em; font-variant-numeric: lining-nums;
}
.stars { display: inline-flex; gap: 0.15rem; color: var(--red-600); font-size: 1.8rem; line-height: 1; }
.stars svg { width: 1em; height: 1em; }
.rating__meta { display: grid; gap: 0.6rem; align-content: start; }
.rating__count { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-2); text-transform: uppercase; line-height: 1; }
.rating__source { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }
.rating__source img { width: 5.5rem; border-radius: var(--radius); }
@media (min-width: 48em) {
  .rating__grid { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-5); }
}

.section-title { margin-bottom: var(--space-3); max-width: 22ch; }
.stars-row { display: flex; align-items: center; gap: 0.7rem; font-weight: 500; }
.rating__score--sm { font-size: clamp(5rem, 3rem + 8vw, 8rem); margin-bottom: var(--space-1); }
.hero__actions--flush { margin-top: 0; }

/* ---------- Visita: horario + dirección ---------- */
.visit__grid { display: grid; gap: var(--space-4); }
.board { background: var(--navy-950); color: var(--white); padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: var(--radius); }
.board h2, .board h3 { font-size: var(--fs-2); margin-bottom: var(--space-2); }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1rem;
  padding: 0.7rem 0.75rem; margin-inline: -0.75rem; border-radius: 4px;
  border-bottom: 1px solid oklch(0.99 0.004 265 / 0.12);
  font-variant-numeric: tabular-nums;
}
.hours li:last-child { border-bottom: 0; }
.hours .day { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.04em; }
.hours .time { font-weight: 500; }
.hours .is-closed { color: oklch(0.78 0.02 265); }
.hours li.is-today { background: var(--navy-700); }
.hours li.is-today .day::after {
  content: "Hoy"; margin-left: 0.75rem; padding: 0.12rem 0.5rem; border-radius: 2px;
  background: var(--red-600); color: var(--white); font-size: 0.8rem; letter-spacing: 0.1em; vertical-align: 0.15em;
}
.place address { font-style: normal; display: grid; gap: var(--space-1); margin-top: var(--space-2); }
.place__big { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: var(--fs-1); line-height: 1.1; letter-spacing: 0.02em; }
.place dl { display: grid; gap: 0.2rem; margin-top: var(--space-3); }
.place dt { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.05rem; color: var(--ink-soft); margin-top: var(--space-2); }
.place dd a { font-size: var(--fs-1); font-weight: 600; text-decoration-thickness: 0.06em; }
.place__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
@media (min-width: 62em) {
  .visit__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-5); align-items: start; }
}

/* ---------- Cabecera de páginas interiores ---------- */
.page-head { background: var(--navy-950); color: var(--white); padding-block: var(--space-5) var(--space-4); }
.page-head h1 { font-size: var(--fs-4); max-width: 18ch; }
.page-head p { margin-top: var(--space-2); font-size: var(--fs-1); line-height: 1.4; color: oklch(0.9 0.012 265); max-width: 46ch; }
.page-head .eyebrow { margin-bottom: var(--space-1); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.crumbs { font-size: var(--fs-s); color: oklch(0.8 0.02 265); margin-bottom: var(--space-3); }
.crumbs a { text-underline-offset: 0.2em; }

/* ---------- Texto largo ---------- */
.prose { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.prose { overflow-wrap: anywhere; }
.prose > * { max-width: 68ch; }
.prose h2 { font-size: var(--fs-2); margin-top: var(--space-4); }
.prose h3 { font-size: var(--fs-1); margin-top: var(--space-3); }
.prose ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.prose a { color: var(--red-700); font-weight: 500; }
.prose a:hover { color: var(--red-600); }
.prose .lede { font-size: var(--fs-1); line-height: 1.45; font-weight: 500; }
.split { display: grid; gap: var(--space-4); }
@media (min-width: 62em) {
  .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-5); align-items: start; }
  .split--rev { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
  .split__aside { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.legal-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.legal-table caption { text-align: left; font-weight: 600; padding-bottom: 0.5rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 0.7rem 0.8rem 0.7rem 0; border-bottom: 1px solid var(--line); }
.legal-table th { font-family: var(--f-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 1rem; white-space: nowrap; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.updated { color: var(--ink-mute); font-size: var(--fs-s); }

/* ---------- Servicios ---------- */
.job-list { list-style: none; margin: 0; padding: 0; counter-reset: job; display: grid; }
.job-list li {
  counter-increment: job; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 3rem; align-items: center; gap: var(--space-2);
  padding-block: 0.9rem; border-bottom: 1px solid var(--line);
}
.job-list li::before {
  content: counter(job, decimal-leading-zero); font-family: var(--f-display); font-weight: 800; font-size: 1.5rem;
  color: var(--red-600); font-variant-numeric: tabular-nums;
}
.job-list__name { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-1); text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.1; }
.job-list img { width: 3rem; height: 3rem; object-fit: contain; }
@media (min-width: 48em) {
  .job-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-5); }
}
.brands { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.75rem; }
.brands li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; padding: 1.1rem; min-height: 6rem; }
.brands img { max-height: 3.4rem; width: auto; max-width: 100%; object-fit: contain; }
.parts { display: grid; gap: var(--space-4); }
.parts article { display: grid; align-content: start; gap: var(--space-1); padding-top: var(--space-2); border-top: 2px solid var(--ink); }
.parts h3 { font-size: var(--fs-2); }
@media (min-width: 48em) { .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-5); } }
.cta-band { background: var(--navy-950); color: var(--white); padding-block: var(--space-5); }
.cta-band__grid { display: grid; gap: var(--space-3); align-items: center; }
.cta-band h2 { font-size: var(--fs-3); max-width: 20ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@media (min-width: 62em) { .cta-band__grid { grid-template-columns: 1fr auto; gap: var(--space-5); } }

/* ---------- Contacto ---------- */
.contact-ways { list-style: none; margin: 0; padding: 0; display: grid; border-top: 2px solid var(--ink); }
.contact-ways li { border-bottom: 1px solid var(--line); }
.contact-ways a {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-2);
  padding: 1.3rem 0.25rem; text-decoration: none;
  transition: background-color 0.2s var(--ease-out), padding 0.2s var(--ease-out);
}
.contact-ways a:hover { background: var(--paper-2); padding-inline: 1rem; }
.contact-ways .way { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: var(--fs-2); line-height: 1; }
.contact-ways .val { display: block; font-size: var(--fs-0); color: var(--ink-soft); font-weight: 500; margin-top: 0.25rem; text-transform: none; font-family: var(--f-body); }
.contact-ways svg { width: 1.6rem; height: 1.6rem; color: var(--red-600); }

/* ---------- Mapa (carga solo con consentimiento) ---------- */
.map { position: relative; background: var(--paper-2); border: 1px solid var(--line); width: 100%; height: clamp(20rem, 12rem + 40vw, 30rem); display: grid; place-items: center; overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__gate { display: grid; gap: var(--space-2); justify-items: start; padding: var(--space-3); max-width: 34rem; }
.map__gate p { font-size: var(--fs-s); color: var(--ink-soft); }
.map__gate .actions { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
.map.is-loaded .map__gate { display: none; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-950); color: oklch(0.9 0.012 265); padding-block: var(--space-5) var(--space-3); margin-top: auto; }
.footer__grid { display: grid; gap: var(--space-4); }
.footer__brand { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: var(--fs-3); line-height: 0.95; color: var(--white); }
.footer__brand small { display: block; font-size: 0.4em; letter-spacing: 0.18em; color: var(--red-on-navy); margin-bottom: 0.4rem; font-weight: 700; }
.site-footer h2 { font-size: 1.15rem; letter-spacing: 0.14em; font-weight: 700; color: var(--white); margin-bottom: var(--space-1); }
.site-footer address { font-style: normal; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.site-footer a, .footer__btn { display: inline-block; padding-block: 0.3rem; color: inherit; }
.site-footer a:hover, .footer__btn:hover { color: var(--white); }
.footer__btn { background: none; border: 0; padding-inline: 0; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
.footer__base { margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid oklch(0.99 0.004 265 / 0.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-3); font-size: var(--fs-s); color: oklch(0.8 0.02 265); }
@media (min-width: 62em) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: var(--space-4); } }

/* ---------- Consentimiento de cookies ---------- */
.consent {
  position: fixed; z-index: 90; left: 0; right: 0; bottom: 0;
  background: var(--navy-950); color: var(--white);
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  border-top: 4px solid var(--red-brand);
  box-shadow: 0 -1.5rem 3rem oklch(0.15 0.05 265 / 0.25);
  animation: sheet 0.5s var(--ease-out-expo) both;
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
.consent__title { font-size: var(--fs-2); margin-bottom: 0.5rem; }
.consent p { font-size: var(--fs-s); line-height: 1.5; color: oklch(0.9 0.012 265); max-width: 60ch; }
.consent p a { color: var(--white); }
.consent__actions { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin-top: var(--space-2); }
/* Rechazar y Aceptar con el mismo peso visual (criterio AEPD) */
.consent .btn { --_bg: transparent; --_fg: var(--white); --_bd: var(--white); min-height: 3rem; font-size: 1.2rem; }
.consent .btn:hover { --_bg: var(--white); --_fg: var(--navy-950); --_bd: var(--white); }
.consent .btn--text { --_bd: transparent; text-decoration: underline; text-underline-offset: 0.2em; }
.consent__prefs { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease-out); }
.consent__prefs.is-open { grid-template-rows: 1fr; }
.consent__prefs-inner { overflow: hidden; min-height: 0; }
.consent__list { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; border-top: 1px solid oklch(0.99 0.004 265 / 0.2); }
.consent__list li { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); align-items: center; padding-block: 0.9rem; border-bottom: 1px solid oklch(0.99 0.004 265 / 0.2); }
.consent__list strong { display: block; font-size: 1rem; }
.consent__list span { font-size: 0.875rem; color: oklch(0.82 0.015 265); }
.switch { position: relative; display: inline-block; width: 3.4rem; height: 2rem; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch__track { position: absolute; inset: 0; border-radius: 2rem; background: oklch(0.45 0.04 265); transition: background-color 0.2s var(--ease-out); }
.switch__track::after { content: ""; position: absolute; top: 0.25rem; left: 0.25rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--white); transition: transform 0.2s var(--ease-out); }
.switch input:checked + .switch__track { background: var(--red-600); }
.switch input:checked + .switch__track::after { transform: translateX(1.4rem); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch__track { opacity: 0.6; }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--red-on-navy); outline-offset: 3px; }
@media (min-width: 40em) {
  .consent { left: var(--gutter); right: auto; bottom: var(--gutter); width: min(30rem, 100% - 2 * var(--gutter)); border-radius: var(--radius); border: 0; border-top: 4px solid var(--red-brand); padding-bottom: var(--space-3); }
  .consent__actions { grid-template-columns: 1fr 1fr; }
  .consent__actions .btn--text { grid-column: 1 / -1; }
}

/* ---------- Reseñas (tarjetas) ---------- */
.reviews__status { color: var(--ink-soft); }
.reviews__grid { columns: 3 19rem; column-gap: var(--space-3); }
.review {
  break-inside: avoid; margin-bottom: var(--space-3); padding: var(--space-3);
  display: grid; gap: var(--space-2); align-content: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.review__stars { font-size: 1.3rem; }
.review__text p { font-size: var(--fs-0); line-height: 1.55; }
.review__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1rem; font-size: var(--fs-s); color: var(--ink-soft); }
.review__author { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.review__link { margin-left: auto; color: var(--red-700); font-weight: 600; }
.reviews__more { margin-top: var(--space-2); }
.reviews__empty { display: grid; gap: var(--space-2); justify-items: start; max-width: 40rem; padding-top: var(--space-3); border-top: 2px solid var(--ink); }

/* ---------- Sala de espera: quizzes ---------- */
:root {
  --ok: oklch(0.52 0.14 150);
  --ok-ink: oklch(0.40 0.12 150);
  --ok-bg: oklch(0.91 0.10 150);
  --ko-bg: oklch(0.92 0.07 29);
}
.quiz { max-width: 46rem; }
.quiz__view { animation: rise 0.5s var(--ease-out-expo) both; }
.quiz__title { font-size: var(--fs-2); margin-bottom: var(--space-3); }

.topics { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.topic {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) 1.6rem; align-items: center; gap: var(--space-2);
  width: 100%; min-height: 4.5rem; padding: 0.9rem 0.25rem; background: none; border: 0; border-bottom: 1px solid var(--line);
  text-align: left; color: var(--ink);
  transition: background-color 0.2s var(--ease-out), padding 0.2s var(--ease-out);
}
.topic:hover { background: var(--paper-2); padding-inline: 1rem; }
.topic__num { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; color: var(--red-600); font-variant-numeric: tabular-nums; }
.topic__text { display: grid; gap: 0.1rem; }
.topic__name { font-family: var(--f-display); font-weight: 800; font-size: var(--fs-2); text-transform: uppercase; line-height: 1; }
.topic__meta { font-size: var(--fs-s); color: var(--ink-soft); }
.topic svg { width: 1.6rem; height: 1.6rem; color: var(--red-600); }

.quiz__board {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-1) var(--space-4);
  padding: 1rem 1.25rem; background: var(--navy-950); color: var(--white); border-radius: var(--radius);
}
.quiz__topic { font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-600); }
.quiz__board .quiz__topic { margin-right: auto; color: var(--red-on-navy); }
.quiz__stat { display: grid; gap: 0.15rem; line-height: 1; }
.quiz__stat-label { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: oklch(0.82 0.015 265); }
.quiz__stat-value { font-family: var(--f-display); font-weight: 800; font-size: 2.4rem; font-variant-numeric: tabular-nums; }
.quiz__progress { list-style: none; margin: var(--space-2) 0 var(--space-3); padding: 0; display: flex; gap: 0.35rem; }
.quiz__progress li { flex: 1; height: 0.5rem; background: var(--line); border-radius: 2px; transition: background-color 0.3s var(--ease-out); }
.quiz__progress .is-now { background: var(--ink-soft); }
.quiz__progress .is-ok { background: var(--ok); }
.quiz__progress .is-ko { background: var(--red-600); }

.quiz__question {
  font-family: var(--f-body); font-weight: 600; text-transform: none; letter-spacing: 0;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); line-height: 1.25; margin-bottom: var(--space-3);
}
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.option {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) 1.6rem; align-items: center; gap: 0.9rem;
  width: 100%; min-height: 3.6rem; padding: 0.7rem 1rem; text-align: left;
  background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius);
  font-size: var(--fs-0); font-weight: 500; line-height: 1.3;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}
.option:hover:not(:disabled) { background: var(--paper-2); }
.option:disabled { cursor: default; }
.option__letter { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; color: var(--red-600); }
.option__mark { font-weight: 800; font-size: 1.4rem; text-align: center; }
.option.is-correct { background: var(--ok-bg); border-color: var(--ok); }
.option.is-correct .option__mark { color: var(--ok-ink); }
.option.is-wrong { background: var(--ko-bg); border-color: var(--red-600); }
.option.is-wrong .option__mark { color: var(--red-700); }
.option.is-dim { border-color: var(--line); opacity: 0.7; }

.feedback { margin-top: var(--space-3); display: grid; gap: 0.35rem; }
.feedback:empty { display: none; }
.feedback__head { font-family: var(--f-display); font-weight: 800; font-size: var(--fs-2); text-transform: uppercase; line-height: 1; }
.feedback.is-ok .feedback__head { color: var(--ok-ink); }
.feedback.is-ko .feedback__head { color: var(--red-700); }
.feedback__answer { font-weight: 600; }
.feedback__why { color: var(--ink-soft); }
.quiz__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.quiz__actions .btn { scroll-margin-bottom: 5.5rem; }

.result__score { display: flex; align-items: baseline; gap: 0.4rem; font-family: var(--f-display); font-weight: 800; line-height: 0.8; margin-top: var(--space-1); }
.result__num { font-size: clamp(7rem, 4rem + 14vw, 12rem); color: var(--navy-950); }
.result__total { font-size: var(--fs-3); color: var(--ink-mute); }
.result__title { font-size: var(--fs-3); margin-top: var(--space-2); }
.result__text { margin-top: var(--space-1); font-size: var(--fs-1); line-height: 1.4; }
.quiz__result .quiz__progress { margin-top: var(--space-3); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; z-index: 60; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
  width: 3.6rem; height: 3.6rem; display: grid; place-items: center; border-radius: 50%;
  background: oklch(0.5 0.14 152); color: var(--white); text-decoration: none;
  box-shadow: 0 0.5rem 1.5rem oklch(0.15 0.05 265 / 0.35);
  transition: transform 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.wa-float:hover { background: oklch(0.44 0.13 152); transform: scale(1.06); }
.wa-float svg { width: 1.8rem; height: 1.8rem; }
.footer__base { padding-right: 4.5rem; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Hero con fondo tintado */
.hero--bg {
  position: relative;
  background-image: 
    linear-gradient(rgba(4, 13, 41, 0.80), rgba(4, 13, 41, 0.80)), 
    url('../assets/img/inic_bmr_01.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}