/* ==========================================================================
   JM Rutas · v4.0 · Sistema de diseño «Hito»
   Un solo archivo: tokens, base y componentes. Lo dueño el director de arte.
   Contrato de uso en GUIA_V4.md (marcado copiable de cada componente).
   Motivo: la carretera peruana. Hitos de kilómetro, altitud, coordenadas y
   líneas de ruta, siempre como detalle fino.
   Tipografía: Overpass (herencia Highway Gothic, la letra de la señalética
   vial de las Américas) para todo; Source Serif 4 itálica solo para la voz
   humana (citas, la familia, el propósito).
   ========================================================================== */

/* ---------- 1. Fuentes ---------- */
@font-face {
  font-family: "Overpass";
  src: url("../fonts/overpass-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-var-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}
/* El punto medio de Overpass queda pegado a la derecha: se toma de la fuente del sistema */
@font-face { font-family: "Overpass"; src: local("Helvetica Neue"), local("Helvetica"), local("Arial"), local("Roboto"); unicode-range: U+00B7; font-weight: 100 900; }
/* Respaldo métrico: evita el salto al cargar la fuente */
@font-face { font-family: "Overpass Respaldo"; src: local("Arial"); size-adjust: 99%; ascent-override: 92%; descent-override: 38%; }

/* ---------- 2. Tokens ---------- */
:root {
  /* Paleta Territorio, con más dramatismo */
  --noche: #10223D;              /* Azul Noche de marca: fondo de cabecera y pie (igual al del logo negativo) */
  --noche-hondo: #0A1628;        /* fondos de mayor drama */
  --noche-alto: #1B3152;         /* superficies sobre noche */
  --noche-linea: rgb(236 231 222 / .16);
  --piedra: #ECE7DE;             /* Piedra de marca */
  --piedra-claro: #F5F2EC;       /* papel */
  --piedra-oscuro: #D8D0C2;
  --piedra-linea: rgb(16 34 61 / .14);
  --tinta: #0F1C30;              /* texto sobre piedra (14,9:1) */
  --tinta-suave: #4A5568;        /* texto secundario sobre piedra (6,7:1 sobre --piedra) */
  --luz: #F7F4EE;                /* texto sobre noche/foto (no es blanco puro) */
  --luz-suave: #BFC6D1;          /* secundario sobre noche (8,6:1 sobre --noche) */
  --cobre: #C4572A;              /* señal: botones, trazos, puntos. NO texto chico sobre piedra */
  --cobre-hondo: #A3441D;        /* cobre para texto sobre piedra (5,2:1) */
  --cobre-boton: #B54E24;        /* relleno de botón: texto luz a 4,7:1 */
  --cobre-claro: #E58A5F;        /* cobre sobre noche y foto (6,1:1 sobre --noche) */
  --estado-hoy: #276B4D;
  --estado-hoy-claro: #7FCBA4;

  /* Tipografía */
  --f-sans: "Overpass", "Overpass Respaldo", system-ui, sans-serif;
  --f-voz: "Source Serif 4", Georgia, "Times New Roman", serif;
  --t-mega: clamp(3.25rem, 1.2rem + 8.2vw, 9.5rem);    /* titular de portada */
  --t-xl: clamp(2.75rem, 1.4rem + 5.4vw, 6.25rem);     /* héroe interior */
  --t-l: clamp(2.125rem, 1.35rem + 3.1vw, 4.25rem);    /* titular de sección */
  --t-m: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem);      /* subtítulo, cifra mediana */
  --t-s: clamp(1.1875rem, 1.08rem + .45vw, 1.4375rem); /* bajada */
  --t-base: 1.0625rem;
  --t-chico: .875rem;
  --t-micro: .75rem;

  /* Espacio (base 4) */
  --e-1: .25rem; --e-2: .5rem; --e-3: .75rem; --e-4: 1rem; --e-5: 1.5rem;
  --e-6: 2rem; --e-7: 3rem; --e-8: 4rem; --e-9: 6rem; --e-10: 8rem;
  --canal: clamp(1rem, .4rem + 3.2vw, 4rem);          /* margen lateral: 16 px a 360, 64 px a 1440+ */
  --seccion: clamp(4.5rem, 2.5rem + 8vw, 10rem);      /* aire vertical entre secciones */
  --ancho: 90rem;                                      /* 1440 */
  --ancho-texto: 38rem;

  --r: 3px;                       /* esquinas: casi rectas, como una placa vial */
  --dur: .7s;
  --curva: cubic-bezier(.16, 1, .3, 1);   /* expo out */
  --cab-alto: 4.5rem;
  color-scheme: light;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--cab-alto) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--piedra-claro); color: var(--tinta);
  font: 400 var(--t-base)/1.6 var(--f-sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video, picture { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--cobre); }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1; letter-spacing: -.03em; text-wrap: balance; }
p { text-wrap: pretty; }
strong, b { font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--cobre); color: var(--luz); }
:focus-visible { outline: 3px solid var(--cobre-claro); outline-offset: 3px; border-radius: 1px; }
[data-tono="piedra"] :focus-visible, [data-tono="papel"] :focus-visible { outline-color: var(--cobre-hondo); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.salto {
  position: fixed; left: var(--e-4); top: var(--e-4); z-index: 100; padding: var(--e-3) var(--e-4);
  background: var(--cobre); color: var(--luz); font-weight: 700; text-decoration: none; transform: translateY(-200%);
}
.salto:focus { transform: none; }
.tab { font-variant-numeric: tabular-nums lining-nums; }

/* Tonos de sección: noche · hondo · piedra · papel */
[data-tono="noche"] { background: var(--noche); color: var(--luz); }
[data-tono="hondo"] { background: var(--noche-hondo); color: var(--luz); }
[data-tono="piedra"] { background: var(--piedra); color: var(--tinta); }
[data-tono="papel"] { background: var(--piedra-claro); color: var(--tinta); }
[data-tono="noche"], [data-tono="hondo"] { --suave: var(--luz-suave); --acento: var(--cobre-claro); --linea: var(--noche-linea); }
:root, [data-tono="piedra"], [data-tono="papel"] { --suave: var(--tinta-suave); --acento: var(--cobre-hondo); --linea: var(--piedra-linea); }

/* ---------- 4. Estructura ---------- */
.marco { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--canal); }
.seccion { padding-block: var(--seccion); position: relative; }
.seccion--junta { padding-top: 0; }
.rejilla { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1rem, 2vw, 2rem); }
.pila > * + * { margin-top: var(--e-5); }

