/* Estilos que Tailwind no cubre: utilidades sueltas y la animación de bienvenida. */

[x-cloak] { display: none !important; }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.tarjeta-persona { animation: aparecer .35s ease both; }

@keyframes aparecer {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================================
   Intro
   Fases (clases que pone intro.js en #intro):
     (ninguna)  logo, título y botón "Entrar"
     .jugando   el logo sube y el león entra corriendo desde la izquierda
     .rugiendo  abre la boca, ondas de sonido y la pantalla tiembla
     .saludo    aparece "¡Bienvenidos!"
     .saliendo  la cortina sube y deja ver el formulario
   ========================================================================= */

.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  overflow: clip; /* a diferencia de hidden, no deja que el foco la desplace */
  color: #fff;
  background: radial-gradient(ellipse at 50% 35%, #0A4BC0 0%, #00338D 45%, #001233 100%);
  transition: transform .8s cubic-bezier(.7, 0, .25, 1);
}
.intro.saliendo { transform: translateY(-100%); pointer-events: none; }

.intro-contenido { position: absolute; inset: 0; }
.intro.rugiendo .intro-contenido { animation: sacudir .12s linear infinite; }

.intro-rayos {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220vmax;
  height: 220vmax;
  margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(rgba(235, 183, 0, .12) 0deg 8deg, transparent 8deg 16deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 50%);
          mask-image: radial-gradient(circle, #000 0%, transparent 50%);
  animation: girar 70s linear infinite;
}

/* ---------- Logo y textos ---------- */

.intro-escena {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  transform-origin: 50% 0;
  transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}
/* --subir lo calcula intro.js para que el logo quede pegado arriba en cualquier pantalla */
.intro.jugando .intro-escena { transform: translateY(var(--subir, 0px)) scale(.6); }

.intro-logo {
  width: clamp(112px, 34vw, 168px);
  aspect-ratio: 1;
  border-radius: 9999px;
  background: #fff;
  object-fit: contain;
  padding: 8px;
  box-shadow: 0 0 0 5px #EBB700, 0 20px 50px rgba(0, 0, 0, .45);
  animation: logo-aparece .9s cubic-bezier(.2, .9, .3, 1.3) both, brillo 2.4s ease-in-out .9s infinite;
}
.intro-club {
  margin-top: 24px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #EBB700;
  animation: subir .7s ease .35s both;
}
.intro-titulo {
  margin-top: 8px;
  max-width: 18ch;
  font-size: clamp(1.75rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  animation: subir .7s ease .5s both;
}
.intro-lugar { margin-top: 10px; font-size: 1.05rem; font-weight: 600; color: #EBB700; animation: subir .7s ease .6s both; }
.intro-entrar { margin-top: 36px; font-size: 1.125rem; animation: subir .7s ease .7s both; }
.intro-volumen { margin-top: 12px; font-size: .8rem; color: rgba(255, 255, 255, .6); animation: subir .7s ease .85s both; }
.intro.jugando .intro-entrar,
.intro.jugando .intro-volumen { animation: desvanecer .3s ease forwards; pointer-events: none; }

.intro-saltar {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 2;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .85);
  font-size: .85rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.intro-saltar:hover { background: rgba(255, 255, 255, .22); }

.intro-bienvenida {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(6vh, 28px);
  text-align: center;
  font-size: clamp(1.6rem, 6vw, 2.75rem);
  font-weight: 800;
  color: #EBB700;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(24px) scale(.9);
  transition: opacity .4s ease, transform .5s cubic-bezier(.2, .9, .3, 1.4);
}
.intro.saludo .intro-bienvenida { opacity: 1; transform: none; }

/* ---------- León ---------- */

.intro-leon {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(78vw, 46vh, 400px);
  aspect-ratio: 1;
  translate: -50% -50%;
  transform: translateX(-130vw);
  visibility: hidden;
}
.intro.jugando .intro-leon { visibility: visible; animation: leon-entra 1.1s cubic-bezier(.25, .9, .3, 1) .3s both; }
.intro.jugando .leon-trote { animation: trote .27s ease-in-out .3s 4 alternate; }

/* Resplandor dorado detrás del león mientras ruge */
.intro-leon::before {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 183, 0, .5), transparent 65%);
  opacity: 0;
  transition: opacity .3s;
}
.intro.rugiendo .intro-leon::before { opacity: 1; animation: pulso .25s ease-in-out infinite alternate; }

.leon-trote { position: relative; width: 100%; height: 100%; }
.intro-leon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45));
}

