/* ==========================================================================
   THE TICKET — CORE STYLES, LIQUID GLASS & METALLIC CHROME
   Mobile-first (375px - 430px) with zero horizontal overflow.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  overflow-x: clip;
  position: relative;
}

/* Background Animated Bioluminescent Canvas */
#jellyfish-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Subtle obsidian ambient radial vignette over canvas for high-contrast legibility */
.ambient-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(183, 148, 246, 0.08), transparent 44%),
    radial-gradient(circle at 82% 24%, rgba(111, 255, 233, 0.07), transparent 42%),
    radial-gradient(circle at 50% 85%, rgba(244, 114, 182, 0.06), transparent 50%),
    radial-gradient(ellipse at center, transparent 45%, rgba(4, 4, 10, 0.72) 100%);
}

/* App Shell */
.app-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(44px, env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hidden {
  display: none !important;
}

.main-experience {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metallic Chrome Text Effect */
.chrome-text {
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #dce6f7 22%,
    #9caac3 44%,
    #ffffff 62%,
    #b794f6 78%,
    #6fffe9 92%,
    #ffffff 100%
  );
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: chromeFlow 9s ease-in-out infinite;
}

.chrome-text-subtle {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #e2eaf7 48%,
    #9aa8c1 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes chromeFlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Liquid Glass Surface + Animated Liquid Chrome / Mercury Border */
.liquid-card {
  position: relative;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.085) 0%,
    rgba(16, 19, 36, 0.56) 35%,
    rgba(9, 11, 22, 0.74) 100%
  );
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  box-shadow:
    var(--shadow-deep),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(111, 255, 233, 0.08);
  isolation: isolate;
}

/* Iridescent Mercury Border Overlay using CSS Mask */
.liquid-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.25px;
  background: conic-gradient(
    from var(--holo-angle),
    rgba(255, 255, 255, 0.58) 0deg,
    rgba(111, 255, 233, 0.52) 60deg,
    rgba(183, 148, 246, 0.55) 125deg,
    rgba(244, 114, 182, 0.48) 185deg,
    rgba(251, 207, 232, 0.62) 235deg,
    rgba(110, 231, 183, 0.45) 295deg,
    rgba(255, 255, 255, 0.58) 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  opacity: 0.75;
  animation: mercurySpin 12s linear infinite;
}

/* Specular Liquid Reflection Sweep */
.liquid-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.06) 44%,
    rgba(111, 255, 233, 0.05) 50%,
    rgba(255, 255, 255, 0.03) 56%,
    transparent 78%
  );
  pointer-events: none;
  z-index: 1;
}

@keyframes mercurySpin {
  0% {
    --holo-angle: 0deg;
  }
  100% {
    --holo-angle: 360deg;
  }
}

/* Top Status / Demo Banner */
.top-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--chrome-200);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  flex-shrink: 0;
  animation: softPulse 2.4s ease-in-out infinite;
}

.pulse-dot.demo {
  background: var(--neon-violet);
  box-shadow: 0 0 10px var(--neon-violet);
}

@keyframes softPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.28);
    opacity: 0.65;
  }
}

.icon-btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--chrome-300);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s var(--ease-fluid);
}

.icon-btn-ghost:hover,
.icon-btn-ghost:active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--chrome-100);
  border-color: rgba(111, 255, 233, 0.4);
}

/* ==========================================================================
   LOGIN GATE (VIP PASS AUTHENTICATION)
   ========================================================================== */
.auth-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 0 24px;
  animation: fadeUp 0.7s var(--ease-fluid) both;
}

.auth-card {
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.auth-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 7.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.auth-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chrome-400);
  padding-left: 4px;
}

.glass-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 8, 18, 0.58);
  color: var(--chrome-100);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.glass-input::placeholder {
  color: rgba(168, 180, 204, 0.42);
}

.glass-input:focus {
  border-color: rgba(111, 255, 233, 0.65);
  background: rgba(10, 13, 28, 0.78);
  box-shadow: 0 0 0 3px rgba(111, 255, 233, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.error-banner {
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(244, 114, 182, 0.14);
  border: 1px solid rgba(244, 114, 182, 0.42);
  color: #ffd6ea;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Liquid Glass / Chrome Primary Button */
.btn-liquid {
  position: relative;
  width: 100%;
  min-height: 50px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(111, 255, 233, 0.18) 35%,
    rgba(183, 148, 246, 0.22) 70%,
    rgba(244, 114, 182, 0.18) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--chrome-100);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 10px 26px -10px rgba(111, 255, 233, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: transform 0.22s var(--ease-fluid), box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-liquid::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 75%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.32),
    transparent
  );
  transform: skewX(-22deg);
  transition: left 0.65s var(--ease-fluid);
  pointer-events: none;
}

.btn-liquid:hover::after,
.btn-liquid:focus-visible::after {
  left: 145%;
}

.btn-liquid:active {
  transform: scale(0.982);
}

.btn-liquid:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-liquid-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   VIP BOARDING PASS HERO CARD
   ========================================================================== */
.boarding-pass {
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow 0.5s ease;
}

.boarding-pass.final-activated {
  box-shadow:
    0 24px 70px -12px rgba(111, 255, 233, 0.26),
    0 0 42px rgba(183, 148, 246, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pass-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pass-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pass-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.pass-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 6.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.pass-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--chrome-100);
  white-space: nowrap;
}

.pass-badge.live-vip {
  background: linear-gradient(135deg, rgba(111, 255, 233, 0.22), rgba(183, 148, 246, 0.24));
  border-color: rgba(111, 255, 233, 0.55);
  color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(111, 255, 233, 0.25);
}

.pass-passenger-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--chrome-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-value.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.pass-route-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px;
}

