/*
 * @orangecheck/app-design — fonts.css
 *
 * Inter (variable: weight + optical size) and JetBrains Mono, self-hosted from
 * @fontsource-variable 5.3.0, both SIL OFL 1.1. Optical size is what gives large
 * headlines the tight display cut of the ochk.app design (iteration 2) without a second family. The
 * family names are app-specific so a site's own next/font Inter cannot shadow them.
 */

@font-face {
    font-family: 'OCA Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('./fonts/inter-latin.woff2') format('woff2-variations');
    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: 'OCA Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('./fonts/inter-latin-ext.woff2') format('woff2-variations');
    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: 'OCA JetBrains Mono';
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url('./fonts/jetbrains-mono-latin.woff2') format('woff2-variations');
    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: 'OCA JetBrains Mono';
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url('./fonts/jetbrains-mono-latin-ext.woff2') format('woff2-variations');
    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;
}

/* Metric-matched fallbacks, so the swap from Arial / Courier to the webfont
   does not move a line. Liberation and Arimo / Cousine are Arial's and Courier
   New's metric twins: a machine with neither Arial nor them (most Linux) fell
   to a wider face, and a tool site's header moved 3-5px at the swap.

   Inter narrows as optical sizing follows the font size, about 9% from 14px to
   32px, and widens with weight, so one face cannot match it. Text gets faces
   measured at 16px, display type faces measured at 32px and up, each weight
   band its own Arial cut. Measured on docs prose in Chrome; ascent and descent
   keep Inter's line box at every size-adjust. JetBrains Mono and Courier New
   share one advance, 0.6em, so the mono face is not scaled. */

@font-face {
    font-family: 'OCA Inter Fallback';
    font-weight: 100 449;
    src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Arimo');
    ascent-override: 91.46%;
    descent-override: 22.77%;
    line-gap-override: 0%;
    size-adjust: 105.92%;
}

@font-face {
    font-family: 'OCA Inter Fallback';
    font-weight: 450 549;
    src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Arimo');
    ascent-override: 90.51%;
    descent-override: 22.54%;
    line-gap-override: 0%;
    size-adjust: 107.03%;
}

@font-face {
    font-family: 'OCA Inter Fallback';
    font-weight: 550 649;
    src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Arimo Bold'), local('Arimo-Bold');
    ascent-override: 96.45%;
    descent-override: 24.02%;
    line-gap-override: 0%;
    size-adjust: 100.44%;
}

@font-face {
    font-family: 'OCA Inter Fallback';
    font-weight: 650 900;
    src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Arimo Bold'), local('Arimo-Bold');
    ascent-override: 95.46%;
    descent-override: 23.77%;
    line-gap-override: 0%;
    size-adjust: 101.48%;
}

/* Display type's light weight (oca-display-*, 300) on its own face: Inter Light is about 3%
   narrower than Inter Regular, and one size-adjust for both set the light headlines 3.3% wide,
   so an H1 rewrapped as Inter swapped in (ochk.app /about at 390, CLS 0.0189). */
@font-face {
    font-family: 'OCA Inter Display Fallback';
    font-weight: 100 349;
    src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Arimo');
    ascent-override: 102.62%;
    descent-override: 25.66%;
    line-gap-override: 0%;
    size-adjust: 94.4%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback';
    font-weight: 350 449;
    src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Arimo');
    ascent-override: 99.36%;
    descent-override: 24.74%;
    line-gap-override: 0%;
    size-adjust: 97.5%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback';
    font-weight: 450 549;
    src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Arimo');
    ascent-override: 97.42%;
    descent-override: 24.26%;
    line-gap-override: 0%;
    size-adjust: 99.44%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback';
    font-weight: 550 649;
    src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Arimo Bold'), local('Arimo-Bold');
    ascent-override: 102.92%;
    descent-override: 25.63%;
    line-gap-override: 0%;
    size-adjust: 94.13%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback';
    font-weight: 650 900;
    src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Arimo Bold'), local('Arimo-Bold');
    ascent-override: 101%;
    descent-override: 25.15%;
    line-gap-override: 0%;
    size-adjust: 95.92%;
}

@font-face {
    font-family: 'OCA JetBrains Mono Fallback';
    src: local('Courier New'), local('CourierNewPSMT'), local('Liberation Mono'), local('LiberationMono'), local('Cousine');
    ascent-override: 101.17%;
    descent-override: 29.75%;
    line-gap-override: 0%;
}

/* Display type on a machine with no Arial, Liberation or Arimo: the face the page's
   generic sans resolves to there (Noto Sans, DejaVu Sans, Ubuntu), scaled to Inter's
   width and set on Inter's ascent, so the footer's wordmark fits its frame before Inter
   loads. Each size-adjust is Inter's width over the face's, measured in Chrome on the
   wordmark and a sentence (the smaller, so a fallback is never the wider), weights 300 and 400. */
@font-face {
    font-family: 'OCA Inter Display Fallback Noto';
    font-weight: 100 449;
    src: local('Noto Sans'), local('NotoSans-Regular'), local('Noto Sans Regular');
    ascent-override: 107.12%;
    descent-override: 26.78%;
    line-gap-override: 0%;
    size-adjust: 90.44%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback Noto';
    font-weight: 450 549;
    src: local('Noto Sans'), local('NotoSans-Regular'), local('Noto Sans Regular');
    ascent-override: 103.97%;
    descent-override: 25.99%;
    line-gap-override: 0%;
    size-adjust: 93.18%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback DejaVu';
    font-weight: 100 449;
    src: local('DejaVu Sans'), local('DejaVuSans');
    ascent-override: 115.49%;
    descent-override: 28.87%;
    line-gap-override: 0%;
    size-adjust: 83.88%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback DejaVu';
    font-weight: 450 549;
    src: local('DejaVu Sans'), local('DejaVuSans');
    ascent-override: 112.11%;
    descent-override: 28.03%;
    line-gap-override: 0%;
    size-adjust: 86.41%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback Ubuntu';
    font-weight: 100 449;
    src: local('Ubuntu'), local('Ubuntu Regular'), local('Ubuntu-Regular');
    ascent-override: 102.91%;
    descent-override: 25.73%;
    line-gap-override: 0%;
    size-adjust: 94.14%;
}

@font-face {
    font-family: 'OCA Inter Display Fallback Ubuntu';
    font-weight: 450 549;
    src: local('Ubuntu'), local('Ubuntu Regular'), local('Ubuntu-Regular');
    ascent-override: 100.65%;
    descent-override: 25.16%;
    line-gap-override: 0%;
    size-adjust: 96.25%;
}
