/*
 * Shared self-hosted font-face declarations for every WordPress-side
 * surface that needs the Journal's typography (the Contact pages —
 * journal-contact.css — and the WP+SWELL Journal templates themselves —
 * docker/wordpress/theme-local/swell_child/jp-extra/{page,single}-journal-
 * preview.php). One file, `@import`ed everywhere it's needed, so there is
 * exactly one place that lists which weights are self-hosted.
 *
 * Files come from `fonts/` (this directory), which is the SAME
 * figma/src/fonts/ tree the React Journal's Vite build bundles — see that
 * directory's own fonts.css for the full provenance/license note
 * (SIL OFL 1.1, @fontsource packages, vendored, no Google Fonts requests).
 * Noto Serif/Sans JP's per-chunk unicode-range data (the real @fontsource
 * output, not hand-picked) is used as-is — see each family's own 400.css/
 * 500.css/600.css under fonts/.
 *
 * 2026-10-19: weight 700 is NOT loaded for either family. Every jp-extra
 * template and journal-contact.css were grepped for font-weight usage on
 * var(--jp-font-display)/--jp-font-article/--jp-font-sans (the only rules
 * that resolve to these families under html:lang(ja)) — none specify 700.
 * Confirmed live over two full /journal/ page loads (cold + warm): zero
 * noto-*-700 woff2 subset requests. Weight 500 headings already render at
 * the nearest available weight, 400, exactly as before.
 *
 * 2026-10-19 (follow-up): noto-serif-jp/400.css and noto-sans-jp/400,500,
 * 600.css used to be `@import`ed from here. Measured waterfall showed the
 * browser must fully fetch+parse THIS file before it can even discover
 * those nested @import URLs, so they only started ~170-250ms after every
 * other stylesheet (main.css, blocks.css, etc. — all of which get
 * discovered immediately from the HTML's own <link> tags). Each of the 4
 * jp-extra templates that <link>s this file now ALSO <link>s those 4
 * manifests directly, right next to it — so the browser discovers all of
 * them in the same first wave as every other stylesheet, instead of one
 * CSS-parse round-trip later. No weight/unicode-range/file changed, and
 * the @font-face rules land in the cascade exactly as before (plain
 * additive font-face registrations — load order doesn't affect which
 * glyphs resolve to which family).
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/inter/files/inter-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/inter/files/inter-latin-500-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/inter/files/inter-latin-600-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/inter/files/inter-latin-700-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/playfair-display/files/playfair-display-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/playfair-display/files/playfair-display-latin-500-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/playfair-display/files/playfair-display-latin-600-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/playfair-display/files/playfair-display-latin-700-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(fonts/merriweather/files/merriweather-latin-300-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/merriweather/files/merriweather-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/merriweather/files/merriweather-latin-400-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/merriweather/files/merriweather-latin-700-normal.woff2) format('woff2');
}

/*
 * Three font roles, language-automatic — same scheme as figma/src/
 * index.css (the React Journal), so both rendering paths look identical
 * once WordPress starts generating the Journal's HTML:
 *   --jp-font-display : titles, H1-H6, section headings
 *   --jp-font-article : running body copy — paragraphs/lists/quotes
 *   --jp-font-sans     : UI chrome — nav, buttons, search/inputs, labels
 * `:lang(ja)` (matched against <html lang>, which WordPress already sets
 * per Polylang page) overrides all three for Japanese pages. Japanese
 * headings deliberately do not list Inter first (unlike body/UI): any
 * alphanumerics inside a JA heading render in Noto Serif JP's own Latin
 * glyphs so they stay visually consistent with the surrounding mincho.
 */
:root {
  --jp-font-display: 'Playfair Display', Georgia, serif;
  --jp-font-article: 'Merriweather', Georgia, serif;
  --jp-font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
}
html:lang(ja) {
  --jp-font-display: 'Noto Serif JP', serif;
  --jp-font-article: 'Inter', 'Noto Sans JP', sans-serif;
  --jp-font-sans: 'Inter', 'Noto Sans JP', sans-serif;
}
