/*
 * Metric-compatible fallback faces for the theme fonts (ACH-418).
 *
 * While Montserrat / Open Sans are still loading (font-display: swap) the
 * browser renders these local Arial faces, scaled so that the text takes the
 * same width and the same line box as the web font – the swap then no longer
 * moves the layout (the hero text shifted by CLS 0.15 on desktop when the
 * fonts arrived after the first paint). Montserrat is ~15 % wider than Arial,
 * Open Sans ~4.5 %; without size-adjust the fallback wrapped fewer lines.
 *
 * Numbers computed with fontTools from the woff2 files in assets/fonts and the
 * matching Arial variants (2048 UPM, identical metrics on macOS and Windows;
 * Liberation Sans is the metric-compatible stand-in on Linux, incl. CI runners);
 * the average glyph width is weighted by the German text of the start page:
 *   size-adjust        = (avg width / UPM) web font ÷ (avg width / UPM) Arial
 *   ascent-override    = ascender / UPM / size-adjust   (hhea = typo metrics)
 *   descent-override   = |descender| / UPM / size-adjust
 *   line-gap-override  = lineGap / UPM / size-adjust    (0 for both fonts)
 *
 * WP Rocket: this file is on the Remove-Unused-CSS safelist (functions.php).
 * The SaaS otherwise prunes the faces because they are never rendered while
 * the web fonts are available at crawl time. The stacks that reference the
 * fallback families live in theme.json (settings.typography.fontFamilies).
 */

@font-face {
  font-family: "Montserrat Fallback";
  font-style: normal;
  font-weight: 500;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans");
  size-adjust: 115.046%;
  ascent-override: 84.14%;
  descent-override: 21.817%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Montserrat Fallback";
  font-style: italic;
  font-weight: 500;
  src: local("Arial Italic"), local("Arial-ItalicMT"), local("Liberation Sans Italic"), local("LiberationSans-Italic");
  size-adjust: 115.701%;
  ascent-override: 83.664%;
  descent-override: 21.694%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Open Sans Fallback";
  font-style: normal;
  font-weight: 400;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans");
  size-adjust: 104.467%;
  ascent-override: 102.314%;
  descent-override: 28.044%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Open Sans Fallback";
  font-style: italic;
  font-weight: 400;
  src: local("Arial Italic"), local("Arial-ItalicMT"), local("Liberation Sans Italic"), local("LiberationSans-Italic");
  size-adjust: 98.264%;
  ascent-override: 108.773%;
  descent-override: 29.814%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Open Sans Fallback";
  font-style: normal;
  font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold");
  size-adjust: 100.998%;
  ascent-override: 105.829%;
  descent-override: 29.007%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Open Sans Fallback";
  font-style: italic;
  font-weight: 600;
  src: local("Arial Bold Italic"), local("Arial-BoldItalicMT"), local("Liberation Sans Bold Italic"), local("LiberationSans-BoldItalic");
  size-adjust: 95.137%;
  ascent-override: 112.348%;
  descent-override: 30.794%;
  line-gap-override: 0%;
}
