/* The shop's type, self-hosted. Licences: OFL-*.txt beside these files.
 *
 * WHAT CHANGED, AND WHY
 *
 * Until 1.1 this was Karla for the interface, Lateef for Arabic and Marcellus
 * for headings. Two of those three were doing jobs they are bad at:
 *
 *  - Marcellus was setting NUMBERS: KPI tiles, cash balances, prices, order
 *    numbers. Its zero is drawn as a round capital O, so "1,080,000" read as
 *    "1,O8O,OOO" on every money figure in the dashboard, and its figures are
 *    proportional, so a column of totals did not line up.
 *  - Lateef has a very small x-height. At the 13-16px the storefront and the
 *    portal actually use, Arabic product copy was close to unreadable on a
 *    phone, and it has no weights between regular and bold to build a
 *    hierarchy with.
 *
 * Three pairings were set side by side on the real copy (a KPI row, a table of
 * totals, an Arabic product card, the checkout fields):
 *
 *  A. IBM Plex Sans + IBM Plex Sans Arabic   <- chosen
 *  B. Readex Pro for both scripts            - the most legible Arabic of the
 *     three, but it has no tabular figures at all (1111 and 0000 measure
 *     80px and 97px even with tabular-nums), which rules it out for money.
 *  C. Instrument Sans + Noto Naskh Arabic    - a handsome naskh, but twice the
 *     bytes per weight and noticeably weaker at 13px labels; its Latin figures
 *     are proportional unless asked.
 *
 * Plex won because it is one design across both scripts: Latin, digits and
 * Arabic come from the same drawing, its figures are tabular by default, the
 * zero cannot be mistaken for an O, and the Arabic holds up at label sizes.
 *
 * HOW THE FILES ARE SPLIT
 *
 * One variable file carries every Latin weight (400-700). The Arabic files
 * carry ONLY Arabic code points, one per weight, so an English page never
 * downloads them and an Arabic page downloads only the weights it draws. Latin
 * letters and digits inside Arabic text therefore always come from the Latin
 * file, which is the same design, so one font stack serves both languages:
 *
 *   'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif
 *
 * MARCELLUS IS BRAND DISPLAY ONLY, AND CANNOT DRAW A DIGIT
 *
 * Its latin face below deliberately leaves out U+0030-0039. A heading set in
 * Marcellus that contains a number ("Open 5-10 days", a date range) takes the
 * digits from the next family in its stack instead. That turns "numbers are
 * never in Marcellus" from a rule somebody has to remember into something the
 * browser cannot get wrong. test/fonts.test.js holds it there.
 */

/* ---- IBM Plex Sans: interface, body, every number ---- */
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(./ibm-plex-sans-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;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(./ibm-plex-sans-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;
}

/* ---- IBM Plex Sans Arabic: Arabic code points only ---- */
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./ibm-plex-sans-arabic-400.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./ibm-plex-sans-arabic-500.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./ibm-plex-sans-arabic-600.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./ibm-plex-sans-arabic-700.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ---- Arabic beside Marcellus ----
 * Marcellus has no Arabic, and every storefront heading asks for weight 400
 * because Marcellus has only one. Arabic headings would fall through to Plex
 * Arabic Regular and look thin next to a Latin display face. This alias maps
 * that same weight 400 to the SemiBold file, so an Arabic heading carries the
 * weight a heading needs without every heading rule knowing which script it is
 * holding. No new bytes: it is the 600 file already declared above. */
@font-face {
  font-family: 'BM Arabic Heading';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(./ibm-plex-sans-arabic-600.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ---- Marcellus: brand display text, never digits ---- */
/* latin-ext */
@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./marcellus-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;
}
/* latin, minus U+0030-0039 (see the header) */
@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./marcellus-latin.woff2) format('woff2');
  unicode-range: U+0000-002F, U+003A-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;
}
