/* ============================================================
   Start Right Up — design tokens
   Single source of truth for colour, type and rhythm.
   The reasoning behind every value lives in internal-spec.md §3 and §8.
   Do not restate it here; change it there first.
   ============================================================ */

:root{
  /* Structure */
  --navy:#022E64;          /* signed brand navy */
  --navy-deep:#03204A;     /* hero gradient floor */
  --navy-lift:#0A3A78;     /* navy button hover */

  /* Action — the calm blue. Carries every interactive element. */
  --action:#2C6DB5;
  --action-hover:#22568F;

  /* Emphasis */
  --accent:#A11C18;        /* section headings. Deepened red, AA on white and mist */
  --signal:#CD0402;        /* signed logo red. Map pin and journey trail only */

  /* Neutrals */
  --white:#fff;
  --ink:#0E1B2E;
  --muted:#54607A;
  --line:#C7CDD8;
  --line-soft:#E7EBF1;
  --mist:#F4F6F9;
  --on-navy-muted:#AEBED6;
  --cell-us:#F3F7FF;
  --tick:#0B7A3B;

  /* Type — IBM Plex programme, all three scripts (internal-spec.md §3) */
  --font:"IBM Plex Sans","IBM Plex Sans Thai",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --size-body:1.0625rem;   /* 17px, not 16 — Thai stacks four levels */
  --lh-body:1.6;           /* Latin. Overridden per script below. */
  --lh-tight:1.05;

  /* Type roles. Named for the job, not the value: the call site asks for a
     role and the scale decides the size. Before this there were six sizes
     between .86rem and 1.02rem doing five different jobs, which is why the
     page read as flat — nothing was separated enough to rank. */
  --fs-display:clamp(2.9rem,1.5rem + 5.2vw,5.2rem);
  --fs-h1:clamp(2.3rem,1.4rem + 3.2vw,3.6rem);
  --fs-h2:clamp(1.9rem,1.2rem + 2.2vw,2.6rem);
  --fs-h3:1.3rem;
  --fs-lead:1.1875rem;     /* section intros and hero sub-copy */
  --fs-body:1.0625rem;     /* running prose */
  --fs-sm:.9375rem;        /* card and table copy */
  --fs-ctrl:.9rem;         /* buttons and menu items — a control is not prose */
  --fs-xs:.8125rem;        /* nav links, hints */
  --fs-label:.75rem;       /* uppercase metadata */

  /* Weight roles. The gap that carries hierarchy is 300 against 700; the
     middle steps are for controls, not for prose. */
  --fw-light:300;
  --fw-body:400;
  --fw-med:500;
  --fw-semi:600;
  --fw-bold:700;

  /* Rhythm */
  --wrap:1160px;
  --wrap-nav:1340px;
  --gutter:1.6rem;

  /* Depth */
  --sh-1:0 2px 10px rgba(2,46,100,.06);
  --sh-2:0 14px 34px rgba(2,46,100,.12),0 3px 8px rgba(2,46,100,.06);
  --sh-3:0 30px 70px rgba(3,20,45,.28);
  --ease:cubic-bezier(.16,1,.3,1);
}

/* Per-script line height. One rule set, three scripts — the stylesheet is
   byte-identical across all 45 addresses; only the html lang attribute differs. */
/* Headings too (12/10): Thai stacks vowels and tone marks above and below the line, so the
   Latin 1.05 made lines collide; Chinese needs a little air as well. */
html[lang|="th"]{
  --lh-body:1.85;
  --lh-tight:1.38;
  --font:"IBM Plex Sans Thai","IBM Plex Sans",system-ui,sans-serif;
}
html[lang|="zh"]{
  --lh-body:1.75;
  --lh-tight:1.28;
  --font:"IBM Plex Sans SC","IBM Plex Sans",system-ui,sans-serif;
}
/* CJK takes no synthetic italic and no negative tracking — both look broken. */
html[lang|="zh"] h1,html[lang|="zh"] h2,html[lang|="zh"] h3{letter-spacing:0}
html[lang|="zh"] i,html[lang|="zh"] em{font-style:normal;font-weight:600}
/* Plex Sans Thai ships no italic either. Left alone the browser shears the
   upright, which throws the above-vowels and tone marks off their stems.
   Emphasis in Thai is weight, the same answer as Chinese. */
html[lang|="th"] i,html[lang|="th"] em{font-style:normal;font-weight:600}
/* Thai takes no negative tracking (it pulls the marks into the next letter) and every tight
   label gets the room its marks need. */
html[lang|="th"] h1,html[lang|="th"] h2,html[lang|="th"] h3{letter-spacing:0}
html[lang|="th"] :is(h3,.jump__tx,.ti__tx,.mile__h,.mcard__h,.road__when,.xp__n,.seg__b,.pull,.person__ph,.founder__ph){line-height:1.5}
html[lang|="zh"] :is(h3,.jump__tx,.ti__tx,.mile__h,.mcard__h,.road__when,.xp__n,.seg__b){line-height:1.4}
