/*
 * felicitaciones.css — Estilos de la página de felicitaciones y pedido de acceso.
 * Usa los colores y la letra de la web (styles.css). Todo empieza con "fx-" para no chocar con nada.
 */

/* ---------- Base de la página ---------- */
.fx-body { overflow-x: hidden; }
.fx {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 70px;
}
.fx svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Confeti: ocupa toda la pantalla y no bloquea clics */
#confeti {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Entrada escalonada: cada bloque aparece con un pequeño retraso (la variable --n lo ordena) */
.fx-aparece {
  animation: fx-entra 520ms cubic-bezier(0.23, 1, 0.32, 1) both;
  animation-delay: calc(var(--n, 0) * 70ms + 80ms);
}
@keyframes fx-entra {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- La felicitación ---------- */
.fx-hero {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 34px 0 44px;
  text-align: center;
}
.fx-hero h1 {
  max-width: 17ch;
  margin: 0 auto 22px;
  font-size: clamp(44px, 8vw, 92px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -1.5px;
}
/* El resaltado naranja se "pinta" de izquierda a derecha después de entrar el título */
.fx-resalta {
  background: linear-gradient(var(--orange-soft), var(--orange-soft)) no-repeat 0 88% / 0% 0.36em;
  animation: fx-pinta 900ms cubic-bezier(0.77, 0, 0.175, 1) 700ms forwards;
  color: var(--orange);
}
@keyframes fx-pinta { to { background-size: 100% 0.36em; } }
.fx-lead {
  max-width: 34ch;
  margin: 0 0 30px;
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.35;
  color: var(--muted);
}
.fx-lead strong { color: var(--text); }
.fx-ir {
  min-height: 58px;
  padding: 0 30px;
  gap: 10px;
  font-size: 19px;
}
.fx-ir svg { width: 22px; height: 22px; }

/* ---------- Dos columnas: beneficios y formulario ---------- */
.fx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 44px;
  align-items: start;
}
.fx-beneficios { display: grid; gap: 18px; }
.fx-titulo-seccion {
  margin: 0 0 4px;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 900;
  line-height: 1.1;
}

/* Tarjetas de beneficios con letra grande */
.fx-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(96, 60, 82, 0.08);
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 220ms ease-out;
}
.fx-icono {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--tono);
  color: var(--tinta);
}
.fx-icono svg { width: 36px; height: 36px; stroke-width: 1.7; }
.fx-etiqueta {
  margin: 2px 0 6px;
  color: var(--tinta);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fx-card h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 900;
  line-height: 1.1;
}
.fx-card p:not(.fx-etiqueta) {
  margin: 0;
  font-size: clamp(18px, 1.9vw, 21px);
  line-height: 1.45;
  color: var(--muted);
}
.fx-card strong { color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .fx-card:hover { transform: translateY(-3px); box-shadow: 0 22px 52px rgba(96, 60, 82, 0.14); }
}

/* Pasos para recibir el acceso */
.fx-pasos { margin-top: 14px; }
.fx-pasos ol { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.fx-pasos li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  background: #fff4ed;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.35;
}
.fx-pasos b {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

/* ---------- Columna del pase y del formulario ---------- */
.fx-lateral {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
  scroll-margin-top: 90px;
}

/* El pase de acceso (se inclina un poco con el mouse) */
.fx-pase-marco { perspective: 900px; }
.fx-pase {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 4px;
  padding: 22px 24px 18px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 101, 22, 0.55), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(68, 161, 120, 0.38), transparent 55%),
    linear-gradient(145deg, #17202a, #26364a);
  box-shadow: 0 28px 60px rgba(23, 32, 42, 0.34);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 160ms ease-out;
  will-change: transform;
}
/* Brillo que cruza el pase una vez al cargar */
.fx-pase::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: fx-brillo 1400ms cubic-bezier(0.23, 1, 0.32, 1) 900ms 1 both;
  pointer-events: none;
}
@keyframes fx-brillo { to { transform: translateX(120%); } }
.fx-pase-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.fx-pase-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
}
.fx-pase-logo img { width: 34px; height: 34px; object-fit: contain; }
.fx-pase-titulo { flex: 1; font-size: 13px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.fx-pase-dias {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--orange);
  font-size: 13px;
  font-weight: 900;
}
.fx-pase-label { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; }
.fx-pase-nombre {
  margin: 0;
  overflow: hidden;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fx-pase-nombre.is-vacio { opacity: 0.4; }
.fx-pase-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; padding: 0; list-style: none; }
.fx-pase-chips li {
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 700;
}
.fx-pase-pie { display: flex; justify-content: space-between; align-items: center; }
.fx-pase-barras {
  display: block;
  width: 62%;
  height: 26px;
  opacity: 0.55;
  background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 5px, #fff 5px 6px, transparent 6px 10px, #fff 10px 13px, transparent 13px 16px);
}
/* Sello "Listo": aparece al enviar el formulario */
.fx-pase-sello {
  position: absolute;
  right: 22px;
  bottom: 18px;
  padding: 6px 16px;
  border: 3px solid #5fd49b;
  border-radius: 10px;
  color: #5fd49b;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: rotate(-9deg) scale(1.6);
  transition: opacity 200ms ease-out, transform 360ms cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
}
.fx-pase.is-listo .fx-pase-sello { opacity: 1; transform: rotate(-9deg) scale(1); }