/* ---------- 5. Tipografía de sistema ---------- */
/* Antetítulo con hito: «KM 02 · Servicios» */
.ante {
  display: flex; align-items: baseline; gap: var(--e-3); flex-wrap: wrap;
  font-size: var(--t-micro); font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  font-variant-numeric: tabular-nums; color: var(--suave); margin-bottom: var(--e-5);
}
.ante::after { content: ""; flex: 1 1 2rem; max-width: 6rem; height: 1px; align-self: center; background: currentColor; opacity: .45; }
.ante--sin-linea::after { display: none; }
/* Hito de kilómetro: placa vial mínima */
.hito {
  display: inline-flex; align-items: baseline; justify-content: center; gap: .3em; flex: none; min-width: 3.4em; padding: .42em .55em .3em;
  border: 1px solid currentColor; border-radius: .55em .55em 2px 2px;
  font-size: .6875rem; font-weight: 800; letter-spacing: .1em; line-height: 1; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--acento);
}
.hito b { font-size: 1.18em; letter-spacing: .02em; }

.titular { font-size: var(--t-l); font-weight: 800; line-height: .98; letter-spacing: -.035em; max-width: 16ch; }
.titular--xl { font-size: var(--t-xl); line-height: .92; letter-spacing: -.04em; max-width: 13ch; }
.titular--mega { font-size: var(--t-mega); line-height: .88; letter-spacing: -.045em; max-width: 11ch; }
.titular--m { font-size: var(--t-m); line-height: 1.08; letter-spacing: -.02em; max-width: 22ch; }
.titular em { font-family: var(--f-voz); font-style: italic; font-weight: 500; letter-spacing: -.02em; color: var(--acento); }
.punto { color: var(--cobre); }
[data-tono="noche"] .punto, [data-tono="hondo"] .punto, .heroe .punto { color: var(--cobre-claro); }
.bajada { font-size: var(--t-s); line-height: 1.45; color: var(--suave); max-width: 34ch; font-weight: 400; }
.texto { max-width: var(--ancho-texto); color: var(--suave); }
.texto strong { color: inherit; }
.voz { font-family: var(--f-voz); font-style: italic; font-weight: 400; font-size: var(--t-m); line-height: 1.25; letter-spacing: -.01em; max-width: 26ch; }
.dato { font-size: var(--t-micro); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--suave); }
.nota { font-size: var(--t-chico); color: var(--suave); max-width: 52ch; }

/* ---------- 6. Botones y enlaces ---------- */
.boton {
  --b-fondo: var(--cobre-boton); --b-texto: var(--luz);
  display: inline-flex; align-items: center; justify-content: center; gap: .65em; min-height: 3rem;
  padding: .85em 1.35em .72em; border: 1px solid var(--b-fondo); border-radius: var(--r);
  background: var(--b-fondo); color: var(--b-texto); font-weight: 700; font-size: .9375rem; letter-spacing: .015em;
  line-height: 1.1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--curva);
}
.boton:hover { --b-fondo: var(--cobre-hondo); text-decoration: none; }
.boton:active { transform: translateY(1px); }
.boton .flecha { display: inline-block; transition: transform .35s var(--curva); }
.boton:hover .flecha { transform: translateX(4px); }
.boton--primario { /* alias v3.1 (base-hoja.js) */ }
.boton--linea, .boton--contorno { --b-fondo: transparent; --b-texto: currentColor; border-color: currentColor; }
.boton--linea:hover, .boton--contorno:hover { --b-fondo: transparent; border-color: var(--cobre); color: inherit; }
.boton--chico { min-height: 2.75rem; padding: .65em 1.05em .52em; font-size: .875rem; }
.enlace, .enlace-flecha {
  display: inline-flex; align-items: baseline; gap: .5em; padding-block: .35em; border: 0; background: none; cursor: pointer;
  font-weight: 700; text-decoration: none; color: inherit; border-bottom: 1px solid var(--cobre); line-height: 1.3;
}
.enlace::after, .enlace-flecha::after { content: "→"; color: var(--acento); transition: transform .35s var(--curva); }
.enlace:hover::after, .enlace-flecha:hover::after { transform: translateX(4px); }
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-4) var(--e-5); }

/* Estado de una cifra (honestidad: toda cifra lleva fuente o estado) */
.estado {
  display: inline-flex; align-items: center; gap: .45em; padding: .32em .55em .22em; border-radius: var(--r);
  border: 1px solid color-mix(in srgb, currentColor 55%, transparent); font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  line-height: 1.3; color: var(--suave); white-space: nowrap; justify-self: start; align-self: start;
}
.estado::before { content: ""; flex: none; width: .5em; height: .5em; border-radius: 50%; background: currentColor; }
.estado--hoy { color: var(--estado-hoy); }
[data-tono="noche"] .estado--hoy, [data-tono="hondo"] .estado--hoy { color: var(--estado-hoy-claro); }
.estado--meta::before { background: transparent; border: 1.5px solid currentColor; }
.estado--piloto::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); border: 1px solid currentColor; }
.estado--confirmar { border-style: dashed; border-color: currentColor; }
.estado--confirmar::before { background: transparent; border: 1.5px dashed currentColor; }

/* ---------- 7. Cabecera y menú ---------- */
.cab {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--cab-alto);
  display: flex; align-items: center; gap: var(--e-5); padding-inline: var(--canal);
  background: var(--noche); color: var(--luz); border-bottom: 1px solid var(--noche-linea);
  transition: transform .45s var(--curva);
}
.cab[data-oculta="si"] { transform: translateY(-100%); }
.cab__marca { display: block; flex: none; margin-left: -.5rem; }
.cab__marca img { width: auto; height: 3.1rem; }
.cab__nav { margin-left: auto; }
.cab__nav ul { display: flex; gap: clamp(.75rem, 1.6vw, 1.75rem); list-style: none; margin: 0; padding: 0; }
.cab__nav a { display: block; padding-block: .6rem; font-size: .9375rem; font-weight: 600; text-decoration: none; color: var(--luz-suave); position: relative; transition: color .2s; }
.cab__nav a:hover, .cab__nav a[aria-current="page"] { color: var(--luz); }
.cab__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .25rem; height: 2px; background: var(--cobre-claro); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--curva); }
.cab__nav a:hover::after, .cab__nav a[aria-current="page"]::after { transform: scaleX(1); }
.cab__acciones { display: flex; align-items: center; gap: var(--e-3); margin-left: var(--e-2); }
.boton-menu {
  display: none; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 .75rem; border: 1px solid var(--noche-linea);
  border-radius: var(--r); background: transparent; color: var(--luz); font-weight: 700; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.boton-menu__ico { width: 1.1rem; height: 9px; border-block: 2px solid currentColor; position: relative; }
.boton-menu--cerrar .boton-menu__ico { border: 0; height: 1.1rem; }
.boton-menu--cerrar .boton-menu__ico::before, .boton-menu--cerrar .boton-menu__ico::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: currentColor; transform: rotate(45deg); }
.boton-menu--cerrar .boton-menu__ico::after { transform: rotate(-45deg); }
@media (max-width: 1099px) {
  .cab__nav { display: none; }
  .cab__acciones { margin-left: auto; }
  .boton-menu { display: inline-flex; }
}
@media (max-width: 479px) {
  .cab__cta { display: none; }
  .cab__marca img { height: 2.75rem; }
}

