/* ============================================================
   NAKHLA JET — Base: reset, fonts, typography, layout, motion
   Consumes semantic tokens from tokens.css only.
   ============================================================ */

/* ---- Latin brand fonts (self-hosted, as in v3) ----
   Cormorant Infant (titles; the closest open font to the Instagram tiles) and
   Jost (everything else), from /fonts. Both are variable and SIL Open Font
   License; latin + latin-ext subsets only (Arabic uses Camel). */
@font-face {
  font-family: 'Cormorant Infant';
  font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/cormorant-infant-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Infant';
  font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/cormorant-infant-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Jost';
  font-style: normal; font-weight: 300 500; font-display: swap;
  src: url('../fonts/jost-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal; font-weight: 300 500; font-display: swap;
  src: url('../fonts/jost-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Arabic brand font (The Year of the Camel · MOC) ---- */
/* Latin stays Cormorant Infant and Jost: Camel is Arabic-only, subset to the
   Arabic ranges as woff2 (fonts/README.md), and the unicode-range means a
   browser fetches it only for Arabic text set in it. */
@font-face {
  font-family: 'TheYearofTheCamel';
  src: url('../fonts/TheYearofTheCamel-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
  unicode-range: U+0020, U+00A0, U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'TheYearofTheCamel';
  src: url('../fonts/TheYearofTheCamel-Medium.woff2') format('woff2');
  font-weight: 500 600; font-display: swap;
  unicode-range: U+0020, U+00A0, U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'TheYearofTheCamel';
  src: url('../fonts/TheYearofTheCamel-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
  unicode-range: U+0020, U+00A0, U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

/* ---------------- Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* The hidden attribute must win over component display rules (e.g. .nj-btn sets
   display:inline-flex, which otherwise keeps a [hidden] button visible). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--nj-bg);
  color: var(--nj-text);
  font-family: var(--nj-font-body);
  font-size: var(--nj-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* The light in the room, as in v3: a glow from the top and sky light from the
   foot, fixed so it stays put while the page moves. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% 0%, var(--nj-glow-top) 0%, transparent 62%),
    radial-gradient(90% 45% at 50% 108%, var(--nj-glow-bottom) 0%, transparent 70%);
}
img, picture, video, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: var(--nj-accent-bright); text-decoration: none; }
a:hover { color: var(--nj-accent); }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--nj-accent-bright); outline-offset: 2px; }

/* ---------------- Type scale ---------------- */
.nj-lead { font-size: var(--nj-text-lead); line-height: 1.6; color: var(--nj-text-soft); }

@media (min-width: 900px) {
  .nj-lead { font-size: var(--nj-text-lead-md); }
  body { font-size: var(--nj-text-body-md); }
}

/* An old query-string URL's page while legacy-redirect.js sends it on */
.nj-legacy { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px; }

/* ---------------- Skip link ----------------
   Hidden above the page, not off to one side: a side offset becomes
   sideways scroll when the page reads right to left. */
.nj-skip {
  position: absolute; top: 0; inset-inline-start: 0; z-index: 200;
  transform: translateY(-110%);
  background: var(--nj-accent); color: var(--nj-on-accent);
  padding: 10px 18px; border-end-end-radius: var(--nj-r-card);
}
.nj-skip:focus { transform: none; }

/* ---------------- Arabic / RTL ----------------
   The Arabic (Camel/Kufi) font is scoped to ACTUAL Arabic text, never to
   Latin. Full-page Arabic uses [lang="ar"] (set only when the Arabic edition
   is ready); inline Arabic words in an English page use .nj-arabic. This keeps
   Latin in Cormorant Infant and Jost even next to an Arabic word. */
.nj-arabic,
[lang="ar"] {
  font-family: 'TheYearofTheCamel', 'Reem Kufi', 'Noto Kufi Arabic', var(--nj-font-body);
}
[lang="ar"] { line-height: 1.75; }

/* ---------------- Motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Utility */
.nj-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

