/**
 * Shirube Typography Configuration (shirube.fyi)
 *
 * System Architecture:
 * - H1, H2, Major Headings, Hero Catchphrases:
 *     Latin: Newsreader (editorial serif)
 *     Japanese: Noto Serif JP (weights 500, 600, 700, 900)
 * - Body, Navigation, Buttons, Badges, Tags, Numbers, H3+:
 *     Latin: Plus Jakarta Sans
 *     Japanese: Noto Sans JP (weights 400, 500, 600, 700)
 * - Code & Monospace:
 *     ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace
 *
 * Note: Newsreader is strictly paired with Noto Serif JP so that Japanese glyphs
 * cleanly render in Noto Serif JP without falling back to random system fonts.
 */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400..700;1,6..72,400..600&family=Noto+Serif+JP:wght@500;600;700;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

:root {
  --shirube-font-serif: "Newsreader", "Noto Serif JP", Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  --shirube-font-sans: "Plus Jakarta Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shirube-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Base Document Styling */
html,
body {
  font-family: var(--shirube-font-sans);
}

/* Headings & Catchphrases: Dignified Japanese Mincho + Latin Newsreader */
h1,
h2,
.font-serif,
.shirube-serif,
.editorial-heading {
  font-family: var(--shirube-font-serif);
  font-feature-settings: "palt" 1;
}

/* Specific fine-tuning for H1 & H2 */
h1 {
  letter-spacing: -0.015em;
}

h2 {
  letter-spacing: -0.01em;
}

/* UI, Navigation, Buttons, Badges, Tags, Numbers, Tables strictly retain Sans */
p,
li,
td,
th,
input,
select,
textarea,
nav,
button,
.font-sans,
.badge,
.tag,
.shirube-nav,
#shirube-sidebar-slot,
[id^="nav-"],
.stat-number {
  font-family: var(--shirube-font-sans);
}

/* Sub-headings (H3, H4) default to Sans unless explicitly tagged with .font-serif */
h3:not(.font-serif),
h4:not(.font-serif),
h5:not(.font-serif),
h6:not(.font-serif) {
  font-family: var(--shirube-font-sans);
}

/* Monospace Utilities */
code,
pre,
.font-mono {
  font-family: var(--shirube-font-mono);
}
