/* Typography for the languages the Latin webfonts cannot set.
   ---------------------------------------------------------------------------
   Loaded only when the page is not in English, so an English visit pays
   nothing for it.

   The measurement this file exists because of: fonts/open-sans-400.woff2 and
   fonts/montserrat-700.woff2 carry 232 codepoints each and cover Latin only.
   No Cyrillic, no Hangul, no kana, no ideographs.

   Without unicode-range in style.css, the browser applied those faces to the
   Latin characters in a line and fell back per glyph for the rest, so a single
   line could be set in two typefaces at two optical weights. That reads as a
   design fault rather than a missing font, which is why it would have shipped
   unnoticed. The range is declared there; the replacements are here.

   No CJK webfont is shipped. A subsetted Noto Sans KR is 1-4 MB, and
   subsetting it per page needs a build step this site does not have. Every
   platform these readers are on has a good CJK UI font already. */


/* --- Families -------------------------------------------------------------
   Two tokens, redefined per language. Everything else in style.css already
   reads them, so nothing below needs to name a selector twice.

   Ordered OS-first rather than Noto-first: the platform font is the one
   already on disk, so it paints immediately and matches what the reader sees
   in the rest of their system. Noto is the fallback for Linux and for anything
   that ships neither. */

.lang-ko{
  --font-body: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Nanum Gothic', system-ui, sans-serif;
  --font-head: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Nanum Gothic', system-ui, sans-serif;
  --font-ui:   'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Nanum Gothic', system-ui, sans-serif;
}

.lang-ja{
  --font-body: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans JP', Meiryo, system-ui, sans-serif;
  --font-head: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans JP', Meiryo, system-ui, sans-serif;
  --font-ui:   'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans JP', Meiryo, system-ui, sans-serif;
}

.lang-zh{
  --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --font-head: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --font-ui:   'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
}

/* Russian keeps the system stack rather than a webfont. The Latin faces have
   no Cyrillic to offer, and every platform sets Cyrillic well. Shipping a
   Cyrillic subset of Open Sans and Montserrat would hold the design closer and
   costs about 10 KB a face; it is worth doing if the Russian pages earn it. */
.lang-ru{
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-head: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-ui:   system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}


/* --- CJK text sizing and leading ------------------------------------------
   A CJK glyph fills its em box, where a lowercase Latin letter fills about
   half of it. The same line-height that looks airy in English looks cramped in
   Korean, and at 15px the characters are simply small. */

.lang-ko body,
.lang-ja body,
.lang-zh body{
  font-size: 16px;
  line-height: 1.9;
}

.lang-ko h1, .lang-ja h1, .lang-zh h1,
.lang-ko h2, .lang-ja h2, .lang-zh h2,
.lang-ko .masthead h1, .lang-ja .masthead h1, .lang-zh .masthead h1,
.lang-ko .page-head h1, .lang-ja .page-head h1, .lang-zh .page-head h1,
.lang-ko .section-title, .lang-ja .section-title, .lang-zh .section-title,
.lang-ko .banner-title, .lang-ja .banner-title, .lang-zh .banner-title{
  line-height: 1.45;
}

/* square.css sets 1.05 here, which is tight enough to clip a CJK glyph. */
.lang-ko .sq-meta dd,
.lang-ja .sq-meta dd,
.lang-zh .sq-meta dd{
  line-height: 1.25;
}


/* --- Letter-spacing and uppercase ----------------------------------------
   These two travel together through the theme, on buttons, eyebrows, table
   headers and card labels.

   `letter-spacing` on CJK inserts a gap between every ideograph, which reads
   as broken spacing rather than as tracking. `text-transform: uppercase` does
   nothing to CJK, so it is only removed here for tidiness — but it is left
   alone for Russian, where it works and is wanted. */

.lang-ko .btn, .lang-ja .btn, .lang-zh .btn,
.lang-ko .sq-eyebrow, .lang-ja .sq-eyebrow, .lang-zh .sq-eyebrow,
.lang-ko .place-card-tax, .lang-ja .place-card-tax, .lang-zh .place-card-tax,
.lang-ko .place-facts dt, .lang-ja .place-facts dt, .lang-zh .place-facts dt,
.lang-ko .place-distances thead th, .lang-ja .place-distances thead th, .lang-zh .place-distances thead th,
.lang-ko .place-quote footer, .lang-ja .place-quote footer, .lang-zh .place-quote footer,
.lang-ko .sq-meta dt, .lang-ja .sq-meta dt, .lang-zh .sq-meta dt,
.lang-ko .sq-side, .lang-ja .sq-side, .lang-zh .sq-side,
.lang-ko .sq-3d-label, .lang-ja .sq-3d-label, .lang-zh .sq-3d-label,
.lang-ko .page-head-pill, .lang-ja .page-head-pill, .lang-zh .page-head-pill{
  letter-spacing: 0;
  text-transform: none;
}

/* Russian keeps its capitals, but loses the tracking: Cyrillic uppercase is
   already about 15% wider than the Latin it was spaced for. */
.lang-ru .btn,
.lang-ru .sq-eyebrow,
.lang-ru .place-card-tax,
.lang-ru .place-facts dt,
.lang-ru .place-distances thead th,
.lang-ru .sq-meta dt,
.lang-ru .page-head-pill{
  letter-spacing: 0;
}


/* --- Line breaking --------------------------------------------------------
   Korean breaks at spaces the way Latin does. The CSS default breaks it
   anywhere, mid-word, which a Korean reader reads as an error.

   Japanese and Chinese break anywhere by design, but not before a small kana,
   a prolonged sound mark, or a closing bracket. `line-break: strict` is what
   forbids that. */

.lang-ko{
  word-break: keep-all;
  overflow-wrap: break-word;
}

.lang-ja,
.lang-zh{
  line-break: strict;
}


/* --- Punctuation ---------------------------------------------------------
   The stacked distance table repeats its column header before each cell via
   a generated ": ". CJK uses a full-width colon and no trailing space. */

@media (max-width: 767px){
  .lang-ko .place-distances td:before,
  .lang-ja .place-distances td:before,
  .lang-zh .place-distances td:before{
    content: attr(data-label) "：";
  }
}
