/* ==========================================================================
   aeroportero.com · estilos
   Marca: Proyecto RRSS/estrategia/marca.md (fuente única).
   Los tokens de :root son los de Proyecto RRSS/bin/marca.css, copiados tal cual.
   No escribir códigos de color sueltos fuera de :root.
   ========================================================================== */

@font-face { font-family: "Anton"; src: url("/fonts/anton.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  /* Tokens de marca (bin/marca.css) */
  --marino: #0C2340; --marino-2: #13284D; --blanco: #FFFFFF; --amarillo: #FFD400;
  --rojo: #E0262B;   /* solo señal: error */
  --verde: #18A558;  /* solo señal */
  --tinta: #0A1426;
  --f-titular: "Anton", "Arial Narrow", sans-serif;
  --f-texto: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Derivados (solo mezclas de los tokens) */
  --texto-suave: color-mix(in srgb, var(--blanco) 82%, var(--marino-2));
  --linea: color-mix(in srgb, var(--blanco) 14%, transparent);
  --sombra: 0 18px 40px color-mix(in srgb, var(--tinta) 55%, transparent);

  /* Forma: un solo sistema de esquinas */
  --r-grande: 20px;  /* billete y filas */
  --r-control: 12px; /* campos y botón */

  /* Movimiento */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* Espacio lateral que respeta el notch */
  --margen: max(20px, env(safe-area-inset-left, 0px));
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--marino);
}
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--f-texto);
  font-weight: 600;
  font-size: 1.125rem; /* 18 px: letra grande para el público */
  line-height: 1.5;
  color: var(--blanco);
  overflow-wrap: break-word; /* emails y palabras largas con la letra al 200 % */
}
img, svg { display: block; max-width: 100%; }
/* «hidden» siempre gana: si no, .form { display: grid } dejaba el formulario a la vista tras enviarlo */
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: inherit; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; border-radius: 4px; }

/* Foto de aeropuerto desenfocada con capa marina (nunca fondo negro) */
.fondo {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--marino) 78%, transparent) 0%,
      color-mix(in srgb, var(--marino) 90%, transparent) 55%,
      var(--marino) 100%),
    url("/img/fondo-salidas.jpg") center top / cover no-repeat;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--marino) 78%, transparent) 0%,
      color-mix(in srgb, var(--marino) 90%, transparent) 55%,
      var(--marino) 100%),
    image-set(url("/img/fondo-salidas.webp") type("image/webp"), url("/img/fondo-salidas.jpg") type("image/jpeg")) center top / cover no-repeat;
}

/* --- Maqueta --------------------------------------------------------------- */
.pagina {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top, 0px))
    var(--margen)
    max(32px, env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* nada puede ensanchar la página en móvil */
  gap: 28px;
}

/* --- Quién: foto, nombre, cargo y lema --------------------------------------- */
.quien {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr); /* el lema no puede ensanchar la cabecera */
  align-items: center;
  column-gap: 16px;
  row-gap: 22px;
}
.quien__foto {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid var(--marino);
  box-shadow: 0 0 0 3px var(--amarillo);
}
.quien__texto { min-width: 0; }
.quien__nombre { font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.quien__cargo {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 4px solid var(--amarillo); /* presentación del kit: barra amarilla a la izquierda */
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--texto-suave);
}
.lema {
  grid-column: 1 / -1;
  min-width: 0;
  font-family: var(--f-titular);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 12.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.lema em, .billete__titulo em, .legal h1 em { font-style: normal; color: var(--amarillo); }

/* --- Billete: la guía gratis ----------------------------------------------- */
.billete { display: grid; grid-template-columns: minmax(0, 1fr); filter: drop-shadow(var(--sombra)); }
.billete__arriba,
.billete__abajo {
  background: var(--marino-2);
  padding: 24px 22px;
}
/* Muescas de tarjeta de embarque: medio círculo recortado a cada lado del corte */
.billete__arriba {
  border-radius: var(--r-grande) var(--r-grande) 0 0;
  padding-bottom: 28px;
  -webkit-mask:
    radial-gradient(circle 14px at 0 100%, transparent 13.5px, white 14px) left / 51% 100% no-repeat,
    radial-gradient(circle 14px at 100% 100%, transparent 13.5px, white 14px) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 14px at 0 100%, transparent 13.5px, white 14px) left / 51% 100% no-repeat,
    radial-gradient(circle 14px at 100% 100%, transparent 13.5px, white 14px) right / 51% 100% no-repeat;
}
.billete__corte {
  height: 0;
  margin: 0 22px;
  border-top: 2px dashed var(--linea);
  position: relative;
  z-index: 1;
}
.billete__abajo {
  border-radius: 0 0 var(--r-grande) var(--r-grande);
  padding-top: 28px;
  -webkit-mask:
    radial-gradient(circle 14px at 0 0, transparent 13.5px, white 14px) left / 51% 100% no-repeat,
    radial-gradient(circle 14px at 100% 0, transparent 13.5px, white 14px) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 14px at 0 0, transparent 13.5px, white 14px) left / 51% 100% no-repeat,
    radial-gradient(circle 14px at 100% 0, transparent 13.5px, white 14px) right / 51% 100% no-repeat;
}

