:root{
  --navy-950: #05080F;
  --navy-900: #0A1428;
  --navy-800: #101E3D;
  --royal-600: #1D4587;
  --royal-400: #3E74C9;
  --gold-700: #9C7420;
  --gold-500: #E3B93E;
  --gold-300: #F6DA85;
  --cream: #F4F0E4;
  --cream-dim: #B9C0CE;
  --ink: #12100A;
  --line: rgba(227,185,62,0.22);
}

*{ box-sizing: border-box; }
html, body{ margin: 0; padding: 0; }

body{
  background:
    radial-gradient(circle at 50% 0%, rgba(62,116,201,0.16), transparent 55%),
    var(--navy-950);
  color: var(--cream);
  font-family: 'Work Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8vw 5% 10vw;
}

.wrap{
  width: 94%;
  max-width: 420px;
}

/* ---------- Marca ---------- */
.brand{
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 5%;
}
.brand-glow{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(227,185,62,0.20) 0%, rgba(62,116,201,0.12) 45%, transparent 72%);
  filter: blur(2px);
  pointer-events: none;
}
.brand-logo{
  position: relative;
  width: clamp(64px, 20vw, 92px);
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(227,185,62,0.35), 0 8px 24px rgba(0,0,0,0.45);
}

h1{
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(24px, 7vw, 30px);
  line-height: 1.15;
  margin: 0 0 3%;
  text-align: center;
  background: linear-gradient(100deg, var(--gold-300), var(--gold-500) 55%, var(--gold-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub{
  text-align: center;
  color: var(--cream-dim);
  font-size: clamp(14px, 3.8vw, 15px);
  line-height: 1.5;
  margin: 0 auto 7%;
  max-width: 90%;
}

/* ---------- Tarjeta ---------- */
.card{
  background: linear-gradient(165deg, var(--navy-800), var(--navy-900) 65%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8% 7%;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.card::before{
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

label{
  display: block;
  font-size: clamp(12px, 3.4vw, 13px);
  color: var(--cream-dim);
  margin-bottom: 3%;
}

input[type="text"]{
  width: 100%;
  background: rgba(244,240,228,0.06);
  border: 1px solid rgba(244,240,228,0.16);
  border-radius: 8px;
  padding: 4% 5%;
  color: var(--cream);
  font-family: 'Work Sans', sans-serif;
  font-size: 16px; 
  outline: none;
  transition: border-color .15s ease;
}
input[type="text"]:focus{ border-color: var(--gold-500); }
input[type="text"]::placeholder{ color: rgba(244,240,228,0.32); }

.err{
  color: #E8847E;
  font-size: clamp(12px, 3.4vw, 13px);
  margin-top: 3%;
  min-height: 16px;
}

/* ---------- Botones ---------- */
.btn{
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 4.5% 5%;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(15px, 4vw, 16px);
  cursor: pointer;
  text-align: center;
  min-height: 48px;
  transition: transform .1s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active{ transform: scale(0.99); }

.btn-ghost{
  margin-top: 6%;
  background: rgba(62,116,201,0.14);
  border: 1px solid rgba(62,116,201,0.55);
  color: var(--cream);
}
.btn-ghost:hover{ background: rgba(62,116,201,0.24); }

.btn-gold{
  margin-top: 6%;
  background: linear-gradient(155deg, var(--gold-300), var(--gold-500) 60%, var(--gold-700));
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(227,185,62,0.35);
}
.btn-gold:hover{ box-shadow: 0 8px 26px rgba(227,185,62,0.5); }

/* ---------- Ticket de usuario + contraseña ---------- */
#ticket{ display: none; }

.ticket-eyebrow{
  text-align: center;
  font-size: clamp(12px, 3.4vw, 13px);
  color: var(--cream-dim);
  margin-bottom: 5%;
}

.pass-block{
  position: relative;
  background: rgba(5,8,15,0.45);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pass-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4%;
  padding: 6% 7%;
}

.pass-label{
  font-size: clamp(12px, 3.4vw, 13px);
  color: var(--cream-dim);
}

.pass-value{
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(17px, 4.6vw, 20px);
  color: var(--gold-300);
  word-break: break-word;
  text-align: right;
}

.pass-divider{
  position: relative;
  border-top: 2px dashed rgba(227,185,62,0.3);
  margin: 0 6%;
}
.pass-divider::before,
.pass-divider::after{
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--navy-900);
  border: 1px solid var(--line);
}
.pass-divider::before{ left: -14%; }
.pass-divider::after{ right: -14%; }

.ticket-note{
  text-align: center;
  font-size: clamp(12px, 3.4vw, 13px);
  color: var(--cream-dim);
  margin: 6% 0 1%;
  line-height: 1.5;
}

.btn-link{
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--cream-dim);
  font-family: 'Work Sans', sans-serif;
  font-size: clamp(12px, 3.4vw, 13px);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 5%;
  padding: 2% 0;
}
.btn-link:hover{ color: var(--cream); }

.fine{
  text-align: center;
  font-size: clamp(11px, 3vw, 12px);
  color: rgba(244,240,228,0.4);
  margin-top: 7%;
}

/* ---------- Animación de aparición ---------- */
@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}
@keyframes sheen{
  from{ transform: translateX(-120%) rotate(8deg); }
  to{ transform: translateX(220%) rotate(8deg); }
}
.reveal{ animation: fadeUp .35s ease both; }

.pass-block::after{
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 30%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(246,218,133,0.18), transparent);
  pointer-events: none;
}
.reveal .pass-block::after{
  animation: sheen 1.1s ease-out .15s both;
}

@media (prefers-reduced-motion: reduce){
  .reveal{ animation: none; }
  .reveal .pass-block::after{ animation: none; }
}

/* ---------- Ajustes por tamaño de pantalla ---------- */
@media (max-width: 360px){
  body{ padding: 10vw 4% 12vw; }
  .wrap{ width: 96%; }
  .pass-divider::before{ left: -12px; }
  .pass-divider::after{ right: -12px; }
}

@media (min-width: 640px){
  body{ padding: 6vw 5%; }
}