.menu {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--noche-hondo); color: var(--luz); overflow-y: auto;
}
.menu::backdrop { background: rgb(10 22 40 / .6); }
.menu__barra { display: flex; align-items: center; justify-content: space-between; height: var(--cab-alto); padding-inline: var(--canal); border-bottom: 1px solid var(--noche-linea); }
.menu__barra img { height: 3.1rem; width: auto; margin-left: -.5rem; }
.menu__cuerpo { padding: var(--e-7) var(--canal) var(--e-8); display: grid; gap: var(--e-7); max-width: var(--ancho); margin-inline: auto; }
.menu__principal { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.menu__principal li { counter-increment: m; border-bottom: 1px solid var(--noche-linea); }
.menu__principal a { display: grid; grid-template-columns: 3rem 1fr; align-items: baseline; padding-block: .9rem; text-decoration: none; }
.menu__principal a::before { content: counter(m, decimal-leading-zero); font-size: var(--t-micro); font-weight: 700; color: var(--cobre-claro); font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.menu__principal .t { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.menu__principal .d { grid-column: 2; color: var(--luz-suave); font-size: .9375rem; margin-top: .2rem; }
.menu__principal a[aria-current="page"] .t { color: var(--cobre-claro); }
.menu__lateral { display: grid; gap: var(--e-6); align-content: start; }
.menu__secundario { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); }
.menu__secundario a { color: var(--luz-suave); text-decoration: none; font-weight: 600; }
.menu__secundario a:hover { color: var(--luz); }
@media (min-width: 900px) { .menu__cuerpo { grid-template-columns: 1.6fr 1fr; gap: var(--e-9); } }
@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu__principal li { animation: entra .6s var(--curva) both; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }
}
@keyframes entra { from { opacity: 0; transform: translateY(14px); } }
body.menu-abierto, body.hoja-abierta { overflow: hidden; }

/* ---------- 8. Héroe de portada (video a sangre) ---------- */
.heroe {
  position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate;
  background: var(--noche-hondo); color: var(--luz); padding-top: var(--cab-alto);
}
.heroe__medio, .heroe__medio > *, .heroe__medio img, .heroe__medio video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heroe__medio { z-index: -2; }
.heroe__medio img, .heroe__medio video { object-position: var(--pos, 50% 50%); }
.heroe__medio video { opacity: 0; transition: opacity 1.2s ease; }
.heroe__medio video.listo { opacity: 1; }
/* Velo medido: noche desde abajo-izquierda, deja el paisaje arriba-derecha */
.heroe::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(10 22 40 / .55) 0%, rgb(10 22 40 / 0) 22%),
    linear-gradient(0deg, rgb(10 22 40 / .94) 0%, rgb(10 22 40 / .72) 30%, rgb(10 22 40 / .15) 62%, rgb(10 22 40 / 0) 80%),
    linear-gradient(90deg, rgb(10 22 40 / .62) 0%, rgb(10 22 40 / 0) 60%);
}
.heroe__cuerpo { padding-block: var(--e-8) var(--e-6); }
.heroe .ante { color: var(--luz-suave); }
.heroe .titular { color: var(--luz); }
.heroe .bajada { color: #D9DEE6; max-width: 36ch; margin-top: var(--e-5); }
.heroe .acciones { margin-top: var(--e-6); }
/* Tablero de ruta: la franja inferior con datos del corredor */
.tablero {
  display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: var(--e-4) clamp(1.5rem, 4vw, 4rem);
  margin-top: var(--e-8); padding-top: var(--e-4); border-top: 1px solid rgb(247 244 238 / .22);
  font-variant-numeric: tabular-nums;
}
.tablero dt { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--luz-suave); }
.tablero dd { font-size: 1.0625rem; font-weight: 700; margin-top: .15rem; white-space: nowrap; }
.tablero dd small { font-weight: 500; color: var(--luz-suave); font-size: .8125rem; }
.heroe__control {
  position: absolute; right: var(--canal); bottom: var(--e-6); z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 .9rem; border-radius: 99px;
  border: 1px solid rgb(247 244 238 / .35); background: rgb(10 22 40 / .45); color: var(--luz); font-size: .8125rem; font-weight: 700; letter-spacing: .06em; cursor: pointer;
}
.heroe__control::before { content: ""; width: 10px; height: 11px; border-inline: 3px solid currentColor; }
.heroe__control[aria-pressed="true"]::before { border: 0; border-left: 10px solid currentColor; border-block: 6px solid transparent; width: 0; height: 0; }
@media (max-width: 767px) {
  .tablero { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--e-6); }
  .heroe__control { bottom: auto; top: calc(var(--cab-alto) + var(--e-4)); }
}

/* Héroe de página interior a sangre */
.heroe-pagina { position: relative; min-height: min(88svh, 52rem); display: grid; align-items: end; overflow: hidden; isolation: isolate; background: var(--noche-hondo); color: var(--luz); padding-top: var(--cab-alto); }
.heroe-pagina .heroe__medio img { transform: scale(1.06); transform-origin: 50% 40%; }
.heroe-pagina::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(10 22 40 / .92) 0%, rgb(10 22 40 / .6) 38%, rgb(10 22 40 / .1) 72%), linear-gradient(90deg, rgb(10 22 40 / .5), rgb(10 22 40 / 0) 65%); }
.heroe-pagina .heroe__cuerpo { padding-block: var(--e-9) var(--e-7); }
.heroe-pagina .titular { color: var(--luz); }
.heroe-pagina .bajada { color: #D9DEE6; margin-top: var(--e-5); }
.heroe-pagina .ante { color: var(--luz-suave); }
.lugar { position: absolute; right: var(--canal); bottom: var(--e-6); z-index: 1; text-align: right; font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--luz-suave); font-variant-numeric: tabular-nums; line-height: 1.6; }
.lugar b { display: block; color: var(--luz); font-size: .8125rem; letter-spacing: .1em; }
@media (max-width: 767px) { .lugar { display: none; } }

