/* NoorHaven's own tokens, lifted from theme/onboarding.ts and theme/tokens.ts.
   Dark by choice rather than by default: the app's signature surface is the
   near-black ground with evergreen cards, every screenshot below is dark, and
   a light page would frame them in something the product never shows.
   Layout: one centred reading column; the screenshot rail is the only element
   allowed to run wider, and it scrolls rather than squeezing. */
:root {
  --ground: #0D1210;
  --raise: #151B17;
  --line: #232B25;
  --ink: #ECE7DA;
  --ink-dim: #9A9483;
  --ink-faint: #6E6A5E;
  --green: #16463A;
  --green-lift: #1C5546;
  --sage: #87BBA2;
  --brass: #D8B26A;
  --brass-ink: #231A0C;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Amiri", "Geeza Pro", "Noto Naskh Arabic", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 68rem; margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 42rem; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 22px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.brand b { font-family: var(--display); font-weight: 400; font-size: 1.32rem; letter-spacing: -0.01em; }
.brand b span { color: var(--brass); }
.top nav { display: flex; gap: 22px; font-size: 0.93rem; }
.top nav a { color: var(--ink-dim); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
@media (max-width: 620px) { .top nav { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: 56px 20px; text-align: center; overflow: hidden; }
/* The mihrab arch the first-run screen draws, as a line. Decorative only. */
.arch {
  position: absolute; inset: 0; margin: auto; width: 320px; height: 420px;
  pointer-events: none; opacity: 0.5;
}
.hero > * { position: relative; }
h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 4.3rem); line-height: 1.04;
  letter-spacing: -0.02em; margin: 0 0 16px; text-wrap: balance;
}
h1 span { color: var(--brass); }
.lede {
  font-size: clamp(1.08rem, 2.6vw, 1.3rem); color: var(--ink-dim);
  margin: 0 auto 26px; max-width: 32rem; text-wrap: balance;
}
.promise {
  display: inline-flex; align-items: center; gap: 9px; flex-wrap: wrap;
  justify-content: center;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-size: 0.9rem; color: var(--ink-dim);
  background: var(--raise);
}
.promise b { color: var(--sage); font-weight: 600; }

/* ---------- the action block ---------- */
.get {
  background: var(--raise); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px; margin-block: 44px;
}
.get h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 1.6rem; }
.get > p { margin: 0 0 22px; color: var(--ink-dim); font-size: 0.97rem; }

.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store {
  flex: 1 1 15rem; min-width: 0;
  display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--line); border-radius: 13px;
  padding: 13px 17px; background: #0F1412; color: var(--ink-faint);
  cursor: not-allowed;
}
.store svg { flex: none; }
.store .lines { min-width: 0; }
.store .lines i { display: block; font-style: normal; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.store .lines b { display: block; font-size: 1.02rem; font-weight: 600; color: var(--ink-dim); }
.soon {
  margin: 13px 0 0; font-size: 0.86rem; color: var(--ink-faint);
}

.rule { height: 1px; background: var(--line); margin-block: 26px; }

.enter {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; border: 0; border-radius: 13px;
  background: var(--brass); color: var(--brass-ink);
  font-family: var(--ui); font-size: 1.05rem; font-weight: 700;
  padding: 16px 20px; text-decoration: none; cursor: pointer;
}
.enter:hover { filter: brightness(1.06); }
.enter-note { margin: 11px 0 0; font-size: 0.87rem; color: var(--ink-faint); text-align: center; }

.accounts { display: flex; gap: 11px; margin-top: 16px; }
.accounts a {
  flex: 1 1 0; min-width: 0; text-align: center;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 0.97rem; background: #0F1412;
}
.accounts a:hover { border-color: var(--sage); }
@media (max-width: 460px) { .accounts { flex-direction: column; } }

/* ---------- sections ---------- */
section { padding-block: 56px; }
.eyebrow {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brass); margin: 0 0 10px; font-weight: 600;
}
h2.sec {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.8rem, 4.4vw, 2.5rem); line-height: 1.15;
  margin: 0 0 14px; letter-spacing: -0.015em; text-wrap: balance;
}
.sec-lede { color: var(--ink-dim); margin: 0 0 32px; max-width: 36rem; }

/* ---------- screenshots ---------- */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 232px;
  gap: 18px; overflow-x: auto; padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}
