/* Self-hosted Inter + Source Serif 4 — the ONLY web fonts in this project (site AND
   admin). No Google Fonts, no CDN: CSP is font-src 'self'.

   Both families are VARIABLE fonts, so one file per family/style/subset covers every
   weight we use — storing a file per weight stored the same outlines several times over.
   Subset to the glyphs this site can actually render (AZ = latin + latin-ext ə ğ ş ı İ,
   EN = latin, RU = cyrillic) and Source Serif's optical-size axis is pinned at 20.
   Result: 4 MB across 70 files → 188 KB across 9.

   NO FOIT, NO FOUT SHIFT:
     · font-display: swap  → text is never invisible (never use `optional`: it hides text
       on the PHP dev server — STACK_GOTCHAS).
     · The metric-compatible fallback faces at the bottom make the fallback lay out with
       the SAME metrics as the real font, so when the swap happens nothing reflows.
     · The 4 above-the-fold files are preloaded in base.html.twig.

   Regenerate: see PROJECT_STATE "Şriftlər". */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+2010-2011,U+2013-2014,U+2018-2019,U+201C-201D,U+2022,U+2026,U+2039-203A,U+20AC;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-lat-ext.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+02BC,U+1E00-1EFF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-cyr.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+2116;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+2010-2011,U+2013-2014,U+2018-2019,U+201C-201D,U+2022,U+2026,U+2039-203A,U+20AC;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-lat-ext.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+02BC,U+1E00-1EFF;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-cyr.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+2116;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-italic-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+2010-2011,U+2013-2014,U+2018-2019,U+201C-201D,U+2022,U+2026,U+2039-203A,U+20AC;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-italic-lat-ext.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+02BC,U+1E00-1EFF;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-italic-cyr.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+2116;
}

/* Metric-compatible fallbacks — the whole point of these is that the swap is invisible.
   Numbers are MEASURED, not guessed: size-adjust = width(web font) / width(fallback),
   measured in-browser on real Azerbaijani text; ascent/descent = the font's own hhea
   values divided by that size-adjust. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 105.84%;
  ascent-override: 91.53%;
  descent-override: 22.79%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Source Serif Fallback';
  /* Georgia, NOT Times: measured against real AZ text, Georgia is within ~2% of Source
     Serif's width while Times is ~9% narrower — a Times-based fallback still reflowed a
     48px heading by a whole line. Georgia ships on Windows and macOS; on Linux the
     generic serif takes over and the fallback is approximate, which is acceptable. */
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 102.17%;
  ascent-override: 101.40%;
  descent-override: 32.79%;
  line-gap-override: 0%;
}