/* ---------- 9. Línea de ruta (motivo) ---------- */
/* Eje: línea central de carretera, discontinua, que se dibuja al entrar */
.eje { height: 2px; background: repeating-linear-gradient(90deg, var(--cobre) 0 28px, transparent 28px 44px); transform-origin: left; }
.js [data-revelar].eje { transform: scaleX(0); opacity: 1; transition: transform 1.6s var(--curva); }
.js [data-revelar].eje.visible { transform: none; }

/* ---------- 10. Índice editorial de servicios (foto + número, no tarjetas) ---------- */
.indice { display: grid; gap: var(--e-8) clamp(1rem, 3vw, 3rem); grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: var(--e-8); }
.indice__item { grid-column: span 12; display: grid; gap: var(--e-5); align-content: start; text-decoration: none; color: inherit; }
.indice__foto { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--piedra-oscuro); }
.indice__foto img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 1.2s var(--curva); }
.indice__item:hover .indice__foto img { transform: scale(1.04); }
.indice__num { font-size: var(--t-micro); font-weight: 800; letter-spacing: .14em; color: var(--acento); font-variant-numeric: tabular-nums; }
.indice__item h3 { font-size: var(--t-m); line-height: 1.05; margin-top: var(--e-2); }
.indice__item p { color: var(--suave); max-width: 34ch; margin-top: var(--e-3); }
.indice__item .enlace { margin-top: var(--e-4); }
@media (min-width: 768px) {
  .indice__item:nth-child(1) { grid-column: 1 / span 7; grid-row: span 2; }
  .indice__item:nth-child(1) .indice__foto { aspect-ratio: 4 / 5; }
  .indice__item:nth-child(2) { grid-column: 9 / span 4; margin-top: var(--e-9); }
  .indice__item:nth-child(3) { grid-column: 8 / span 5; }
  .indice__item:nth-child(2) .indice__foto, .indice__item:nth-child(3) .indice__foto { aspect-ratio: 3 / 2; }
  .indice__item:nth-child(4) { grid-column: 2 / span 6; }
}

/* ---------- 11. Foto + texto asimétrico (duo) ---------- */
.duo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1rem, 3vw, 3rem); row-gap: var(--e-6); align-items: center; }
.duo__foto { grid-column: 1 / -1; position: relative; overflow: hidden; margin-inline: calc(var(--canal) * -1); aspect-ratio: 4 / 3; }
.duo__foto picture, .duo__foto > img { position: absolute; inset: 0; }
.duo__foto img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.duo__texto .titular { font-size: clamp(2.125rem, 1.3rem + 2.6vw, 3.75rem); max-width: 14ch; }
.duo__texto { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .duo__foto { grid-column: 1 / span 7; margin-inline: calc(var(--canal) * -1) 0; aspect-ratio: auto; min-height: clamp(28rem, 42vw, 44rem); }
  .duo__texto { grid-column: 9 / span 4; }
  .duo--invertido .duo__foto { grid-column: 6 / span 7; grid-row: 1; margin-inline: 0 calc(var(--canal) * -1); }
  .duo--invertido .duo__texto { grid-column: 1 / span 4; grid-row: 1; }
}
@media (min-width: 1440px) {
  .duo__foto { margin-left: calc((100vw - var(--ancho)) / -2 - var(--canal)); }
  .duo--invertido .duo__foto { margin-left: 0; margin-right: calc((100vw - var(--ancho)) / -2 - var(--canal)); }
}
.lista-ruta { list-style: none; margin: var(--e-6) 0 0; padding: 0; border-top: 1px solid var(--linea); }
.lista-ruta li { display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--e-3); padding-block: var(--e-4); border-bottom: 1px solid var(--linea); }
.lista-ruta li::before { content: ""; width: .7rem; height: .7rem; margin-top: .4rem; border-radius: 50%; border: 2px solid var(--acento); }
.lista-ruta b { display: block; }
.lista-ruta span { color: var(--suave); font-size: .9375rem; }
.rotulo { position: absolute; z-index: 1; left: var(--e-4); bottom: var(--e-4); padding: .35em .6em .25em; background: rgb(10 22 40 / .72); color: var(--luz); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }

/* ---------- 12. Banda de cifras con estado ---------- */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); border-top: 1px solid var(--linea); }
.cifra { padding: var(--e-6) var(--e-5) var(--e-6) 0; border-bottom: 1px solid var(--linea); display: grid; gap: var(--e-3); align-content: start; }
.cifra + .cifra { padding-left: var(--e-5); border-left: 1px solid var(--linea); }
.cifra__valor { font-size: clamp(3.25rem, 2rem + 4.5vw, 6rem); font-weight: 800; letter-spacing: -.05em; line-height: .9; font-variant-numeric: tabular-nums lining-nums; }
.cifra__valor small { font-size: .32em; letter-spacing: 0; font-weight: 700; margin-left: .15em; color: var(--suave); }
.cifra__texto { color: var(--suave); max-width: 24ch; font-size: .9375rem; }
@media (max-width: 599px) { .cifra { padding-right: var(--e-3); } .cifra + .cifra { padding-left: 0; border-left: 0; } .cifra:nth-child(even) { padding-left: var(--e-4); border-left: 1px solid var(--linea); } .cifra__valor small { display: block; margin: .35em 0 0; } }

