/* ==========================================================================
   Digital Naka — typography

   Self-hosted and subset. Nothing from a CDN, so the page renders identically
   on a locked-down site network and the CSP stays `font-src 'self'`.

   The Indic faces are subset by TEXT CLOSURE over the actual copy deck, which
   keeps every conjunct those strings need (cjct/rphf/blwf/half/pres verified)
   while cutting Mukta Vaani from ~450KB to ~56KB. Gujarati must never fall
   back to a system font — it is declared first in the stack for that language.
   ========================================================================== */

/* ---- DM Sans: one family for display and body.
       A geometric grotesque with a real optical-size axis — the 700 cut is
       instanced at opsz=40 so headlines tighten properly, while 400/500/600 are
       instanced at opsz=14 for UI text. One family reads more considered than a
       display/body pair that never quite agree. ---- */
@font-face {
  font-family: "DM Sans DN";
  src: url("../fonts/DMSans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans DN";
  src: url("../fonts/DMSans-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans DN";
  src: url("../fonts/DMSans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans Display DN";
  src: url("../fonts/DMSans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---- Numerals and IDs: IBM Plex Mono ---- */
@font-face {
  font-family: "Plex Mono DN";
  src: url("../fonts/PlexMono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---- Gujarati: Mukta Vaani ---- */
@font-face {
  font-family: "Mukta Vaani DN";
  src: url("../fonts/MuktaVaani-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0A80-0AFF, U+200C-200D, U+0964-0965;
}
@font-face {
  font-family: "Mukta Vaani DN";
  src: url("../fonts/MuktaVaani-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0A80-0AFF, U+200C-200D, U+0964-0965;
}

/* ---- Hindi: Mukta ---- */
@font-face {
  font-family: "Mukta DN";
  src: url("../fonts/Mukta-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0900-097F, U+A8E0-A8FF, U+200C-200D;
}
@font-face {
  font-family: "Mukta DN";
  src: url("../fonts/Mukta-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0900-097F, U+A8E0-A8FF, U+200C-200D;
}

/* --------------------------------------------------------------------------
   Script-aware stacks. The Indic faces carry unicode-range, so a Gujarati
   visitor never downloads the Devanagari file. Latin inside an Indic string
   (10/10, +91, 2.0) still falls through to Jakarta.
   -------------------------------------------------------------------------- */
html[lang="gu"] body,
html[lang="gu"] input,
html[lang="gu"] select,
html[lang="gu"] textarea,
html[lang="gu"] button { font-family: var(--font-gu); }

html[lang="hi"] body,
html[lang="hi"] input,
html[lang="hi"] select,
html[lang="hi"] textarea,
html[lang="hi"] button { font-family: var(--font-hi); }

/* Indic ascenders/descenders are taller than Latin; matras clip at Latin
   leading. Loosen for those languages only. */
html[lang="gu"], html[lang="hi"] { --lh-tight: 1.34; --lh-body: 1.62; }

/* The display face is Latin-only. For Indic the heading uses the Indic face at
   600 rather than rendering tofu. */
html[lang="gu"] .u-display { font-family: var(--font-gu); font-weight: 600; letter-spacing: 0; }
html[lang="hi"] .u-display { font-family: var(--font-hi); font-weight: 600; letter-spacing: 0; }
