/*
 * Inter and Newsreader, served by us.
 *
 * Serving them ourselves keeps a third party off the critical path. A hosted
 * <link> costs two DNS lookups, two TLS handshakes and a stylesheet round trip
 * before any text renders, on the first page a stranger ever sees. That is a
 * direct cost to Largest Contentful Paint, which is a ranking signal as well
 * as the thing somebody actually waits for.
 *
 * Both are SIL Open Font License, which is what makes this allowed; the
 * licence text sits next to the files in app/assets/fonts/OFL.txt.
 *
 * Subsets: latin, latin-ext and greek. Not cyrillic and not vietnamese,
 * which nothing here renders. Greek is kept because master names are the one
 * piece of user text on the public pages and this is run from Athens; a name
 * dropping to a fallback serif in the directory would be visible.
 *
 * Both families are variable, so one file covers a weight range and the
 * whole of Inter is three files rather than six: Google serves the same
 * bytes for 400 and 500 and only the URL differs.
 *
 * font-display: swap, so text is readable in the fallback immediately and
 * reflows once. The alternative is text nobody can read for up to three
 * seconds, which is worse on a page whose job is to be read.
 *
 * unicode-range is what keeps the greek file off a page with no greek on it.
 * It has to stay accurate: widen it and browsers download bytes nobody needs.
 * These are copies of what Google served on the day the files were fetched.
 * They are ours now, and they only stay true while the files do, so anyone
 * re-subsetting has to move both in the same commit.
 *
 * Not done, and the obvious next thing if the numbers come back good and the
 * page still feels jumpy: size-adjust and ascent-override on a declared
 * fallback, so `swap` reflows less when the real face lands.
 */

/* ── Inter, the interface face ─────────────────────────────────────────── */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/inter-latin-normal-400500-496a588b.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: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/inter-latin-ext-normal-400500-5a6754fc.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: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/inter-greek-normal-400500-efaf7d96.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* ── Newsreader, the display serif ─────────────────────────────────────── */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/assets/newsreader-latin-normal-300500-fe979712.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: "Newsreader";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/assets/newsreader-latin-ext-normal-300500-c601fd27.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: "Newsreader";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("/assets/newsreader-latin-italic-300500-fd8d4ba4.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: "Newsreader";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("/assets/newsreader-latin-ext-italic-300500-e778c051.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;
}
