/* ==========================================================================
   Japanese edition — set to its own standard, not as translated English.
   Noto Sans JP is self-hosted, subset to the Japanese glyphs the page and
   its scripts use, and shipped as WOFF2 (regenerate with
   tools/build_fonts.py whenever the Japanese copy changes).
   ========================================================================== */
/* Japanese script only. The unicode-range keeps Latin text in DM Sans and
   means the browser fetches this face only when Japanese characters are on
   the page. The English page never links this stylesheet at all. */
@font-face {
  font-family: "Noto Sans JP";
  src: url("noto-sans-jp-400.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+3000-30FF, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF;
}
@font-face {
  font-family: "Noto Sans JP";
  src: url("noto-sans-jp-700.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+3000-30FF, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF;
}

html[lang="ja"] {
  /* kana and kanji need the bold cut to carry a headline */
  --w-display: 700;
  /* Latin stays in DM Sans; kana and kanji in Noto Sans JP */
  --font: "DM Sans", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-display: "DM Sans", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  /* Japanese headlines are set smaller and looser than Latin display type */
  --fs-display: clamp(2.125rem, 1rem + 4vw, 4.75rem);
  --fs-h2: clamp(1.625rem, 1rem + 2.2vw, 3rem);
  --fs-statement: clamp(1.5rem, .95rem + 2vw, 2.75rem);
  --fs-lead: clamp(1.0625rem, 1rem + .35vw, 1.3125rem);
}

html[lang="ja"] body {
  line-height: 1.85;
  letter-spacing: .02em;
  word-break: normal;
  line-break: strict;          /* 禁則処理 */
  overflow-wrap: break-word;   /* a Latin word is never broken mid-word */
}
html[lang="ja"] :is(h1, h2, h3, .hero__title, .section-head__title, .trust__title, .briefing__title,
  .statement, .trust__closing, .signature__line, .cine__lead, .howto__label, .howto__step h3, .pillar h3, .trust__motif figcaption) {
  line-height: 1.32;
  letter-spacing: .01em;
  font-feature-settings: "palt" 1;
  /* headlines break at phrase boundaries where the browser can find them
     (auto-phrase), and never put a 句読点 at the start of a line */
  word-break: normal;
  word-break: auto-phrase;
  line-break: strict;
  overflow-wrap: normal;
}
html[lang="ja"] .hero__title { line-height: 1.18; letter-spacing: -.005em; max-width: 13em; }
html[lang="ja"] .section-head__title,
html[lang="ja"] .trust__title { letter-spacing: 0; }
html[lang="ja"] .cine__lead { line-height: 1.3; }
html[lang="ja"] .section-head__lead,
html[lang="ja"] .hero__category,
html[lang="ja"] .hero__thesis,
html[lang="ja"] .trust__lead,
html[lang="ja"] .briefing__lead { line-height: 1.75; }
html[lang="ja"] .pillar p { line-height: 1.8; }
html[lang="ja"] a { text-underline-position: under; }
html[lang="ja"] .howto__step p { line-height: 1.8; }
html[lang="ja"] .chapter__name { font-size: .875rem; }
html[lang="ja"] .lang-toggle { font-family: "DM Sans", sans-serif; letter-spacing: 0; }
@media (max-width: 719px) {
  html[lang="ja"] .hero__title { font-size: clamp(1.875rem, 1.2rem + 3.6vw, 2.375rem); }
  html[lang="ja"] .section-head__title, html[lang="ja"] .trust__title, html[lang="ja"] .briefing__title { font-size: clamp(1.5rem, 1.1rem + 2vw, 1.875rem); }
}

/* short Japanese text breaks at phrase boundaries too: labels, lists, captions */
html[lang="ja"] :is(.hero__category, .briefing__covers li, .briefing__steps li, .briefing__lead, .briefing__for,
  .howto__step h3, .chapter__name, .pillar p, .trust__motif figcaption, .assurance li, .exhibit__caption,
  .instrument__hint, .field label, .office__title, .triad__item) {
  word-break: auto-phrase;
}
/* the briefing headline sits in a five-column measure: set it to fit */
@media (min-width: 1000px) {
  html[lang="ja"] .briefing__title { font-size: clamp(1.75rem, 1rem + 1.4vw, 2.5rem); }
}
