/* Mi Ruta MX — hoja única del sitio. Sin fuentes ni recursos externos. */

@font-face {
  font-family: "Jost";
  src: url("/assets/fuentes/jost-latin.woff2") format("woff2");
  font-weight: 200 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Paleta tomada del logo: azul marino #0c2942 (matiz 208°) y turquesa #0db7b3 (matiz 179°).
     Los demás tonos derivan de esos dos matices; contraste AA comprobado en las pruebas. */
  --navy: #0c2942;           /* logo */
  --navy-2: #143857;         /* mismo matiz, más claro: estados :hover */
  --navy-profundo: #071827;  /* mismo matiz, más oscuro: fondo nocturno */
  --navy-via: #13324e;       /* calles del fondo */
  --turquesa: #0db7b3;       /* logo */
  --turquesa-texto: #087271; /* turquesa del logo oscurecido para texto sobre claro: 5,7:1 */
  --turquesa-suave: #e7f8f8;
  --fondo: #f6f9fb;
  --fondo-2: #ebf0f5;
  --superficie: #ffffff;
  --texto: #0c2942;          /* el azul del logo */
  --texto-2: #39536a;
  --texto-prosa: #1f3a54;
  --tinta-clara: #c6d7e7;    /* texto sobre azul marino */
  --tinta-media: #a2b9cd;    /* texto secundario sobre azul marino */
  --borde: #dbe4eb;
  --pendiente-fondo: #fff1c2;   /* sólo vista previa: marcas de pendiente */
  --pendiente-borde: #b98900;
  --pendiente-texto: #5c4300;
  --pendiente-caja: var(--pendiente-caja);

  --fuente-titulos: "Jost", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --fuente: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radio: 14px;
  --sombra: 0 1px 2px rgb(12 41 66 / 6%), 0 8px 24px rgb(12 41 66 / 6%);
  --ancho: 1120px;
  --margen: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--texto);
  font: 400 1rem/1.6 var(--fuente);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; outline: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--turquesa-texto); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--turquesa-texto);
  outline-offset: 3px;
  border-radius: 6px;
}

