/* Self-hosted web fonts for the broadcast-television look.
   Source: Google Fonts (latin subset only), downloaded 2026-09-03.
   Oswald: SIL Open Font License 1.1 (see LICENSE-Oswald.txt).
   Barlow Semi Condensed / Barlow Condensed: SIL Open Font License 1.1 (see LICENSE-Barlow.txt).
   All URLs are relative to this stylesheet's folder.
   "font-display: swap" means: show text immediately in a fallback font, then swap in the
   web font once it has loaded.
   "unicode-range" lists the characters each file contains; the browser only downloads
   the file when the page uses one of those characters. */

/* Display face: Oswald, one variable-weight file covering weights 200 to 700. */
@font-face {
  font-family: "TVDisplay";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("oswald-var.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;
}

/* Text face: Barlow Semi Condensed, one static file per weight. */
@font-face {
  font-family: "TVText";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("barlow-semicond-400.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: "TVText";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("barlow-semicond-500.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: "TVText";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("barlow-semicond-600.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: "TVText";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("barlow-semicond-700.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;
}

/* Text italic: Barlow Condensed bold italic (used for emphasis inside TVText). */
@font-face {
  font-family: "TVText";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("barlow-cond-700i.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;
}

/* Metric-matched fallback: a locally installed narrow font, resized so that text set in it
   takes up about the same space as TVText. This limits layout shift while the web font loads.
   "size-adjust" scales the glyphs; the "-override" properties set the vertical metrics. */
@font-face {
  font-family: "TVText Fallback";
  src: local("Arial Narrow"), local("Roboto Condensed"), local("Helvetica Neue");
  size-adjust: 88%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* Font stacks. Use as: font-family: var(--tv-font-display); */
:root {
  --tv-font-display: "TVDisplay", "Oswald", "Roboto Condensed", "Avenir Next Condensed", "Arial Narrow", system-ui, sans-serif;
  --tv-font-text: "TVText", "Barlow Semi Condensed", "TVText Fallback", "Roboto Condensed", "Avenir Next Condensed", "Arial Narrow", system-ui, sans-serif;
}
