/* ==========================================================================
   QuranicKids website styles
   Palette and radii mirror the Flutter app (lib/theme/app_theme.dart) so the
   site and the app read as one product.
   ========================================================================== */

:root {
  --deep-teal: #0c4f49;
  --teal: #0f6b60;
  --teal-dark: #0b3e39;
  --green: #1e8a63;
  --gold: #f6a821;
  --gold-soft: #f7c24b;
  --moon: #7c6ff0;
  --coral: #f56b6b;
  --ink: #10233a;
  --ink-soft: #5b6b73;
  --soft-white: #f6f9f7;
  --night: #13355b;
  --night-deep: #0b1b33;

  --line: #e2e8e6;
  --shadow-sm: 0 6px 18px rgba(12, 79, 73, 0.08);
  --shadow-md: 0 14px 34px rgba(12, 79, 73, 0.12);
  --shadow-lg: 0 26px 60px rgba(11, 27, 51, 0.28);

  --radius: 24px;
  --radius-sm: 16px;
  --radius-pill: 40px;

  --wrap: 1140px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-ar: "Noto Naskh Arabic", "Traditional Arabic", "Segoe UI", serif;
  --font-bn: "Noto Sans Bengali", "Nirmala UI", var(--font);
}

/* --------------------------------------------------------------- base ---- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keeps anchor targets clear of the sticky header. */
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 900; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 800; }
p  { margin: 0 0 1em; }
a  { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 800;
}
.skip-link:focus { left: 0; }

.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* Arabic and Bengali need their own faces to render properly everywhere. */
[lang="ar"], .ar { font-family: var(--font-ar); }
[lang="bn"], .bn { font-family: var(--font-bn); }

/* ------------------------------------------------------------- buttons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: 20px; font-weight: 800; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: .92rem; border-radius: 14px; }

.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 8px 20px rgba(246, 168, 33, .35); }
.btn-gold:hover { background: #e79a15; }

.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(15, 107, 96, .3); }
.btn-teal:hover { background: #0d5c53; }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

.btn-outline { background: #fff; color: var(--teal); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--teal); }

/* Google Play badge */
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; padding: 12px 24px 12px 20px;
  border-radius: 16px; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
  box-shadow: 0 10px 26px rgba(16, 35, 58, .35);
}
.store-btn:hover { transform: translateY(-2px); text-decoration: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-btn small { font-size: .68rem; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }
.store-btn strong { font-size: 1.15rem; font-weight: 800; }
.store-btn-pending { opacity: .92; cursor: default; }
.store-btn-pending:hover { transform: none; }

/* -------------------------------------------------------------- header ---- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-inner { display: flex; align-items: center; gap: 18px; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--ink); font-size: 1.12rem; font-weight: 900; letter-spacing: -.02em; }
.brand-text em { color: var(--ink-soft); font-size: .68rem; font-style: normal; font-weight: 600; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--teal); text-decoration: none; }
.site-nav .nav-cta { color: #fff; }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  background: var(--soft-white); border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------------------------------------------------------------- hero ---- */

.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, var(--teal) 0%, var(--deep-teal) 55%, var(--teal-dark) 100%);
  padding: clamp(48px, 8vw, 92px) 0 clamp(60px, 9vw, 110px);
}

/* Islamic 8-point star field, painted rather than imaged. */
.starfield { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.starfield span {
  position: absolute; display: block; color: var(--gold-soft);
  font-size: 18px; opacity: .32;
  animation: twinkle 4s ease-in-out infinite;
}
.starfield span::before { content: "\2738"; }
.starfield span:nth-child(1) { top: 12%; left: 6%;  font-size: 26px; animation-delay: .0s; }
.starfield span:nth-child(2) { top: 30%; left: 88%; font-size: 20px; animation-delay: .6s; }
.starfield span:nth-child(3) { top: 68%; left: 12%; font-size: 16px; animation-delay: 1.2s; }
.starfield span:nth-child(4) { top: 78%; left: 78%; font-size: 24px; animation-delay: 1.8s; }
.starfield span:nth-child(5) { top: 8%;  left: 52%; font-size: 14px; animation-delay: 2.4s; }
.starfield span:nth-child(6) { top: 52%; left: 42%; font-size: 12px; animation-delay: 3.0s; }
.starfield span:nth-child(7) { top: 88%; left: 34%; font-size: 18px; animation-delay: .9s; }
.starfield span:nth-child(8) { top: 20%; left: 26%; font-size: 13px; animation-delay: 2.1s; }
@keyframes twinkle { 0%,100% { opacity: .2; transform: scale(.9); } 50% { opacity: .6; transform: scale(1.1); } }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  padding: 8px 16px; border-radius: var(--radius-pill);
  font-size: .82rem; font-weight: 700; margin-bottom: 20px;
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 .accent { color: var(--gold-soft); }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.18rem); color: rgba(255, 255, 255, .88); max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 22px; }