/* Etiqueta de serie del kit: chip marino, borde amarillo de 3 px, Inter 900 */
.chip {
  display: inline-block;
  padding: 5px 12px;
  border: 3px solid var(--amarillo);
  border-radius: 999px;
  background: var(--marino);
  font-weight: 900;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.billete__cabeza {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
}
.billete__titulo {
  font-family: var(--f-titular);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 11vw, 3rem);
  line-height: 1.02;
}
.billete__portada {
  width: 86px;
  height: auto;
  border-radius: 8px;
  rotate: 4deg;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--tinta) 70%, transparent);
}
.billete__sub { margin-top: 12px; color: var(--texto-suave); }

.aprendes {
  list-style: none;
  padding: 0;
  margin-top: 18px;
  display: grid;
  gap: 10px;
}
.aprendes li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.aprendes svg { width: 26px; height: 26px; color: var(--amarillo); margin-top: 1px; }

/* --- Formulario ------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form__intro { font-weight: 800; }
.campo { display: grid; gap: 8px; }
.campo label { font-weight: 800; font-size: 1.0625rem; }
.campo input {
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  font: inherit;
  font-size: 1.1875rem; /* 19 px: nunca menos de 16 o iOS hace zoom */
  font-weight: 600;
  color: var(--marino);
  background: var(--blanco);
  border: 3px solid transparent;
  border-radius: var(--r-control);
  appearance: none;
}
.campo input:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; border-radius: var(--r-control); }
.campo input[aria-invalid="true"] { border-color: var(--rojo); }
.campo__error {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding-left: 10px;
  border-left: 4px solid var(--rojo);
  font-weight: 800;
  font-size: 1rem;
}
.campo__error[hidden] { display: none; }

.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Botón: es el rótulo del gancho del kit (caja amarilla, letra marina, Anton) */
.boton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--amarillo);
  color: var(--marino);
  font-family: var(--f-titular);
  font-size: clamp(1.3rem, 7vw, 1.5rem); /* a 320 px cabe en una línea con margen */
  letter-spacing: 0.02em;
  text-wrap: balance;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 140ms var(--ease-out), opacity 200ms ease;
}
.boton:active { transform: scale(0.97); }
.boton__icono { width: 26px; height: 26px; transition: transform 200ms var(--ease-out); }
.boton[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.boton[aria-busy="true"] .boton__icono { display: none; }

.form__aviso { font-size: 0.9375rem; line-height: 1.45; color: var(--texto-suave); }
.form__aviso a, .form__fallo a, .legal a { color: var(--amarillo); text-underline-offset: 3px; }

.form__fallo {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r-control);
  border-left: 4px solid var(--rojo);
  background: var(--marino);
  font-size: 1rem;
}
.form__fallo[hidden] { display: none; }
.form__fallo svg { width: 26px; height: 26px; color: var(--rojo); }

/* Estado de éxito: sustituye al formulario */
.hecho { display: grid; gap: 16px; outline: none; }
.hecho[hidden] { display: none; }
.hecho__icono { width: 52px; height: 52px; color: var(--amarillo); }
.hecho__titulo { font-family: var(--f-titular); font-weight: 400; text-transform: uppercase; font-size: 2.25rem; line-height: 1.05; }
.pasos { list-style: none; padding: 0; display: grid; gap: 12px; counter-reset: paso; }
.pasos li { counter-increment: paso; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; }
.pasos li::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--amarillo);
  color: var(--marino);
  font-family: var(--f-titular);
  font-size: 1.25rem;
}
.hecho__nota { font-size: 1rem; color: var(--texto-suave); }

