/* ============================================================
   CheatMeals — Indic webfonts (ROUTE-SCOPED, not global)

   This file is NOT linked from index.html. JokesScreen injects it
   on mount (see ensureIndicFonts() there), so the Devanagari face
   only ever loads on /jokes — the homepage initial load stays free
   of it. The brand stack (Anton/Yellowtail/Poppins) cannot render
   Indic scripts, so each script gets a Noto face that is applied
   ONLY to joke text tagged data-indic="<script>". English jokes and
   ALL page chrome (headline, buttons, nav) keep the brand fonts.

   ────────────────────────────────────────────────────────────
   ADD THE NEXT SCRIPT — three lines here + one line in JS:
     1. one @font-face   (self-host the woff2 in ../assets/fonts/)
     2. one --font-indic-<script> token
     3. one mapping rule  [data-indic="<script>"] { font-family: var(--font-indic-<script>); }
     + one entry in SCRIPT_BY_LANG in JokesScreen.jsx  (e.g. gu: 'gujarati')

   Example (Gujarati):
     @font-face { font-family:"Noto Sans Gujarati"; font-weight:400 600; font-display:swap;
       src:url("../assets/fonts/noto-sans-gujarati.woff2") format("woff2");
       unicode-range:U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839; }
     :root { --font-indic-gujarati: "Noto Sans Gujarati", var(--font-body); }
     [data-indic="gujarati"] { font-family: var(--font-indic-gujarati); }
   ============================================================ */

/* ---- Devanagari (hi) ---- */
@font-face {
  font-family: "Noto Sans Devanagari";
  font-style: normal;
  font-weight: 400 600;          /* one variable file covers the 400–600 range */
  font-display: swap;
  src: url("../assets/fonts/noto-sans-devanagari.woff2") format("woff2");
  /* Devanagari block + combining marks. The unicode-range means the file is
     fetched only when these codepoints actually render — never for Latin. */
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

:root {
  /* Indic stack falls back to the brand body font for any stray Latin chars
     (the Noto subset above carries no Latin glyphs). */
  --font-indic-devanagari: "Noto Sans Devanagari", var(--font-body);
}

/* script → font mapping. Only elements tagged data-indic get an Indic face. */
[data-indic="devanagari"] { font-family: var(--font-indic-devanagari); }