.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; }
.hero-points li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: rgba(255, 255, 255, .85); }
.hero-points li::before { content: "\2713"; color: var(--gold-soft); font-weight: 900; }

/* --------------------------------------------------------------- phone ---- */

.phone { position: relative; margin: 0 auto; width: min(320px, 86vw); }
.phone-frame {
  position: relative; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #24343f, #131f28);
  box-shadow: var(--shadow-lg);
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 20px; background: #131f28; border-radius: 0 0 14px 14px; z-index: 3;
}
.phone-screen {
  position: relative; overflow: hidden;
  border-radius: 32px; padding: 34px 16px 18px;
  background: linear-gradient(170deg, #13355b, #0e2340 60%, #0b1b33);
  min-height: 566px;
}
.phone-screen .stars { position: absolute; inset: 0; pointer-events: none; }
.phone-screen .stars span { position: absolute; color: var(--gold-soft); opacity: .22; font-size: 14px; }
.phone-screen .stars span::before { content: "\2738"; }
.phone-screen .stars span:nth-child(1) { top: 14%; left: 10%; }
.phone-screen .stars span:nth-child(2) { top: 24%; left: 82%; font-size: 18px; }
.phone-screen .stars span:nth-child(3) { top: 58%; left: 6%;  font-size: 11px; }
.phone-screen .stars span:nth-child(4) { top: 72%; left: 88%; }
.phone-screen .stars span:nth-child(5) { top: 44%; left: 92%; font-size: 10px; }
.phone-screen .stars span:nth-child(6) { top: 90%; left: 20%; font-size: 16px; }

.app-hud { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.hud-close {
  width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .16);
  color: #fff; display: grid; place-items: center; font-size: 18px; flex: none;
}
.hud-bar { flex: 1; height: 9px; border-radius: 10px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.hud-bar i { display: block; height: 100%; background: var(--gold); border-radius: 10px; }
.hud-hearts { font-size: 11px; letter-spacing: -1px; flex: none; }

.app-chips { display: flex; justify-content: space-between; margin: 12px 0 14px; position: relative; z-index: 2; }
.chip {
  background: rgba(255, 255, 255, .16); color: #fff;
  padding: 5px 13px; border-radius: var(--radius-pill); font-size: .68rem; font-weight: 700;
}
.chip-gold { background: var(--gold); }

.app-lead {
  color: #fff; text-align: center; font-weight: 700; font-size: .84rem;
  margin: 0 0 12px; position: relative; z-index: 2;
}

.app-card {
  background: #fff; border-radius: var(--radius); padding: 20px 16px;
  box-shadow: var(--shadow-md); position: relative; z-index: 2;
}
.app-emoji { font-size: 42px; text-align: center; line-height: 1; }
.app-arabic {
  font-family: var(--font-ar); font-size: 46px; font-weight: 700; color: var(--ink);
  text-align: center; margin: 6px 0 2px; line-height: 1.5;
}
.app-translit { color: var(--teal); font-weight: 800; font-size: 1.1rem; text-align: center; }
.app-card hr { margin: 14px 0 12px; }
.app-meaning { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 5px 0; }
.app-lang { color: var(--ink-soft); font-size: .66rem; font-weight: 700; width: 54px; text-align: right; }
.app-meaning strong { color: var(--ink); font-size: 1.02rem; font-weight: 800; }
.app-speaker { font-size: .78rem; }

.app-audio { display: flex; justify-content: center; gap: 16px; margin: 16px 0 14px; position: relative; z-index: 2; }
.audio-btn {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  font-size: 22px; box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
}
.audio-btn.teal { background: var(--teal); }
.audio-btn.moon { background: var(--moon); }

.app-next {
  background: var(--gold); color: #fff; text-align: center; font-weight: 800;
  padding: 13px; border-radius: 18px; position: relative; z-index: 2;
  box-shadow: 0 8px 18px rgba(246, 168, 33, .35);
}

.phone-badge {
  position: absolute; background: #fff; color: var(--ink);
  padding: 9px 15px; border-radius: var(--radius-pill);
  font-weight: 800; font-size: .78rem; box-shadow: var(--shadow-md);
  animation: float 5s ease-in-out infinite;
}
.badge-a { top: 14%; left: -34px; }
.badge-b { bottom: 16%; right: -30px; animation-delay: 1.6s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* --------------------------------------------------------------- stats ---- */

.stats { background: var(--deep-teal); color: #fff; padding: 26px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.stat-value { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; color: var(--gold-soft); line-height: 1.1; }
.stat-label { font-size: .82rem; color: rgba(255, 255, 255, .82); }

/* ------------------------------------------------------------ sections ---- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--soft-white); }
.section-dark {
  background: linear-gradient(165deg, var(--night), var(--night-deep));
  color: #fff; position: relative; overflow: hidden;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-lead { color: rgba(255, 255, 255, .8); }

.section-head { max-width: 44rem; margin: 0 auto clamp(32px, 5vw, 54px); text-align: center; }
.section-tag {
  display: inline-block; color: var(--teal); background: rgba(15, 107, 96, .1);
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
}
.section-dark .section-tag { color: var(--gold-soft); background: rgba(246, 168, 33, .16); }
.section-lead { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* ---------------------------------------------------------------- loop ---- */

.loop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.loop-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; position: relative; transition: transform .18s ease, box-shadow .18s ease;
}
.loop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.loop-step {
  position: absolute; top: 20px; right: 22px;
  font-size: .8rem; font-weight: 900; color: var(--line);
}
.loop-icon { font-size: 34px; line-height: 1; margin-bottom: 12px; }
.loop-card h3 { margin-bottom: 6px; }
.loop-card p { color: var(--ink-soft); font-size: .93rem; margin: 0; }

/* ------------------------------------------------------------ features ---- */

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius); padding: 24px 20px;
  transition: transform .18s ease, background .18s ease;
}
.feature-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .11); }
.feature-icon { font-size: 30px; line-height: 1; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.04rem; margin-bottom: 8px; }
.feature-card p { color: rgba(255, 255, 255, .76); font-size: .9rem; margin: 0; }

