@font-face {
  font-family: 'PROACTIVE Sans';
  src: url('/fuentes/proactive-sans.woff2') format('woff2');
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Great Vibes';
  src: url('/fuentes/great-vibes.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: light;
  --noche: #04063d;
  --marca: #0a0e90;
  --marca-claro: #2a31c4;
  --rojo: #c8102e;
  --rojo-oscuro: #9b0d23;
  --oro: #f2c14e;
  --oro-claro: #ffe3a1;
  --pino: #0f6b3a;
  --crema: #fffaf1;
  --papel: #ffffff;
  --tinta: #171a3d;
  --tinta-suave: #4b4f73;
  --borde: #e6dfd0;
  --exito: #157a44;
  --sombra: 0 24px 60px -20px rgb(0 0 0 / .55), 0 2px 6px rgb(0 0 0 / .18);
  --radio: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: 'PROACTIVE Sans', system-ui, sans-serif;
  font-stretch: 97%;
  color: #fff;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, #1a1fb0 0%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 85% 30%, rgb(200 16 46 / .22) 0%, transparent 70%),
    linear-gradient(180deg, var(--marca) 0%, #070a6b 45%, var(--noche) 100%);
  background-color: var(--noche);
  overflow-x: hidden;
}

/* ---- Cielo: estrellas y nieve ------------------------------------------- */
/* La nieve se mueve solo con transform, exactamente un tramo del dibujo por
   vuelta: así la anima la tarjeta gráfica, sin repintar, y el bucle no salta. */
.cielo {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  contain: strict;
}
.cielo::before, .cielo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background-repeat: repeat;
  will-change: transform;
  backface-visibility: hidden;
  animation: linear infinite;
}
.cielo::before {
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 90px 110px, rgb(255 255 255 / .9) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 160px 60px, rgb(255 255 255 / .8) 50%, transparent 51%),
    radial-gradient(3px 3px at 60px 170px, rgb(255 255 255 / .7) 50%, transparent 51%),
    radial-gradient(2px 2px at 140px 190px, #fff 50%, transparent 51%);
  background-size: 200px 200px;
  top: -200px;
  animation-name: nevar-cerca;
  animation-duration: 7s;
  opacity: .85;
}
.cielo::after {
  background-image:
    radial-gradient(4px 4px at 40px 80px, rgb(255 255 255 / .75) 50%, transparent 51%),
    radial-gradient(3.5px 3.5px at 220px 20px, rgb(255 255 255 / .6) 50%, transparent 51%),
    radial-gradient(5px 5px at 160px 230px, rgb(255 255 255 / .55) 50%, transparent 51%);
  background-size: 300px 300px;
  top: -300px;
  animation-name: nevar-lejos;
  animation-duration: 8s;
}
@keyframes nevar-cerca { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 200px, 0); } }
@keyframes nevar-lejos { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 300px, 0); } }

.estrellas {
  position: fixed;
  inset: 0 0 auto 0;
  height: 60vh;
  pointer-events: none;
  z-index: 0;
}
.estrellas i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--oro-claro);
  box-shadow: 0 0 6px 1px rgb(255 227 161 / .8);
  will-change: opacity;
  animation: titilar 2.4s ease-in-out infinite;
}
.estrellas i:nth-child(1) { top: 14%; left: 8%; }
.estrellas i:nth-child(2) { top: 26%; left: 88%; animation-delay: .6s; }
.estrellas i:nth-child(3) { top: 40%; left: 14%; animation-delay: 1.3s; }
.estrellas i:nth-child(4) { top: 18%; left: 72%; animation-delay: 2s; }
.estrellas i:nth-child(5) { top: 48%; left: 92%; animation-delay: .3s; }
.estrellas i:nth-child(6) { top: 8%; left: 40%; animation-delay: 1.7s; }
@keyframes titilar { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .cielo::before, .cielo::after, .estrellas i { animation: none; }
}

/* ---- Guirnalda ---------------------------------------------------------- */
.guirnalda {
  position: relative;
  z-index: 2;
  height: 96px;
  margin: 0 0 -40px;
  background: url('/guirnalda.svg') repeat-x;
  background-position: center top;
}
.guirnalda--baja { height: 72px; background-size: auto 72px; margin-bottom: -24px; }

/* ---- Estructura --------------------------------------------------------- */
main {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 48px 0 40px;
}

.logo {
  display: block;
  width: min(220px, 58vw);
  height: auto;
  margin: 0 auto;
}

