/* ---------- tokens ---------- */
:root {
  --bg: #f4f6fb;
  --bg-alt: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #6d5efc;
  --accent-2: #f59e0b;
  --grad: linear-gradient(135deg, #6d5efc, #a855f7);
  --panel: #ffffff;
  --panel-border: #e2e8f0;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1160px, 92%); margin-inline: auto; }
.container-narrow { width: min(760px, 92%); margin-inline: auto; }

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: 999px; font-weight: 600;
  font-size: 0.98rem; transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(109, 94, 252, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(109, 94, 252, 0.45); }
.btn-ghost {
  background: transparent; color: var(--text); border-color: #cbd5e1;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn-lg { padding: 1rem 2.1rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(244, 246, 251, 0.85); backdrop-filter: blur(12px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled { background: #fff; box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 1.5rem; }

.logo { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 800; }
.logo-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  background: var(--grad); color: #fff; font-size: 1.2rem; font-weight: 800;
  box-shadow: 0 8px 20px rgba(109, 94, 252, 0.4);
}
.logo-text { font-size: 1.25rem; letter-spacing: -0.02em; }

.nav { display: flex; gap: 2rem; align-items: center; }
.nav-link { font-weight: 500; color: var(--muted); transition: color 0.2s ease; }
.nav-link:hover { color: var(--accent); }

.menu-toggle { display: none; background: none; border: none; flex-direction: column; gap: 5px; padding: 6px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- hero ---------- */
.hero { padding: calc(var(--nav-h) + 60px) 0 80px; background: radial-gradient(80% 60% at 80% 10%, rgba(168, 85, 247, 0.12), transparent 60%); }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4rem; align-items: center; }

.eyebrow {
  display: inline-block; padding: 0.3rem 0.9rem; border-radius: 999px;
  background: rgba(109, 94, 252, 0.12); color: var(--accent);
  font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}
.hero-title { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.12; margin-bottom: 1.2rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 1.12rem; max-width: 540px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero-stats { list-style: none; display: flex; gap: 2.4rem; flex-wrap: wrap; }
.hero-stats li { color: var(--muted); font-size: 0.92rem; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- animated hero quiz card ---------- */
.hero-visual { display: grid; place-items: center; }
.quiz-card-anim {
  width: min(420px, 100%); background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 24px; padding: 2rem; box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.anim-question { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-bottom: 1.2rem; }
.anim-options { display: grid; gap: 0.7rem; margin-bottom: 1.4rem; }
.anim-opt {
  display: block; padding: 0.8rem 1.1rem; border-radius: 12px; border: 1.5px solid var(--panel-border);
  font-weight: 500; font-size: 0.95rem; animation: slideIn 0.5s ease both;
}
.anim-opt.opt-a { animation-delay: 0s; }
.anim-opt.opt-b { animation-delay: 0.15s; }
.anim-opt.opt-c { animation-delay: 0.3s; }
.anim-opt.opt-d { animation-delay: 0.45s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.anim-progress { height: 8px; border-radius: 99px; background: #e9ecf5; overflow: hidden; }
.anim-progress span { display: block; width: 55%; height: 100%; background: var(--grad); border-radius: 99px; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-eyebrow {
  color: var(--accent); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.4rem;
}
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; margin-bottom: 2.4rem; }

/* ---------- quiz grid ---------- */
.quiz-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
.quiz-card {
  display: block; background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.quiz-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--card) 50%, white); }
.quiz-cover {
  height: 150px; display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card) 85%, white), color-mix(in srgb, var(--card) 60%, white));
}
.quiz-emoji { font-size: 3.4rem; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.2)); animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.quiz-body { padding: 1.4rem 1.5rem 1.6rem; }
.quiz-cat { color: var(--card); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.quiz-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin: 0.3rem 0 0.5rem; }
.quiz-desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.quiz-meta { font-size: 0.85rem; font-weight: 600; color: var(--text); }

/* ---------- how ---------- */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.how-card {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow); transition: transform 0.3s ease;
}
.how-card:hover { transform: translateY(-6px); }
.how-num {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
  margin-bottom: 1.1rem; box-shadow: 0 10px 22px rgba(109, 94, 252, 0.35);
}
.how-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.5rem; }
.how-card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px; padding: 1.2rem 1.4rem;
  cursor: pointer; box-shadow: var(--shadow);
}
.faq-item summary {
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--accent); font-weight: 400; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { color: var(--muted); margin-top: 0.8rem; font-size: 0.95rem; }

