/* ============ SuHagSAT — sibling of the Spaikz house style ============ */
/* Same bones as spaikz.com and khasat.spaikz.com: fonts loaded from Google,
   fixed grid/glow background, kicker pills, cards, reveal-on-scroll,
   dark-default with a light toggle applied before first paint.

   Two deliberate departures:
   - Palette is the app's own VIOLET (--brand #5b4bcf light / #9b8ef5 dark),
     lifted straight from web/src/index.css so the site and the app are the
     same product — and clearly not KhaSAT's azure, since a visitor may well
     have both open.
   - Headings are a SERIF, matching the maths face the app sets notation in. A
     grotesk headline over a serif equation reads as two products stapled
     together. */
:root {
  --bg: #0d1017;
  --bg-soft: #12161f;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-brd: rgba(255, 255, 255, 0.09);
  --text: #e6eaf2;
  --muted: #9aa3b6;
  --brand: #9b8ef5;          /* the app's dark-mode accent */
  --brand-2: #c3bbfb;
  --accent: #d8a657;         /* the app's flag amber, used sparingly */
  --on-brand: #14102a;
  --ok: #4ec99a;
  --bad: #ef7a63;
  --grad-text: linear-gradient(115deg, #9b8ef5 0%, #c3bbfb 45%, #d8a657 100%);
  --glow-opacity: 1;
  --radius: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

:root[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-soft: #eaeef6;
  --panel: rgba(28, 34, 48, 0.035);
  --panel-brd: rgba(28, 34, 48, 0.13);
  --text: #1c2230;
  --muted: #5c6478;
  --brand: #5b4bcf;          /* the app's light-mode accent */
  --brand-2: #3d3196;
  --accent: #9a6414;
  --on-brand: #ffffff;
  --ok: #1f7a5a;
  --bad: #c1442f;
  --grad-text: linear-gradient(115deg, #5b4bcf 0%, #3d3196 45%, #9a6414 100%);
  --glow-opacity: 0.45;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, .brand-name, .tier-price {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  letter-spacing: -0.015em;
}
a { color: inherit; text-decoration: none; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(155,142,245,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155,142,245,.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; top: -20%; left: 50%;
  width: 900px; height: 900px; transform: translateX(-50%);
  background: radial-gradient(circle at 30% 30%, rgba(155,142,245,.22), transparent 60%),
              radial-gradient(circle at 70% 40%, rgba(216,166,87,.10), transparent 55%),
              radial-gradient(circle at 50% 50%, rgba(195,187,251,.16), transparent 60%);
  filter: blur(30px);
  opacity: var(--glow-opacity);
  animation: float 16s var(--ease) infinite alternate;
}
@keyframes float {
  from { transform: translateX(-50%) translateY(0) scale(1); }
  to   { transform: translateX(-45%) translateY(40px) scale(1.08); }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-brd);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: block; }
.brand-mark-sm { width: 24px; height: 24px; border-radius: 6px; }
.brand-name { font-weight: 700; font-size: 1.08rem; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--muted); font-size: .94rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--panel-brd); background: var(--panel);
  padding: 8px 14px; border-radius: 999px;
}
.theme-toggle, .nav-toggle {
  background: var(--panel); border: 1px solid var(--panel-brd); color: var(--text);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.theme-toggle svg { width: 18px; height: 18px; }
:root[data-theme="light"] .icon-moon, :root:not([data-theme="light"]) .icon-sun { display: none; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 16px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 12px;
  font-weight: 600; font-size: .98rem;
  transition: transform .2s var(--ease), opacity .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-ghost { border: 1px solid var(--panel-brd); background: var(--panel); color: var(--text); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: 64px 24px 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 20px;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.05; margin: 0 0 20px; font-weight: 700; }
.lead { color: var(--muted); font-size: 1.13rem; max-width: 32rem; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { color: var(--muted); font-size: .88rem; margin: 18px 0 0; }

/* ---------- hero question card ---------- */
/* A real banked question, answerable in place. The point is that the product
   demo IS the product: same four choices, same cross-out control, same
   explanation the app shows after you answer. */
.hero-visual { display: grid; gap: 12px; }
.qcard {
  background: var(--bg-soft); border: 1px solid var(--panel-brd);
  border-radius: var(--radius); padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.qcard-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--panel-brd);
}
.qtag {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  padding: 4px 10px; border-radius: 999px;
}
.qcount { margin-left: auto; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.qsetup {
  font-family: "Source Serif 4", "Cambria Math", Georgia, serif;
  font-size: 1.06rem; line-height: 1.6; margin: 0 0 14px; color: var(--text);
}
/* A displayed equation gets its own centred line, the way the test sets one. */
.qsetup .display { display: block; text-align: center; font-size: 1.2rem; margin: 6px 0; }
/* The typed-answer box, which is a quarter of the real section and the thing
   this site most wants a visitor to notice they have never practised. */
.qtyped { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; }
.qtyped input {
  font-family: "Cambria Math", Georgia, serif; font-size: 1.5rem; font-weight: 600;
  width: 7ch; text-align: center; color: var(--text);
  background: var(--panel); border: 1px solid var(--panel-brd); border-radius: 10px;
  padding: 8px 6px;
}
.qtyped-note { color: var(--muted); font-size: .82rem; }
.qprompt { font-size: .94rem; font-weight: 600; margin: 0 0 12px; color: var(--text); }
.qchoices { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.qchoice { display: flex; align-items: stretch; gap: 8px; }
.qchoice-btn {
  flex: 1; display: flex; align-items: flex-start; gap: 10px; text-align: left;
  font: inherit; font-size: .93rem; cursor: pointer;
  background: var(--panel); border: 1px solid var(--panel-brd); color: var(--text);
  border-radius: 10px; padding: 10px 12px;
  transition: border-color .18s, background .18s, transform .18s var(--ease);
}
.qchoice-btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brand) 50%, transparent); transform: translateY(-1px); }
.qchoice-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.qchoice-btn:disabled { cursor: default; }
.qletter {
  flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-size: .76rem; font-weight: 700; color: var(--muted);
  border: 1px solid var(--panel-brd); background: var(--bg);
}
.qchoice.is-struck .qchoice-btn { opacity: .42; }
.qchoice.is-struck .qchoice-text { text-decoration: line-through; }
.qchoice.is-correct .qchoice-btn { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.qchoice.is-correct .qletter { color: var(--ok); border-color: var(--ok); }
.qchoice.is-wrong .qchoice-btn { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.qchoice.is-wrong .qletter { color: var(--bad); border-color: var(--bad); }
.qstrike {
  flex: none; width: 34px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--panel-brd); color: var(--muted);
  font-size: .9rem; line-height: 1;
  transition: color .18s, border-color .18s;
}
.qstrike:hover { color: var(--text); border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.qstrike:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.qexplain {
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--panel-brd);
}
.qverdict { margin: 0 0 6px; font-weight: 700; font-size: .92rem; }
.qverdict.ok { color: var(--ok); }
.qverdict.bad { color: var(--bad); }
.qexplain-body { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.qcard-foot { display: flex; margin-top: 14px; }
.qnext {
  margin-left: auto; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  background: transparent; border: 0; color: var(--brand); padding: 4px 0;
}
.qnext:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.demo-caption { color: var(--muted); font-size: .85rem; margin: 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .qchoice-btn, .btn, .card { transition: none; }
  .bg-glow { animation: none; }
}

/* ---------- strip ---------- */
.strip {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 24px 10px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  border-top: 1px solid var(--panel-brd);
}
.strip p { color: var(--muted); font-size: .9rem; margin: 0; }
.strip-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.strip-tags span {
  font-size: .8rem; color: var(--muted);
  border: 1px solid var(--panel-brd); background: var(--panel);
  padding: 4px 11px; border-radius: 999px;
}

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px; }
.section-alt { background: var(--bg-soft); }
.section-inner { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.kicker {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand);
  padding: 6px 12px; border: 1px solid var(--panel-brd); border-radius: 999px;
  background: var(--panel); margin-bottom: 18px;
}
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 14px; line-height: 1.15; font-weight: 700; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--panel-brd);
  border-radius: var(--radius); padding: 26px;
  transition: transform .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.card-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--panel-brd);
  font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--muted);
}
.card-icon-accent { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.card h3 { font-size: 1.14rem; margin: 0 0 8px; font-weight: 600; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.ticks li { position: relative; padding-left: 30px; color: var(--muted); font-size: 1rem; }
.ticks li strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  color: var(--brand); font-weight: 700;
}

/* ---------- navigator mock ---------- */
.panel-demo {
  background: var(--bg-soft); border: 1px solid var(--panel-brd); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.26);
}
.panel-head { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--panel-brd); }
.panel-head span { width: 10px; height: 10px; border-radius: 50%; background: var(--panel-brd); }
.nav-demo { padding: 20px 18px; }
.nav-demo-title {
  margin: 0 0 16px; font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.nav-group { padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; }
.nav-group.is-active { background: var(--panel); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.nav-group p { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-size: .88rem; }
.nav-group p span { font-weight: 600; }
.nav-group p em { margin-left: auto; font-style: normal; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.dots { display: flex; gap: 5px; }
.dots i {
  width: 100%; height: 6px; border-radius: 3px;
  background: var(--panel-brd); display: block;
}
.dots i.on { background: var(--brand); }
.dots i.cur { background: var(--accent); }
.nav-demo-note { margin: 14px 0 0; color: var(--muted); font-size: .84rem; font-style: italic; }

/* ---------- domains ---------- */
.domain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.domain {
  background: var(--panel); border: 1px solid var(--panel-brd);
  border-radius: 14px; padding: 20px 22px;
  transition: transform .2s var(--ease), border-color .2s;
}
.domain:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.domain-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.domain h3 { font-size: 1.05rem; margin: 0; font-weight: 600; }
.domain-top span { margin-left: auto; color: var(--brand); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.domain p { color: var(--muted); font-size: .9rem; margin: 0; }
.coverage-note { color: var(--muted); font-size: .95rem; margin: 26px 0 0; max-width: 46rem; }

/* ---------- pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 780px; }
.tier {
  position: relative;
  background: var(--panel); border: 1px solid var(--panel-brd);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column;
}
.tier-featured { border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.tier-badge {
  position: absolute; top: -11px; left: 28px;
  font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--bg-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding: 3px 10px; border-radius: 999px;
}
.tier h3 { font-size: 1.2rem; margin: 0 0 4px; font-weight: 600; }
.tier-price { font-size: 2rem; font-weight: 700; margin: 0 0 18px; }
.tier-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.tier-list li { position: relative; padding-left: 26px; font-size: .93rem; color: var(--muted); }
.tier-list li.yes::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.tier-list li.no::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.tier-cta { margin-top: auto; text-align: center; }

/* ---------- contact ---------- */
.contact-card {
  background: var(--panel); border: 1px solid var(--panel-brd);
  border-radius: 22px; padding: 52px 40px; text-align: center;
}
.contact-card h2 { margin-bottom: 12px; }
.contact-card p { color: var(--muted); max-width: 34rem; margin: 0 auto 26px; }
.contact-alt { font-size: .9rem; margin-top: 22px !important; }
.contact-alt a { color: var(--brand); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--panel-brd); margin-top: 40px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.footer-tag { color: var(--muted); font-size: .92rem; margin: 0; margin-right: auto; }
.footer-tag a { color: var(--brand); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); font-size: .9rem; }
.footer-links a:hover { color: var(--text); }
.copyright {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px 34px;
  color: var(--muted); font-size: .84rem;
}

/* ---------- legal pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: .9rem; margin: 0 0 36px; }
.doc h2 { font-size: 1.3rem; margin: 36px 0 12px; }
.doc h3 { font-size: 1.05rem; margin: 24px 0 8px; font-weight: 600; }
.doc p, .doc li { color: var(--muted); font-size: 1rem; }
.doc a { color: var(--brand); }
.doc ul { padding-left: 22px; display: grid; gap: 8px; }
.doc .callout {
  background: var(--panel); border: 1px solid var(--panel-brd);
  border-radius: 12px; padding: 18px 20px; margin: 24px 0;
}
.doc .callout p { margin: 0; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .domain-grid { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-soft); border: 1px solid var(--panel-brd);
    border-radius: 14px; padding: 12px;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 10px 12px; border-radius: 8px; }
  .nav-cta { text-align: center; }
  .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  .section, .section-inner { padding: 60px 20px; }
  .contact-card { padding: 36px 22px; }
}