/* --- Enlaces a redes: filas de panel de salidas ----------------------------- */
.salidas__titulo {
  font-family: var(--f-titular);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 14px;
}
.salidas__lista { list-style: none; padding: 0; display: grid; gap: 10px; }
.vuelo {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  grid-template-areas: "icono red flecha" "icono usuario flecha";
  align-items: center;
  column-gap: 16px;
  min-height: 76px;
  padding: 12px 18px;
  border-radius: var(--r-grande);
  background: var(--marino-2);
  border: 1px solid var(--linea);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 140ms var(--ease-out), border-color 200ms ease;
}
.vuelo:active { transform: scale(0.98); }
.vuelo__icono { grid-area: icono; width: 34px; height: 34px; }
.vuelo__red { grid-area: red; font-weight: 900; font-size: 1.25rem; line-height: 1.15; }
.vuelo__usuario { grid-area: usuario; overflow-wrap: anywhere; font-weight: 800; font-size: 1rem; color: var(--amarillo); line-height: 1.3; }
.vuelo__flecha { grid-area: flecha; width: 26px; height: 26px; color: var(--amarillo); }

/* --- Pie -------------------------------------------------------------------- */
.pie {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 8px;
  font-size: 1rem;
  color: var(--texto-suave);
}
.pie a { text-underline-offset: 3px; min-width: 0; overflow-wrap: anywhere; }
.pie p { width: 100%; }

/* --- Ratón: los efectos de pasar por encima solo donde existen ---------------- */
@media (hover: hover) and (pointer: fine) {
  .boton:hover .boton__icono { transform: translateX(4px); }
  .vuelo:hover { border-color: var(--amarillo); }
  .vuelo:hover .vuelo__flecha { transform: translateX(4px); }
  .vuelo__flecha { transition: transform 200ms var(--ease-out); }
}

/* --- Pantallas grandes: identidad a la izquierda, acción a la derecha -------- */
@media (min-width: 960px) {
  .pagina {
    max-width: 72rem;
    padding-top: 72px;
    padding-inline: 48px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    grid-template-areas: "quien billete" "quien salidas" "pie pie";
    column-gap: clamp(48px, 7vw, 112px);
    row-gap: 40px;
    align-items: start;
  }
  .quien { grid-area: quien; position: sticky; top: 72px; }
  .billete { grid-area: billete; }
  .salidas { grid-area: salidas; }
  .pie { grid-area: pie; }
  .quien__foto { width: 104px; height: 104px; }
  .lema { font-size: clamp(4rem, 6.4vw, 5.75rem); margin-top: 12px; }
}

/* --- Entrada suave, una sola vez y solo si el sistema lo permite ------------- */
@media (prefers-reduced-motion: no-preference) {
  .quien, .billete, .salidas {
    animation: entrar 480ms var(--ease-out) both;
  }
  .billete { animation-delay: 70ms; }
  .salidas { animation-delay: 140ms; }
  .hecho:not([hidden]) {
    transition: opacity 300ms ease, transform 300ms var(--ease-out);
    @starting-style { opacity: 0; transform: translateY(8px); }
  }
}
@keyframes entrar {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* --- Páginas de texto (privacidad, confirmación) ---------------------------- */
.legal {
  max-width: 42rem;
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top, 0px))
    var(--margen)
    max(48px, env(safe-area-inset-bottom, 0px));
}
@media (min-width: 960px) { .legal { padding-top: 72px; } }
.legal .volver { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; text-decoration: none; color: var(--amarillo); }
.legal .volver svg { width: 22px; height: 22px; rotate: 180deg; }
.legal h1 { font-family: var(--f-titular); font-weight: 400; text-transform: uppercase; font-size: clamp(2.6rem, 10vw, 3.75rem); line-height: 1.02; margin-top: 20px; }
.legal h2 { font-weight: 900; font-size: 1.3rem; margin-top: 32px; }
.legal p, .legal ul { margin-top: 12px; color: var(--texto-suave); }
.legal strong { color: var(--blanco); }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal .boton { margin-top: 24px; text-decoration: none; color: var(--marino); } /* si no, «.legal a» lo pinta amarillo sobre amarillo */
.legal .actualizado { margin-top: 40px; font-size: 0.9375rem; }
.legal .hecho__icono { margin-top: 28px; }
.legal .pasos { margin-top: 20px; }
.legal .pasos li { color: var(--blanco); }
.legal .nota { font-size: 1rem; }
.legal .salidas { margin-top: 48px; }
.legal .vuelo { color: var(--blanco); }
/* La lista de redes no hereda la letra ni la sangría del texto legal */
.legal .salidas__titulo { margin-top: 0; font-weight: 400; font-size: 2rem; }
.legal .salidas__lista { padding-left: 0; margin-top: 0; gap: 10px; }
.legal h2 + p { margin-top: 8px; }
.legal address { font-style: normal; }

