/* Fonts for the public page: two families, both served from this origin, nothing from Google.
   The mockup loaded Inter and Playfair Display from Google Fonts. Here the Latin subsets sit in ../fonts/
   (inter-latin.woff2, playfair-latin.woff2, playfair-italic-latin.woff2) and are declared once, with font-display: swap.

   Each family also has "Fallback" faces: a local system font (Arial for Inter, Georgia for Playfair Display) scaled with
   size-adjust and the vertical-metric overrides so that text set in the fallback takes the same width and line height as the
   web font. When the web font arrives the text swaps in without the layout moving. The tokens in base.css name them:
   --sans: Inter, "Inter Fallback", ...   --disp: "Playfair Display", "Playfair Display Fallback", Georgia, ...

   How the numbers were made (the capsize method), from the shipped woff2 files themselves:
   - size-adjust = width of the page's own text in the web font / width of the same text in the fallback, measured in Edge
     for each weight and style the page uses (Inter at 16px, so its optical-size axis is the body-text one; Playfair Display at 100px),
     then averaged by how much text sits at each weight. Inter 400-500 against Arial, 600-700 against Arial Bold; Playfair Display
     400-500 against Georgia, 600-800 against Georgia Bold, italic against Georgia Italic.
   - ascent-override and descent-override = the web font's hhea ascender and descender divided by its units per em, then divided by
     size-adjust (the browser multiplies them by size-adjust again). Inter: 1984 and 494 of 2048. Playfair Display: 1082 and 251 of 1000.
   - line-gap-override is 0%: neither web font has a line gap, and Arial's own 3.3% gap would otherwise leak into the line height.
   Devices without Arial or Georgia (some Android phones) use the next family in the token and keep their own metrics. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-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;
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/playfair-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;
}

@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/playfair-italic-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;
}

/* Inter Fallback: Arial, regular and bold */
@font-face {
  font-family: "Inter Fallback";
  font-style: normal;
  font-weight: 400 500;
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  size-adjust: 105.9%;
  ascent-override: 91.48%;
  descent-override: 22.78%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Inter Fallback";
  font-style: normal;
  font-weight: 600 700;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold");
  size-adjust: 101.26%;
  ascent-override: 95.67%;
  descent-override: 23.82%;
  line-gap-override: 0%;
}

/* Playfair Display Fallback: Georgia, regular, bold and italic */
@font-face {
  font-family: "Playfair Display Fallback";
  font-style: normal;
  font-weight: 400 500;
  src: local("Georgia"), local("Georgia-Regular");
  size-adjust: 101.91%;
  ascent-override: 106.17%;
  descent-override: 24.63%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Playfair Display Fallback";
  font-style: normal;
  font-weight: 600 800;
  src: local("Georgia Bold"), local("Georgia-Bold");
  size-adjust: 88.66%;
  ascent-override: 122.04%;
  descent-override: 28.31%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Playfair Display Fallback";
  font-style: italic;
  font-weight: 400 500;
  src: local("Georgia Italic"), local("Georgia-Italic");
  size-adjust: 96.22%;
  ascent-override: 112.45%;
  descent-override: 26.09%;
  line-gap-override: 0%;
}
