/* Landing page. Matches the app's "Sunny Classroom" look: lavender, indigo, gold, chunky buttons. */
:root {
  --bg: #F4F1FF; --surface: #FFFFFF; --surface-2: #ECE8FF;
  --text: #1E1A4D; --text-2: #4D4880; --muted: #5F5A93;
  --border: #E3DEFA; --border-2: #CFC8F5;
  --primary: #5B4CF0; --primary-deep: #3F32C4; --on-primary: #FFFFFF;
  --gold: #FFC531; --gold-deep: #E08A00; --gold-bg: rgba(255,197,49,.2);
  --good: #16A34A; --good-bg: rgba(22,163,74,.1);
  --bad: #E5345F; --bad-bg: rgba(229,52,95,.09);
  --primary-text: #4F3FE0; --gold-text: #8A5300; --good-text: #15803D;   /* text-safe variants (AA on light cards) */
  --shadow: 0 10px 30px rgba(63,50,196,.12);
  --hero-1: #5B4CF0; --hero-2: #8B5CF6;
  --font-body: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Baloo Bhaijaan 2', 'Cairo', system-ui, sans-serif;
  --card-bg: var(--surface); --text-primary: var(--text); --text-muted: var(--muted);   /* aliases used by account.css */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1424; --surface: #1A2239; --surface-2: #232D4D;
    --text: #F3F6FF; --text-2: #C4CCE6; --muted: #A3AED3;
    --border: rgba(160,180,235,.16); --border-2: rgba(160,180,235,.3);
    --primary: #6A5BFF; --primary-deep: #4437D6;
    --gold-bg: rgba(255,197,49,.16); --good: #34D57A; --good-bg: rgba(52,213,122,.13);
    --bad: #FF6B8B; --bad-bg: rgba(255,107,139,.12);
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --hero-1: #3B30B8; --hero-2: #6B3FD0;
    --primary-text: #A79BFF; --gold-text: #FFC531; --good-text: #34D57A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1424; --surface: #1A2239; --surface-2: #232D4D;
  --text: #F3F6FF; --text-2: #C4CCE6; --muted: #A3AED3;
  --border: rgba(160,180,235,.16); --border-2: rgba(160,180,235,.3);
  --primary: #6A5BFF; --primary-deep: #4437D6;
  --gold-bg: rgba(255,197,49,.16); --good: #34D57A; --good-bg: rgba(52,213,122,.13);
  --bad: #FF6B8B; --bad-bg: rgba(255,107,139,.12);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --hero-1: #3B30B8; --hero-2: #6B3FD0;
  --primary-text: #A79BFF; --gold-text: #FFC531; --good-text: #34D57A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.8; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary-text); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.35; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 20px; }
section { padding-block: 64px; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.sec-head h2 { font-size: clamp(26px, 5vw, 36px); }
.sec-head p { margin-top: 10px; color: var(--text-2); }
.eyebrow { display: inline-block; margin-bottom: 10px; padding: 3px 14px; border-radius: 999px; background: var(--gold-bg); color: var(--gold-text); font-weight: 800; font-size: 13px; }
[hidden] { display: none !important; }

/* Buttons: chunky, like the app */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 16px; border: 0; font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 5px 0 var(--primary-deep), 0 10px 22px rgba(91,76,240,.3); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--primary-deep); }
.btn-gold { background: var(--gold); color: #3A2A00; box-shadow: 0 5px 0 var(--gold-deep), 0 10px 22px rgba(224,138,0,.3); }
.btn-gold:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold-deep); }
.btn-ghost { background: var(--surface); color: var(--primary-text); border: 2px solid var(--border-2); box-shadow: 0 4px 0 var(--border-2); }
.btn-ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border-2); }
.btn-lg { padding: 16px 32px; font-size: 18px; }
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 12px; box-shadow: none; }
.btn-sm.btn-primary { box-shadow: 0 3px 0 var(--primary-deep); }
.btn-sm.btn-ghost { box-shadow: none; border-width: 2px; }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.brand img { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 3px 0 var(--primary-deep); }
.nav { display: none; gap: 22px; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav a:hover { color: var(--primary-text); }
.top-actions { display: flex; gap: 8px; align-items: center; }
@media (min-width: 860px) { .nav { display: flex; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: 48px 72px; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(closest-side, rgba(139,92,246,.28), transparent); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: auto auto -30% -10%; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,197,49,.25), transparent); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } .hero { padding-block: 72px 96px; } }
.hero h1 { font-size: clamp(34px, 7vw, 56px); }
.hero h1 em { font-style: normal; color: var(--primary-text); background: linear-gradient(transparent 62%, var(--gold-bg) 62%); padding-inline: 4px; }
.hero .lead { margin-top: 18px; font-size: clamp(17px, 2.6vw, 20px); color: var(--text-2); max-width: 540px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.cta-note { margin-top: 14px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cta-note span::before { content: "✓ "; color: var(--good-text); font-weight: 800; }

/* Hero visual: a mock of the app card */
.mock { position: relative; max-width: 380px; margin-inline: auto; }
.mock-card { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 22px; box-shadow: var(--shadow); }
.mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 13px; font-weight: 800; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; background: var(--gold-bg); color: var(--gold-text); font-weight: 800; font-size: 13px; }
.bubble { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-size: 15px; line-height: 1.7; }
.bubble + .bubble { margin-top: 10px; }
.bubble.alt { background: var(--primary); color: var(--on-primary); border-end-end-radius: 4px; }
.mock-q { margin: 16px 0 10px; font-weight: 800; font-size: 14px; color: var(--text-2); }
.mock-opt { display: block; width: 100%; text-align: start; margin-top: 8px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; pointer-events: none; }
.mock-opt.right { border-color: var(--good); background: var(--good-bg); }
.float { position: absolute; padding: 8px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 800; font-size: 14px; white-space: nowrap; animation: bob 5s ease-in-out infinite; }
.float.a { top: -14px; inset-inline-start: -10px; }
.float.b { bottom: 70px; inset-inline-end: -14px; animation-delay: -1.7s; }
.float.c { bottom: -16px; inset-inline-start: 20px; animation-delay: -3.2s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Trust strip */
.strip { padding-block: 0 8px; }
.strip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .strip-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px 12px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 30px; color: var(--primary-text); line-height: 1.2; }
.stat span { font-size: 14px; color: var(--text-2); font-weight: 700; }

/* Demo quiz */
.demo { background: linear-gradient(180deg, transparent, var(--surface-2) 30%, var(--surface-2) 70%, transparent); }
.quiz { max-width: 640px; margin-inline: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 24px 20px; box-shadow: var(--shadow); }
@media (min-width: 600px) { .quiz { padding: 32px; } }
.dots { display: flex; gap: 6px; margin-bottom: 18px; }
.dots i { flex: 1; height: 8px; border-radius: 99px; background: var(--border); transition: background .25s; }
.dots i.on { background: var(--gold); }
.dots i.ok { background: var(--good); }
.dots i.no { background: var(--bad); }
.q-label { font-weight: 800; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.q-text { font-size: 19px; line-height: 1.9; padding: 16px 18px; background: var(--surface-2); border-radius: 18px; font-weight: 600; }
.q-ask { margin: 18px 0 6px; font-weight: 800; }
.opts { display: grid; gap: 10px; }
.opt { text-align: start; padding: 13px 16px; border-radius: 16px; border: 2px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 0 3px 0 var(--border-2); transition: transform .08s, border-color .15s; }
.opt:hover:not(:disabled) { border-color: var(--primary); }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--border-2); }
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--good); background: var(--good-bg); box-shadow: 0 3px 0 var(--good); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 3px 0 var(--bad); }
.feedback { margin-top: 16px; padding: 14px 16px; border-radius: 16px; font-size: 15.5px; animation: pop .25s ease-out; }
.feedback.ok { background: var(--good-bg); border: 1px solid var(--good); }
.feedback.no { background: var(--bad-bg); border: 1px solid var(--bad); }
.feedback strong { display: block; margin-bottom: 2px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.quiz-next { margin-top: 16px; display: flex; justify-content: flex-end; }
.result { text-align: center; padding: 8px 0 4px; }
.result .big { font-size: 56px; line-height: 1.2; }
.result h3 { font-size: 26px; margin: 6px 0; }
.result p { color: var(--text-2); max-width: 440px; margin: 0 auto; }
.result .cta-row { justify-content: center; }

/* Cards */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--surface-2); margin-bottom: 14px; }
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card p { color: var(--text-2); font-size: 15.5px; }