.route-point {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.route-code {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.route-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.route-arc {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 52px;
}

.route-arc-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(111, 255, 233, 0.2), rgba(255, 255, 255, 0.65), rgba(244, 114, 182, 0.2));
}

.route-arc-icon {
  position: absolute;
  padding: 0 6px;
  background: rgba(11, 13, 24, 0.85);
  color: var(--neon-cyan);
  font-size: 0.85rem;
}

/* Perforated Boarding Pass Divider with Side Notches */
.pass-perforation {
  position: relative;
  margin: 2px -20px;
  height: 20px;
  display: flex;
  align-items: center;
}

.pass-perforation::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  border-top: 1.5px dashed rgba(226, 236, 255, 0.2);
}

.pass-notch-left,
.pass-notch-right {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-obsidian);
  transform: translateY(-50%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  z-index: 3;
}

.pass-notch-left {
  left: -10px;
}

.pass-notch-right {
  right: -10px;
}

/* Live Countdown Grid */
.countdown-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.countdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cd-unit {
  padding: 10px 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.11);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.cd-number {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cd-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pass-footer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.barcode-visual {
  flex: 1;
  height: 22px;
  border-radius: 4px;
  opacity: 0.68;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.75) 0 2px,
    transparent 2px 5px,
    rgba(111, 255, 233, 0.7) 5px 6px,
    transparent 6px 10px,
    rgba(183, 148, 246, 0.75) 10px 13px,
    transparent 13px 16px
  );
}

.pass-serial {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--chrome-400);
  white-space: nowrap;
}

/* ==========================================================================
   ANIMATIONS & UTILITIES
   ========================================================================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shake-error {
  animation: shakeX 0.42s ease-in-out;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-4px); }
  85% { transform: translateX(3px); }
}

/* Toast Notification */
.toast-banner {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translate(-50%, 24px);
  z-index: 60;
  width: calc(100% - 32px);
  max-width: 396px;
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(14, 18, 34, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(111, 255, 233, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(111, 255, 233, 0.18);
  color: var(--chrome-100);
  font-size: 0.84rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.32s var(--ease-fluid);
}

.toast-banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Emergency Reset Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 10, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-card {
  width: 100%;
  max-width: 396px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeUp 0.28s var(--ease-fluid) both;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.welcome-burst-card {
  padding: 26px 22px 22px;
  gap: 16px;
  text-align: center;
  box-shadow:
    0 24px 70px -12px rgba(111, 255, 233, 0.28),
    0 0 42px rgba(244, 114, 182, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: popBurst 0.52s cubic-bezier(0.18, 1.32, 0.36, 1) both;
}

.welcome-burst-copy {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--chrome-100);
}

@keyframes popBurst {
  0% {
    opacity: 0;
    transform: scale(0.68) translateY(18px);
    filter: blur(8px);
  }
  70% {
    opacity: 1;
    transform: scale(1.03) translateY(-2px);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* ==========================================================================
   PREÁMBULO VIP (ANTES DE INICIAR EL TIMELINE)
   ========================================================================== */
.preamble-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 0 24px;
  animation: fadeUp 0.65s var(--ease-fluid) both;
}

.preamble-card {
  padding: 26px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preamble-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preamble-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 6.4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  word-break: break-word;
}

.preamble-quote {
  margin: 0;
  font-size: 0.86rem;
  font-style: italic;
  color: var(--neon-pearl);
  line-height: 1.5;
  padding-left: 11px;
  border-left: 2px solid rgba(111, 255, 233, 0.55);
}

.preamble-body {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.preamble-body p {
  margin: 0;
  font-size: 0.91rem;
  line-height: 1.62;
  color: var(--text-secondary);
}

.preamble-body strong {
  color: var(--chrome-100);
  font-weight: 600;
}

.preamble-pillars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pillar-item {
  padding: 10px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.11);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pillar-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  color: var(--neon-cyan);
  font-weight: 700;
}

.pillar-desc {
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .chrome-text,
  .liquid-card::before,
  .pulse-dot {
    animation: none;
  }
}
