/* LeapCode — design tokens · Source of truth: Brand Guidelines v2 §8 (BG2) and Design DNA Blueprint · v1.0 (DNA) §2–§4. Every value below cites its source. Values marked · DERIVED are not in either document and were chosen to complete the · system; they are the first things to swap when KZ rules. · Colour budget (DNA C1/C3): Coral means exactly 2 things — an action you · can take, and the mark. Gold is a rule, never a heading (BG2 §8.1). */

:root {
  /* ---- Colour · house palette (BG2 §8.1) -------------------------------- */
  --c-coral:        #F65656;  /* Leap Red: the mark; primary button fill (Brand Manual v2) */
  --c-coral-2:      #FF2032;  /* Ignition: hover, gradient deep end       */
  --c-coral-deep:   #C83A3A;  /* Ember: text-safe red, links, white-text buttons (5.09:1) */
  --c-ignition:     #FF2032;  /* focus ring, gradient deep end            */
  --c-flame:        #FF9B93;  /* gradient light end, kickers on Ink       */
  --c-blush:        #FFF6F7;  /* soft content surface                     */
  --grad-ignition:  linear-gradient(135deg, #FF2032 0%, #F65656 55%, #FF9B93 100%);
  --c-ink:          #1A1A1A;  /* body text                                */
  --c-ink-2:        #1A1A1A;  /* heading ink = Ink (Brand Manual v2)      */
  --c-steel:        #6B7B82;  /* input borders, hairline-adjacent (3:1)   */
  --c-steel-deep:   #5E6D74;  /* secondary / muted text, kicker (DNA §4.1) */
  --c-gold:         #C8962C;  /* rules and edges only, never text         */
  --c-gold-deep:    #8E6A1D;  /* text-safe gold, kicker variant (DNA §4.1) */
  --c-risk:         #C00000;  /* warnings, unverified figures             */
  --c-warn:         #E07830;  /* early warning, decoration only           */
  --c-warn-deep:    #AD5519;  /* text-safe warn (DNA §4.1)                */
  --c-hairline:     #D9DEDE;  /* the house rule line                      */

  /* ---- Colour · the 4 grounds (DNA C4) — no 5th ------------------------- */
  --g-paper:        #FFFFFF;
  --g-surface:      #FFF6F7;  /* "Callout" in BG2 §8.1                    */
  --g-sunk:         #F7F8F8;  /* "Zebra" in BG2 §8.1                      */
  --g-mist:         #F7FAFC;  /* DNA §4.1; reserved for artefact panels   */
  --g-anchor:       #1A1A1A;  /* the 1 dark band (DNA C2)                 */
  --g-anchor-2:     #232323;  /* dark surface                             */
  --g-anchor-3:     #2C2C2C;  /* dark raised                              */

  /* ---- Colour · on the Anchor ground (DNA §4.1 "d" pairs) --------------- */
  --d-text:         #F2F4F4;
  --d-text-2:       #DDE2E3;
  --d-muted:        #A3B0B6;
  --d-coral:        #FF9B93;  /* links and focus on dark                  */
  --d-gold:         #D9A83F;
  --d-risk:         #F07A72;
  --d-warn:         #E89A57;
  --d-hairline:     #363636;

  /* ---- Colour · BSC LEAP accents — scorecard artefacts only (BG2 §8.1) -- */
  --a-legacy:         #1A6DAF;
  --a-evolution:      #CC4449;
  --a-evolution-deep: #BE3A3F;
  --a-abundance:      #11B890;
  --a-abundance-deep: #0B7C61;
  --a-process:        #3D3D4A;

  /* ---- Semantic aliases (what components consume) ----------------------- */
  --bg:             var(--g-paper);
  --bg-tint:        var(--g-surface);
  --bg-sunk:        var(--g-sunk);
  --fg:             var(--c-ink);
  --fg-heading:     var(--c-ink-2);
  --fg-muted:       var(--c-steel-deep);
  --line:           var(--c-hairline);
  --line-strong:    var(--c-steel);
  --link:           var(--c-coral-deep);
  --focus:          var(--c-ignition);
  --rule:           var(--c-gold);
  --action:         var(--c-coral);
  --action-fg:      var(--c-ink);      /* DNA Decision 1, recommended: mark coral + Ink label */
  --action-hover:   var(--c-coral-2);

  /* ---- Type (BG2 §8.2; DNA T1–T4) --------------------------------------- */
  /* Figtree headings, Inter body, both self-hosted (assets/fonts, brand.css). Web fallback stack is
     DERIVED (DNA Decision 5: Calibri is a desktop font). */
  --font-heading:   "Figtree", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-urdu:      "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;   /* BG2 §8.2 */
  --font-arabic:    "Cairo", "Zain", "Noto Naskh Arabic", serif;             /* BG2 T-34: BJ rules until KZ does */

  --w-regular:  400;
  --w-medium:   500;   /* Inter only */
  --w-semibold: 600;   /* kickers, buttons */
  --w-bold:     700;   /* H1, H2 — nothing at 800/900 (DNA T4) */

  /* Scale: H1 = 56–60px over 18px body at desktop (DNA T1, 3.0–3.4×).
     Body ≥ 16px; nothing anywhere below 14px (DNA §4 row 7). */
  --fs-body:    clamp(1rem, 0.94rem + 0.3vw, 1.125rem);      /* 16 → 18px */
  --fs-small:   0.875rem;                                    /* 14px — the floor */
  --fs-kicker:  0.875rem;
  --fs-h1:      clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);     /* 36 → 60px */
  --fs-h2:      clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);      /* 28 → 40px */
  --fs-h3:      clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);   /* 22 → 26px */
  --fs-h4:      1.25rem;                                     /* 20px */
  --fs-lead:    clamp(1.125rem, 1rem + 0.5vw, 1.375rem);     /* 18 → 22px */
  --fs-display: clamp(2.75rem, 1.5rem + 5vw, 5rem);          /* audited numerals only (DNA T5) */

  --lh-body:    1.6;    /* DNA §5.1 */
  --lh-tight:   1.1;
  --lh-heading: 1.15;
  --ls-kicker:  0.08em; /* DNA T2 */

  --measure:        68ch;   /* body 62–72ch (DNA T3); centred blocks ≤ 68ch (DNA §3.3) */
  --measure-wide:   72ch;

  /* ---- Space · 8px grid (DNA §5.2) -------------------------------------- */
  --s-1:  0.25rem;   /*  4px */
  --s-2:  0.5rem;    /*  8px */
  --s-3:  0.75rem;   /* 12px */
  --s-4:  1rem;      /* 16px */
  --s-5:  1.5rem;    /* 24px — grid gutter (DNA R5) */
  --s-6:  2rem;      /* 32px */
  --s-7:  3rem;      /* 48px */
  --s-8:  4rem;      /* 64px — header height (DNA A3) */
  --s-9:  6rem;      /* 96px — section padding, mobile (DNA R2) */
  --s-10: 10rem;     /* 160px — section padding, desktop (DNA R2) */

  --section-pad:    var(--s-9);
  --gutter:         var(--s-4);      /* ≥ 16px side gutter at every width (DNA §4 row 5) */
  --container:      75rem;           /* 1200px, 12-col (DNA R5) */
  --header-h:       var(--s-8);

  /* ---- Radius · border · shadow (DNA R6) -------------------------------- */
  --r-card:   8px;
  --r-ctl:    6px;   /* buttons, inputs */
  --r-max:    12px;  /* never above this */
  --r-pill:   999px; /* DERIVED: segmented control only */
  --bw:       1px;
  --shadow-raised: 0 1px 2px rgba(26, 26, 26, 0.06), 0 4px 12px rgba(26, 26, 26, 0.06); /* genuinely raised surfaces only */

  /* ---- Focus (DNA §4 row 3) -------------------------------------------- */
  --focus-w:      3px;
  --focus-offset: 2px;

  /* ---- Motion (DNA M1–M4) — settle, never launch ------------------------ */
  --ease-settle:  cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-settle:   240ms;
  --dur-fade:     200ms;   /* sticky-CTA fade (DNA A3) */
  --dur-hover:    120ms;   /* DERIVED: hover/focus colour change */
  --rise:         12px;

  /* ---- Tap targets (DNA §4 row 6) --------------------------------------- */
  --tap: 44px;

  color-scheme: light;
}

