/* Shared look for the public pages (home, privacy): the app's ink-and-gold palette, right to left. */
:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --ink: #141B2D;
  --soft: #4A5368;
  --muted: #6B7389;
  --border: #E4E6EC;
  --gold: #B8862B;
  --accent: #8C6420;
  --accent-soft: #F6EEDC;
  --hero: #10151F;
  --hero-card: #1F2A44;
  --hero-border: #2E3A57;
  --hero-text: #F4F5F7;
  --hero-muted: #A9B1C4;
  --hero-accent: #E2B457;
  --radius: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151F;
    --surface: #1A2130;
    --ink: #E8E6E1;
    --soft: #C3C8D4;
    --muted: #9AA3B6;
    --border: #2E3A57;
    --accent: #E2B457;
    --accent-soft: #2A2416;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--hero-accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: var(--hero); color: var(--hero-text); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hero-text); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-family: "Aref Ruqaa", serif; font-size: 26px; font-weight: 700; color: var(--hero-accent); line-height: 1; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--hero-muted); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--hero-text); background: var(--hero-card); }

/* Hero */
.hero { background: var(--hero); color: var(--hero-text); padding: 40px 0 64px; border-radius: 0 0 36px 36px; text-align: center; }
.hero .icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.hero h1 { font-family: "Aref Ruqaa", serif; font-size: clamp(44px, 9vw, 72px); font-weight: 700; color: var(--hero-accent); margin: 18px 0 0; line-height: 1.3; }
.hero .tagline { font-size: clamp(18px, 3.4vw, 22px); color: var(--hero-text); margin: 6px 0 0; }
.hero .lead { color: var(--hero-muted); max-width: 620px; margin: 14px auto 0; }

.stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 20px;
  border-radius: 16px; text-decoration: none; font-weight: 600; font-size: 16px;
  background: var(--hero-accent); color: var(--hero);
}
.store small { display: block; font-weight: 400; font-size: 12px; opacity: .8; line-height: 1.2; }
.store.soon { background: transparent; color: var(--hero-muted); border: 1px solid var(--hero-border); cursor: default; }
.store svg { width: 24px; height: 24px; flex: none; }

/* Sample verse card on the hero */
.verse {
  max-width: 560px; margin: 36px auto 0; padding: 22px 20px; border-radius: var(--radius);
  background: var(--hero-card); border: 1px solid var(--hero-border);
}
.verse p { font-family: "Noto Naskh Arabic", serif; font-size: clamp(18px, 3.6vw, 22px); line-height: 2; margin: 0; color: var(--hero-text); }
.verse cite { display: block; margin-top: 10px; font-style: normal; color: var(--hero-accent); font-size: 15px; }

.ornament { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px auto; }
.ornament i { width: 46px; height: 1px; background: var(--hero-accent); opacity: .6; }
.ornament b { width: 8px; height: 8px; border: 1.2px solid var(--hero-accent); transform: rotate(45deg); }

/* Sections */
section { padding: 56px 0 0; }
.section-title { font-family: "Noto Naskh Arabic", serif; font-weight: 700; font-size: clamp(24px, 4.5vw, 30px); text-align: center; margin: 0; }
.section-sub { text-align: center; color: var(--muted); margin: 6px auto 0; max-width: 560px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 10px; text-align: center; }
.stat strong { display: block; font-size: clamp(24px, 5vw, 32px); color: var(--accent); line-height: 1.3; }
.stat span { color: var(--muted); font-size: 14px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 28px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature .glyph {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 10px;
}
.feature .glyph svg { width: 22px; height: 22px; }
.feature h3 { font-family: "Noto Naskh Arabic", serif; font-size: 19px; margin: 0 0 4px; }
.feature p { margin: 0; color: var(--soft); font-size: 15.5px; line-height: 1.8; }

.cta {
  margin-top: 56px; background: var(--hero); color: var(--hero-text); border-radius: 28px;
  padding: 34px 20px; text-align: center;
}
.cta h2 { font-family: "Noto Naskh Arabic", serif; font-size: clamp(22px, 4vw, 28px); margin: 0; }
.cta p { color: var(--hero-muted); margin: 6px 0 0; }

/* Long-form document (privacy policy) */
.doc-head { background: var(--hero); color: var(--hero-text); padding: 34px 0 44px; border-radius: 0 0 36px 36px; text-align: center; }
.doc-head h1 { font-family: "Noto Naskh Arabic", serif; font-size: clamp(30px, 6vw, 40px); margin: 0; line-height: 1.5; }
.doc-head p { color: var(--hero-muted); margin: 6px 0 0; font-size: 15px; }

.doc { max-width: 780px; margin: -22px auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 28px 24px; }
.doc h2 { font-family: "Noto Naskh Arabic", serif; font-size: 22px; margin: 34px 0 6px; padding-top: 4px; scroll-margin-top: 16px; }
.doc h2:first-of-type { margin-top: 8px; }
.doc h3 { font-size: 17px; margin: 18px 0 2px; color: var(--accent); }
.doc p { margin: 8px 0; color: var(--soft); }
.doc ul { margin: 8px 0; padding-inline-start: 22px; color: var(--soft); }
.doc li { margin: 4px 0; }
.doc strong { color: var(--ink); }
.note { background: var(--accent-soft); border-radius: 14px; padding: 12px 16px; margin: 12px 0; color: var(--ink); }

.toc { margin: 4px 0 8px; padding: 14px 18px; border: 1px dashed var(--border); border-radius: 16px; }
.toc p { margin: 0 0 4px; font-weight: 600; color: var(--ink); }
.toc ol { margin: 0; padding-inline-start: 22px; columns: 2; column-gap: 28px; }
.toc a { text-decoration: none; }

/* Footer */
footer { margin-top: 56px; padding: 26px 0 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
  .stats { gap: 8px; }
  .stat { padding: 14px 6px; }
  .doc { border-radius: 20px; padding: 22px 16px; margin-top: -18px; }
  .toc ol { columns: 1; }
  .nav a { padding: 6px 8px; font-size: 14px; }
}
