/* BDO Grotesk (SIL Open Font License 1.1, see assets/fonts/BDO-GROTESK-OFL.txt), served from this site: the Content Security Policy
   allows fonts from 'self' only. Weights 400, 500, 600 and 700.
   size-adjust: BDO Grotesk sets about 5% larger than the previous typeface at the same font size (x-height +7%, width +4%), so it is scaled to
   match. Line heights are unchanged. */
@font-face {
  font-family: "BDO Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 95%;
  src: url(fonts/BDOGrotesk-Regular.woff2) format("woff2");
}

@font-face {
  font-family: "BDO Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  size-adjust: 95%;
  src: url(fonts/BDOGrotesk-Medium.woff2) format("woff2");
}

@font-face {
  font-family: "BDO Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  size-adjust: 95%;
  src: url(fonts/BDOGrotesk-DemiBold.woff2) format("woff2");
}

@font-face {
  font-family: "BDO Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  size-adjust: 95%;
  src: url(fonts/BDOGrotesk-Bold.woff2) format("woff2");
}

/* Fallback shown until BDO Grotesk arrives: Arial/Helvetica scaled to BDO Grotesk's width and line metrics, so the swap does not move
   the page. BDO Grotesk has ascent 0.800, descent 0.177 and line gap 0.400 em, and is shown at 95%; each override below is that
   divided by the fallback's size-adjust. Widths (average glyph, em): BDO 400 0.561, 500 0.564, 600 0.569 (after the 95%); Arial 0.534, Arial Bold 0.570.
   The 400 and 500 widths are set a little under the average (102%) because that makes the hero paragraph and headline wrap like BDO Grotesk does. */
@font-face {
  font-family: "BDO Fallback";
  font-weight: 400;
  size-adjust: 102%;
  ascent-override: 74.5%;
  descent-override: 16.5%;
  line-gap-override: 37.3%;
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans");
}

@font-face {
  font-family: "BDO Fallback";
  font-weight: 500;
  size-adjust: 102%;
  ascent-override: 72%;
  descent-override: 15.9%;
  line-gap-override: 36%;
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans");
}

@font-face {
  font-family: "BDO Fallback";
  font-weight: 600 700;
  size-adjust: 100%;
  ascent-override: 76%;
  descent-override: 16.8%;
  line-gap-override: 38%;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica-Bold"), local("Liberation Sans Bold");
}

/* OpenDyslexic (SIL Open Font License 1.1, see assets/fonts/OPENDYSLEXIC-OFL.txt), served from this site. Only downloaded when a visitor
   chooses it in the Display panel (html[data-font="dyslexic"], assets/site.css): a @font-face costs nothing until the font is used.
   size-adjust: OpenDyslexic sets much larger than BDO Grotesk at the same size, so it is scaled down to keep the layouts intact. */
@font-face {
  font-family: "OpenDyslexic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 88%;
  src: url(fonts/OpenDyslexic-Regular.woff2) format("woff2");
}

@font-face {
  font-family: "OpenDyslexic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  size-adjust: 88%;
  src: url(fonts/OpenDyslexic-Bold.woff2) format("woff2");
}