/* Tarjeta del formulario */
.fx-form-card {
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.fx-form-card h2 { margin: 0 0 4px; font-size: clamp(28px, 3vw, 34px); font-weight: 900; line-height: 1.1; }
.fx-form-sub { margin: 0 0 18px; font-size: 18px; color: var(--muted); }
.fx-form-card label { display: block; margin: 14px 0 7px; font-size: 17px; font-weight: 900; }
.fx-form-card input[type="text"],
.fx-form-card input[type="email"] {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 19px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.fx-form-card input::placeholder { color: #a9a29b; }
.fx-form-card input:focus-visible {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 101, 22, 0.18);
}
.fx-form-card input[aria-invalid="true"] { border-color: #d6386a; }
.fx-error { min-height: 0; margin: 6px 0 0; color: #c0285a; font-size: 15px; font-weight: 700; }
.fx-error:empty { display: none; }
.fx-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fx-enviar {
  width: 100%;
  min-height: 62px;
  margin-top: 20px;
  gap: 10px;
  border: 0;
  font: inherit;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}
.fx-enviar svg { width: 22px; height: 22px; }
.fx-enviar:active { transform: scale(0.98); }
.fx-enviar[disabled] { opacity: 0.75; cursor: progress; transform: none; }
.fx-legal { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted-soft); }

/* Éxito */
.fx-exito { text-align: center; animation: fx-entra 420ms cubic-bezier(0.23, 1, 0.32, 1) both; }
.fx-exito:focus { outline: none; }
.fx-exito[hidden] { display: none; }
.fx-exito h2 { margin: 12px 0 10px; }
.fx-exito p { margin: 0 0 10px; font-size: 19px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.fx-exito-sub { font-size: 17px !important; color: var(--muted) !important; }
.fx-exito .button { margin-top: 10px; }
.fx-check { width: 84px; height: 84px; color: var(--green); }
.fx-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; stroke-width: 2.4; animation: fx-trazo 520ms cubic-bezier(0.77, 0, 0.175, 1) 80ms forwards; }
.fx-check path { stroke-dasharray: 40; stroke-dashoffset: 40; stroke-width: 3; animation: fx-trazo 360ms cubic-bezier(0.23, 1, 0.32, 1) 520ms forwards; }
@keyframes fx-trazo { to { stroke-dashoffset: 0; } }

.fx-volver { min-height: 44px; margin-left: auto; }

/* ---------- Celular y tablet ---------- */
@media (max-width: 920px) {
  .fx-grid { grid-template-columns: 1fr; gap: 30px; }
  /* En celular primero se ven los beneficios y después el pase con el formulario */
  .fx-lateral { position: static; max-width: 520px; width: 100%; margin: 0 auto; }
  .fx-hero { padding-top: 14px; }
}
@media (max-width: 560px) {
  .fx-card { grid-template-columns: 1fr; gap: 14px; padding: 22px 20px; }
  .fx-icono { width: 60px; height: 60px; border-radius: 16px; }
  .fx-icono svg { width: 30px; height: 30px; }
  .fx-form-card { padding: 22px 18px 18px; }
  .fx-volver { display: none; }
}

/* ---------- Si la persona pidió menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-aparece { animation: none; }
  .fx-resalta { animation: none; background-size: 100% 0.36em; }
  .fx-pase::after { animation: none; }
  .fx-pase { transition: none; transform: none; }
  .fx-check circle, .fx-check path { animation: none; stroke-dashoffset: 0; }
  .fx-exito { animation: none; }
}

/* Aviso de "te llevamos a inscribirte" y su botón (cuando hay dirección de inscripción) */
.fx-exito-destino { font-weight: 900; color: var(--orange) !important; }
.fx-ir-inscripcion { width: 100%; min-height: 56px; margin-top: 8px; font-size: 18px; }
.fx-ir-inscripcion[hidden], .fx-exito-destino[hidden] { display: none; }
