/* ==========================================================================
   Simplified Chinese overrides
   Loaded only by public/chinese/*.html, after the page stylesheet.

   Fraunces and Inter carry no CJK glyphs, so Chinese text would otherwise
   fall through to whatever the OS picks — usually a mismatched, poorly
   hinted face. Noto Sans SC is loaded ahead of the local fallbacks, and the
   Latin faces are kept in front of it so numerals, phone numbers and the
   English brand name still render in the site's own type.
   ========================================================================== */

:root {
  /* Latin first, then CJK: mixed runs like "15+ 年" keep both correct. */
  --font-display: "Fraunces", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;

  /* Negative tracking is tuned for Latin display type and makes CJK look
     cramped; Han characters already carry their own side bearings. */
  --tracking-display: 0;
  --tracking-tight: 0;
  /* Wide letter-spacing does not apply to Han — keep eyebrows readable. */
  --tracking-caps: 0.08em;
  --tracking-wide: 0.04em;

  /* CJK needs more leading than Latin at the same size to stay comfortable. */
  --lh-tight: 1.3;
  --lh-snug: 1.45;
  --lh-normal: 1.75;
  --lh-relaxed: 1.9;
}

/* Han characters have a larger visual mass than Latin at the same px size, so
   the largest display sizes are pulled back a little. */
h1 {
  font-size: clamp(2rem, 1.55rem + 2vw, 3.25rem);
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.25rem, 1.7rem + 2.6vw, 3.75rem);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.625rem, 1.4rem + 1.1vw, 2.375rem);
  font-weight: 700;
}

/* `text-wrap: balance` breaks Chinese lines at odd places because there are no
   spaces to balance around; normal wrapping reads better. */
h1,
h2,
h3,
h4 {
  text-wrap: normal;
}

/* Do not break a line in the middle of a word/number run. */
p,
li {
  line-break: strict;
  overflow-wrap: break-word;
}

/* The stat values stay Latin (15+, 6, 19, 2) — keep their tight display feel. */
.stat__value,
.agent-detail__stats strong {
  letter-spacing: -0.02em;
}

/* Uppercase transforms do nothing to Han but do affect any Latin mixed in;
   the eyebrow keeps its role without shouting. */
.eyebrow,
.footer-col__title,
.info-card__title,
.agent-detail__group h3 {
  font-weight: 700;
}

/* The A–Z rail and licence numbers stay Latin — pin them to the Latin stack so
   they are not substituted by a CJK face with different digit widths. */
.letter-rail__btn,
.agent-card__license,
.agent-detail__license,
.agent-card__action,
.hours-list__row dd,
.btn--phone {
  font-family: "Inter", system-ui, sans-serif;
}
