/*
 * DDHC — self-hosted web fonts (Latin + Telugu).
 *
 * Metronic's HTML references Inter from Google Fonts; CLAUDE.md forbids CDN
 * assets, because the programme's users are on metered rural data and an
 * outage at a third party must not change how the application renders. Inter
 * is therefore self-hosted below (variable font, one file per subset covers
 * weights 300–700), alongside Noto Sans Telugu — Inter has no Telugu glyphs,
 * so every Telugu string would otherwise render as tofu boxes.
 *
 * This file adds font-face declarations and a font-family fallback ONLY. It
 * defines no component, no colour and no layout — CLAUDE.md 3.2 forbids
 * authoring UI outside the Metronic theme, and this is typography plumbing,
 * not a component.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  /* Variable font: this single declaration serves every weight Metronic
     asks for (300, 400, 500, 600, 700). */
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  /* latin-ext carries U+20B9 — the rupee sign, which this application
     prints on nearly every money-bearing screen. */
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Noto Sans Telugu";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-sans-telugu-400.ttf") format("truetype");
  /* Only the Telugu block plus the shared punctuation range, so Latin text
     keeps using Inter and the browser never downloads this for an English
     page that has no Telugu on it. */
  unicode-range: U+0C00-0C7F, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Noto Sans Telugu";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/noto-sans-telugu-500.ttf") format("truetype");
  unicode-range: U+0C00-0C7F, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Noto Sans Telugu";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/noto-sans-telugu-600.ttf") format("truetype");
  unicode-range: U+0C00-0C7F, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Noto Sans Telugu";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-sans-telugu-700.ttf") format("truetype");
  unicode-range: U+0C00-0C7F, U+200C-200D, U+25CC;
}

/*
 * Append the Telugu face to Metronic's existing stack rather than replacing
 * it. Because of the unicode-range above, the browser picks Inter for Latin
 * and Noto for Telugu automatically, so a bilingual line renders correctly
 * without any markup deciding which font to use.
 */
:root {
  --bs-font-sans-serif: Inter, "Noto Sans Telugu", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/*
 * Telugu glyphs sit taller than Latin ones at the same point size. A slightly
 * looser line height stops descenders colliding in table rows, which is where
 * the two scripts most often share a line.
 */
:lang(te) {
  line-height: 1.6;
}
