/* Mapa de Rutas — base compartida (index + legales)
   Tema cartográfico claro: marfil, teal principal, coral de acento. */

:root {
  /* Paleta */
  --bg:       #f3f1e8;   /* marfil / gris muy claro, fondo */
  --card:     #fcfbf6;   /* superficie de fichas */
  --card-2:   #f7f4ea;   /* superficie alterna */
  --ink:      #16302e;   /* texto */
  --teal:     #0a6360;   /* teal principal: 6,7:1 sobre --card */
  --teal-dk:  #074845;   /* teal oscuro, hover */
  --teal-bg:  #e2efec;   /* tinte teal, recuadros */
  --coral:    #e2573a;   /* coral de acento: nodos y arcos (decorativo) */
  --coral-ink:#c23a22;   /* coral para texto/etiquetas: 5:1 sobre --card */
  --coral-bg: #fcebe4;   /* tinte coral, avisos */
  --line:     #d7d1be;   /* líneas de mapa y bordes */
  --line-dk:  #bdb6a0;   /* líneas más marcadas */
  --mute:     #56645d;   /* texto secundario: 5,4:1 sobre --bg */

  /* Tipografía */
  --display: 'Bricolage Grotesque', system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono:    'DM Mono', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, monospace;
  --text:    system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Escala */
  --fs-0: 0.8125rem;                                   /* 13 — etiquetas */
  --fs-1: 0.9375rem;                                   /* 15 — notas, tablas */
  --fs-2: 1.0625rem;                                   /* 17 — cuerpo desktop */
  --fs-3: 1.1875rem;                                   /* 19 — entradillas, H4 */
  --fs-4: clamp(1.3125rem, 1.15rem + 0.7vw, 1.625rem); /* 21–26 — H3 */
  --fs-5: clamp(1.625rem, 1.3rem + 1.5vw, 2.375rem);   /* 26–38 — H2 */
  --fs-6: clamp(2rem, 1.35rem + 2.9vw, 3.3rem);        /* 32–53 — H1 */

  /* Ritmo (múltiplos de 4) */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px;

  /* Modal de cookies: fondo borroso configurable */
  --cookie-blur:    16px;                       /* intensidad del desenfoque del fondo (0 = sin blur) */
  --cookie-overlay: rgba(22, 48, 46, 0.42);     /* color y opacidad del velo sobre la página */
  --cookie-width:   460px;                       /* ancho máximo de la tarjeta */

  --r: 14px;            /* radio de fichas */
  --r-sm: 8px;
  --measure: 66ch;
  --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-2);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 640px) { body { font-size: 1rem; } }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s2);
  text-wrap: balance;
}
h1 { font-size: var(--fs-6); }
h2 { font-size: var(--fs-5); }
h3 { font-size: var(--fs-4); }
h4 { font-size: var(--fs-3); font-weight: 600; letter-spacing: -0.01em; }

p, ul, ol, dl { margin: 0 0 var(--s2); max-width: var(--measure); }
ul, ol { padding-left: 1.2em; }
li + li { margin-top: 6px; }
strong { font-weight: 700; }
small { font-size: var(--fs-0); }

a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--teal-dk); text-decoration-thickness: 2px; }
a, code { overflow-wrap: anywhere; }

/* Códigos de aeropuerto y datos en monoespaciada */
.cod { font-family: var(--mono); font-weight: 500; letter-spacing: 0.02em; overflow-wrap: anywhere; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--teal); color: #fff; }

table, .tnum { font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s2); }
@media (min-width: 768px) { .container { padding-inline: var(--s4); } }

/* Etiqueta de sección */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--fs-0);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-ink);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s3);
  font-family: var(--display); font-weight: 600; font-size: var(--fs-1);
  text-decoration: none; cursor: pointer;
  border: 2px solid var(--teal); border-radius: 999px;
  background: var(--teal); color: #fff;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--teal-dk); border-color: var(--teal-dk); color: #fff; }
.btn.ghost { background: transparent; color: var(--teal); }
.btn.ghost:hover { background: var(--teal-bg); color: var(--teal-dk); }

.skip {
  position: absolute; left: var(--s2); top: -100px;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: var(--s1) var(--s2); background: var(--ink); color: #fff;
  z-index: 100; text-decoration: none; font-weight: 600; border-radius: var(--r-sm);
}
.skip:focus { top: var(--s2); color: #fff; }

/* ---------- Modal de cookies ----------
   Nace oculto; solo script.js lo abre añadiendo .is-open.
   Los IDs cookieModal / cookieAcceptButton no se deben renombrar. */
#cookieModal {
  display: none; position: fixed; inset: 0; z-index: 90;
  align-items: center; justify-content: center; padding: 20px;
  background: var(--cookie-overlay);
  -webkit-backdrop-filter: blur(var(--cookie-blur));
  backdrop-filter: blur(var(--cookie-blur));
}
#cookieModal.is-open { display: flex; }
#cookieAcceptButton { min-height: 48px; cursor: pointer; }
.cookie {
  background: var(--card); width: 100%; max-width: var(--cookie-width);
  padding: var(--s3); border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(22, 48, 46, 0.28);
}
.cookie h2 { font-size: var(--fs-4); margin-bottom: var(--s1); }
.cookie p { font-size: var(--fs-1); margin-bottom: var(--s1); }
.cookie .fila { margin-top: var(--s2); }
.cookie .fila .btn { width: 100%; }

a.src { color: var(--mute); font-size: var(--fs-0); font-family: var(--mono); }
a.src:hover { color: var(--teal-dk); }

.muted { color: var(--mute); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