@media (min-width: 64em) {
  :root { --section-pad: var(--s-10); }
}

@media (min-width: 40em) {
  :root { --gutter: var(--s-5); }
}

/* Dark scheme — DERIVED as a page-wide mode. · The guidelines specify no site dark mode. The values themselves are NOT · derived: they are the DNA §4.1 "d" pairs, contrast-gated for the Anchor · band. Applying them page-wide when the OS asks for dark is the only · derivation here. Opt out per page with <html data-theme="light">. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:           var(--g-anchor);
    --bg-tint:      var(--g-anchor-2);
    --bg-sunk:      var(--g-anchor-3);
    --fg:           var(--d-text);
    --fg-heading:   var(--d-text);
    --fg-muted:     var(--d-muted);
    --line:         var(--d-hairline);
    --line-strong:  var(--d-muted);
    --link:         var(--d-coral);
    --focus:        var(--c-ignition);
    --rule:         var(--d-gold);
    --action:       var(--c-coral);
    --action-fg:    var(--g-anchor);   /* 5.09:1 (DNA §4.1) */
    --action-hover: var(--c-coral-2);
    --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:           var(--g-anchor);
  --bg-tint:      var(--g-anchor-2);
  --bg-sunk:      var(--g-anchor-3);
  --fg:           var(--d-text);
  --fg-heading:   var(--d-text);
  --fg-muted:     var(--d-muted);
  --line:         var(--d-hairline);
  --line-strong:  var(--d-muted);
  --link:         var(--d-coral);
  --focus:        var(--c-ignition);
  --rule:         var(--d-gold);
  --action:       var(--c-coral);
  --action-fg:    var(--g-anchor);
  --action-hover: var(--c-coral-2);
  --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ===== Wave 2e (1 Nov 2026): colour Option A, rebuilt from the Registry (W-32; wave2/colour/LR-15_Colour_Preview_v0.1.html). Registry wins (DR-21).
   Section pairs: -s soft ground, -d deep ground, -a accent, -as strong accent, -p pattern line. Tints are DERIVED from a Registry step (marked in the preview). ===== */
