/* ============================================================
   SURPRISE LOTTERY — Landing
   Mobile-first · sin dependencias · optimizada para móvil/tablet
   ============================================================ */

:root {
  --bg:        #0b0b1a;
  --bg-2:      #120f2a;
  --surface:   #181430;
  --surface-2: #211b40;
  --line:      rgba(255, 255, 255, .09);
  --line-2:    rgba(255, 255, 255, .16);

  --text:      #f4f3fb;
  --muted:     #a9a4c7;

  --gold:      #ffd34d;
  --gold-2:    #f5a623;
  --purple:    #7b5cff;
  --magenta:   #d65cff;
  --wa:        #25d366;
  --wa-dark:   #1faa52;

  --grad-hot:  linear-gradient(135deg, #7b5cff 0%, #d65cff 55%, #ff7ac0 100%);
  --grad-gold: linear-gradient(135deg, #ffe07a 0%, #ffd34d 40%, #f5a623 100%);

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 18px 50px -20px rgba(0, 0, 0, .75);
  --shadow-gold: 0 14px 34px -12px rgba(245, 166, 35, .55);
  --shadow-wa:   0 14px 30px -10px rgba(37, 211, 102, .5);

  --header-h:  64px;
  --maxw:      1120px;

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
.svg-defs { position: absolute; width: 0; height: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -.02em; }
ul, ol { list-style: none; }

/* Layout helpers */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.container.narrow { max-width: 760px; }
.section { padding: clamp(48px, 9vw, 96px) 0; }
.section-alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--gold); color: #1a1300; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  --pad-y: 14px; --pad-x: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: var(--pad-y) var(--pad-x); border-radius: 999px; border: 0;
  cursor: pointer; white-space: nowrap; line-height: 1;
  transition: transform .15s ease, box-shadow .25s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-gold { background: var(--grad-gold); color: #2a1a00; box-shadow: var(--shadow-gold); }
.btn-gold:hover { filter: brightness(1.05); box-shadow: 0 18px 40px -12px rgba(245,166,35,.7); }
.btn-wa   { background: var(--wa); color: #04210f; box-shadow: var(--shadow-wa); }
.btn-wa:hover { background: #2ee06f; }
.btn-lg { --pad-y: 17px; --pad-x: 30px; font-size: 1.08rem; }
.wa-ico { width: 20px; height: 20px; fill: currentColor; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(11, 11, 26, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 800; font-size: 1.18rem; }
.brand-mark { width: 30px; height: 30px; line-height: 1; filter: drop-shadow(0 3px 8px rgba(123,92,255,.55)); flex: 0 0 auto; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.brand-text span { color: var(--gold); }
.nav-desktop { display: none; gap: 28px; font-weight: 500; color: var(--muted); }
.nav-desktop a { transition: color .2s; }
.nav-desktop a:hover { color: var(--text); }
.header-cta { --pad-y: 10px; --pad-x: 16px; font-size: .94rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(56px, 14vw, 120px) 0 clamp(40px, 8vw, 72px);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(123,92,255,.35), transparent 60%),
    radial-gradient(80% 60% at 90% 10%, rgba(214,92,255,.22), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero-glow {
  position: absolute; inset: auto 0 -40% 0; height: 70%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(245,166,35,.18), transparent 70%);
  pointer-events: none;
}
/* Balotas decorativas (solo donde hay espacio lateral; en móvil estorban el titular) */
.hero-balls { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
@media (min-width: 760px) { .hero-balls { display: block; } }
.hero-balls .ball { position: absolute; width: 64px; filter: drop-shadow(0 12px 22px rgba(0,0,0,.45)); opacity: .9; }
.hero-balls .b1 { top: 12%;  left: 6%;  animation: float 6s ease-in-out infinite; }
.hero-balls .b2 { top: 20%;  right: 7%; width: 76px; animation: float 7.5s ease-in-out infinite .8s; }
.hero-balls .b3 { bottom: 14%; left: 12%; width: 52px; animation: float 6.8s ease-in-out infinite .4s; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(4deg); } }

.hero-inner { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.pill {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-2); color: var(--text);
}
.hero h1 { font-size: clamp(2.25rem, 9vw, 4.4rem); font-weight: 800; }
.hero h1 .grad {
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 620px; color: var(--muted); font-size: clamp(1rem, 3.6vw, 1.18rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.hero-cta .btn { flex: 1 1 auto; min-width: 220px; max-width: 320px; }

.hero-stats {
  display: flex; gap: clamp(18px, 6vw, 48px); margin-top: 14px;
  padding-top: 22px; border-top: 1px solid var(--line); width: 100%; max-width: 460px; justify-content: center;
}
.hero-stats li { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-family: var(--font-head); font-size: clamp(1.4rem, 6vw, 2rem); color: var(--gold); }
.hero-stats span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ============================================================
   Features
   ============================================================ */
.features {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  margin-top: -28px; position: relative; z-index: 5; padding-bottom: 8px;
}
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: flex; align-items: center; gap: 16px;
}
.feature span { font-size: 1.8rem; line-height: 1; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .92rem; }

/* ============================================================
   Section heads
   ============================================================ */
.section-head { text-align: center; max-width: 620px; margin: 0 auto clamp(28px, 6vw, 48px); }
.section-head h2 { font-size: clamp(1.7rem, 6vw, 2.6rem); font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 1.05rem; }

/* ============================================================
   Steps
   ============================================================ */
.steps { display: grid; grid-template-columns: 1fr; gap: 16px; counter-reset: step; }
.steps li {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px 24px; text-align: center;
}
.step-num {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: #2a1a00;
  background: var(--grad-gold); box-shadow: var(--shadow-gold);
}
.steps h3 { font-size: 1.15rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: .95rem; }

/* ============================================================
   Filtros (chips)
   ============================================================ */
.filters {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; font-family: var(--font-head); font-weight: 600; font-size: .92rem;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line-2);
  transition: all .2s ease; -webkit-tap-highlight-color: transparent;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--grad-hot); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -10px rgba(123,92,255,.7); }

/* ============================================================
   Lottery grid + cards
   ============================================================ */
.lottery-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

.lcard {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  transition: transform .18s ease, border-color .2s ease, box-shadow .25s ease;
  animation: cardIn .35s ease both;
}
.lcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.lcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lcard-flag {
  font-size: 1.35rem; line-height: 1; width: 44px; height: 44px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.lcard-name { font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; }
.lcard-country { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lcard-time {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--gold);
  background: rgba(245,166,35,.1); border: 1px solid rgba(245,166,35,.3);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.lcard-note { font-size: .82rem; color: var(--muted); }
.lcard .btn { width: 100%; --pad-y: 12px; font-size: .96rem; margin-top: auto; }

@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.lcard.is-hidden { display: none; }

.noscript-note { text-align: center; color: var(--muted); }
.noscript-note a { color: var(--wa); font-weight: 600; }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  text-align: center; padding: clamp(48px, 9vw, 88px) 0;
  background: var(--grad-hot); position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 120% at 50% 120%, rgba(255,255,255,.25), transparent 60%);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(1.7rem, 6vw, 2.7rem); color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); margin: 12px 0 26px; font-size: 1.1rem; }
.cta-band .btn { position: relative; z-index: 1; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 6px; transition: border-color .2s;
}
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 14px; font-family: var(--font-head);
  font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--gold); transition: transform .2s; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 14px 16px; color: var(--muted); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding-top: 48px; }
.footer-inner { display: flex; flex-direction: column; gap: 28px; padding-bottom: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand strong { font-family: var(--font-head); font-size: 1.2rem; }
.footer-brand p { color: var(--muted); font-size: .92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px 24px; color: var(--muted); font-weight: 500; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0 calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.disclaimer { font-size: .86rem; color: #d8b24a; }
.copyright { font-size: .82rem; color: var(--muted); }

/* ============================================================
   Floating WhatsApp (FAB)
   ============================================================ */
.fab-wa {
  position: fixed; z-index: 90;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); display: grid; place-items: center;
  box-shadow: 0 12px 30px -6px rgba(37,211,102,.6);
  animation: fabPulse 2.6s ease-in-out infinite;
}
.fab-wa svg { width: 30px; height: 30px; fill: #04210f; }
.fab-wa:active { transform: scale(.94); }
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 12px 30px -6px rgba(37,211,102,.6); }
  50% { box-shadow: 0 12px 30px -6px rgba(37,211,102,.6), 0 0 0 12px rgba(37,211,102,.12); }
}

/* ============================================================
   Responsive — Tablet
   ============================================================ */
@media (min-width: 600px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .lottery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* ============================================================
   Responsive — Desktop
   ============================================================ */
@media (min-width: 900px) {
  :root { --header-h: 72px; }
  .nav-desktop { display: flex; }
  .lottery-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-cta .btn { flex: 0 0 auto; }
  .fab-wa { display: none; } /* en desktop el CTA del header es suficiente */
}

/* ============================================================
   Accesibilidad — movimiento reducido
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
