/* Forgotten Futurist (Typodermic / Ray Larabie) — self-hosted, used site-wide.
   Weight ranges map the site's 400–500 -> Regular and 600–900 -> Bold. */
@font-face {
  font-family: 'Forgotten Futurist';
  src: url('fonts/ForgottenFuturist-Regular.otf') format('opentype');
  font-weight: 100 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Forgotten Futurist';
  src: url('fonts/ForgottenFuturist-Bold.otf') format('opentype');
  font-weight: 501 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Forgotten Futurist';
  src: url('fonts/ForgottenFuturist-Italic.otf') format('opentype');
  font-weight: 100 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Forgotten Futurist';
  src: url('fonts/ForgottenFuturist-BoldItalic.otf') format('opentype');
  font-weight: 501 900; font-style: italic; font-display: swap;
}

/* Arabic (2026-09-23): Noto Kufi Arabic (Google, SIL Open Font License 1.1 — fonts/NotoKufiArabic-OFL.txt), Arabic
   subset only, merged into the SAME family by unicode-range: Latin text keeps Forgotten Futurist, Arabic letters come
   from Noto Kufi Arabic, so every existing 'Forgotten Futurist' stack shows Arabic in the matching square Kufi style.
   Declared AFTER the Latin faces, so it is checked first for the characters in its range. The italic copies stop the
   browser from slanting Arabic (Arabic has no italic). */
@font-face {
  font-family: 'Forgotten Futurist';
  src: url('fonts/NotoKufiArabic-Regular.woff2') format('woff2');
  font-weight: 100 500; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Forgotten Futurist';
  src: url('fonts/NotoKufiArabic-Bold.woff2') format('woff2');
  font-weight: 501 900; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Forgotten Futurist';
  src: url('fonts/NotoKufiArabic-Regular.woff2') format('woff2');
  font-weight: 100 500; font-style: italic; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Forgotten Futurist';
  src: url('fonts/NotoKufiArabic-Bold.woff2') format('woff2');
  font-weight: 501 900; font-style: italic; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* Arabic / right-to-left page rules (js/lang.js sets <html lang="ar" dir="rtl">). Nothing here touches English. */
:root[lang="ar"] body, :root[lang="ar"] body *:not(:lang(en)) { letter-spacing: 0 !important; }   /* spacing breaks Arabic joining; Latin-only elements marked lang="en" keep theirs */
:root[lang="ar"] body * { text-transform: none !important; }   /* upper-casing only hit the Latin inside Arabic (e-mails, «Hardware ID») */
:root[lang="ar"] em, :root[lang="ar"] i { font-style: normal; }
/* Static bits that must be right from the first frame on dynamic pages: <span data-l="en">…</span><span data-l="ar">…</span> */
:root[lang="ar"] [data-l="en"], :root:not([lang="ar"]) [data-l="ar"] { display: none !important; }
/* Arrows / chevrons that point "forward" */
[dir="rtl"] .tp-flip { transform: scaleX(-1); }
/* Values dropped into Arabic sentences (e-mails, codes, numbers) keep their own direction */
[dir="rtl"] .sc-interp, [dir="rtl"] bdi { unicode-bidi: isolate; }
/* Fields that always hold left-to-right text (e-mail, phone, Hardware ID, codes, keys): dir="ltr" on the field;
   in Arabic they still line up with the right-aligned labels. */
[dir="rtl"] input[dir="ltr"], [dir="rtl"] textarea[dir="ltr"] { text-align: right; }
[dir="rtl"] input[dir="ltr"]:placeholder-shown { direction: rtl; }
/* Plain-HTML dynamic pages (<body data-i18n-static>, e.g. the admin page): hidden until js/lang.js has translated them */
:root[lang="ar"][data-i18n="dynamic"]:not([data-i18n-done]) body[data-i18n-static] { visibility: hidden; }
