/*
 * EYalla brand typography — @font-face declarations
 *
 * Three font families:
 *   - Fractul (Latin display) — paid commercial license, user-owned
 *   - Inter (Latin body) — SIL OFL, free
 *   - Alexandria (Arabic body + display) — SIL OFL, free
 *
 * Source files live in:
 *   brand/typography/latin/fractul/   — 36 .otf files
 *   brand/typography/latin/Inter/     — 9 .ttf files
 *   brand/typography/arabic/Alexandria/ — variable + 9 static .ttf files
 *
 * For production web delivery we should convert .otf/.ttf -> .woff2 once
 * (smaller, broadly supported). Until then these declarations work in all
 * modern browsers.
 *
 * Pair selection:
 *   - Latin headlines: Fractul (Regular / Bold / Black for display; Light for big serif-like elegance)
 *   - Latin body: Inter (Regular / Medium / SemiBold)
 *   - Arabic headlines + body: Alexandria (Regular / SemiBold / Bold)
 *
 * Per tasks/lessons.md "Mobile-First Design": load Arabic conditionally based on
 * App::getLocale() to keep mobile bundle size down.
 */

/* ───── Fractul (Latin display) ───── */
@font-face {
  font-family: 'Fractul';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-Light.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-LightItalic.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-Italic.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-Medium.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-SemiBold.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-Bold.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-BoldItalic.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-ExtraBold.otf') format('opentype');
}
@font-face {
  font-family: 'Fractul';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/brand/typography/latin/fractul/Fractul-Black.otf') format('opentype');
}

/* ───── Inter (Latin body) ───── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/brand/typography/latin/Inter/Inter-VariableFont_slnt,wght.ttf') format('truetype-variations');
}

/* ───── Alexandria (Arabic body + display) — OFL, free ───── */
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/brand/typography/arabic/Alexandria/Alexandria-VariableFont_wght.ttf') format('truetype-variations');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007E;
}

/* ───── Tailwind class shortcuts (consumed by tailwind.config.js) ───── */
:root {
  --font-display: 'Fractul', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Fractul', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-arabic:  'Alexandria', 'Tajawal', 'Cairo', 'Noto Sans Arabic', sans-serif;
}

/* When document is RTL (Arabic), prefer Alexandria for both display and body. */
[dir="rtl"] {
  --font-display: 'Alexandria', sans-serif;
  --font-body:    'Alexandria', sans-serif;
}
