/* ===========================================================================
   Aratus Academy — design tokens
   Loaded first. No @import: tokens, base, layout, components, pages are linked
   separately in that order. Dark theme only; there is no light variant.
   Palette rows marked (contract) are fixed by CONTRACT.md section 8.
   =========================================================================== */

:root {
  color-scheme: dark;

  /* ---- palette (contract) ------------------------------------------------ */
  --bg: #421018;                /* page ground */
  --surface: #511a23;           /* cards, raised panels */
  --ink: #fbf4e9;               /* primary text */
  --muted: #e7cbc6;             /* secondary text */
  --gold: #dfb449;              /* primary accent */
  --gold-2: #f4dd9a;            /* display figures, highlights */

  /* ---- supporting palette ----------------------------------------------- */
  --bg-2: #2f0a10;              /* footer, rails, inset wells */
  --bg-3: #380f16;              /* media placeholders */
  --surface-2: #5e212b;         /* raised-on-raised, chips, track */
  --surface-3: #6b2934;         /* hover of surface-2 */
  --dim: #cca4a7;               /* tertiary text, timestamps */
  --gold-deep: #a57b27;         /* pressed gold, borders on gold fills */
  --gold-soft: rgba(223, 180, 73, 0.12);
  --ink-on-gold: #2f0a10;       /* text on a gold fill */
  --line: rgba(244, 221, 154, 0.12);
  --line-strong: rgba(244, 221, 154, 0.28);
  --overlay: rgba(66, 16, 24, 0.72);
  --scrim: rgba(66, 16, 24, 0.86);

  /* ---- status colours ---------------------------------------------------- */
  --success: #a9c88f;
  --success-bg: rgba(169, 200, 143, 0.12);
  --success-line: rgba(169, 200, 143, 0.36);
  --danger: #f49b90;
  --danger-bg: rgba(244, 155, 144, 0.12);
  --danger-line: rgba(244, 155, 144, 0.36);
  --warning: #e9b76a;
  --warning-bg: rgba(233, 183, 106, 0.12);
  --warning-line: rgba(233, 183, 106, 0.36);
  --info: #9cc0dc;
  --info-bg: rgba(156, 192, 220, 0.12);
  --info-line: rgba(156, 192, 220, 0.36);

  /* ---- type (contract) --------------------------------------------------- */
  --font-serif: "Fraunces", "Noto Naskh Arabic", Georgia, serif;
  --font-sans: "Outfit", "Noto Naskh Arabic", system-ui, sans-serif;

  /* Type metrics live in tokens so the Kurdish block below can retune the
     whole document by overriding four values rather than hunting selectors. */
  --fs-base: 16px;
  --lh-base: 1.62;
  --lh-head: 1.12;
  --tracking-body: 0.01em;
  --tracking-head: -0.03em;
  --tracking-eyebrow: 0.22em;   /* section kickers */
  --tracking-micro: 0.14em;     /* badges, table heads */
  --case-eyebrow: uppercase;    /* becomes none for Naskh */
  --fs-eyebrow: 0.72rem;

  /* ---- spacing scale ----------------------------------------------------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 56px;
  --sp-10: 72px;
  --sp-11: 96px;
  --sp-12: 128px;

  --gutter: 16px;               /* page side gutter, grows with viewport */
  --section-y: 56px;            /* vertical rhythm of a .section */

  /* ---- container widths -------------------------------------------------- */
  --max: 1180px;                /* standard page measure */
  --max-wide: 1360px;           /* player, full-bleed dashboards */
  --max-narrow: 760px;          /* legal, article body */
  --max-prose: 42rem;           /* readable paragraph measure */
  --max-form: 480px;            /* auth cards */
  --rail-w: 320px;              /* lesson rail */

  /* ---- sizing ------------------------------------------------------------ */
  --header-h: 64px;
  --tap: 44px;                  /* minimum touch target, never go below */
  --control-h: 48px;            /* buttons, inputs */

  /* ---- radii ------------------------------------------------------------- */
  --radius: 20px;
  --radius-lg: 28px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* ---- shadows ----------------------------------------------------------- */
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-gold: 0 8px 24px rgba(223, 180, 73, 0.24);

  /* ---- motion ------------------------------------------------------------ */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.18s;
  --dur: 0.28s;
  --dur-slow: 0.45s;

  /* ---- z-index layers ---------------------------------------------------- */
  --z-base: 0;
  --z-grain: 1;
  --z-raised: 10;
  --z-sticky: 30;
  --z-header: 40;
  --z-nav: 45;
  --z-overlay: 50;
  --z-toast: 60;
  --z-modal: 70;
}

/* ---------------------------------------------------------------------------
   Kurdish (Sorani) typography. Noto Naskh Arabic leads both stacks, the base
   size goes up ~6% and the line height opens to 1.9 so stacked Naskh marks do
   not collide. Letter-spacing and uppercasing are switched off entirely —
   neither is meaningful in Arabic script.
   --------------------------------------------------------------------------- */
[lang="ckb"] {
  --font-serif: "Noto Naskh Arabic", "Fraunces", Georgia, serif;
  --font-sans: "Noto Naskh Arabic", "Outfit", system-ui, sans-serif;
  --fs-base: 17px;              /* 16 x 1.0625 */
  --lh-base: 1.9;
  --lh-head: 1.45;
  --tracking-body: 0;
  --tracking-head: 0;
  --tracking-eyebrow: 0.04em;
  --tracking-micro: 0;
  --case-eyebrow: none;
  --fs-eyebrow: 0.9rem;
}

@media (min-width: 600px) {
  :root {
    --fs-base: 16.5px;
    --gutter: 20px;
    --section-y: 72px;
  }
  [lang="ckb"] {
    --fs-base: 17.5px;          /* 16.5 x 1.06 */
  }
}

@media (min-width: 900px) {
  :root {
    --gutter: 24px;
    --section-y: 96px;
    --header-h: 78px;
  }
}

@media (min-width: 1200px) {
  :root {
    --rail-w: 340px;
  }
}
