/**
 * Frontend Typography
 * ===================
 * English / Latin:  DM Sans (geometric, matches Expo Arabic's feel)
 * Arabic:           Noto Sans Arabic (Google Fonts – best Arabic coverage)
 *
 * Expo Arabic (by Underware) is a licensed commercial font.
 * Noto Sans Arabic + DM Sans is the closest free pairing with
 * the same geometric-humanist character.
 *
 * To upgrade to the real Expo Arabic, purchase a license from
 * https://www.underware.nl/ and replace the @font-face blocks below.
 */

/* ---- Latin (English): DM Sans ---- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap&subset=latin');

/* ---- Arabic: Noto Sans Arabic (300 Light, 400 Regular, 500 Medium, 600 SemiBold, 700 Bold) ---- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/**
 * Site-wide font-family rules
 * ---------------------------
 * We declare the Arabic font FIRST in the stack so Arabic glyphs
 * are served by Noto Sans Arabic, and Latin glyphs fall through
 * to DM Sans (the font stack works per-character, not per element).
 */
:root {
    --font-primary: 'Noto Sans Arabic', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-latin:   'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic:  'Noto Sans Arabic', sans-serif;
}

/* Apply globally */
*,
html,
body {
    font-family: var(--font-primary) !important;
}

/* Force Arabic text in RTL contexts */
[dir="rtl"],
[dir="rtl"] * {
    font-family: var(--font-arabic) !important;
}

/* Preserve monospace where needed */
code, pre, kbd, samp {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
}