.saltar {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.saltar:focus { top: 12px; color: #fff; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 82%);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgb(12 41 66 / 7%);
}
.inicio .cabecera { background: transparent; border-bottom-color: transparent; position: absolute; inset: 0 0 auto; -webkit-backdrop-filter: none; backdrop-filter: none; }

.cabecera__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 12px var(--margen);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); min-height: 44px; }
.marca img { width: auto; height: 36px; }
.marca__texto { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.inicio .marca__texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.inicio .marca { visibility: hidden; } /* en inicio el logo protagonista ya identifica la marca */
.inicio .nav a { color: #fff; }
.inicio .nav a:hover { background: rgb(255 255 255 / 12%); }
.inicio :focus-visible { outline-color: var(--turquesa); }

.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.nav a:hover { background: rgb(12 41 66 / 6%); }
.nav a[aria-current="page"] { background: var(--turquesa-suave); color: var(--navy); }

/* ---------- Inicio: portada «Próximamente» ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 92px var(--margen) 96px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(55% 50% at 50% 46%, rgb(13 183 179 / 10%) 0%, rgb(13 183 179 / 0%) 60%),
    radial-gradient(70% 70% at 50% 45%, var(--navy-2) 0%, var(--navy) 45%, var(--navy-profundo) 100%);
}
/* Vista aérea abstracta: calles y pasos de cebra (dibujo propio, sin fotografías de terceros) */
.calles { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; }
/* Velo central: el texto nunca queda sobre las líneas del fondo */
/* Costura con la sección siguiente: una vía turquesa */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, rgb(13 183 179 / 0%), var(--turquesa) 22%, var(--turquesa) 78%, rgb(13 183 179 / 0%)); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(48% 46% at 50% 52%, rgb(7 24 39 / 82%) 0%, rgb(7 24 39 / 55%) 55%, rgb(7 24 39 / 0%) 100%); pointer-events: none; }
.calles__vias path { fill: none; stroke: var(--navy-via); stroke-width: 120; opacity: 0.55; }
.calles__vias .calles__secundaria { stroke-width: 34; opacity: 0.45; }
.calles__carriles path { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 26 30; opacity: 0.07; }
.calles__cebra path { fill: none; stroke: #fff; stroke-width: 30; stroke-dasharray: 8 9; opacity: 0.09; }

.red { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.red__linea { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0.08; }
.red__ruta { fill: none; stroke: var(--turquesa); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: trazar 3.2s cubic-bezier(0.65, 0, 0.35, 1) 0.4s forwards; }
.red__pulso { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22 978; stroke-dashoffset: 22; opacity: 0; animation: recorrer 7s linear 3.8s infinite; }
.red__parada { fill: var(--navy); stroke: var(--turquesa); stroke-width: 3; opacity: 0; animation: aparecer 0.5s ease forwards; transform-box: fill-box; transform-origin: center; }
.red__parada--fin { fill: var(--turquesa); }

@keyframes trazar { to { stroke-dashoffset: 0; } }
@keyframes recorrer { 0% { stroke-dashoffset: 22; opacity: 0; } 4% { opacity: 0.9; } 92% { opacity: 0.9; } 100% { stroke-dashoffset: -978; opacity: 0; } }
@keyframes aparecer { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes brillar { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.7; } }

.red__parada:nth-of-type(1) { animation-delay: 0.45s; }
.red__parada:nth-of-type(2) { animation-delay: 0.9s; }
.red__parada:nth-of-type(3) { animation-delay: 1.3s; }
.red__parada:nth-of-type(4) { animation-delay: 1.75s; }
.red__parada:nth-of-type(5) { animation-delay: 2.2s; }
.red__parada:nth-of-type(6) { animation-delay: 2.6s; }
.red__parada:nth-of-type(7) { animation-delay: 3.1s; }
.red__parada:nth-of-type(8) { animation-delay: 3.4s; }
.red__parada:nth-of-type(9) { animation-delay: 3.6s; }

.hero__contenido { display: flex; flex-direction: column; align-items: center; text-align: center; width: min(100%, 980px); }
.hero__contenido > * { animation: subir 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__contenido > :nth-child(2) { animation-delay: 0.12s; }
.hero__contenido > :nth-child(3) { animation-delay: 0.24s; }
.hero__contenido > :nth-child(4) { animation-delay: 0.34s; }
.hero__contenido > :nth-child(5) { animation-delay: 0.44s; }
.hero__contenido > :nth-child(6) { animation-delay: 0.52s; }

/* El logo conserva sus colores sobre una placa blanca */
.hero__placa { padding: clamp(12px, 1.6vw, 18px) clamp(16px, 2.2vw, 26px); border-radius: 22px; background: #fff; box-shadow: 0 18px 50px rgb(0 0 0 / 35%), 0 0 0 1px rgb(255 255 255 / 30%); }
.hero__logo { display: block; width: clamp(112px, min(12vw, 18vh), 160px); }
.hero__logo img { width: 100%; height: auto; }

.hero__titulo { position: relative; display: flex; flex-direction: column; align-items: center; margin: clamp(18px, 3.5vh, 40px) 0 clamp(16px, 2.6vh, 28px); padding: clamp(18px, 3vh, 34px) 0; width: 100%; }
.sol { position: absolute; inset: 50% auto auto 50%; z-index: -1; width: min(820px, 112%); height: auto; transform: translate(-50%, -50%); overflow: visible; }
.via { width: min(560px, 84%); height: auto; margin-top: clamp(14px, 2.4vh, 24px); overflow: visible; }
.sol__rayos line { stroke: #fff; stroke-width: 2; stroke-linecap: round; animation: brillar 5s ease-in-out infinite; }
.sol__trazo { fill: none; stroke: var(--turquesa); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: trazar 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.9s forwards; }
.sol__parada { fill: var(--navy); stroke: var(--turquesa); stroke-width: 3; opacity: 0; animation: aparecer 0.5s ease 2.2s forwards; transform-box: fill-box; transform-origin: center; }
.sol__parada--fin { fill: var(--turquesa); }

.hero h1 { margin: 0; font-family: var(--fuente-titulos); font-weight: 300; line-height: 1; }
.hero__antetitulo { display: block; margin-bottom: clamp(12px, 2vh, 20px); font-size: clamp(0.78rem, 1.4vw, 1rem); font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: var(--turquesa); }
.hero__grande { display: block; font-size: clamp(1.9rem, 8.6vw, 5.4rem); letter-spacing: 0.14em; margin-right: -0.14em; text-transform: uppercase; color: #fff; text-shadow: 0 6px 40px rgb(0 0 0 / 35%); }

.hero__lema { margin: 0; max-width: 30ch; font-family: var(--fuente-titulos); font-size: clamp(1.15rem, 2.3vw, 1.65rem); font-weight: 500; line-height: 1.25; color: #fff; text-wrap: balance; }
.hero__texto { margin: 14px 0 0; max-width: 52ch; color: var(--tinta-clara); font-size: clamp(0.98rem, 1.5vw, 1.08rem); text-wrap: pretty; }

.hero__contacto {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: clamp(22px, 3.5vh, 34px); padding: 0 26px;
  border: 1px solid rgb(255 255 255 / 55%); border-radius: 999px; color: #fff; font-family: var(--fuente-titulos); font-size: 0.86rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.hero__contacto:hover { background: var(--turquesa); border-color: var(--turquesa); color: var(--navy-profundo); }

.hero__plataformas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--tinta-media); font-size: 0.86rem; }
.hero__plataformas li + li::before { content: "·"; margin-right: 18px; color: var(--turquesa); }

.hero__bajar {
  position: absolute; left: 50%; bottom: clamp(18px, 4vh, 34px); display: grid; place-items: center; width: 44px; height: 44px; transform: translateX(-50%);
  border: 1px solid rgb(255 255 255 / 45%); color: #fff; transition: background-color 0.2s ease;
}
.hero__bajar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero__bajar:hover { background: rgb(255 255 255 / 12%); color: #fff; }

/* ---------- Inicio: franja de principios ---------- */
.principios { padding: clamp(52px, 8vw, 92px) var(--margen); background: var(--fondo); }
.principios__interior { max-width: var(--ancho); margin: 0 auto; }
.principios__antetitulo { margin: 0 0 10px; color: var(--turquesa-texto); font-family: var(--fuente-titulos); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; }
.principios h2 { margin: 0 0 10px; color: var(--navy); font-size: clamp(1.5rem, 2.8vw, 2.05rem); line-height: 1.2; }
.principios__intro { margin: 0 0 34px; max-width: 60ch; color: var(--texto-2); }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.tarjeta { position: relative; overflow: hidden; padding: 28px 24px 24px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); box-shadow: var(--sombra); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.tarjeta::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--turquesa); }
.tarjeta:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(12 41 66 / 6%), 0 14px 32px rgb(12 41 66 / 10%); }
.tarjeta__icono { width: 52px; height: 52px; margin-bottom: 16px; padding: 10px; border-radius: 14px; background: var(--turquesa-suave); color: var(--turquesa-texto); }
.tarjeta h3 { margin: 0 0 6px; color: var(--navy); font-family: var(--fuente-titulos); font-size: 1.12rem; font-weight: 600; }
.tarjeta p { margin: 0; color: var(--texto-2); font-size: 0.95rem; }
.principios__nota { margin: 24px 0 0; color: var(--texto-2); font-size: 0.9rem; }

/* Títulos con la tipografía de marca */
.doc h1, .prosa h2, .principios h2, .error h1, .marca__texto { font-family: var(--fuente-titulos); letter-spacing: -0.01em; }
.doc h1, .error h1 { font-weight: 600; }
.prosa h2, .principios h2 { font-weight: 600; }

/* ---------- Pie ---------- */
.pie { background: var(--navy); color: var(--tinta-clara); }
.pie__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 22px var(--margen) calc(22px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "marca enlaces hecho" "marca enlaces legal" "aviso aviso aviso";
  align-items: center;
  gap: 4px 24px;
  font-size: 0.9rem;
}
.pie__marca { grid-area: marca; display: inline-block; margin-right: 12px; padding: 8px 12px; border-radius: 14px; background: #fff; line-height: 0; }
.pie__marca img { width: 84px; height: auto; }
.pie__enlaces { grid-area: enlaces; display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -10px; }
.pie__enlaces a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: #fff; text-decoration: none; border-radius: 8px; }
.pie__enlaces a:hover { color: #fff; text-decoration: underline; }
.pie :focus-visible { outline-color: var(--turquesa); }
.pie__hecho { grid-area: hecho; margin: 0; color: #fff; font-weight: 600; text-align: right; }
.pie__legal { grid-area: legal; margin: 0; color: var(--tinta-media); text-align: right; font-size: 0.82rem; }
.pie__aviso { grid-area: aviso; margin: 10px 0 0; padding-top: 12px; border-top: 1px solid rgb(255 255 255 / 12%); color: var(--tinta-media); font-size: 0.8rem; }
.corazon { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }

/* ---------- Documentos legales y de ayuda ---------- */
.doc { max-width: var(--ancho); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--margen) 72px; }
.doc__cabecera { max-width: 760px; margin-bottom: 28px; }
.doc__ruta { margin: 0 0 14px; color: var(--texto-2); font-size: 0.875rem; }
.doc__ruta a { color: var(--texto-2); }
.doc h1 { margin: 0; color: var(--navy); font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.doc__entradilla { margin: 14px 0 0; color: var(--texto-2); font-size: 1.1rem; text-wrap: pretty; }
.doc__entradilla:empty { display: none; }
.doc__version { display: inline-block; margin: 18px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--fondo-2); color: var(--texto-2); font-size: 0.82rem; font-weight: 600; }

.borrador {
  max-width: 760px;
  margin: 0 0 32px;
  padding: 16px 20px;
  border: 1px solid var(--pendiente-borde);
  border-left-width: 6px;
  border-radius: 12px;
  background: var(--pendiente-caja);
  color: var(--pendiente-texto);
}
.borrador p { margin: 0; }
.borrador__titulo { font-weight: 800; letter-spacing: 0.02em; margin-bottom: 4px !important; }

mark.pendiente, mark.pendiente-muestra {
  padding: 0.05em 0.35em;
  border-radius: 4px;
  background: var(--pendiente-fondo);
  box-shadow: inset 0 -2px 0 var(--pendiente-borde);
  color: var(--pendiente-texto);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.doc__cuerpo { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc__lateral:empty { display: none; }
.doc__cuerpo:has(.doc__lateral:empty) { grid-template-columns: minmax(0, 1fr); }
.indice { position: sticky; top: 88px; padding: 18px 18px 14px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); font-size: 0.875rem; }
.indice__titulo { margin: 0 0 8px; color: var(--navy); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.indice ol { margin: 0; padding: 0 0 0 1.2em; color: var(--texto-2); }
.indice li { margin: 0 0 6px; }
.indice a { color: var(--texto-2); text-decoration: none; }
.indice a:hover { color: var(--navy); text-decoration: underline; }

.prosa { max-width: 72ch; min-width: 0; }
.prosa h2 { margin: 48px 0 12px; color: var(--navy); font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.015em; scroll-margin-top: 88px; }
.prosa h2:first-child { margin-top: 0; }
.prosa h3 { margin: 28px 0 8px; color: var(--navy); font-size: 1.08rem; }
.prosa p, .prosa li { color: var(--texto-prosa); }
.prosa ul, .prosa ol { padding-left: 1.3em; }
.prosa li + li { margin-top: 6px; }
.prosa strong { color: var(--texto); }
.prosa code { padding: 0.1em 0.35em; border-radius: 5px; background: var(--fondo-2); font-size: 0.9em; }

.tabla { margin: 18px 0 24px; overflow-x: auto; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); }
.tabla table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; }
.tabla caption { padding: 12px 16px 0; color: var(--texto-2); font-size: 0.85rem; text-align: left; }
.tabla th, .tabla td { padding: 12px 16px; border-bottom: 1px solid var(--borde); text-align: left; vertical-align: top; }
.tabla thead th { background: var(--fondo-2); color: var(--navy); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.tabla tr:last-child > * { border-bottom: 0; }
.tabla td { color: var(--texto-prosa); }

.caja { margin: 20px 0; padding: 18px 20px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); box-shadow: var(--sombra); }
.caja > :first-child { margin-top: 0; }
.caja > :last-child { margin-bottom: 0; }
.caja--clave { border-left: 5px solid var(--turquesa); }
.prosa > .caja:first-child { margin-top: 0; } /* alinea el resumen con el índice lateral */

.contacto { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font: 700 1rem/1 var(--fuente);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.boton:hover { background: var(--navy-2); color: #fff; }
.boton:active { transform: translateY(1px); }
.boton--secundario { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--borde); }
.boton--secundario:hover { background: #fff; color: var(--navy); }
.boton[hidden] { display: none; }
.estado-copia { min-height: 1.5em; margin: 0; color: var(--turquesa-texto); font-size: 0.9rem; font-weight: 600; }

.preguntas details { border-bottom: 1px solid var(--borde); }
.preguntas details:first-of-type { border-top: 1px solid var(--borde); }
.preguntas summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 2px; color: var(--navy); font-weight: 700; cursor: pointer; list-style: none; }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: "+"; color: var(--turquesa-texto); font-size: 1.3rem; line-height: 1; transition: transform 0.2s ease; }
.preguntas details[open] summary::after { transform: rotate(45deg); }
.preguntas details > :not(summary) { margin: 0 2px 16px; }

/* ---------- 404 ---------- */
.error { display: grid; place-items: center; padding: clamp(56px, 12vh, 120px) var(--margen); text-align: center; }
.error__codigo { margin: 0; color: var(--turquesa-texto); font-weight: 800; letter-spacing: 0.2em; }
.error h1 { margin: 8px 0 12px; color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.error p { max-width: 46ch; margin: 0 auto 28px; color: var(--texto-2); }
.error svg { width: min(320px, 80vw); height: auto; margin: 0 auto 28px; }
.error__acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Adaptación ---------- */
@media (max-width: 860px) {
  .doc__cuerpo { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .indice { position: static; }
  .pie__interior { grid-template-columns: 1fr; grid-template-areas: "marca" "hecho" "enlaces" "legal" "aviso"; gap: 8px; }
  .pie__marca { justify-self: start; margin-bottom: 6px; }
  .pie__hecho, .pie__legal { text-align: left; }
}

@media (max-width: 760px) {
  .red__ruta, .red__pulso, .red__paradas { display: none; }
  .hero__plataformas { flex-direction: column; gap: 4px; }
  .hero__plataformas li + li::before { content: none; }
}

@media (max-width: 520px) {
  .nav a { padding: 0 11px; font-size: 0.9rem; }
  .marca__texto { font-size: 0.98rem; }
  .hero { padding-top: 84px; }
  .hero__antetitulo { letter-spacing: 0.24em; }
  .sol { width: 150%; } /* en pantallas estrechas los rayos se abren para no tocar el texto */
  .sol__lateral { display: none; }
  .hero__grande { letter-spacing: 0.1em; margin-right: -0.1em; }
}

@media (max-height: 640px) and (min-width: 600px) {
  .hero__logo { width: 120px; }
  .hero__titulo { margin: 18px 0 14px; padding: 20px 0; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tarjeta:hover { transform: none; }
  .red__ruta { stroke-dashoffset: 0; }
  .red__parada { opacity: 1; }
  .red__pulso { display: none; }
  .sol__trazo { stroke-dashoffset: 0; }
  .sol__parada { opacity: 1; }
  .sol__rayos line { opacity: 0.5; }
}

@media (forced-colors: active) {
  .red, .calles, .sol { display: none; }
}

@media print {
  .cabecera, .pie, .doc__lateral, .saltar { display: none; }
  body { background: #fff; }
  .doc__cuerpo { display: block; }
  a { color: inherit; }
}
