/* ============================================================
   fonts-i18n.css - per-locale type overrides for the landing site.

   WHY THIS FILE EXISTS: theme.css resolves the four type tokens to
   Black Han Sans / Cinzel / Rajdhani / JetBrains Mono, and their script
   coverage is NOT uniform. Only JetBrains Mono carries Cyrillic, none
   carries Thai, and Black Han Sans is Latin-BASIC so Turkish loses
   g-breve, s-cedilla and dotted-capital-I from every display heading.
   A locale whose glyphs are missing renders tofu or silently falls back to
   whatever the OS picks, and NO string-level check can see either: the
   translation is correct, the artifact is complete, every coverage metric
   reads 100%, and the page looks broken.

   So each affected locale re-points the tokens at a family that actually
   covers its script. The stylesheet is injected by landing/i18n.js (which
   loads on every localized page) and baked statically into landing/<seg>/.
   Locales whose script the shipped stack already covers (id, and Turkish
   for everything except the display token) declare no extra font file in
   scripts/lib/landingLocales.js and are handled by the overrides here alone.

   Guard: scripts/verify-landing-l10n.js (every shipping locale has a rule
   here, and the families it names are the ones its fontHref loads).
   ============================================================ */

/* --- Traditional Chinese ------------------------------------
   Noto TC covers Han; the serif carries the regal wordmark weight Cinzel
   gives Latin. Loaded via the NOTO_TC stylesheet. */
html[lang="zh-Hant"] {
  --font-display: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --font-brand:   'Noto Serif TC', 'PingFang TC', 'Microsoft JhengHei', serif;
  --font-chrome:  'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --font-body:    'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

/* --- Russian (Cyrillic) -------------------------------------
   Oswald is the closest Cyrillic-covering match to the condensed
   display/chrome voice; PT Serif carries the brand serif. JetBrains Mono
   already covers Cyrillic, so --font-mono is deliberately untouched. */
html[lang="ru"] {
  --font-display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --font-brand:   'PT Serif', 'Times New Roman', serif;
  --font-chrome:  'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Noto Sans', -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* --- Thai ---------------------------------------------------
   Nothing in the shipped stack has Thai, including the mono token, so all
   four are re-pointed. Thai glyphs carry stacked marks above and below the
   baseline: the extra line-height is not cosmetic, without it the tone
   marks of one line collide with the vowels of the next. */
html[lang="th"] {
  --font-display: 'Noto Sans Thai', 'Leelawadee UI', 'Thonburi', sans-serif;
  --font-brand:   'Noto Serif Thai', 'Leelawadee UI', 'Thonburi', serif;
  --font-chrome:  'Noto Sans Thai', 'Leelawadee UI', 'Thonburi', sans-serif;
  --font-body:    'Noto Sans Thai', 'Leelawadee UI', 'Thonburi', sans-serif;
  --font-mono:    'Noto Sans Thai', ui-monospace, Consolas, monospace;
}
html[lang="th"] body { line-height: 1.75; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { line-height: 1.45; }

/* --- Turkish (Latin Extended-A) -----------------------------
   Cinzel, Rajdhani and JetBrains Mono all ship latin-ext, so brand, chrome
   and mono are already correct. Black Han Sans does NOT, so the display
   token alone is re-pointed at Rajdhani rather than loading a new family.
   That is why tr declares no fontHref: the fix is a substitution, not a
   download. */
html[lang="tr"] {
  --font-display: 'Rajdhani', 'Arial Narrow', Impact, sans-serif;
}

/* --- Indonesian ---------------------------------------------
   Pure Latin-basic. No override needed; the rule is present so the guard's
   "every shipping locale is represented" check is satisfied by a DELIBERATE
   no-op rather than by an omission that looks identical. */
html[lang="id"] {
  --font-display: 'Black Han Sans', 'Arial Black', Impact, sans-serif;
}
