/* Quranak — shared site styles. Palette mirrors lib/theme/app_theme.dart */
:root {
  --ink: #15110C;
  --ink2: #4A4239;
  --ink3: #6E655A;
  --bg: #F4F1EB;
  --bg2: #EBE6DC;
  --card: #FBF9F4;
  --line: #E6E0D5;
  --gold: #C59A2C;
  --gold-bright: #E2B33F;
  --accent: #15110C;
  --on-accent: #F4F1EB;
  --butter: #FFE9A8;
  --blue: #C9D8FF;
  --sage: #DDEBD8;
  --rose: #F8D9D2;
  --pastel-ink: #15110C;
  --shadow: 0 1px 2px rgba(21,17,12,.04), 0 12px 32px -12px rgba(21,17,12,.14);
  --radius: 24px;
  --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --quran: "Amiri", "Scheherazade New", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F4F1EB; --ink2: #BDB4A6; --ink3: #8F8576;
    --bg: #15110C; --bg2: #1F1A14; --card: #1F1A14; --line: #3A3228;
    --gold: #E2B33F; --accent: #F4F1EB; --on-accent: #15110C;
    --butter: #3A3218; --blue: #232B40; --sage: #243022; --rose: #3A2622;
    --pastel-ink: #F4F1EB;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F4F1EB; --ink2: #BDB4A6; --ink3: #8F8576;
  --bg: #15110C; --bg2: #1F1A14; --card: #1F1A14; --line: #3A3228;
  --gold: #E2B33F; --accent: #F4F1EB; --on-accent: #15110C;
  --butter: #3A3218; --blue: #232B40; --sage: #243022; --rose: #3A2622;
  --pastel-ink: #F4F1EB;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

/* Language switching: elements marked .en / .ar */
html[lang="ar"] .en, html[lang="en"] .ar { display: none !important; }
html[lang="ar"] body { line-height: 1.75; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a.link { display: none; text-decoration: none; color: var(--ink2); font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav-links a.link:hover { color: var(--ink); background: var(--bg2); }
@media (min-width: 820px) { .nav-links a.link { display: inline-block; } }
.chip-btn {
  appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; height: 38px; min-width: 38px; padding: 0 14px;
  border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.chip-btn:hover { border-color: var(--ink3); }
.chip-btn svg { width: 18px; height: 18px; }
.icon-btn { padding: 0; width: 38px; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--accent); color: var(--on-accent);
  padding: 12px 22px 12px 18px; border-radius: 999px; font-weight: 500; font-size: 15px;
  transition: transform .15s, opacity .15s; line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn svg { width: 24px; height: 24px; flex: none; }
.btn small { display: block; font-size: 11px; opacity: .7; font-weight: 400; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink3); }

/* ── Doc pages (privacy / support) ───────────────── */
.doc { max-width: 720px; margin: 0 auto; padding: 40px 16px 80px; }
.doc .eyebrow { color: var(--gold); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
html[lang="ar"] .doc .eyebrow { letter-spacing: 0; }
.doc h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin-bottom: 10px; }
.doc .updated { color: var(--ink3); font-size: 15px; margin-bottom: 36px; }
.doc h2 { font-size: 20px; font-weight: 600; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--ink2); font-size: 16px; }
.doc p { margin-bottom: 12px; }
.doc ul { padding-inline-start: 22px; margin-bottom: 14px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--ink); text-underline-offset: 3px; }
.doc a.btn { color: var(--on-accent); text-decoration: none; }
.doc strong { color: var(--ink); font-weight: 600; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 500; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 300; color: var(--ink3); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 18px; margin: 0; color: var(--ink2); }

/* ── Footer ──────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--ink3); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer a { text-decoration: none; color: var(--ink2); }
.footer a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