/* ---------- 13. Mapa de rutas ---------- */
.mapa { display: grid; gap: var(--e-7); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .mapa { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e-8); } }
.mapa__lienzo { position: relative; max-width: 40rem; width: 100%; margin-inline: auto; }
.mapa svg { width: 100%; height: auto; overflow: visible; }
.mp-dep { fill: var(--noche-alto); stroke: var(--noche-hondo); stroke-width: .8; transition: fill .4s; }
.mp-pais { fill: none; stroke: rgb(236 231 222 / .45); stroke-width: 1.2; }
.mp-grilla line { stroke: rgb(236 231 222 / .1); stroke-width: .8; stroke-dasharray: 2 5; }
.mp-grilla text, .mp-ctx text { fill: rgb(191 198 209 / .75); font: 600 11px var(--f-sans); letter-spacing: .14em; }
.mp-ruta { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mp-ruta__trazo { stroke: var(--cobre-claro); stroke-width: 4; }
.mp-ruta__halo { stroke: var(--cobre); stroke-width: 14; opacity: 0; transition: opacity .35s; }
.mp-ruta--proxima .mp-ruta__trazo { stroke: var(--piedra); stroke-width: 2.5; stroke-dasharray: .003 .016; opacity: .8; }
.mp-nodo { fill: var(--noche-hondo); stroke: var(--luz); stroke-width: 2; }
.mp-nodo--base { fill: var(--cobre); stroke: var(--luz); stroke-width: 3; }
.mp-etq { fill: var(--luz); font: 700 15px var(--f-sans); paint-order: stroke; stroke: var(--noche); stroke-width: 4px; stroke-linejoin: round; }
.mp-etq--chica { font-size: 12px; fill: var(--luz-suave); font-weight: 600; }
[data-ruta].activa .mp-ruta__halo { opacity: .35; }
[data-ruta].activa .mp-ruta__trazo { stroke: var(--luz); }
.mapa[data-activa] [data-ruta]:not(.activa) .mp-ruta__trazo { opacity: .35; }
.js .mapa [data-revelar] .mp-ruta__trazo { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .mapa .mp-ruta--proxima .mp-ruta__trazo { stroke-dasharray: .003 .016; stroke-dashoffset: 0; }
.js .mapa .visible .mp-ruta--actual .mp-ruta__trazo, .js .mapa [data-revelar].visible .mp-ruta--actual .mp-ruta__trazo { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--curva) .3s; }
.mapa__fichas { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linea); }
.ficha-ruta { border-bottom: 1px solid var(--linea); }
.ficha-ruta button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: var(--e-2) var(--e-4); align-items: baseline; text-align: left;
  padding: var(--e-5) 0; border: 0; background: none; cursor: pointer; color: inherit;
}
.ficha-ruta__nombre { font-size: var(--t-m); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; }
.ficha-ruta__via { grid-column: 1 / -1; color: var(--suave); font-size: .9375rem; }
.ficha-ruta dl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-6); margin: var(--e-2) 0 0; font-variant-numeric: tabular-nums; }
.ficha-ruta dt { font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--suave); }
.ficha-ruta dd { margin: 0; font-weight: 700; font-size: 1.0625rem; }
.ficha-ruta button:hover .ficha-ruta__nombre, .ficha-ruta.activa .ficha-ruta__nombre { color: var(--acento); }
.ficha-ruta--proxima .ficha-ruta__nombre { font-size: 1.25rem; font-weight: 700; }
.mapa__leyenda { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); margin-top: var(--e-5); font-size: var(--t-chico); color: var(--suave); }
.mapa__leyenda span { display: inline-flex; align-items: center; gap: .5em; }
.mapa__leyenda i { width: 1.75rem; height: 0; border-top: 3px solid var(--cobre-claro); }
.mapa__leyenda i.prox { border-top: 2px dotted var(--piedra); }

/* Perfil de altitud: la firma del corredor de sierra */
.perfil { margin-top: var(--e-6); overflow-x: auto; scrollbar-width: thin; }
@media (max-width: 767px) { .perfil svg { min-width: 760px; } }
.perfil svg { width: 100%; height: auto; overflow: visible; }
.perfil__area { fill: var(--noche-alto); opacity: .7; }
.perfil__linea { fill: none; stroke: var(--cobre-claro); stroke-width: 2; }
.perfil__base { stroke: var(--noche-linea); stroke-width: 1; }
.perfil text { fill: var(--luz-suave); font: 600 11px var(--f-sans); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.perfil .perfil__cima { fill: var(--luz); font-weight: 800; font-size: 13px; }
.perfil circle { fill: var(--noche); stroke: var(--cobre-claro); stroke-width: 2; }
.js .perfil[data-revelar] .perfil__linea { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .perfil[data-revelar].visible .perfil__linea { stroke-dashoffset: 0; transition: stroke-dashoffset 2.8s var(--curva) .2s; }
.js .perfil[data-revelar] .perfil__area { opacity: 0; }
.js .perfil[data-revelar].visible .perfil__area { opacity: 1; transition: opacity 1.4s ease 1.4s; }

/* ---------- 14. Galería horizontal de lugares ---------- */
.galeria { position: relative; }
.galeria__cab { display: flex; align-items: end; justify-content: space-between; gap: var(--e-5); flex-wrap: wrap; }
.galeria .galeria__pista {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(15rem, 72vw, 26rem); gap: clamp(.75rem, 1.5vw, 1.5rem);
  margin-top: var(--e-7); padding-inline: var(--canal); padding-bottom: var(--e-4);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--canal);
  scrollbar-width: thin; scrollbar-color: var(--cobre) transparent; list-style: none; margin-bottom: 0;
}
@media (min-width: 1440px) { .galeria__pista { padding-inline: calc((100vw - var(--ancho)) / 2 + var(--canal)); scroll-padding-inline: calc((100vw - var(--ancho)) / 2 + var(--canal)); } }
.lugar-foto { scroll-snap-align: start; margin: 0; }
.lugar-foto__img { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--noche-alto); }
.galeria__pista > li:nth-child(even) .lugar-foto__img { aspect-ratio: 1 / 1; margin-top: var(--e-7); }
.lugar-foto img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 1.2s var(--curva); }
.lugar-foto:hover img { transform: scale(1.04); }
.lugar-foto figcaption { display: grid; grid-template-columns: 1fr auto; gap: .15rem var(--e-4); padding-top: var(--e-4); border-top: 1px solid var(--linea); margin-top: var(--e-4); }
.lugar-foto figcaption b { font-size: 1.1875rem; font-weight: 800; letter-spacing: -.01em; }
.lugar-foto figcaption span { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--suave); font-variant-numeric: tabular-nums; }
.lugar-foto figcaption .alt { text-transform: none; letter-spacing: .04em; color: var(--acento); text-align: right; align-self: center; grid-row: span 2; font-size: .8125rem; }
.galeria__botones { display: flex; gap: var(--e-2); }
.galeria__botones button { width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; transition: background-color .2s, color .2s; }
.galeria__botones button:hover:not(:disabled) { background: var(--cobre); border-color: var(--cobre); color: var(--luz); }
.galeria__botones button:disabled { opacity: .3; cursor: default; }
.no-js .galeria__botones { display: none; }

/* ---------- 15. Pasos numerados sobre una ruta ---------- */
.pasos { list-style: none; margin: var(--e-8) 0 0; padding: 0; display: grid; gap: var(--e-6); grid-template-columns: 1fr; position: relative; counter-reset: p; }
.paso { counter-increment: p; position: relative; padding-left: 4rem; }
.paso::before {
  content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 2.75rem; height: 3.25rem; border: 1.5px solid currentColor; border-radius: 1.1rem 1.1rem 2px 2px;
  font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--acento); background: var(--fondo-paso, var(--piedra)); z-index: 1;
}
.paso h3 { font-size: 1.375rem; letter-spacing: -.02em; line-height: 1.15; }
.paso p { color: var(--suave); margin-top: var(--e-2); max-width: 30ch; font-size: .9875rem; }
.paso .dato { margin-top: var(--e-3); display: block; }
.pasos::before { content: ""; position: absolute; left: 1.3rem; top: 3.5rem; bottom: 0; width: 2px; background: repeating-linear-gradient(180deg, var(--cobre) 0 18px, transparent 18px 30px); transform-origin: top; transition: transform 1.8s var(--curva); }
.js .pasos[data-revelar]:not(.visible)::before { transform: scaleY(0); }
@media (min-width: 900px) {
  .pasos { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2.5rem); }
  .paso { padding-left: 0; padding-top: 5rem; }
  .pasos::before { left: 0; right: 0; top: 1.55rem; bottom: auto; width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--cobre) 0 28px, transparent 28px 44px); transform-origin: left; }
  .js .pasos[data-revelar]:not(.visible)::before { transform: scaleX(0); }
}
[data-tono="noche"] .paso::before { --fondo-paso: var(--noche); }
[data-tono="hondo"] .paso::before { --fondo-paso: var(--noche-hondo); }
[data-tono="papel"] .paso::before { --fondo-paso: var(--piedra-claro); }

