/*
  Download page — dark, because the app is dark by default and the butter
  artwork is gold; the colours below are the app's own tokens
  (app/src/theme/tokens.ts), not a second palette invented for the web.

  Two rules the copy depends on:
  · Arabic is NEVER letter-spaced. Tracking breaks the joins between letters,
    so the eyebrow and headings carry weight and size instead.
  · Line-height runs a little taller than a Latin page would want, because
    Arabic ascenders and diacritics need the room.
*/

/* ── fonts ──────────────────────────────────────────────────────────────────
   Self-hosted rather than linked to fonts.gstatic.com: one less origin to
   resolve from Saudi, no third-party request, and the CDN in front of this
   site is the same one serving the page. Latin is declared FIRST and without
   a unicode-range so it acts as the catch-all; the Arabic face is declared
   after it WITH a range, and a later matching face wins. */
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/plex-latin-400.woff2) format("woff2");
}
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/plex-latin-600.woff2) format("woff2");
}
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/plex-latin-700.woff2) format("woff2");
}
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/plex-arabic-400.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/plex-arabic-600.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Plex Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/plex-arabic-700.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --bg: #14110D;
  --surface: #1E1913;
  --line: #2E2620;
  --line-2: #3A3128;
  --text: #F5EFE4;
  --muted: #A89882;
  --dim: #6B5B45;
  --gold: #F6B93B;
  --pad: clamp(20px, 5vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* motion.ts smoothOut */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plex Arabic", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }
::selection { background: rgba(246, 185, 59, 0.28); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Ambient warmth behind the hero. Absolute, not fixed: a glow that follows
   the scroll reads as a stuck overlay rather than light on the page. */
.bloom {
  position: absolute; inset-block-start: 0; inset-inline: 0; height: 860px;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(48rem 26rem at 50% -5rem, rgba(246, 185, 59, 0.15), transparent 68%),
    radial-gradient(28rem 20rem at 85% 5rem, rgba(237, 139, 22, 0.08), transparent 70%);
}

main, footer { position: relative; z-index: 1; }
main { max-width: 1080px; margin-inline: auto; padding-inline: var(--pad); }

/* ── hero ─────────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding-block: clamp(44px, 10vh, 96px) clamp(52px, 9vh, 84px); }

.eyebrow {
  display: inline-block; margin: 0;
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(246, 185, 59, 0.06);
  color: var(--gold); font-size: 13px; font-weight: 600; line-height: 1.4;
}

.lockup {
  display: block; height: auto;
  width: min(440px, 76vw);
  margin: clamp(22px, 4.5vw, 36px) auto clamp(16px, 3vw, 24px);
}

.hero h1 {
  margin: 0 auto;
  max-width: 19ch;
  font-size: clamp(26px, 5.4vw, 43px);
  font-weight: 700;
  line-height: 1.45;
  text-wrap: balance;
}

.lede {
  margin: 14px auto 0; max-width: 36ch;
  color: var(--muted); font-size: clamp(15px, 2.3vw, 18px);
}

.fineprint { margin: 18px 0 0; color: var(--dim); font-size: 13px; }

/* ── store buttons ────────────────────────────────────────────────────────── */
.stores {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(10px, 2.4vw, 16px);
  margin-top: clamp(26px, 4.5vw, 36px);
}

.store {
  display: block; border-radius: 16px;
  transition: transform 0.24s var(--ease), filter 0.24s var(--ease);
}
.store img { display: block; height: clamp(52px, 13.5vw, 62px); width: auto; }
.store:hover { transform: translateY(-3px); filter: drop-shadow(0 12px 26px rgba(246, 185, 59, 0.3)); }
.store:active { transform: translateY(-1px) scale(0.985); }
.store:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

/* The visitor's own store leads. Markup order (Apple, then Play) matches the
   artwork and is what stands when the platform is unknown or JS is off. */
[data-os="android"] .store[data-store="android"] { order: -1; }

/* ── why-zubda cards ──────────────────────────────────────────────────────── */
/* The cards are the last thing on the page now, so this padding plus the
   footer's own margin-top is the entire gap before the rule above the footer. */
.features {
  display: grid; gap: clamp(12px, 2vw, 16px);
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  padding-block: 0 clamp(16px, 3vw, 28px);
}

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(20px, 3vw, 26px);
}
.card h3 { margin: 16px 0 8px; font-size: 17.5px; font-weight: 700; line-height: 1.5; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.8; }

.glyph {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; color: var(--gold);
  background: rgba(246, 185, 59, 0.1); border: 1px solid rgba(246, 185, 59, 0.16);
}
.glyph svg { width: 22px; height: 22px; }

/* ── footer ───────────────────────────────────────────────────────────────── */
footer {
  max-width: 1080px; margin: clamp(48px, 8vw, 76px) auto 0;
  padding: 26px var(--pad) max(34px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center; color: var(--dim); font-size: 13.5px;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-bottom: 12px; }
footer a { color: var(--muted); text-decoration: none; transition: color 0.2s var(--ease); }
footer a:hover { color: var(--gold); }
footer a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 5px; }
footer p { margin: 0; }

/* ── motion ───────────────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.75s var(--ease) both; }
  .hero > .reveal:nth-child(2) { animation-delay: 0.07s; }
  .hero > .reveal:nth-child(3) { animation-delay: 0.14s; }
  .hero > .reveal:nth-child(4) { animation-delay: 0.2s; }
  .hero > .reveal:nth-child(5) { animation-delay: 0.27s; }
  .hero > .reveal:nth-child(6) { animation-delay: 0.34s; }
}

/* `js` is added by site.js itself, never by the head script — so a failed or
   blocked site.js leaves everything visible instead of hiding the whole page
   behind an observer that will never run. */
.js .on-scroll { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .on-scroll.in { opacity: 1; transform: none; }
.js .features .card:nth-child(2) { transition-delay: 0.08s; }
.js .features .card:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .js .on-scroll { opacity: 1; transform: none; transition: none; }
}
