/* ============================================================
   RALLY · fonts
   ------------------------------------------------------------
   Self-hosted. Nine woff2 files, 256 KB total, served from the
   same origin as everything else.

   WHY NOT GOOGLE FONTS
   --------------------
   The stylesheet link this replaces was three network round
   trips before a single glyph could be painted: DNS + TLS to
   fonts.googleapis.com, the CSS, then DNS + TLS to
   fonts.gstatic.com for the files. Two `preconnect` hints hid
   some of that and none of the rest.

   Rally's user is a club owner in Karachi on a mid-range Android
   over a congested 3G/4G cell, and Google's font endpoints are
   intermittently slow or throttled on several Pakistani ISPs. A
   third-party host that is *usually* fast is still a dependency
   the product does not need: these files never change, and this
   Worker is already serving CSS and JS from an edge PoP in the
   same country.

   Same origin also means the browser's connection is already
   open and warm, `_headers` can pin an immutable one-year cache
   on them, and there is no third party learning the IP of every
   person who opens a club's booking page.

   WHAT IS AND IS NOT HERE
   -----------------------
   Only the weights the product actually uses, and only the
   subsets it needs:

     Plus Jakarta Sans  700, 800      latin       (the display
                                                   face — §2 uses
                                                   no other weight)
     Rubik              400,500,600,700  latin    (the reading face)
     Noto Sans Arabic   400–800          arabic   (Urdu, §10)

   No italics — this system does not use them. No 300, no 900.
   Adding a weight means adding a file, so add one only when a
   real rule needs it.

   `font-display: swap` throughout: text paints immediately in
   the fallback and re-renders when the face lands. On a slow
   connection a visible page in the wrong face beats an invisible
   one in the right face, every time.

   The Arabic faces carry a `unicode-range`, so a browser only
   downloads them once Urdu glyphs are actually on the page — an
   English session never pays the 160 KB. That is the same saving
   the old on-demand `<link>` injection in assets/i18n.js bought,
   done declaratively and without JS.

   KEEP IN SYNC WITH: assets/rally.css §1 (`--font-display`,
   `--font`, `--font-ur`) and `public/_headers`.
   ============================================================ */

/* ── v7 WEIGHT SCALE (Nov 2026): one step lighter, everywhere ──
   Sohail asked for type that is "not too bold, minimal". Rather than
   rewrite ~900 font-weight declarations across the product (and risk the
   hierarchy drifting), each declared weight below loads the NEXT LIGHTER
   cut of the face:
       declared 800 → Jakarta 700     declared 700 → Jakarta 600
       declared 600 → Jakarta 500     Rubik 700/600/500 → 600/500/400
       Noto Sans Arabic 800/700/600 → 700/600/500
   Hierarchy is unchanged (every step still differs from its neighbours);
   the whole product simply sits one notch lighter. To go back, point each
   src at the file matching its declared weight. */

/* ── Plus Jakarta Sans — the display face ─────────────────── */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jakarta-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/jakarta-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/jakarta-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jakarta-500.woff2') format('woff2');
}

/* ── Rubik — the reading face ─────────────────────────────── */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/rubik-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/rubik-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/rubik-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/rubik-600.woff2') format('woff2');
}

/* ── Noto Sans Arabic — Urdu (BRAND.md §10) ──────────────────
   A low-contrast sans with open counters and even stroke weight:
   the Arabic-script sibling of Plus Jakarta and Rubik. Naskh, which
   this replaced, is a calligraphic face with thick-thin strokes and
   read like a different brand next to the Hulo display type.

   Five weights so Urdu keeps the same hierarchy as English:
   400 body · 500 nav · 600 labels · 700 headings · 800 display.

   The `unicode-range` keeps these free for an English visitor: the
   browser downloads them only once Urdu glyphs are on the page. */
@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/sans-arabic-400.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FDFC;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/sans-arabic-500.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FDFC;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/sans-arabic-500.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FDFC;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/sans-arabic-600.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FDFC;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/sans-arabic-700.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FDFC;
}