/* ---------- 16. Acordeón corto ---------- */
.acordeon { border-top: 1px solid var(--linea); max-width: 52rem; }
.acordeon details { border-bottom: 1px solid var(--linea); }
.acordeon summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 2rem; gap: var(--e-4); align-items: center;
  padding-block: var(--e-4) .9rem; font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3;
  transition: color .2s;
}
.acordeon summary:hover { color: var(--acento); }
.acordeon summary::-webkit-details-marker { display: none; }
.acordeon summary::after {
  content: ""; justify-self: end; width: .8rem; height: .8rem; color: var(--acento);
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform .35s var(--curva);
}
.acordeon details[open] summary::after { transform: rotate(45deg); }
.acordeon details > div { padding-bottom: var(--e-4); color: var(--suave); max-width: 60ch; }
.detalle-una-linea { font-size: var(--t-chico); color: var(--suave); }
.detalle-una-linea summary { cursor: pointer; font-weight: 700; color: inherit; }
.detalle-una-linea p { margin-top: var(--e-2); max-width: 60ch; }

/* ---------- 17. Banda de cita / propósito (foto a sangre) ---------- */
.banda { position: relative; isolation: isolate; overflow: hidden; color: var(--luz); background: var(--noche-hondo); min-height: min(100svh, 56rem); display: grid; align-items: center; }
.banda__medio, .banda__medio img, .banda__medio video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); z-index: -2; }
.banda__medio img { scale: 1.12; }
.banda::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(10 22 40 / .9) 0%, rgb(10 22 40 / .6) 50%, rgb(10 22 40 / .3) 100%); }
.banda .marco { padding-block: var(--seccion); }
.banda .voz { font-size: clamp(2rem, 1.2rem + 3.6vw, 4.75rem); line-height: 1.05; max-width: 15ch; letter-spacing: -.025em; }
.banda .bajada { color: #D9DEE6; margin-top: var(--e-6); }
.banda .acciones { margin-top: var(--e-6); }
.banda .lugar { bottom: var(--e-5); }

/* ---------- 18. Llamada final ---------- */
.cierre { position: relative; isolation: isolate; overflow: hidden; background: var(--noche-hondo); color: var(--luz); }
.cierre .banda__medio img, .cierre .banda__medio video { scale: 1; }
.cierre::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(10 22 40 / .94) 0%, rgb(10 22 40 / .55) 50%, rgb(10 22 40 / .1) 100%), linear-gradient(90deg, rgb(10 22 40 / .55), rgb(10 22 40 / 0) 70%); }
.cierre .marco { padding-block: clamp(6rem, 4rem + 10vw, 13rem) var(--seccion); }
.cierre .titular { max-width: 14ch; }
.cierre .bajada { color: #D9DEE6; margin-top: var(--e-5); }
.cierre .acciones { margin-top: var(--e-7); }
.cierre__datos { display: flex; flex-wrap: wrap; gap: var(--e-3) var(--e-7); margin-top: var(--e-8); padding-top: var(--e-5); border-top: 1px solid rgb(247 244 238 / .2); font-size: var(--t-chico); color: var(--luz-suave); }
.cierre__datos a { color: var(--luz); }

/* ---------- 19. Chips de perfil ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--e-2); }
.chip, .chips label span {
  display: inline-flex; align-items: center; gap: .5em; min-height: 2.75rem; padding: .5em 1.05em .4em; border-radius: var(--r);
  border: 1px solid var(--linea); background: transparent; color: inherit; font-weight: 600; font-size: .875rem; letter-spacing: .005em; text-decoration: none; cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover, .chips label:hover span { border-color: var(--acento); }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--tinta); color: var(--luz); border-color: var(--tinta); }
[data-tono="noche"] .chip[aria-current="true"], [data-tono="hondo"] .chip[aria-current="true"] { background: var(--luz); color: var(--noche); border-color: var(--luz); }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips input:checked + span { background: var(--tinta); color: var(--luz); border-color: var(--tinta); }
.chips input:focus-visible + span { outline: 3px solid var(--cobre-hondo); outline-offset: 2px; }

/* ---------- 20. Formulario y hoja lateral (base-hoja.js) ---------- */
.hoja {
  position: fixed; inset: 0 0 0 auto; width: min(100%, 36rem); max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--piedra-claro); color: var(--tinta); overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform .5s var(--curva), overlay .5s allow-discrete, display .5s allow-discrete;
  --suave: var(--tinta-suave); --acento: var(--cobre-hondo); --linea: var(--piedra-linea);
}
.hoja.is-abierta { transform: none; }
.hoja::backdrop { background: rgb(10 22 40 / .55); }
.hoja > * { padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.hoja__cab { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: start; gap: var(--e-4); padding-block: var(--e-5) var(--e-4); background: var(--piedra-claro); border-bottom: 1px solid var(--linea); }
.hoja__titulo { font-size: var(--t-m); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; }
.hoja__bajada { color: var(--suave); margin-top: var(--e-2); }
.hoja .boton-menu { display: inline-flex; color: var(--tinta); border-color: var(--linea); }
.hoja__form, .hoja__listo { padding-block: var(--e-5) var(--e-7); display: grid; gap: var(--e-5); }
.hoja__nota, .campo__ayuda { font-size: .8125rem; color: var(--suave); }
.hoja__trampa { position: absolute; left: -9999px; }
@media (max-width: 599px) { .hoja { inset: auto 0 0 0; width: 100%; height: 92svh; transform: translateY(100%); } }
.formulario-jm { display: grid; gap: var(--e-5); }
.formulario-jm .hoja__form, .formulario-jm .hoja__listo { padding: 0; }
.perfil-form, .perfil-bloque, .campo-grupo { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--e-4); }
.perfil-form legend, .campo-grupo legend { font-weight: 700; margin-bottom: var(--e-3); padding: 0; }
.campo { display: grid; gap: var(--e-2); }
.campo label { font-weight: 700; font-size: .9375rem; }
.campo small, .campo label small { font-weight: 400; color: var(--suave); }
.campo input, .campo select, .campo textarea, .hoja__texto {
  width: 100%; min-height: 3rem; padding: .75rem .9rem .6rem; border: 1px solid #8E96A3; border-radius: var(--r);
  background: #FFFDF9; color: var(--tinta); font-size: 1rem;
}
.campo textarea, .hoja__texto { min-height: 7rem; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--tinta); outline: 3px solid var(--cobre-hondo); outline-offset: 1px; }
.campo [aria-invalid="true"] { border-color: #B42318; }
.campo__error, .pasos-form__error, .campo__aviso { color: #B42318; font-size: .875rem; font-weight: 600; }
.dos-col { display: grid; gap: var(--e-4); }
@media (min-width: 480px) { .dos-col { grid-template-columns: 1fr 1fr; } }
.consent { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--e-3); font-size: .875rem; color: var(--suave); }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--cobre); }

