/* Metric-matched fallback faces.
 *
 * The webfonts load with font-display: swap, so text first paints in a system
 * font and is then re-rendered in Montserrat / Playfair Display. Because the
 * system font has different vertical metrics and advance widths, that swap
 * reflowed the page: production Lighthouse attributed a 0.044 Cumulative
 * Layout Shift to it, all of it on section.py-16.bg-white.
 *
 * These faces wrap the local system font and override its metrics so it
 * occupies the same space as the webfont. The swap then changes glyph shapes
 * without moving anything.
 *
 * Numbers derived with fontTools from the actual woff2 files, at the weights
 * the site really renders (Montserrat 400 for body text, Playfair 700 - the
 * only weight .title-font is ever used at):
 *
 *   size-adjust       = webfont avg advance / fallback avg advance, over the
 *                       lowercase alphabet weighted by English letter frequency
 *   ascent-override   = (webfont hhea.ascent  / unitsPerEm) / size-adjust
 *   descent-override  = (webfont hhea.descent / unitsPerEm) / size-adjust
 *
 * Arial and Times New Roman metrics were read from Liberation Sans and
 * Liberation Serif, which are metric-compatible with them by design.
 * Regenerate with tools/font-metrics.py.
 */

@font-face {
  font-family: 'Montserrat Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica'),
       local('Roboto'), local('Liberation Sans');
  size-adjust: 114.51%;
  ascent-override: 84.54%;
  descent-override: 21.92%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Playfair Display Fallback';
  src: local('Times New Roman'), local('Times'), local('Georgia'),
       local('Liberation Serif');
  size-adjust: 115.1%;
  ascent-override: 94%;
  descent-override: 21.81%;
  line-gap-override: 0%;
}
