/* ==========================================================================
   Web fonts, self-hosted (assets/fonts, licences in assets/fonts/LICENSES.txt).
   Loaded before base.css. Every family is split by script with unicode-range, so the browser downloads only
   the files a page really uses (a Russian page without Latin-Extended names never fetches the latin-ext files).
   Family names are used through the tokens --font-body / --font-brand in base.css.
   To replace a file keep the old name out of the cache: give the new file a new name and update this list
   (and the preload links in templates/layout.php).
   ========================================================================== */

/* ---------- Onest: body text, variable weight 400-700, Latin + Cyrillic ---------- */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/onest-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/onest-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;
}

/* ---------- Alegreya SC 700: Russian headings and the Cyrillic glyphs of brand names ---------- */
@font-face {
  font-family: "Alegreya SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/alegreya-sc-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/alegreya-sc-700-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Alegreya SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/alegreya-sc-700-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;
}

/* ---------- Metric-matched fallbacks: system fonts scaled to the web fonts, so the swap moves text as little as
   possible (size-adjust and the vertical overrides were measured against the real files). They are listed after
   the web family in the font tokens of base.css and cost no download. A face whose local() font is missing on the
   visitor's system is simply skipped. ---------- */
@font-face {
  font-family: "Onest Fallback";
  font-weight: 400 500;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 104%;
  ascent-override: 93%;
  descent-override: 29%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Onest Fallback";
  font-weight: 600 700;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold");
  size-adjust: 100%;
  ascent-override: 97%;
  descent-override: 30%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Alegreya SC Fallback";
  font-weight: 700;
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("Times Bold");
  size-adjust: 105%;
  ascent-override: 96%;
  descent-override: 32%;
  line-gap-override: 0%;
}
