/* Non-Latin script fonts. Loaded *after* styles.css and only on non-Latin
   locales (ja, ko, zh-Hans, ru), so it can override --font-display/--font-body
   for those scripts without touching the Latin pages.

   Strategy: prefer a self-hosted, subsetted Noto when present, then fall back to
   the high-quality system CJK/Cyrillic faces (PingFang, Hiragino, Apple SD
   Gothic, Yu Gothic, Malgun, etc.). The fallback alone already renders cleanly
   on Apple and Windows; the @font-face blocks below light up automatically once
   scripts/build_landing.py drops the subsetted woff2 files next to this file.
   Until then they are intentionally absent so no page makes a 404 request. */

/* Cyrillic (ru): the existing -apple-system / Georgia stack already covers it,
   so we only need to make sure the body var keeps those fallbacks. */
[lang="ru"] {
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
}

/* Japanese */
[lang="ja"] {
  --font-display: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Yu Gothic", "Yu Gothic Medium", Meiryo, var(--font-display);
  --font-body: "Noto Sans JP", -apple-system, BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo,
    "Hanken Grotesk", sans-serif;
}

/* Korean */
[lang="ko"] {
  --font-display: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
    "Nanum Gothic", var(--font-display);
  --font-body: "Noto Sans KR", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Nanum Gothic", "Hanken Grotesk",
    sans-serif;
}

/* Simplified Chinese */
[lang="zh-Hans"] {
  --font-display: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", var(--font-display);
  --font-body: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    "Hanken Grotesk", sans-serif;
}

/* CJK reads a touch more comfortably with slightly looser lines and normal
   (non-italic) emphasis, since synthetic italics look poor on these faces. */
[lang="ja"] :is(p, li),
[lang="ko"] :is(p, li),
[lang="zh-Hans"] :is(p, li) {
  line-height: 1.75;
}
[lang="ja"] em,
[lang="ko"] em,
[lang="zh-Hans"] em {
  font-style: normal;
  font-weight: 600;
}
