/* ── Hebrew webfont — one served face, identical on every OS ─────────────────
 *
 * The problem this file solves
 * ----------------------------
 * The UI stacks are Arial-based (--font-body / --font-display in teloring.css)
 * with Inter + Plus Jakarta Sans on the marketing surfaces. For Latin that is
 * fine and stays exactly as it was. For Hebrew it was broken on Windows, for
 * two separate reasons:
 *
 *   1. Hebrew was never rendered by a font we control — it was whatever the OS
 *      supplied, which is Arial's own Hebrew on both platforms. macOS rasterises
 *      it through CoreText: essentially unhinted, gamma-corrected, full-bodied.
 *      Windows runs the same outlines through DirectWrite, which honours the
 *      font's TrueType hinting — and Arial's Hebrew is nowhere near as carefully
 *      hinted as its hand-tuned Latin. At 13–15px the stems come out uneven and
 *      the strokes thin and ragged. Same font name, very different pixels, and
 *      Hebrew shows it far more than Latin does.
 *   2. "Arial Black", "Plus Jakarta Sans" and "Inter" carry no Hebrew glyphs at
 *      all, so every Hebrew heading silently dropped out of the display face
 *      into the body fallback — collapsing the requested 800/900 onto Arial
 *      Bold's 700 while keeping the negative tracking that was picked for Arial
 *      Black's Latin proportions ("פתחו חשבון בחינם", "סטודיו").
 *
 * Neither is fixable by reordering system fonts: Apple's Arial is not
 * redistributable and Windows ships no equivalent Hebrew face. The only way to
 * make Windows match macOS is to stop asking the OS and serve the outlines
 * ourselves, so every visitor rasterises the same font.
 *
 * How it works
 * ------------
 * 'Teloring Hebrew' carries a Hebrew-only `unicode-range`, so the browser
 * consults it for Hebrew codepoints ONLY. Latin text skips the face entirely
 * and keeps rendering in Arial / Inter / Plus Jakarta Sans exactly as before —
 * English is untouched by design. That is also why the family is listed FIRST
 * in every stack instead of last: first place is what makes it win for Hebrew,
 * and the unicode-range is what keeps it out of everything else.
 *
 * It is a variable font (wght 100–900), so 400 / 500 / 700 / 900 are all real
 * weights — nothing is synthesised on any platform any more.
 *
 * Switching the Hebrew typeface for the whole product is the one `src:` line
 * below. No other file in the codebase names a Hebrew font.
 */

@font-face {
  font-family: 'Teloring Hebrew';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  /* Heebo, Hebrew subset only — the same vendored file the 'Heebo' family in
     static/vendor/fonts/fonts.css points at, so declaring it here downloads
     nothing extra (12 KB, one request, shared cache entry). That file's header
     documents where it came from and how to refresh it. */
  src: url('../vendor/fonts/files/NGS6v5_NC0k9P9H0TbFhsqMA6aw.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

/* ── Hebrew display typography ───────────────────────────────────────────────
 *
 * Two Latin-only habits in the design system actively damage Hebrew, and both
 * hurt most on Windows, where the glyphs they were applied to already came out
 * thin and uneven:
 *
 *   * Negative tracking (h1 -1px, h2 -0.5px, .join-benefits h2 -1px). Latin
 *     display type tightens nicely because ascenders and descenders keep the
 *     rhythm readable. Hebrew is a single-height script with no case, so the
 *     same -1px simply collides adjacent letters. It was also chosen for Arial
 *     Black's proportions, which Hebrew never actually rendered in.
 *   * Weight 800/900. Neither platform ever rendered Hebrew that heavy — with
 *     no Hebrew in Arial Black the request collapsed onto Arial Bold's 700 — so
 *     700 is what "looks like the Mac" means for Hebrew headings, and it is now
 *     an explicit 700 in a face that genuinely has one.
 *
 * Scoped to html[dir="rtl"], so the English UI keeps its Arial Black display
 * weight and its tracking. The `html` prefix is deliberate: it lifts
 * specificity above the original single-class rules in teloring.css / auth.css /
 * join.css, so these win regardless of stylesheet order.
 *
 * The Latin wordmarks (.sidebar-logo .wordmark, .auth-logo .wordmark) are
 * intentionally NOT in this list — they are always "Teloring" and must keep
 * rendering in Arial Black at 900 even on a Hebrew page.
 */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .auth-title,
html[dir="rtl"] .modal-title,
html[dir="rtl"] .top-header .page-title,
html[dir="rtl"] .join-card h1,
html[dir="rtl"] .join-benefits h2 {
  font-weight: 700;
  letter-spacing: normal;
}

/* Wide tracking is a Latin small-caps device. Hebrew has no capitals, so
   `text-transform: uppercase` is a no-op on it while the letter-spacing just
   pulls the words apart — e.g. auth.tagline, "פלטפורמת אומני־צ'אנל", on the
   sign-in screen. */
html[dir="rtl"] .label,
html[dir="rtl"] .auth-logo .tagline,
html[dir="rtl"] .ring-catchphrase-line1,
html[dir="rtl"] .ring-catchphrase-line2 {
  letter-spacing: normal;
}
