/* ============================================================================
   VenturesQuiz — Global Design Tokens & Public Site Styles
   Single source of truth for colors/spacing/type on public-facing pages.
   Mirrors the admin panel's brand palette (--primary etc.) so both surfaces
   feel like one product. Add new public pages by linking this file first.
   ============================================================================ */

:root {
  /* Brand */
  --brand-primary: #7C3AED;
  --brand-primary-dark: #5B21B6;
  --brand-primary-light: #A78BFA;
  --brand-secondary: #2563EB;
  --brand-accent: #F59E0B;
  --brand-gold: #FBBF24;
  --brand-success: #10B981;
  --brand-danger: #EF4444;
  --brand-cash: #10B981;
  --brand-coin: #F59E0B;
  --brand-booster: #7C3AED;

  --gradient-hero: linear-gradient(135deg, #0F0C29 0%, #302B63 45%, #7C3AED 100%);
  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #2563EB 100%);
  --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);

  /* Surfaces */
  --bg-page: #F8FAFC;
  --bg-dark: #0B0A1F;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --surface-dark: #161235;
  --border: #E6E8F0;
  --border-dark: rgba(255,255,255,.10);

  /* Text */
  --text-dark: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-invert: #F8FAFC;
  --text-invert-muted: rgba(248,250,252,.72);

  /* Type & spacing scale */
  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 10px rgba(15,23,42,.06);
  --shadow-md: 0 14px 34px rgba(15,23,42,.10);
  --shadow-lg: 0 28px 64px rgba(76,29,149,.22);
  --shadow-gold: 0 14px 34px rgba(245,158,11,.30);
  --container-w: 1180px;
  --section-pad: clamp(3.5rem, 7vw, 6.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg-page);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-dark); margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  background: rgba(124,58,237,.10);
  padding: .4rem .9rem;
  border-radius: var(--radius-pill);
}

