/* ============================================================
   GT Streaming — Portal de clientes
   Identidad propia: violeta profundo + lavanda, tipografía
   Bricolage Grotesque / Instrument Sans. Sin dependencias.
   ============================================================ */

:root {
  --bg: #0a0714;
  --bg-raise: #120c20;
  --ink: #ece7f8;
  --muted: #a094c6;
  --faint: #6f639a;
  --brand: #8b5cf6;
  --brand-deep: #6d3ff0;
  --brand-soft: #c4b5fd;
  --line: rgba(196, 181, 253, 0.14);
  --ok: #5eead4;
  --warn: #fda4af;
  --glass: rgba(18, 12, 32, 0.66);
  --radius: 18px;
  --font-display: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Atmósfera: aurora violeta + grano ---- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(52% 44% at 82% -6%, rgba(109, 63, 240, 0.34), transparent 68%),
    radial-gradient(46% 42% at -8% 22%, rgba(139, 92, 246, 0.20), transparent 70%),
    radial-gradient(60% 52% at 50% 118%, rgba(76, 29, 149, 0.30), transparent 72%),
    var(--bg);
  animation: aurora-drift 26s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  from { background-position: 0 0, 0 0, 0 0; filter: hue-rotate(0deg); }
  to   { background-position: -60px 40px, 50px -30px, 0 -40px; filter: hue-rotate(-14deg); }
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 7, 20, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 42px; width: auto; display: block; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 0.01em;
}
.brand-name em {
  font-style: normal;
  font-weight: 400;
  color: var(--brand-soft);
}
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: #9ff0e0;
  background: rgba(94, 234, 212, 0.08);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.btn-wa:hover {
  transform: translateY(-2px);
  background: rgba(94, 234, 212, 0.16);
  box-shadow: 0 6px 24px rgba(94, 234, 212, 0.18);
}

/* ---- Hero ---- */
.hero {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 56px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(139, 92, 246, 0.08);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 20px 0 16px;
}
.hero h1 .glow {
  background: linear-gradient(92deg, var(--brand-soft), var(--brand) 60%, var(--brand-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero .lead {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 46ch;
  margin-bottom: 34px;
}

/* pasos */
.steps { display: grid; gap: 14px; }
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 12, 32, 0.45);
}
.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--brand-soft);
  border: 1px solid rgba(196, 181, 253, 0.3);
  border-radius: 10px;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: rgba(139, 92, 246, 0.1);
}
.step strong { display: block; font-size: 0.98rem; }
.step span { color: var(--muted); font-size: 0.9rem; }

/* ---- Tarjeta de consulta ---- */
.panel {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 34px 32px 28px;
  box-shadow: 0 24px 70px rgba(5, 2, 14, 0.55);
}
.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(196, 181, 253, 0.45), transparent 38%, transparent 70%, rgba(109, 63, 240, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.panel h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.panel .panel-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  background: rgba(10, 7, 20, 0.55);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field input::placeholder { color: var(--faint); }
.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}
.btn-primary {
  width: 100%;
  margin-top: 18px;
  padding: 15px 20px;
  border: none;
  border-radius: 13px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 10px 30px rgba(109, 63, 240, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 38px rgba(109, 63, 240, 0.5);
}
.btn-primary:active { transform: translateY(0); }
.panel .hint {
  margin-top: 16px;
  font-size: 0.83rem;
  color: var(--faint);
  text-align: center;
}

/* modo "revelar formulario" (REVEAL_MODE) */
.reveal-gate { text-align: center; padding: 8px 0 4px; }
.reveal-gate p { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.reveal-gate .btn-primary { margin-top: 0; }
[hidden] { display: none !important; }

/* ---- Resultado (compatibilidad con alerts del PHP) ---- */
.result-slot { margin-top: 22px; }
.result-slot:empty { display: none; }
.alert {
  border-radius: 13px;
  padding: 16px 18px;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  background: rgba(18, 12, 32, 0.7);
  color: var(--ink);
  margin: 0 auto;
  animation: rise 0.5s ease both;
}
.alert + .alert { margin-top: 10px; }
.alert-info {
  border-color: rgba(196, 181, 253, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: var(--brand-soft);
}
.alert-success {
  border-color: rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.1);
  color: var(--ok);
}
.alert-warning {
  border-color: rgba(253, 186, 116, 0.4);
  background: rgba(253, 186, 116, 0.1);
  color: #fdba74;
}
.alert-danger, .alert-error {
  border-color: rgba(253, 164, 175, 0.4);
  background: rgba(253, 164, 175, 0.1);
  color: var(--warn);
}
.text-center { text-align: center; }
.alert strong { color: var(--ink); }
.alert .bi { margin-right: 6px; }

/* ---- Tarjeta de código ---- */
.code-card {
  margin-top: 22px;
  text-align: center;
  padding: 26px 24px;
  border-radius: 16px;
  border: 1px solid rgba(196, 181, 253, 0.35);
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.16), rgba(76, 29, 149, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 40px rgba(5, 2, 14, 0.4);
  animation: rise 0.5s ease both;
}
.code-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin-bottom: 14px;
}
.code-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 8vw, 3rem);
  letter-spacing: 0.22em;
  color: #fff;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.55);
  padding-left: 0.22em;
}
.code-expiry {
  display: block;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---- Contenedor de mensaje crudo (fallback) ---- */
.message-frame {
  margin-top: 16px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #111;
  max-height: 60vh;
  overflow: auto;
}
.message-frame img { max-width: 100%; height: auto; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--line);
  background: rgba(10, 7, 20, 0.6);
  backdrop-filter: blur(10px);
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}
.footer-brand img { height: 30px; }
.footer-links { color: var(--faint); font-size: 0.88rem; }
.disclaimer {
  color: var(--faint);
  font-size: 0.68rem;
  line-height: 1.5;
  max-width: 82ch;
  opacity: 0.6;
}

/* ---- Animación de entrada escalonada ---- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  .atmosphere, .rise, .alert { animation: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 44px;
  }
  /* en móvil la acción principal (formulario) va primero */
  .hero > section:first-child { order: 2; }
  .hero > .panel { order: 1; }
  .hero .lead { margin-bottom: 24px; }
  .panel { padding: 28px 22px 24px; }
  .brand-name { font-size: 1.05rem; }
  .btn-wa span { display: none; }
  .btn-wa { padding: 10px 13px; }
}