:root{
  --hero-s:#2A2939;--hero-d:#171625;--hero-a:#ECB4B1;--hero-as:#ECB4B1;--hero-p:#3D3C4C;--hero-fg:#F2F4F4;
  --problem-s:#FBF0EF;--problem-d:#F8E4E3;--problem-a:#A34243;--problem-as:#7A272A;--problem-p:#E8CAC9;
  --solution-s:#EBF6F2;--solution-d:#DBEFE7;--solution-a:#05785D;--solution-as:#015541;--solution-p:#B8DAD1;
  --proof-s:#EDF4FB;--proof-d:#DEECF9;--proof-a:#136AAC;--proof-as:#024A7E;--proof-p:#BDD6EA;
  --trust-s:#F5F3F0;--trust-d:#EDE9E4;--trust-a:#6E6558;--trust-as:#4F463B;--trust-p:#D7D4CF;
  --faq-s:#F3F3F7;--faq-d:#EBEBF2;--faq-a:#464657;--faq-as:#464657;--faq-p:#D4D4DB;
  /* Registry unit colours (via BSC LEAP lens) */
  --u-foundation:#CC4449;--u-revenue:#11B890;--u-delivery:#1A6DAF;--u-people:#CC4449;--u-technology:#3D3D4A;--u-compliance:#3D3D4A;
  --rule-line:#EEF1F1; /* DR-19.5 */
}