@media (prefers-reduced-motion: no-preference) {
  .legal { animation: entrar 480ms var(--ease-out) both; }
}

.legal .salidas { animation: none; }

/* --- Experiencia: cifras, mapa de rutas y lista de aeropuertos --------------- */
/* El HTML lo genera scripts/generar-experiencia.py */
.experiencia { display: grid; gap: 22px; min-width: 0; }
.experiencia__titulo {
  font-family: var(--f-titular);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 2rem;
  line-height: 1;
}
.cifras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.cifra b {
  display: block;
  font-family: var(--f-titular);
  font-weight: 400;
  font-size: clamp(4.2rem, 22vw, 5.6rem);
  line-height: 0.95;
  color: var(--amarillo);
  font-variant-numeric: tabular-nums;
}
.cifra span { display: block; margin-top: 6px; font-weight: 800; font-size: 1.0625rem; }
.cifras__nota { grid-column: 1 / -1; color: var(--texto-suave); font-size: 1.0625rem; }

.mapa { margin: 0; min-width: 0; }
.mapa svg { width: 100%; height: auto; cursor: pointer; touch-action: manipulation; }
.mapa__tierra { fill: #3A4A63; fill: color-mix(in srgb, var(--blanco) 16%, var(--marino)); }
.mapa__rutas path { fill: none; stroke: var(--amarillo); stroke-width: 1.2; stroke-opacity: 0.55; stroke-linecap: round; }
.mapa__destinos circle { fill: var(--amarillo); }
.mapa__casa { fill: var(--blanco); }
.mapa__anillo { fill: none; stroke: var(--blanco); stroke-width: 3; }
.mapa__info { min-height: 1.6em; margin-top: 6px; font-size: 1rem; color: var(--texto-suave); }
.mapa__info b {
  margin-right: 8px;
  font-family: var(--f-titular);
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  color: var(--amarillo);
}

/* Las rutas se dibujan una vez al llegar al mapa (solo con JS y si el sistema lo permite) */
@media (prefers-reduced-motion: no-preference) {
  .mapa--animar .mapa__rutas path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .mapa--animar .mapa__destinos circle { opacity: 0; }
  .mapa--animar.en-vista .mapa__rutas path { animation: trazar 700ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
  .mapa--animar.en-vista .mapa__destinos circle { animation: encender 200ms var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 600ms); }
}
@keyframes trazar { to { stroke-dashoffset: 0; } }
@keyframes encender { to { opacity: 1; } }

.codigos { border-top: 1px solid var(--linea); }
.codigos summary {
  list-style: none;
  cursor: pointer;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
  font-size: 1.125rem;
}
.codigos summary::-webkit-details-marker { display: none; }
.codigos summary::after { content: "+"; font-family: var(--f-titular); font-size: 1.9rem; line-height: 1; color: var(--amarillo); }
.codigos[open] summary::after { content: "−"; }
.codigos__pais { margin-top: 18px; font-size: 1rem; font-weight: 800; color: var(--texto-suave); }
.codigos__lista {
  list-style: none;
  padding: 0;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: 10px 14px;
}
.codigo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.codigo__iata {
  flex: none;
  width: 3.6rem;
  padding: 7px 0;
  text-align: center;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--amarillo) 55%, transparent);
  font-family: var(--f-titular);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--amarillo);
}
.codigo__ciudad { min-width: 0; font-weight: 800; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }

@media (min-width: 960px) {
  .pagina { grid-template-areas: "quien billete" "quien experiencia" "quien salidas" "pie pie"; }
  .experiencia { grid-area: experiencia; }
  .cifra b { font-size: 5.6rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .experiencia { animation: entrar 480ms var(--ease-out) both; animation-delay: 140ms; }
}