.shot { scroll-snap-align: start; }
.shot img {
  width: 100%; display: block; border-radius: 17px;
  border: 1px solid var(--line); background: var(--ground);
}
.shot p { margin: 11px 2px 0; font-size: 0.88rem; color: var(--ink-dim); }

/* ---------- features ---------- */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.feat {
  border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  background: var(--raise); min-width: 0;
}
.feat h3 {
  margin: 0 0 8px; font-size: 1.07rem; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.feat h3 svg { flex: none; color: var(--sage); }
.feat p { margin: 0; color: var(--ink-dim); font-size: 0.95rem; }
.feat em { font-style: normal; color: var(--ink); }

/* ---------- privacy ---------- */
.privacy { background: var(--green); border-radius: 22px; padding: 38px 32px; }
.privacy h2 { color: #F2EEE2; }
.privacy .sec-lede { color: #BFD6C9; }
.privacy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.privacy li { display: flex; gap: 12px; align-items: flex-start; color: #DCE9E1; font-size: 0.97rem; }
.privacy li svg { flex: none; margin-top: 3px; color: var(--brass); }

.ar-note {
  font-family: var(--arabic); direction: rtl; text-align: right;
  font-size: 1.22rem; line-height: 1.95; color: var(--ink-dim);
  border-inline-start: 2px solid var(--brass); padding-inline-start: 16px;
  margin-top: 26px;
}

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding-block: 34px 48px; }
.foot-row { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
footer a { color: var(--ink-dim); text-decoration: none; font-size: 0.92rem; }
footer a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.copy { color: var(--ink-faint); font-size: 0.87rem; margin: 18px 0 0; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }

/* ==========================================================================
   Arabic, and the direction that comes with it.
   One stylesheet for both pages rather than two copies: the English and Arabic
   pages are the same design and a second copy of 240 lines would drift the
   first time a colour moved. The Arabic page sets dir="rtl" lang="ar" on <html>
   and everything below keys off that.
   ========================================================================== */

/* The app's own Arabic faces. Amiri where Newsreader carries the display voice,
   Cairo where Hanken Grotesk carries the UI — the same pairing theme/fonts.ts
   remaps to when the app language is Arabic, so the page and the product read
   as one thing. */
[lang="ar"] {
  --display: "Amiri", "Geeza Pro", "Noto Naskh Arabic", serif;
  --ui: "Cairo", "Geeza Pro", system-ui, sans-serif;
}

/* Arabic script has no case and takes tracking badly: letters are joined, and
   spacing them apart breaks the join. So the uppercase eyebrow becomes a plain
   coloured label rather than a tracked-out one. */
[lang="ar"] .eyebrow { text-transform: none; letter-spacing: 0; font-size: 0.84rem; }
[lang="ar"] .store .lines i { text-transform: none; letter-spacing: 0; font-size: 0.78rem; }

/* Amiri sits smaller on the body than Newsreader at the same size, and its
   ascenders need more room between lines. */
[lang="ar"] h1 { font-size: clamp(2.5rem, 7.4vw, 4rem); line-height: 1.3; letter-spacing: 0; }
[lang="ar"] h2.sec { line-height: 1.4; letter-spacing: 0; }
[lang="ar"] body { line-height: 1.85; }
[lang="ar"] .brand b { letter-spacing: 0; }

/* The one glyph that must physically turn round: the arrow in the enter button
   points the way the reader is going. Everything else is laid out with logical
   properties (padding-inline, border-inline-start) and flips on its own. */
[dir="rtl"] .enter svg { transform: scaleX(-1); }

/* The mirror of .ar-note on the English page: a line of the other language,
   set in its own direction and face. */
.en-note {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  direction: ltr; text-align: left;
  font-size: 1rem; line-height: 1.6; color: var(--ink-dim);
  border-inline-start: 2px solid var(--brass); padding-inline-start: 16px;
  margin-top: 26px;
}

/* The language switch, in the top bar beside the section links. */
.lang {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 13px; color: var(--ink-dim); text-decoration: none;
  font-size: 0.88rem; white-space: nowrap;
}
.lang:hover { border-color: var(--sage); color: var(--ink); }
/* The switch stays reachable on a phone, where the section links are hidden. */
@media (max-width: 620px) {
  .top nav { display: flex; }
  .top nav a:not(.lang) { display: none; }
}