/* Líneas de velocidad mientras corre */
.intro-estela {
  position: absolute;
  right: 72%;
  top: 28%;
  width: 70vw;
  height: 44%;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .55) 0 3px, transparent 3px 24px);
  -webkit-mask-image: linear-gradient(to left, #000, transparent);
          mask-image: linear-gradient(to left, #000, transparent);
  opacity: 0;
}
.intro.jugando .intro-estela { animation: estela 1.2s ease-out .3s both; }

/* Ondas del rugido */
.intro-ondas span {
  position: absolute;
  left: 15%;
  top: 20%;
  width: 70%;
  aspect-ratio: 1;
  border: 6px solid rgba(235, 183, 0, .85);
  border-radius: 50%;
  opacity: 0;
}
.intro.rugiendo .intro-ondas span { animation: onda 1.1s ease-out infinite; }
.intro.rugiendo .intro-ondas span:nth-child(2) { animation-delay: .36s; }
.intro.rugiendo .intro-ondas span:nth-child(3) { animation-delay: .72s; }

/* Partes del SVG que se mueven */
.leon-cabeza, .leon-melena, .leon-boca, .leon-ojos, .leon-ceja-izq, .leon-ceja-der { transform-box: view-box; }
.leon-cabeza { transform-origin: 200px 260px; }
.leon-melena { transform-origin: 200px 200px; }
.leon-boca { transform-origin: 200px 284px; transform: scaleY(0); transition: transform .18s ease-out; }
.leon-mandibula { transition: transform .18s ease-out; }
.leon-ojos { transform-origin: 200px 198px; transition: transform .18s; }
.leon-ceja-izq { transform-origin: 164px 174px; transition: transform .18s; }
.leon-ceja-der { transform-origin: 236px 174px; transition: transform .18s; }

.intro.rugiendo .leon-cabeza { animation: cabeza-ruge 1.8s ease-out both; }
.intro.rugiendo .leon-melena { animation: melena .14s ease-in-out infinite alternate; }
.intro.rugiendo .leon-boca { transform: scaleY(1); }
.intro.rugiendo .leon-mandibula { transform: translateY(46px); }
.intro.rugiendo .leon-ojos { transform: scaleY(.55); }
.intro.rugiendo .leon-ceja-izq { transform: translateY(6px) rotate(16deg); }
.intro.rugiendo .leon-ceja-der { transform: translateY(6px) rotate(-16deg); }

/* ---------- Keyframes ---------- */

@keyframes girar { to { transform: rotate(360deg); } }
@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes desvanecer { to { opacity: 0; transform: translateY(10px) scale(.95); } }
@keyframes logo-aparece { from { opacity: 0; transform: scale(.4) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes brillo {
  0%, 100% { box-shadow: 0 0 0 5px #EBB700, 0 20px 50px rgba(0, 0, 0, .45); }
  50%      { box-shadow: 0 0 0 5px #EBB700, 0 0 60px 10px rgba(235, 183, 0, .55); }
}
@keyframes leon-entra {
  0%   { transform: translateX(-130vw) rotate(-14deg); }
  65%  { transform: translateX(6%) rotate(5deg); }
  82%  { transform: translateX(-2%) rotate(-2deg); }
  100% { transform: translateX(0) rotate(0); }
}
@keyframes trote { to { transform: translateY(-8%); } }
@keyframes estela { 0% { opacity: 0; } 25% { opacity: .9; } 100% { opacity: 0; } }
@keyframes onda { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.5); opacity: 0; } }
@keyframes pulso { from { transform: scale(.95); } to { transform: scale(1.08); } }
@keyframes sacudir {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-4px, 3px); }
  50%  { transform: translate(4px, -3px); }
  75%  { transform: translate(-3px, -2px); }
  100% { transform: translate(0, 0); }
}
@keyframes cabeza-ruge {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.08) translateY(-2%); }
  85%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes melena {
  from { transform: scale(1.05) rotate(-2.5deg); }
  to   { transform: scale(1.12) rotate(2.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .intro, .intro * { animation: none !important; transition-duration: .01ms !important; }
}

/* =========================================================================
   Página de agradecimiento: logo como marca de agua
   ========================================================================= */

.gracias { background: radial-gradient(ellipse at 50% 35%, #0A4BC0 0%, #00338D 45%, #001233 100%); }

/* Mosaico inclinado; es más grande que la pantalla para que el giro no deje esquinas vacías */
.gracias-marcas {
  position: absolute;
  inset: -50%;
  background-size: 150px;
  opacity: .08;
  transform: rotate(-14deg);
  pointer-events: none;
}

.gracias-marca-tarjeta {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112%;
  max-width: none;
  translate: -50% -50%;
  opacity: .1;
  pointer-events: none;
  user-select: none;
}

/* Reporte de asistentes: hoja A4 horizontal, con los colores tal cual se ven en pantalla */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tabla-reporte thead { display: table-header-group; }
  .tabla-reporte tr { break-inside: avoid; }
}

.sin-barra { scrollbar-width: none; }
.sin-barra::-webkit-scrollbar { display: none; }