/* ---------------------------------------------------------- curriculum ---- */

.curriculum-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.curr-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.curr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.curr-emoji {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  font-size: 28px; background: rgba(15, 107, 96, .1); flex: none;
}
.curr-part { color: var(--gold); font-weight: 900; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.curr-card h3 { margin: 2px 0 2px; }
.curr-sub { color: var(--ink-soft); font-size: .86rem; }
.curr-count {
  display: inline-block; background: var(--soft-white); border: 1px solid var(--line);
  color: var(--teal); font-weight: 800; font-size: .78rem;
  padding: 5px 13px; border-radius: var(--radius-pill); margin-bottom: 14px;
}
.curr-card > p { color: var(--ink-soft); font-size: .95rem; }
.word-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.word-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--soft-white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 16px; min-width: 78px;
}
.word-chip .ar { font-family: var(--font-ar); font-size: 1.4rem; font-weight: 700; color: var(--ink); line-height: 1.5; }
.word-chip .en { font-size: .72rem; color: var(--ink-soft); font-weight: 700; }

/* --------------------------------------------------------------- split ---- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 62px); align-items: center; }
.split-rev .split-media { order: -1; }
.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .tick {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(30, 138, 99, .12); color: var(--green);
  display: grid; place-items: center; font-weight: 900; font-size: .78rem; margin-top: 2px;
}
.check-list strong { display: block; font-weight: 800; }
.check-list span.body { color: var(--ink-soft); font-size: .92rem; }

/* Parent dashboard mock */
.dash {
  background: #fff; border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.dash-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dash-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(15, 107, 96, .12);
  display: grid; place-items: center; font-size: 24px; flex: none;
}
.dash-head strong { display: block; font-size: 1rem; }
.dash-head span { color: var(--ink-soft); font-size: .8rem; }
.dash-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.dash-stat { background: var(--soft-white); border-radius: var(--radius-sm); padding: 12px 14px; }
.dash-stat b { display: block; font-size: 1.3rem; font-weight: 900; color: var(--ink); }
.dash-stat span { font-size: .74rem; color: var(--ink-soft); }
.dash-bars { display: flex; align-items: flex-end; gap: 7px; height: 92px; margin-bottom: 6px; }
.dash-bars i {
  flex: 1; background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-radius: 6px 6px 3px 3px; display: block;
}
.dash-days { display: flex; gap: 7px; }
.dash-days span { flex: 1; text-align: center; font-size: .68rem; color: var(--ink-soft); font-weight: 700; }