.portada {
  display: grid;
  gap: 8px 48px;
  align-items: center;
  text-align: center;
}
.portada__texto { display: grid; justify-items: center; gap: 4px; }
.antetitulo {
  margin: 26px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--oro);
}
.titulo {
  margin: 0;
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(64px, 18vw, 112px);
  line-height: 1;
  padding: .06em .1em .12em;
  color: #fff;
  text-shadow: 0 0 28px rgb(255 214 120 / .55), 0 4px 16px rgb(0 0 0 / .35);
}
.bajada {
  max-width: 34ch;
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: rgb(255 255 255 / .9);
  text-wrap: balance;
}
.arbol {
  display: block;
  width: min(260px, 70vw);
  height: auto;
  margin: 18px auto 0;
}

/* ---- Tarjeta del evento ------------------------------------------------- */
.tarjeta {
  position: relative;
  width: min(100%, 520px);
  margin: 28px auto 0;
  padding: 28px 24px 24px;
  border-radius: var(--radio);
  background: var(--crema);
  color: var(--tinta);
  box-shadow: var(--sombra);
  text-align: left;
}
.tarjeta::before {
  /* Cinta roja que cruza la tarjeta, como un regalo. */
  content: '';
  position: absolute;
  inset: 0 auto 0 30px;
  width: 10px;
  background: linear-gradient(var(--rojo), var(--rojo-oscuro));
  border-radius: 0;
  opacity: .9;
}
.tarjeta--evento { padding-left: 64px; }

.dato {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 2px 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px dashed var(--borde);
}
.dato:first-child { padding-top: 0; }
.dato:last-of-type { border-bottom: 0; }
.dato svg { width: 22px; height: 22px; color: var(--rojo); margin-top: 1px; }
.dato__etiqueta {
  grid-column: 2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}
.dato__valor { grid-column: 2; font-size: 18px; font-weight: 600; line-height: 1.35; }
.dato__nota { grid-column: 2; font-size: 15px; color: var(--tinta-suave); line-height: 1.4; }
.dato a { color: var(--marca); font-weight: 600; text-underline-offset: 3px; }

.mapa {
  display: block;
  width: 100%;
  height: 220px;
  margin: 4px 0 0;
  border: 0;
  border-radius: 12px;
  background: #e9e6dc;
  box-shadow: inset 0 0 0 1px var(--borde);
}

.plazo {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff3d6;
  border: 1px solid #f3d58b;
  font-size: 15px;
  line-height: 1.4;
  color: #5b4100;
}
.plazo strong { color: #3d2b00; }

/* ---- Botones ------------------------------------------------------------ */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.boton:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
.boton--principal {
  color: #fff;
  background: linear-gradient(180deg, #e01a3a, var(--rojo) 55%, var(--rojo-oscuro));
  box-shadow: 0 10px 24px -8px rgb(200 16 46 / .8), inset 0 1px 0 rgb(255 255 255 / .35);
}
.boton--principal:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgb(200 16 46 / .9), inset 0 1px 0 rgb(255 255 255 / .35); }
.boton--principal:active { transform: translateY(1px); }
.boton--principal[disabled] { opacity: .6; cursor: progress; transform: none; }
.boton--secundario {
  color: var(--marca);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #c9cbe8;
}
.boton--secundario:hover { box-shadow: inset 0 0 0 1.5px var(--marca); }
.boton--ancho { width: 100%; }

.accion { display: grid; justify-items: center; gap: 12px; margin: 28px auto 0; width: min(100%, 520px); }
.accion .boton { width: 100%; }
.accion__nota { margin: 0; font-size: 14px; color: rgb(255 255 255 / .75); text-align: center; }

.pie {
  position: relative;
  z-index: 1;
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 13px;
  color: rgb(255 255 255 / .6);
}

/* ---- Formulario --------------------------------------------------------- */
.encabezado-form { text-align: center; }
.encabezado-form .logo { width: min(170px, 46vw); }
.encabezado-form .titulo { font-size: clamp(52px, 14vw, 76px); margin-top: 10px; }

.tarjeta--form { padding: 28px 22px 24px; }
.tarjeta--form::before { display: none; }
.tarjeta__titulo { margin: 0; font-size: 22px; font-weight: 800; color: var(--marca); letter-spacing: -.01em; }
.tarjeta__bajada { margin: 6px 0 0; font-size: 16px; line-height: 1.45; color: var(--tinta-suave); }
.tarjeta__evento {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f1f0fb;
  font-size: 14px;
  font-weight: 600;
  color: var(--marca);
}

.identidad {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 18px 0 0;
  padding: 12px 0;
  border-top: 1px solid var(--borde);
  border-bottom: 1px solid var(--borde);
  font-size: 14px;
  color: var(--tinta-suave);
}
.identidad strong { color: var(--tinta); }
.identidad a { color: var(--marca); font-weight: 600; text-underline-offset: 3px; }

.pregunta { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.pregunta__titulo {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--tinta);
}
.pregunta__titulo .numero { color: var(--rojo); margin-right: 4px; }
.pregunta__titulo .requerida { color: var(--rojo); margin-left: 2px; }
.pregunta__ayuda { margin: -4px 0 10px; font-size: 14px; color: var(--tinta-suave); }

.campo {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid #d6d1c4;
  border-radius: 12px;
  background: var(--papel);
  font: inherit;
  font-size: 17px;
  color: var(--tinta);
}
textarea.campo { min-height: 110px; resize: vertical; line-height: 1.45; }
.campo:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 3px rgb(10 14 144 / .18); }
.campo[aria-invalid='true'] { border-color: var(--rojo); }