.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; line-height: 1.2; margin-top: .9rem; }
.section-head p { color: var(--text-muted); margin-top: .85rem; font-size: 1.02rem; line-height: 1.6; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-lg); }
.btn-primary:hover { box-shadow: 0 20px 40px rgba(37,99,235,.35); }
.btn-gold { background: var(--gradient-gold); color: #422006; box-shadow: var(--shadow-gold); }
.btn-ghost { background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-outline { background: transparent; color: var(--brand-primary); border: 1.5px solid var(--brand-primary); }
.btn-outline:hover { background: rgba(124,58,237,.08); }
.btn-sm { padding: .55rem 1.1rem; font-size: .84rem; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  padding: .9rem 0;
  transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
}
.navbar.is-scrolled { background: rgba(11,10,31,.85); backdrop-filter: blur(14px); box-shadow: 0 8px 30px rgba(0,0,0,.25); padding: .6rem 0; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: .65rem; }
.nav-brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.nav-brand .brand-fallback {
  width: 38px; height: 38px; border-radius: 10px; background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.15rem;
}
.nav-brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 2.1rem; }
.nav-links a { color: var(--text-invert-muted); font-weight: 500; font-size: .92rem; transition: color .15s; }
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: .8rem; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* ── Hero ── */
.hero {
  position: relative;
  background: var(--gradient-hero);
  padding: calc(var(--section-pad) + 3.5rem) 0 var(--section-pad);
  color: #fff;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(4px); opacity: .5;
}
.hero::before { width: 420px; height: 420px; background: radial-gradient(circle, rgba(124,58,237,.55), transparent 70%); top: -160px; right: -120px; }
.hero::after { width: 380px; height: 380px; background: radial-gradient(circle, rgba(245,158,11,.35), transparent 70%); bottom: -180px; left: -100px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; position: relative; z-index: 2; }
.hero-copy .eyebrow { background: rgba(255,255,255,.12); color: #fff; }
.hero-copy h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 700; line-height: 1.12; margin: 1.1rem 0 1.15rem; }
.hero-copy h1 .accent { background: var(--gradient-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p.lead { font-size: 1.08rem; color: var(--text-invert-muted); line-height: 1.7; max-width: 520px; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.1rem; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 1.8rem; margin-top: 2.6rem; flex-wrap: wrap; }
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust strong { font-family: var(--font-display); font-size: 1.4rem; }
.hero-trust span { font-size: .78rem; color: var(--text-invert-muted); }

/* Live leaderboard card floating in hero */
.hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}
.hero-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.hero-card-head h4 { color: #fff; font-size: 1rem; }
.live-dot { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 700; color: #6EE7B7; text-transform: uppercase; letter-spacing: .05em; }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.rank-row { display: flex; align-items: center; gap: .8rem; padding: .65rem .2rem; border-bottom: 1px dashed rgba(255,255,255,.12); }
.rank-row:last-child { border-bottom: none; }
.rank-badge { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; background: rgba(255,255,255,.12); color: #fff; flex-shrink: 0; }
.rank-row:nth-child(1) .rank-badge { background: var(--gradient-gold); color: #422006; }
.rank-row:nth-child(2) .rank-badge { background: #CBD5E1; color: #1E293B; }
.rank-row:nth-child(3) .rank-badge { background: #C2703D; color: #2b1608; }
.rank-name { flex: 1; color: #fff; font-size: .88rem; font-weight: 500; }
.rank-score { font-size: .85rem; font-weight: 700; color: #FBBF24; }
.hero-card-empty { color: var(--text-invert-muted); font-size: .88rem; text-align: center; padding: 1rem 0; }

/* ── Stats strip ── */
.stats-strip { background: var(--surface-dark); padding: 2.6rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-item i { font-size: 1.3rem; color: var(--brand-primary-light); margin-bottom: .5rem; }
.stat-item strong { display: block; font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: #fff; }
.stat-item span { font-size: .8rem; color: var(--text-invert-muted); }

/* ── How it works ── */
.how { padding: var(--section-pad) 0; background: var(--bg-page); }
.how-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.step-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step-num { position: absolute; top: 1.3rem; right: 1.5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--border); }
.step-icon { width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem; margin-bottom: 1.1rem; }
.step-card h3 { font-size: 1.08rem; margin-bottom: .55rem; }
.step-card p { font-size: .88rem; color: var(--text-muted); line-height: 1.6; }

/* ── Winners ── */
.winners { padding: var(--section-pad) 0; background: var(--surface-alt); }
.winners-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.winner-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.winner-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.winner-rank {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto .8rem; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-family: var(--font-display); color: #fff; background: var(--gradient-primary);
}
.winner-card.rank-1 .winner-rank { background: var(--gradient-gold); color: #422006; }
.winner-name { font-weight: 600; color: var(--text-dark); font-size: .95rem; margin-bottom: .3rem; }
.winner-prize { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.winner-prize.cash { color: var(--brand-cash); }
.winner-prize.coin { color: var(--brand-coin); }
.winner-prize.booster { color: var(--brand-booster); }
.winner-meta { font-size: .75rem; color: var(--text-muted); margin-top: .4rem; }
.winners-empty {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--text-muted);
  background: var(--surface); border-radius: var(--radius-lg); border: 1px dashed var(--border);
}
.winners-empty i { font-size: 1.8rem; color: var(--brand-primary-light); margin-bottom: .8rem; display: block; }
.winners-total { text-align: center; margin-top: 2.2rem; font-size: .95rem; color: var(--text-muted); }
.winners-total strong { color: var(--brand-cash); font-family: var(--font-display); font-size: 1.15rem; }

/* ── Features ── */
.features { padding: var(--section-pad) 0; background: var(--bg-page); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.feature-card {
  border-radius: var(--radius-lg); padding: 2rem; color: #fff; position: relative; overflow: hidden;
  min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow-md);
}
.feature-card::before { content: ''; position: absolute; inset: 0; opacity: .92; z-index: 0; }
.feature-card.f-challenge::before { background: var(--gradient-primary); }
.feature-card.f-spin::before { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.feature-card.f-boosters::before { background: linear-gradient(135deg, #0EA5E9, #2563EB); }
.feature-card > * { position: relative; z-index: 1; }
.feature-icon { font-size: 1.9rem; margin-bottom: 1rem; opacity: .95; }
.feature-card h3 { color: #fff; font-size: 1.25rem; margin-bottom: .5rem; }
.feature-card p { color: rgba(255,255,255,.85); font-size: .88rem; line-height: 1.55; }
.feature-tag { display: inline-flex; margin-top: .9rem; font-size: .78rem; font-weight: 700; background: rgba(255,255,255,.18); padding: .3rem .7rem; border-radius: var(--radius-pill); align-self: flex-start; }

.booster-chip-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.2rem; justify-content: center; }
.booster-chip { display: inline-flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--border); padding: .55rem 1.05rem; border-radius: var(--radius-pill); font-size: .85rem; font-weight: 600; color: var(--text-dark); box-shadow: var(--shadow-sm); }
.booster-chip i { font-size: .9rem; }

/* ── CTA banner ── */
.cta-banner {
  margin: 0 auto; max-width: var(--container-w);
  background: var(--gradient-primary); border-radius: var(--radius-lg);
  padding: 3rem clamp(1.5rem, 5vw, 3.5rem); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-banner p { color: rgba(255,255,255,.85); margin-top: .5rem; }

/* ── Footer ── */
.site-footer { background: var(--bg-dark); color: var(--text-invert-muted); padding: 3.5rem 0 1.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.4rem; border-bottom: 1px solid var(--border-dark); }
.footer-brand { display: flex; align-items: center; gap: .65rem; margin-bottom: .9rem; }
.footer-brand img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.footer-brand span { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.site-footer h5 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.site-footer p, .site-footer li { font-size: .88rem; line-height: 1.9; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 1.4rem; font-size: .8rem; flex-wrap: wrap; gap: .6rem; }

/* ── Reveal-on-scroll ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 420px; }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .winners-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (max-width: 767px) {
  .nav-links { position: fixed; top: 0; right: -100%; height: 100vh; width: 78%; max-width: 320px;
    background: var(--bg-dark); flex-direction: column; justify-content: center; gap: 2rem;
    transition: right .3s ease; z-index: 1000; }
  .nav-links.open { right: 0; }
  .nav-toggle { display: block; }
  .nav-cta .btn-outline { display: none; }
  .how-steps, .winners-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cta-banner { flex-direction: column; text-align: center; }
  .hero-trust { justify-content: center; }
}