/* ---------------------------------------------------------- use cases ---- */

.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.uc-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.uc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(15, 107, 96, .3); }
.uc-emoji {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  font-size: 28px; background: linear-gradient(140deg, rgba(246, 168, 33, .18), rgba(15, 107, 96, .12));
  margin-bottom: 16px;
}
.uc-audience {
  color: var(--teal); font-weight: 900; font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px;
}
.uc-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.uc-card > p { color: var(--ink-soft); font-size: .93rem; }
.uc-points { list-style: none; padding: 16px 0 0; margin: auto 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.uc-points li { display: flex; gap: 9px; font-size: .86rem; color: var(--ink-soft); }
.uc-points li::before { content: "\2713"; color: var(--green); font-weight: 900; flex: none; }

/* ----------------------------------------------------------------- faq ---- */

.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 54px 20px 22px;
  font-weight: 800; position: relative; font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--teal); transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--ink-soft); font-size: .95rem; }
.faq-item .faq-body p { margin: 0; }

/* ----------------------------------------------------------------- cta ---- */

.cta { padding: clamp(48px, 7vw, 84px) 0; background: var(--soft-white); }
.cta-inner {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  background: linear-gradient(150deg, var(--green), var(--teal) 55%, var(--deep-teal));
  border-radius: 34px; padding: clamp(38px, 6vw, 68px) clamp(24px, 5vw, 60px);
  box-shadow: var(--shadow-lg);
}
.cta-inner h2 { color: #fff; }
.cta-inner > p { color: rgba(255, 255, 255, .88); max-width: 40em; margin: 0 auto 26px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta-fine { margin: 22px 0 0; font-size: .82rem; color: rgba(255, 255, 255, .72); }
.cta-stars { position: absolute; inset: 0; pointer-events: none; }
.cta-stars span { position: absolute; color: var(--gold-soft); opacity: .3; font-size: 22px; }
.cta-stars span::before { content: "\2738"; }
.cta-stars span:nth-child(1) { top: 16%; left: 8%; }
.cta-stars span:nth-child(2) { top: 68%; left: 14%; font-size: 15px; }
.cta-stars span:nth-child(3) { top: 22%; right: 10%; font-size: 18px; }
.cta-stars span:nth-child(4) { bottom: 14%; right: 16%; font-size: 26px; }

/* -------------------------------------------------------------- footer ---- */

.site-footer { background: var(--ink); color: rgba(255, 255, 255, .78); padding: 56px 0 26px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 2fr; gap: 40px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand strong { color: #fff; font-size: 1.1rem; font-weight: 900; display: block; margin-bottom: 6px; }
.footer-brand p { font-size: .88rem; margin: 0; max-width: 30em; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.footer-cols h3 { color: #fff; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.footer-cols a { display: block; color: rgba(255, 255, 255, .74); font-size: .9rem; margin-bottom: 9px; }
.footer-cols a:hover { color: var(--gold-soft); text-decoration: none; }

.footer-note {
  text-align: center; margin: 40px 0 26px; padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.ar-note { font-family: var(--font-ar); font-size: 1.5rem; color: var(--gold-soft); margin: 0 0 6px; line-height: 1.8; }
.ar-gloss { font-size: .82rem; margin: 0; color: rgba(255, 255, 255, .6); }

.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 30px; justify-content: space-between; font-size: .8rem; }
.footer-bottom p { margin: 0; }
.footer-bottom .muted { color: rgba(255, 255, 255, .5); max-width: 48em; }

/* ------------------------------------------------------------- legal ------ */

.legal-hero {
  background: linear-gradient(160deg, var(--teal), var(--deep-teal));
  color: #fff; padding: clamp(44px, 6vw, 72px) 0 clamp(38px, 5vw, 58px);
}
.legal-hero h1 { color: #fff; margin-bottom: 10px; }
.legal-hero p { color: rgba(255, 255, 255, .84); margin: 0; }
.legal-updated {
  display: inline-block; margin-top: 16px; background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22); padding: 7px 16px;
  border-radius: var(--radius-pill); font-size: .82rem; font-weight: 700;
}

.legal-layout { display: grid; grid-template-columns: 250px 1fr; gap: 48px; align-items: start; }
/* A grid item's automatic minimum size is min-content, so the wide data
   tables would stretch the column past the viewport and scroll the whole
   page sideways on a phone. Let the columns shrink; .table-scroll then
   scrolls the table inside itself, which is what it is there for. */
.legal-layout > * { min-width: 0; }
.legal-toc { position: sticky; top: 96px; }
.legal-toc h2 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.legal-toc a { display: block; font-size: .88rem; color: var(--ink-soft); padding: 6px 0; border-left: 2px solid var(--line); padding-left: 14px; }
.legal-toc a:hover { color: var(--teal); border-left-color: var(--teal); text-decoration: none; }

.legal-body { max-width: 46rem; }
.legal-body h2 { font-size: 1.4rem; margin-top: 44px; margin-bottom: 14px; scroll-margin-top: 96px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin-top: 26px; }
.legal-body p, .legal-body li { color: #33434f; font-size: .97rem; }
.legal-body ul { padding-left: 20px; }
.legal-body li { margin-bottom: 8px; }

.legal-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .9rem; }
.legal-body th, .legal-body td { text-align: left; padding: 12px 14px; border: 1px solid var(--line); vertical-align: top; }
.legal-body th { background: var(--soft-white); font-weight: 800; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.callout {
  background: var(--soft-white); border: 1px solid var(--line);
  border-left: 4px solid var(--teal); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 22px 0;
}
.callout.gold { border-left-color: var(--gold); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

/* ----------------------------------------------------------------- 404 ---- */

.notfound { text-align: center; padding: clamp(70px, 12vw, 130px) 0; }
.notfound .big { font-size: clamp(4rem, 14vw, 8rem); line-height: 1; margin-bottom: 10px; }
.notfound p { color: var(--ink-soft); max-width: 32em; margin: 0 auto 26px; }

/* --------------------------------------------------------- responsive ---- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions, .hero-points { justify-content: center; }
  .hero-media { margin-top: 34px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .loop-grid { grid-template-columns: repeat(2, 1fr); }
  .uc-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-layout { grid-template-columns: 1fr; gap: 26px; }
  .legal-toc { position: static; }
  .legal-toc a { display: inline-block; border-left: 0; border-bottom: 2px solid var(--line); padding: 6px 12px; margin: 0 6px 6px 0; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 22px 18px; box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { margin-top: 12px; border-bottom: 0; text-align: center; }
  .nav-toggle { display: flex; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .loop-grid, .feature-grid, .uc-grid, .curriculum-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-rev .split-media { order: 0; }
  .badge-a { left: -10px; }
  .badge-b { right: -6px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .site-header, .site-footer, .cta, .nav-toggle, .legal-toc { display: none !important; }
  body { color: #000; }
  .legal-layout { grid-template-columns: 1fr; }
}