/* ---------- ad slots ---------- */
.ad-slot {
  width: min(760px, 92%); margin: 0 auto; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  background: #eef1f7; border: 1px dashed #cbd5e1; border-radius: 14px;
  color: #94a3b8; font-size: 0.85rem;
}
.ad-leaderboard { margin: 0 auto 70px; }
.quiz-ad { margin: 2rem auto; }
.ad-label { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; }

/* ---------- quiz page ---------- */
.quiz-page { padding: calc(var(--nav-h) + 60px) 0 70px; }
.quiz-screen { max-width: 720px; margin-inline: auto; }
.quiz-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.quiz-category { color: var(--accent); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.quiz-count { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.quiz-progress { height: 8px; background: #e9ecf5; border-radius: 99px; overflow: hidden; margin-bottom: 1.8rem; }
#quizProgressBar { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width 0.4s ease; width: 0; }
.quiz-question { font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; margin-bottom: 1.8rem; }
.quiz-options { display: grid; gap: 0.9rem; }
.quiz-option {
  display: flex; align-items: center; gap: 1rem; text-align: left;
  background: var(--panel); border: 2px solid var(--panel-border); border-radius: 14px;
  padding: 1rem 1.2rem; font-size: 1rem; color: var(--text); font-weight: 500;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.quiz-option:hover { border-color: var(--accent); transform: translateX(6px); }
.quiz-option.selected { border-color: var(--accent); background: rgba(109, 94, 252, 0.08); }
.quiz-option.correct { border-color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.quiz-option.wrong { border-color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.opt-letter {
  width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 10px; background: #eef1f7; font-weight: 700; font-size: 0.9rem;
}
.quiz-option.selected .opt-letter, .quiz-option.correct .opt-letter { background: var(--accent); color: #fff; }
.quiz-option.wrong .opt-letter { background: #ef4444; color: #fff; }
.quiz-hint { margin-top: 1.2rem; font-weight: 600; color: var(--accent); min-height: 1.4em; text-align: center; }

/* ---------- result ---------- */
.result-screen { max-width: 720px; margin-inline: auto; }
.result-card {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 24px;
  padding: 2.6rem; text-align: center; box-shadow: var(--shadow-lg);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.result-title { font-family: var(--font-display); font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 800; margin-bottom: 1rem; }
.result-desc { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto 1.8rem; }
.result-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.2rem; }
.share-row { border-top: 1px solid var(--panel-border); padding-top: 1.6rem; }
.share-label { display: block; font-weight: 600; margin-bottom: 1rem; color: var(--muted); font-size: 0.9rem; }
.share-btns { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.share-btn {
  padding: 0.7rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  border: 1.5px solid var(--panel-border); background: #fff; transition: transform 0.2s ease, border-color 0.2s ease;
}
.share-btn:hover { transform: translateY(-3px); }
.share-fb:hover { border-color: #1877f2; color: #1877f2; }
.share-wa:hover { border-color: #25d366; color: #25d366; }
.share-copy:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- footer ---------- */
.footer { background: #0f172a; color: #94a3b8; padding-top: 3.5rem; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer .logo-text { color: #fff; }
.footer-col h4 { font-family: var(--font-display); color: #fff; font-size: 0.95rem; margin-bottom: 1rem; }
.footer-col a { display: block; color: #94a3b8; padding: 0.25rem 0; transition: color 0.2s ease; font-size: 0.95rem; }
.footer-col a:hover { color: #fff; }
.footer-brand p { font-size: 0.95rem; margin-top: 0.8rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 1.4rem 0; text-align: center; font-size: 0.88rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .quiz-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-link { padding: 1rem 1.5rem; width: 100%; }
  .nav-cta { display: none; }
  .menu-toggle { display: flex; }
}