/* ---------- 21. Pie (v4.1: compacto) ---------- */
.pie { background: var(--noche); color: var(--luz); padding-top: var(--e-7); font-size: .875rem; }
.pie__alto { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3) var(--e-6); padding-bottom: var(--e-5); border-bottom: 1px solid var(--noche-linea); }
.pie__marca { flex: none; display: block; }
.pie__marca img { width: auto; height: 2.5rem; margin-left: -.35rem; }
.pie__lema { flex: 1 1 18rem; min-width: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.pie__lema em { font-family: var(--f-voz); font-weight: 400; color: var(--cobre-claro); }
.pie__lema-d { font-size: .875rem; font-weight: 400; letter-spacing: 0; color: var(--luz-suave); margin-left: .5em; }
.pie__cta { flex: none; }
.pie__columnas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-5) var(--e-5); padding-block: var(--e-5); }
.pie__col h2 { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--luz-suave); font-weight: 700; margin-bottom: var(--e-2); line-height: 1.4; }
.pie__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.pie__col a { display: inline-block; padding-block: .2rem; text-decoration: none; color: var(--luz); font-weight: 500; line-height: 1.35; }
.pie__col a:hover { color: var(--cobre-claro); }
.pie__bajo { display: flex; flex-wrap: wrap; gap: .25rem var(--e-5); padding-block: var(--e-3) var(--e-4); border-top: 1px solid var(--noche-linea); font-size: .75rem; line-height: 1.5; color: var(--luz-suave); }
.pie__bajo a { color: inherit; text-underline-offset: .2em; }
.pie__coordenadas { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.creditos { border-top: 1px solid var(--noche-linea); padding-block: var(--e-2); font-size: .75rem; color: var(--luz-suave); }
.creditos summary { cursor: pointer; font-weight: 600; color: var(--luz-suave); padding-block: .35rem; list-style-position: inside; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creditos summary:hover { color: var(--luz); }
.creditos summary small { font-weight: 400; color: var(--luz-suave); font-size: inherit; }
.creditos ul { columns: 2 18rem; column-gap: var(--e-7); padding-left: 1rem; margin-top: var(--e-3); }
.creditos li { break-inside: avoid; margin-bottom: .3rem; }
.creditos a { color: var(--luz); }
@media (min-width: 900px) {
  .pie__columnas { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--e-7); }
  .pie__bajo { justify-content: flex-start; }
  .pie__coordenadas { margin-left: auto; }
}
@media (max-width: 639px) {
  .pie { padding-top: var(--e-6); padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
  .pie__lema-d { display: block; margin: .2rem 0 0; }
  .pie__cta { display: none; }   /* en celular la acción vive en la barra fija */
}
/* Barra fija en celular: una sola acción */
.barra-accion { position: fixed; inset: auto 0 0; z-index: 40; padding: var(--e-3) var(--canal) calc(var(--e-3) + env(safe-area-inset-bottom)); background: var(--noche); border-top: 1px solid var(--noche-linea); transform: translateY(110%); transition: transform .45s var(--curva); }
.barra-accion .boton { width: 100%; }
.barra-accion.visible { transform: none; }
@media (min-width: 640px) { .barra-accion { display: none; } }

/* ---------- 22. Revelados (solo con JS y con movimiento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-revelar]:not(.eje):not(.perfil):not(.mapa__lienzo):not(.pasos) { opacity: 0; transform: translateY(28px); transition: opacity var(--dur) ease, transform 1s var(--curva); transition-delay: calc(var(--i, 0) * 90ms); }
  .js [data-revelar].visible:not(.eje):not(.perfil):not(.mapa__lienzo):not(.pasos) { opacity: 1; transform: none; }
  .js [data-paralaje] img { will-change: transform; scale: 1.14; }
  .heroe .titular, .heroe .ante, .heroe .bajada, .heroe .acciones, .heroe .tablero { animation: entra 1.1s var(--curva) both; }
  .heroe .ante { animation-delay: .1s; } .heroe .titular { animation-delay: .2s; } .heroe .bajada { animation-delay: .4s; }
  .heroe .acciones { animation-delay: .55s; } .heroe .tablero { animation-delay: .75s; }
  .heroe-pagina .heroe__medio img { animation: acerca 2.4s var(--curva) both; }
}
@keyframes acerca { from { transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .mapa [data-revelar] .mp-ruta__trazo, .js .perfil .perfil__linea { stroke-dashoffset: 0 !important; }
  .js .perfil .perfil__area { opacity: 1 !important; }
  .js .eje { transform: none !important; }
}

/* ---------- 23. Utilidades de composición ---------- */
.col-texto { max-width: var(--ancho-texto); }
.cab-seccion { display: grid; gap: var(--e-5); }
@media (min-width: 900px) {
  .cab-seccion--lado { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: end; column-gap: var(--e-8); }
  .cab-seccion--lado .bajada { justify-self: start; }
}
.a-sangre { margin-inline: calc(var(--canal) * -1); }
.foto-placeholder { display: grid; place-items: center; aspect-ratio: 4 / 5; border: 1.5px dashed var(--linea); color: var(--suave); text-align: center; padding: var(--e-6); font-size: var(--t-chico); background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(16 34 61 / .035) 14px 15px); }
[data-tono="noche"] .foto-placeholder, [data-tono="hondo"] .foto-placeholder { background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(236 231 222 / .05) 14px 15px); }
.foto-placeholder b { display: block; font-size: 1.125rem; color: var(--acento); margin-bottom: var(--e-2); }
.centrado-404 { min-height: 100svh; display: grid; align-items: center; }
/* Duo con retrato vertical (familia, fundadores, testimonios reales) */
.duo--retrato .duo__foto { margin-inline: 0; aspect-ratio: 4 / 5; min-height: 0; max-width: 30rem; }
.duo--retrato .duo__foto .foto-placeholder { height: 100%; aspect-ratio: auto; }
@media (min-width: 900px) {
  .duo--retrato .duo__foto { grid-column: 2 / span 4; margin: 0; min-height: 0; }
  .duo--retrato .duo__texto { grid-column: 7 / span 6; }
}
.voz--grande { font-size: clamp(2rem, 1.3rem + 3vw, 4rem); line-height: 1.08; letter-spacing: -.02em; max-width: 16ch; }
/* Fotos que llenan su caja (picture de medios.py) */
.indice__foto picture, .duo__foto picture, .lugar-foto__img picture, .banda__medio picture, .heroe__medio picture { display: block; width: 100%; height: 100%; }
/* Superficies oscuras sin data-tono: héroes, bandas, cierre */
.heroe, .heroe-pagina, .banda, .cierre, .menu, .pie { --suave: var(--luz-suave); --acento: var(--cobre-claro); --linea: var(--noche-linea); }
.seccion--corta { padding-top: var(--e-8); }
.creditos__pie { margin-top: var(--e-4); }
@media (max-width: 959px) { .mapa__lienzo { order: 2; max-width: 30rem; } }
/* Celular: el texto ocupa casi todo el ancho; el velo cubre más (medido ≥ 4,5:1 en p95) */
@media (max-width: 767px) {
  .heroe::before, .heroe-pagina::before { background: linear-gradient(180deg, rgb(10 22 40 / .5) 0%, rgb(10 22 40 / .35) 20%, rgb(10 22 40 / .7) 45%, rgb(10 22 40 / .92) 75%, rgb(10 22 40 / .96) 100%); }
}
/* v4.0 · ronda 2 (solo se añade) */
.promesa { margin-top: var(--e-5); font-size: var(--t-m); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--cobre-claro); }
.heroe .promesa + .bajada { margin-top: var(--e-3); }
.heroe__nota { margin-top: var(--e-4); color: var(--luz-suave); }
.voz-en-linea { font-family: var(--f-voz); font-style: italic; color: var(--acento); }
.ficha-ruta dd .estado { margin-left: .4em; vertical-align: .1em; font-size: .625rem; }
.indice__foto .rotulo { z-index: 1; }
.cifra__valor:not(:has(span)) { white-space: nowrap; }
.cab-seccion .titular + .bajada { margin-top: var(--e-5); }
.duo__texto .titular.titular--ancho, .portada .duo__texto .titular { max-width: 18ch; }
/* v4.1 · Rótulo sobre foto (héroes, bandas, cierre): placa de hito llena + texto en una línea.
   Sin banda de fondo: la placa (luz sobre noche, 15:1) se alinea a la línea base del texto;
   el texto va en luz con sombra corta sobre el velo del componente (≥ 4,5:1 medido en la zona baja). */