/* Steps */
.steps { counter-reset: s; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 26px 22px 22px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -18px; inset-inline-start: 22px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #3A2A00; font-family: var(--font-display); font-size: 20px; box-shadow: 0 3px 0 var(--gold-deep); }
.step h3 { font-size: 19px; margin-bottom: 4px; }
.step p { color: var(--text-2); font-size: 15.5px; }

/* Why sign up */
.why { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .why { grid-template-columns: 1fr 1fr; gap: 48px; } }
.why h2 { font-size: clamp(26px, 5vw, 36px); }
.why .lead { margin-top: 10px; color: var(--text-2); }
.perks { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 14px; }
.perks li { display: flex; gap: 14px; align-items: flex-start; }
.perks .pi { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--gold-bg); }
.perks b { display: block; font-size: 17px; }
.perks span { color: var(--text-2); font-size: 15px; }
.compare { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--border); }
.compare th:first-child, .compare td:first-child { text-align: start; font-weight: 700; }
.compare thead th { background: var(--surface-2); font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.compare thead th.acc { background: var(--primary); color: var(--on-primary); }
.compare tr:last-child td { border-bottom: 0; }
.yes { color: var(--good-text); font-weight: 800; }
.nope { color: var(--muted); }
.compare .foot { padding: 16px; display: grid; gap: 10px; }
.compare .foot .btn { width: 100%; }
.compare .foot small { text-align: center; color: var(--muted); }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 4px 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--primary-text); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; color: var(--text-2); }

/* Final CTA */
.final { padding-block: 24px 72px; }
.final-box { text-align: center; border-radius: 32px; padding: 52px 24px; color: #fff; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); box-shadow: 0 16px 40px rgba(91,76,240,.35); position: relative; overflow: hidden; }
.final-box::after { content: ""; position: absolute; inset: auto -60px -80px auto; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,197,49,.3); }
.final-box h2 { font-size: clamp(28px, 5.5vw, 40px); position: relative; z-index: 1; }
.final-box p { margin: 10px auto 0; max-width: 520px; opacity: .92; position: relative; z-index: 1; }
.final-box .cta-row { justify-content: center; position: relative; z-index: 1; }
.final-box .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.55); box-shadow: 0 4px 0 rgba(255,255,255,.3); }

/* Footer */
.foot-nav { border-top: 1px solid var(--border); padding-block: 28px 100px; text-align: center; color: var(--muted); font-size: 14px; }
.foot-nav nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 10px; }
.foot-nav a { color: var(--text-2); }

/* Sticky mobile CTA */
.sticky-cta { position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; gap: 10px; padding: 10px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border-2); box-shadow: var(--shadow); transform: translateY(160%); transition: transform .3s; }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { flex: 1; padding: 12px 10px; font-size: 15px; }
@media (min-width: 860px) { .sticky-cta { display: none; } }

/* Reveal on scroll (content stays visible if JS fails) */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s, transform .6s; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .feedback { animation: none; }
}
