/* ═══════════════════════════════════════════════════════
   QuizFi — Global Design System
   Product of Venturio Labs · quizfi.app
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --navy:       #07080f;
  --navy2:      #0d1117;
  --surface:    #13161f;
  --surface2:   #1a1d28;
  --border:     rgba(255,255,255,0.08);
  --border2:    rgba(255,255,255,0.14);
  --text:       #f0f2ff;
  --muted:      rgba(240,242,255,0.45);
  --muted2:     rgba(240,242,255,0.28);
  --brand:      #5b5ef4;
  --brand2:     #7c7fff;
  --grad:       linear-gradient(135deg,#5b5ef4,#a78bfa);
  --grad3:      linear-gradient(90deg,#5b5ef4,#a78bfa,#f472b6);
  --gold:       #f9c932;
  --green:      #10b981;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--navy);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

/* ── TYPOGRAPHY ──────────────────────────────────────── */
.font-display { font-family: 'Nunito', sans-serif; }
h1,h2,h3,h4 { font-family: 'Nunito', sans-serif; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px,5vw,52px); font-weight: 800; }
h2 { font-size: clamp(22px,3vw,32px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }
p  { color: var(--muted); line-height: 1.7; }

/* ── LOGO ────────────────────────────────────────────── */
.logo {
  font-family: 'Nunito', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}
.logo-q    { color: #fff; }
.logo-rest { background: var(--grad3); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── NAV ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 62px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7,8,15,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-links { display: flex; gap: 28px; }
.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color .15s;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-right { display: flex; gap: 10px; align-items: center; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity .15s, transform .12s, box-shadow .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }

.btn-primary {
  padding: 10px 22px;
  font-size: 14px;
  background: var(--grad);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(91,94,244,0.35); opacity: 1; }

.btn-ghost {
  padding: 9px 18px;
  font-size: 13px;
  background: none;
  color: rgba(255,255,255,0.65);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: #fff; opacity: 1; }

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

.btn-outline {
  padding: 9px 20px;
  font-size: 13px;
  background: none;
  color: var(--brand2);
  border: 1px solid rgba(91,94,244,0.4);
}
.btn-outline:hover { background: rgba(91,94,244,0.08); color: #fff; opacity: 1; }

/* ── CARDS ───────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .18s, border-color .18s;
}
.card:hover { transform: translateY(-3px); border-color: var(--border2); }

/* ── TAGS / BADGES ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ── SECTION ─────────────────────────────────────────── */
.section { padding: 52px 40px 40px; }
.section-sm { padding: 36px 40px 28px; }
.sec-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.sec-title { font-family: 'Nunito', sans-serif; font-size: 24px; font-weight: 800; color: #fff; }
.sec-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sec-link { font-size: 13px; color: var(--brand2); font-weight: 600; white-space: nowrap; }

/* ── DIVIDER ─────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 0 40px; }

/* ── GRADIENT TEXT ───────────────────────────────────── */
.grad-text { background: var(--grad3); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.grad-text-2 { background: linear-gradient(90deg,#a78bfa,#f472b6,#fb923c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── GRID HELPERS ────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

/* ── CONTAINER ───────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* ── ORB BACKGROUNDS ─────────────────────────────────── */
.orb-bg { position: relative; overflow: hidden; }
.orb-bg::before,
.orb-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.orb-bg::before { width: 400px; height: 400px; background: #5b5ef4; opacity: .1; top: -120px; left: -60px; }
.orb-bg::after  { width: 360px; height: 360px; background: #f472b6; opacity: .08; top: -80px; right: -80px; }

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  background: var(--navy2);
  border-top: 1px solid var(--border);
  padding: 48px 40px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand-desc { font-size: 13px; color: var(--muted2); line-height: 1.7; margin-top: 12px; max-width: 260px; }
.footer-col-title { font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 14px; letter-spacing: .02em; text-transform: uppercase; }
.footer-link { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; transition: color .15s; }
.footer-link:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-legal { font-size: 12px; color: var(--muted2); line-height: 1.6; }
.footer-legal a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.2); }
.footer-legal a:hover { color: #fff; }

/* ── AD SLOT PLACEHOLDER ─────────────────────────────── */
.ad-slot {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ad-slot-leaderboard { width: 100%; height: 90px; }
.ad-slot-rectangle   { width: 300px; height: 250px; }
.ad-slot-banner      { width: 100%; height: 60px; }

/* ── DISCLAIMER ──────────────────────────────────────── */
.affiliate-disclaimer {
  background: rgba(249,201,50,0.06);
  border: 1px solid rgba(249,201,50,0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 12px;
  color: rgba(249,201,50,0.8);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.affiliate-disclaimer i { font-size: 15px; flex-shrink: 0; margin-top: 1px; color: var(--gold); }

/* ── POINTS / TIER BADGE ─────────────────────────────── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}
.tier-starter  { background: rgba(100,116,139,0.2); color: #94a3b8; }
.tier-explorer { background: rgba(14,165,233,0.18); color: #38bdf8; }
.tier-scholar  { background: rgba(139,92,246,0.18); color: #c084fc; }
.tier-champion { background: rgba(249,201,50,0.18); color: #f9c932; }
.tier-legend   { background: rgba(244,114,182,0.18); color: #f472b6; }

/* ── TOAST / NOTIFICATION ────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes pulse    { 0%,100% { opacity:1; } 50% { opacity:.5; } }
@keyframes spin     { to { transform:rotate(360deg); } }
@keyframes blink    { 0%,100% { opacity:1; } 50% { opacity:.2; } }
@keyframes shimmer  { 0% { background-position:-200% 0; } 100% { background-position:200% 0; } }

.animate-fade-up  { animation: fadeUp .5s ease both; }
.animate-fade-in  { animation: fadeIn .4s ease both; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .section, .section-sm { padding-left: 20px; padding-right: 20px; }
  .container { padding: 0 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer { padding: 36px 20px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .divider { margin: 0 20px; }
}