.heroe .ante, .heroe-pagina .ante, .banda .ante, .cierre .ante {
  flex-wrap: nowrap; align-items: baseline; gap: .7em; white-space: nowrap; max-width: 100%;
  color: var(--luz) !important; text-shadow: 0 1px 2px rgb(10 22 40 / .85), 0 0 14px rgb(10 22 40 / .55);
}
.heroe .hito, .heroe-pagina .hito, .banda .hito, .cierre .hito {
  background: var(--luz); border-color: var(--luz); color: var(--noche) !important; text-shadow: none;
  box-shadow: 0 1px 3px rgb(10 22 40 / .35);
}
.heroe .ante::after, .heroe-pagina .ante::after, .banda .ante::after, .cierre .ante::after { align-self: center; background: var(--luz); opacity: .5; }
@media (max-width: 400px) {
  .heroe .ante, .heroe-pagina .ante, .banda .ante, .cierre .ante { letter-spacing: .1em; gap: .55em; }
}
/* Velos: más hondos en la zona del texto */
.heroe-pagina::before { background: linear-gradient(0deg, rgb(10 22 40 / .94) 0%, rgb(10 22 40 / .72) 40%, rgb(10 22 40 / .35) 75%, rgb(10 22 40 / .45) 100%), linear-gradient(90deg, rgb(10 22 40 / .62), rgb(10 22 40 / 0) 70%); }
.cierre::before { background: linear-gradient(0deg, rgb(10 22 40 / .95) 0%, rgb(10 22 40 / .78) 50%, rgb(10 22 40 / .5) 100%), linear-gradient(90deg, rgb(10 22 40 / .6), rgb(10 22 40 / 0) 75%); }
.banda::before { background: linear-gradient(90deg, rgb(10 22 40 / .93) 0%, rgb(10 22 40 / .78) 55%, rgb(10 22 40 / .5) 100%); }
.heroe .promesa, .cierre .bajada, .banda .dato { text-shadow: 0 1px 2px rgb(10 22 40 / .7), 0 0 18px rgb(10 22 40 / .6); }
@media (max-width: 767px) {
  .heroe::before, .heroe-pagina::before { background: linear-gradient(180deg, rgb(10 22 40 / .6) 0%, rgb(10 22 40 / .55) 20%, rgb(10 22 40 / .78) 45%, rgb(10 22 40 / .94) 75%, rgb(10 22 40 / .97) 100%); }
  .cierre::before { background: rgb(10 22 40 / .8); }
  .banda::before { background: rgb(10 22 40 / .84); }
}
.heroe .promesa { color: #F4EFE6; }
@media (max-width: 767px) { .tablero dd { white-space: normal; overflow-wrap: anywhere; } }
/* v4.1 · coordinador: halo de lectura detrás del antetítulo sobre foto (sin banda visible) */
.heroe .ante, .heroe-pagina .ante, .banda .ante, .cierre .ante, .escena .ante, .cm-p .ante { position: relative; isolation: isolate; width: fit-content; }
.heroe .ante::before, .heroe-pagina .ante::before, .banda .ante::before, .cierre .ante::before, .escena .ante::before, .cm-p .ante::before {
  content: ""; position: absolute; inset: -1.1rem -2.2rem -1.1rem -1.4rem; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(10 22 40 / .72), rgb(10 22 40 / .45) 60%, rgb(10 22 40 / 0));
}
.esc__n, .esc .tab { text-shadow: 0 1px 3px rgb(10 22 40 / .8); }
.lugar-foto .tab, .galeria .tab { background: rgb(10 22 40 / .6); padding: .1rem .4rem; border-radius: 3px; }