.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcion span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 1.5px solid #d6d1c4;
  border-radius: 12px;
  background: var(--papel);
  font-size: 17px;
  font-weight: 700;
  color: var(--tinta);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.opcion span::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #b9b3a4;
  background: #fff;
  transition: inherit;
}
.opcion input:checked + span { border-color: var(--marca); background: #eef0ff; color: var(--marca); }
.opcion input:checked + span::before { border: 5px solid var(--marca); }
.opcion input:focus-visible + span { box-shadow: 0 0 0 3px rgb(10 14 144 / .25); }
.opciones[aria-invalid='true'] .opcion span { border-color: var(--rojo); }

.error {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--rojo);
}
.aviso {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.45;
}
.aviso--error { background: #fdecee; color: #8a0b20; border: 1px solid #f5c2ca; }
.aviso--info { background: #f1f0fb; color: var(--marca); border: 1px solid #d9dbf5; }

.enviar { margin-top: 28px; }

/* ---- Hijos: un recuadro por hijo -------------------------------------- */
.hijos { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hijo {
  padding: 12px 12px 14px;
  border: 1.5px solid #e3ddcf;
  border-radius: 14px;
  background: var(--papel);
}
.hijo[aria-invalid='true'] { border-color: var(--rojo); }
.hijo__cabecera { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin-bottom: 6px; }
.hijo__titulo { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave); }
.hijo__quitar {
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--rojo);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.hijo__campos { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 10px; }
.hijo__campo span { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--tinta-suave); }
.hijo__campo .campo { min-height: 48px; }
.campo--edad { text-align: center; }
.agregar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  border: 1.5px dashed #aeb2e6;
  border-radius: 12px;
  background: #f5f5ff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--marca);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.agregar:hover { border-color: var(--marca); background: #eef0ff; }
.agregar:focus-visible { outline: 3px solid rgb(10 14 144 / .3); outline-offset: 2px; }
.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Estados ------------------------------------------------------------ */
[hidden] { display: none !important; }

.cargando { display: grid; justify-items: center; gap: 14px; padding: 24px 0 8px; color: var(--tinta-suave); font-size: 15px; text-align: center; }
.girando {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #e3e1f3; border-top-color: var(--rojo);
  animation: girar .8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

.gracias { text-align: center; }
.gracias__icono {
  display: grid; place-items: center;
  width: 72px; height: 72px; margin: 0 auto 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff5a6e, var(--rojo) 60%, var(--rojo-oscuro));
  box-shadow: 0 10px 22px -8px rgb(200 16 46 / .7);
}
.gracias__icono svg { width: 36px; height: 36px; color: #fff; }
.gracias__icono--no { background: radial-gradient(circle at 35% 30%, #5a62e6, var(--marca) 60%, #060a6a); box-shadow: 0 10px 22px -8px rgb(10 14 144 / .7); }
.gracias h1 { margin: 0; font-size: 26px; font-weight: 800; color: var(--marca); letter-spacing: -.01em; }
.gracias p { margin: 8px auto 0; max-width: 38ch; font-size: 16px; line-height: 1.5; color: var(--tinta-suave); }

.resumen { margin: 20px 0 0; padding: 0; text-align: left; border-top: 1px solid var(--borde); }
.resumen div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.resumen dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave); }
.resumen dd { margin: 0; font-size: 16px; font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
.resumen__momento { margin: 10px 0 0; font-size: 13px; color: var(--tinta-suave); text-align: left; }

.botonera { display: grid; gap: 10px; margin-top: 22px; }

/* ---- Escritorio --------------------------------------------------------- */
@media (min-width: 860px) {
  main { padding-top: 64px; }
  .portada { grid-template-columns: 1.1fr .9fr; text-align: left; }
  .portada > * { grid-column: 1; }
  .portada > .arbol { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .portada__texto { justify-items: start; }
  .portada .logo { margin: 0; }
  .arbol { width: 380px; margin: 0 auto; }
  .portada .tarjeta, .portada .accion { margin-left: 0; }
  .accion__nota { text-align: left; }
  .accion { justify-items: start; }
}
