/*
 * Self-hosted webfonts. Poppins for headings and card titles, Roboto for
 * everything else.
 *
 * **Self-hosted rather than loaded from Google Fonts, and not by preference.**
 * The client's CloudFront response headers policy sets a Content-Security-Policy
 * of `font-src 'self' data:` and `style-src 'self' 'unsafe-inline'`, so a
 * `fonts.googleapis.com` stylesheet and a `fonts.gstatic.com` font file are both
 * refused — silently, with a console violation and a page that renders in the
 * fallback stack. Widening the CSP to permit them is the wrong trade: it adds a
 * third-party origin to every page load to save 88KB that is already cached.
 *
 * **Linked from index.html rather than injected by the theme.** The browser
 * discovers these while the JS bundle is still downloading; a CssBaseline
 * `@font-face` block is not discovered until React has mounted, which is a
 * visible reflow on a cold load.
 *
 * The files are the latin and latin-ext subsets only. Everything this catalog
 * renders comes out of Confluence in English.
 *
 * To refresh: request the CSS from Google Fonts with a modern browser
 * User-Agent, take the `latin` and `latin-ext` faces, and download those woff2
 * files. Anything else and you get the woff/ttf fallbacks.
 */

/*
 * Poppins is a static family, so each weight is its own file. Only the two the
 * designs use are here — SemiBold 600 and Bold 700. There is no Poppins 400:
 * body text is Roboto, and a synthesised regular would be nobody's decision.
 */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./poppins-600-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: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./poppins-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./poppins-700-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: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./poppins-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

/*
 * Roboto is a variable font: **one file per subset covers 400, 500 and 700**,
 * which is why there are two Roboto files here and four Poppins ones. The
 * `font-weight: 100 900` range is what tells the browser to interpolate rather
 * than synthesise a fake bold.
 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('./roboto-variable-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: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('./roboto-variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
