/* Copyright (c) Edward James Harrison. All rights reserved. */
/*
 * SELF-HOSTED FONTS — single source of truth for every webfont in the app.
 * Replaces all Google Fonts links/@imports. All families are SIL OFL 1.1
 * (see ./LICENSES.md and ./OFL.txt) and are legally self-hostable.
 *
 * NOTO SANS SYMBOLS is scoped via unicode-range to ONLY the zodiac-sign,
 * planet, and aspect codepoints so it overrides the body font for those
 * glyphs (killing emoji "colored circle" presentation and letting our own
 * fill colors apply) without touching any other text. U+2609 (Sun ☉) is
 * deliberately omitted — Noto Sans Symbols has no glyph for it, so it keeps
 * rendering in the body font (it has no emoji-presentation problem anyway).
 */

/* ─── Cinzel (display) ─────────────────────────────────────────── */
@font-face { font-family:'Cinzel'; font-style:normal; font-weight:400; font-display:swap; src:url('cinzel-v26-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'Cinzel'; font-style:normal; font-weight:500; font-display:swap; src:url('cinzel-v26-latin-500.woff2') format('woff2'); }
@font-face { font-family:'Cinzel'; font-style:normal; font-weight:600; font-display:swap; src:url('cinzel-v26-latin-600.woff2') format('woff2'); }
@font-face { font-family:'Cinzel'; font-style:normal; font-weight:700; font-display:swap; src:url('cinzel-v26-latin-700.woff2') format('woff2'); }

/* ─── Cinzel Decorative (oracle display) ───────────────────────── */
@font-face { font-family:'Cinzel Decorative'; font-style:normal; font-weight:400; font-display:swap; src:url('cinzel-decorative-v19-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'Cinzel Decorative'; font-style:normal; font-weight:700; font-display:swap; src:url('cinzel-decorative-v19-latin-700.woff2') format('woff2'); }

/* ─── Outfit (body) ────────────────────────────────────────────── */
@font-face { font-family:'Outfit'; font-style:normal; font-weight:300; font-display:swap; src:url('outfit-v15-latin-300.woff2') format('woff2'); }
@font-face { font-family:'Outfit'; font-style:normal; font-weight:400; font-display:swap; src:url('outfit-v15-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'Outfit'; font-style:normal; font-weight:500; font-display:swap; src:url('outfit-v15-latin-500.woff2') format('woff2'); }
@font-face { font-family:'Outfit'; font-style:normal; font-weight:600; font-display:swap; src:url('outfit-v15-latin-600.woff2') format('woff2'); }
@font-face { font-family:'Outfit'; font-style:normal; font-weight:700; font-display:swap; src:url('outfit-v15-latin-700.woff2') format('woff2'); }

/* ─── Cormorant Garamond (FaceReader + reference) ──────────────── */
@font-face { font-family:'Cormorant Garamond'; font-style:normal; font-weight:300; font-display:swap; src:url('cormorant-garamond-v21-latin-300.woff2') format('woff2'); }
@font-face { font-family:'Cormorant Garamond'; font-style:normal; font-weight:400; font-display:swap; src:url('cormorant-garamond-v21-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'Cormorant Garamond'; font-style:normal; font-weight:500; font-display:swap; src:url('cormorant-garamond-v21-latin-500.woff2') format('woff2'); }
@font-face { font-family:'Cormorant Garamond'; font-style:normal; font-weight:600; font-display:swap; src:url('cormorant-garamond-v21-latin-600.woff2') format('woff2'); }
@font-face { font-family:'Cormorant Garamond'; font-style:normal; font-weight:700; font-display:swap; src:url('cormorant-garamond-v21-latin-700.woff2') format('woff2'); }
@font-face { font-family:'Cormorant Garamond'; font-style:italic; font-weight:300; font-display:swap; src:url('cormorant-garamond-v21-latin-300italic.woff2') format('woff2'); }
@font-face { font-family:'Cormorant Garamond'; font-style:italic; font-weight:400; font-display:swap; src:url('cormorant-garamond-v21-latin-italic.woff2') format('woff2'); }

/* ─── DM Sans (FaceReader) ─────────────────────────────────────── */
@font-face { font-family:'DM Sans'; font-style:normal; font-weight:300; font-display:swap; src:url('dm-sans-v17-latin-300.woff2') format('woff2'); }
@font-face { font-family:'DM Sans'; font-style:normal; font-weight:400; font-display:swap; src:url('dm-sans-v17-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'DM Sans'; font-style:normal; font-weight:500; font-display:swap; src:url('dm-sans-v17-latin-500.woff2') format('woff2'); }
@font-face { font-family:'DM Sans'; font-style:normal; font-weight:600; font-display:swap; src:url('dm-sans-v17-latin-600.woff2') format('woff2'); }
@font-face { font-family:'DM Sans'; font-style:normal; font-weight:700; font-display:swap; src:url('dm-sans-v17-latin-700.woff2') format('woff2'); }

/* ─── JetBrains Mono (FaceReader) ──────────────────────────────── */
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:300; font-display:swap; src:url('jetbrains-mono-v24-latin-300.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('jetbrains-mono-v24-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('jetbrains-mono-v24-latin-500.woff2') format('woff2'); }

/* ─── Noto Sans Symbols (zodiac / planet / aspect GLYPHS only) ──── */
/* Range: nodes/conj/opp (260A–260D), Moon…Pisces (263D–2653), Chiron (26B7),
 * sextile/semisextile/quincunx/sesquisquare (26B9–26BC). Sun (2609) omitted —
 * this font has no glyph for it; Noto Sans Symbols 2 below supplies it. */
@font-face {
  font-family:'Noto Sans Symbols';
  font-style:normal; font-weight:400; font-display:swap;
  src:url('noto-sans-symbols-v47-symbols-regular.woff2') format('woff2');
  unicode-range: U+260A-260D, U+263D-2653, U+26B7, U+26B9-26BC;
}

/* ─── Noto Sans Symbols 2 (glyphs absent from Noto Sans Symbols) ── */
/* Supplies exactly the symbol codepoints the first font lacks, so canvas
 * never falls through to an OS font: Sun (2609), trine (25B3), square
 * (25A1), sextile ✱ (2731 — used by ASPECT_SYMBOLS), I-Ching trigrams
 * (2630–2637). Custom subset. Ranges are disjoint from the other faces,
 * so each glyph resolves to its owner. */
@font-face {
  font-family:'Noto Sans Symbols 2';
  font-style:normal; font-weight:400; font-display:swap;
  src:url('noto-sans-symbols-2-subset.woff2') format('woff2');
  unicode-range: U+25A1, U+25B3, U+2609, U+2630-2637, U+2731;
}

/* ─── Noto Sans Math (semisquare ∠) ────────────────────────────── */
/* ∠ U+2220 is a math glyph present in neither Noto Sans Symbols font;
 * Noto Sans Math is the only Noto family that carries it. Subset to that
 * single codepoint. */
@font-face {
  font-family:'Noto Sans Math';
  font-style:normal; font-weight:400; font-display:swap;
  src:url('noto-sans-math-subset.woff2') format('woff2');
  unicode-range: U+2220;
}

/* ─── Noto Sans (retrograde ℞) ─────────────────────────────────── */
/* ℞ U+211E (retrograde indicator) lives in none of the Noto symbol/math
 * fonts — only the base Noto Sans has it. Scoped by unicode-range to that
 * one codepoint, so this face never competes with body text. */
@font-face {
  font-family:'Noto Sans';
  font-style:normal; font-weight:400; font-display:swap;
  src:url('noto-sans-subset.woff2') format('woff2');
  unicode-range: U+211E;
}

/* ─── Noto Color Emoji Flags (country flag emoji) ──────────────── */
/* Windows' Segoe UI Emoji has NO flag glyphs (flags render as 2-letter
 * codes), so we self-host a flags-only subset of Google's Noto Color Emoji.
 * Scoped by unicode-range to the regional-indicator pairs (U+1F1E6–1F1FF) so
 * it ONLY supplies country flags and never competes with other text/emoji.
 * Colour glyph (CBDT) TTF — see ./LICENSES.md for the OFL + flag-art note. */
@font-face {
  font-family:'Noto Color Emoji Flags';
  font-style:normal; font-weight:400; font-display:swap;
  src:url('noto-color-emoji-flags.ttf') format('truetype');
  unicode-range: U+1F1E6-1F1FF;
}

/* ─── --font-emoji: THE emoji font stack (DOM side) ─────────────── */
/* Single source of truth for how emoji look in the DOM, defined HERE (not in a
 * per-app stylesheet) so EVERY entry point that loads fonts.css gets it —
 * index, account, reset-password, theme-editor, credits. This is the OS/system
 * colour-emoji stack ('Noto Color Emoji Flags' first is our self-hosted flags
 * subset so country flags render on Windows, whose Segoe UI Emoji has none).
 * Its canvas twin is EMOJI_FONT_STACK in data/glyphs.js (keep the two in sync).
 * NOTE: no trailing generic (sans-serif) on purpose, so it can be spliced into
 * the middle of a larger stack (--font-body) without a generic short-circuiting
 * the text font that follows. Add `, sans-serif` at emoji-only use sites. */
:root {
  --font-emoji: 'Noto Color Emoji Flags', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', 'EmojiOne Color', 'Android Emoji';
}
