/* ==========================================================================
   Al Quran — website styles
   ========================================================================== */

:root {
  --night: #0c0a18;
  --night-2: #141126;
  --surface: #1b1730;
  --surface-2: #231e3d;
  --indigo: #29235c;
  --violet: #8478f6;
  --violet-soft: #b7aeff;
  --gold: #dbb13a;
  --gold-soft: #f1d27a;
  --cream: #f7f0e6;
  --olive: #4c4a16;

  --bg: var(--night);
  --bg-elev: var(--surface);
  --bg-elev-2: var(--surface-2);
  --text: #ecebf4;
  --text-muted: #a9a5bf;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: var(--gold);
  --accent-2: var(--violet-soft);
  --glass: rgba(27, 23, 48, 0.62);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --pattern-opacity: 0.07;

  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-ar: "Cairo", "Manrope", sans-serif;
  --font-quran: "Amiri", "Traditional Arabic", serif;

  --radius: 22px;
  --radius-sm: 14px;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #faf6ef;
  --bg-elev: #ffffff;
  --bg-elev-2: #f3ede3;
  --text: #1a1633;
  --text-muted: #5f5a78;
  --line: rgba(41, 35, 92, 0.1);
  --line-strong: rgba(41, 35, 92, 0.18);
  --accent: #a87d0e;
  --accent-2: #5a4fd0;
  --glass: rgba(255, 255, 255, 0.7);
  --shadow: 0 30px 70px -35px rgba(41, 35, 92, 0.35);
  --pattern-opacity: 0.06;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

html[lang="ar"] body { font-family: var(--font-ar); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: var(--gold); color: var(--night); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--night);
  font-weight: 700;
}
.skip-link:focus { top: 16px; }

/* ---------- Background layers ---------- */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: var(--pattern-opacity);
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M40 8 L49 31 L72 40 L49 49 L40 72 L31 49 L8 40 L31 31 Z'/%3E%3Cpath d='M17 17 L40 26 L63 17 L54 40 L63 63 L40 54 L17 63 L26 40 Z'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
:root[data-theme="light"] .bg-pattern { filter: invert(1); }

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(132, 120, 246, 0.25), transparent 70%),
    radial-gradient(500px 380px at 5% 10%, rgba(219, 177, 58, 0.12), transparent 70%);
}
:root[data-theme="light"] .bg-glow {
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(132, 120, 246, 0.18), transparent 70%),
    radial-gradient(500px 380px at 5% 10%, rgba(219, 177, 58, 0.18), transparent 70%);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 14px;
  inset-inline: 0;
  z-index: 50;
  transition: transform 0.4s var(--ease);
}
.nav.is-hidden { transform: translateY(-120%); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max);
  margin-inline: var(--gutter);
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
@media (min-width: 1244px) {
  .nav__inner { margin-inline: auto; }
}
html[dir="rtl"] .nav__inner { padding: 8px 16px 8px 8px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.nav__links {
  display: none;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--line); }

.nav__actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--line); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .i-sun { display: none; }
:root[data-theme="light"] .icon-btn .i-sun { display: block; }
:root[data-theme="light"] .icon-btn .i-moon { display: none; }

@media (min-width: 900px) {
  .nav__links { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 22px; height: 22px; flex: none; }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1a1408;
  box-shadow: 0 12px 30px -12px rgba(219, 177, 58, 0.7);
}
.btn--ghost {
  border-color: var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(10px);
}
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  height: 60px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-elev);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.store-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px -20px rgba(219, 177, 58, 0.6);
}
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn small { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.2; }
.store-btn strong { display: block; font-size: 18px; line-height: 1.2; }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(219, 177, 58, 0.2);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 8px rgba(219, 177, 58, 0); }
}

h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 8.5vw, 104px);
  letter-spacing: -0.03em;
}
.display em {
  font-style: italic;
  background: linear-gradient(120deg, var(--gold-soft), var(--gold) 40%, var(--violet-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[lang="ar"] .display {
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 84px);
  letter-spacing: 0;
  line-height: 1.25;
}
html[lang="ar"] .display em { font-style: normal; }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 5.5vw, 64px);
}
.section-title em { font-style: italic; color: var(--accent); }
html[lang="ar"] .section-title {
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: clamp(30px, 4.5vw, 50px);
  line-height: 1.3;
}
html[lang="ar"] .section-title em { font-style: normal; }

.lead {
  max-width: 560px;
  margin: 22px 0 0;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-muted);
}

.section { padding-block: clamp(80px, 12vw, 140px); position: relative; }
.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .lead { margin-inline: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 60px;
}

.hero__grid {
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 980px) {
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-muted);
}
.hero__meta li { display: flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--accent); }

/* Phone mockup */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 600px;
}

.orbit {
  position: absolute;
  width: min(560px, 120%);
  aspect-ratio: 1;
  color: var(--accent);
  opacity: 0.55;
  animation: spin 80s linear infinite;
}
.orbit--inner {
  width: min(420px, 90%);
  opacity: 0.3;
  color: var(--accent-2);
  animation-duration: 60s;
  animation-direction: reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.phone {
  position: relative;
  z-index: 2;
  width: 290px;
  height: 590px;
  padding: 12px;
  border-radius: 48px;
  background: linear-gradient(160deg, #3a3458, #15122a 40%, #2b2547);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    var(--shadow),
    0 0 120px -20px rgba(132, 120, 246, 0.45);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}
.phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: #121019;
  color: #ecebf4;
  font-family: var(--font-sans);
}
.phone__island {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 3;
  width: 92px;
  height: 26px;
  border-radius: 20px;
  background: #000;
  transform: translateX(-50%);
}
.app {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 50px 14px 16px;
}
.app__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #a9a5bf;
}
.app__hijri { color: var(--gold); font-weight: 700; }
.app__card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #5a2d96, #2a1758);
  box-shadow: 0 10px 30px -10px rgba(90, 45, 150, 0.7);
}
.app__label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.app__prayer { margin-top: 4px; font-size: 26px; font-weight: 800; }
.app__countdown {
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--gold-soft);
}
.app__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.app__list li {
  display: flex;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 12px;
  background: #1e1b29;
  font-size: 12.5px;
}
.app__list li.is-next {
  background: rgba(219, 177, 58, 0.14);
  box-shadow: inset 0 0 0 1px rgba(219, 177, 58, 0.5);
  color: var(--gold-soft);
  font-weight: 700;
}
.app__list time { font-variant-numeric: tabular-nums; }
.app__verse {
  margin-top: auto;
  padding: 14px;
  border-radius: 16px;
  background: #faf7f3;
  color: #1a1633;
  text-align: center;
}
.app__verse p {
  margin: 0;
  font-family: var(--font-quran);
  font-size: 19px;
  line-height: 1.9;
  direction: rtl;
}
.app__verse span { display: block; font-size: 10px; color: #5f5a78; }
.app__note {
  position: absolute;
  bottom: -2px;
  inset-inline: 0;
  font-size: 10px;
  text-align: center;
  color: #6c6888;
}

.float-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  animation: bob 6s ease-in-out infinite;
}
.float-chip svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.float-chip small { display: block; font-weight: 500; color: var(--text-muted); font-size: 11px; }
.float-chip--a { top: 30%; inset-inline-start: -6%; }
.float-chip--b { bottom: 16%; inset-inline-end: -4%; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-12px); } }

@media (max-width: 560px) {
  .hero__visual { min-height: 540px; }
  .phone { width: 260px; height: 530px; }
  .float-chip--a { inset-inline-start: 0; top: 4%; }
  .float-chip--b { inset-inline-end: 0; bottom: 6%; }
}

/* ---------- Ayah band ---------- */
.ayah-band {
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, var(--bg-elev) 20%, var(--bg-elev) 80%, transparent);
  padding-block: 44px;
  text-align: center;
}
.ayah-band__arabic {
  margin: 0;
  font-family: var(--font-quran);
  font-size: clamp(26px, 4.4vw, 44px);
  line-height: 1.8;
  color: var(--accent);
  direction: rtl;
  transition: opacity 0.6s, transform 0.6s var(--ease);
}
.ayah-band__trans {
  margin: 8px auto 0;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 16px;
  transition: opacity 0.6s 0.1s;
}
.ayah-band__ref { font-size: 13px; color: var(--text-muted); opacity: 0.7; }
.ayah-band.is-fading .ayah-band__arabic,
.ayah-band.is-fading .ayah-band__trans { opacity: 0; transform: translateY(8px); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: 30px 22px;
  background: var(--bg);
  text-align: center;
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 64px);
  line-height: 1;
  color: var(--text);
}
.stat__label { margin-top: 8px; font-size: 14px; color: var(--text-muted); }

/* ---------- Bento features ---------- */
.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .card--wide { grid-column: span 4; }
  .card--half { grid-column: span 3; }
  .card--third { grid-column: span 2; }
}

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  isolation: isolate;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(219, 177, 58, 0.12), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover { border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }

.card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(219, 177, 58, 0.22), rgba(132, 120, 246, 0.18));
  color: var(--accent);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.card p { margin: 10px 0 0; color: var(--text-muted); font-size: 15.5px; }

.card__art {
  margin-top: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Mini mushaf art */
.mushaf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2a1758, #5a2d96);
}
.mushaf__page {
  padding: 16px 14px;
  border-radius: 10px;
  background: #faf7f3;
  color: #1a1633;
  font-family: var(--font-quran);
  font-size: 15px;
  line-height: 2.1;
  text-align: justify;
  text-align-last: center;
  direction: rtl;
}
.mushaf__page .hl { background: rgba(219, 177, 58, 0.35); border-radius: 4px; }
.mushaf__head {
  margin-bottom: 6px;
  padding: 2px;
  border: 1px solid #c9b48a;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  color: #6b4f12;
}

/* Audio wave art */
.wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 64px;
}
.wave span {
  flex: 1;
  height: 30%;
  border-radius: 4px;
  background: linear-gradient(to top, var(--violet), var(--gold));
  animation: wave 1.2s ease-in-out infinite;
}
@keyframes wave { 50% { height: 100%; } }

.player {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 16px;
  background: var(--bg-elev-2);
}
.player__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1408;
}
.player__btn svg { width: 18px; height: 18px; }
.player__meta { min-width: 0; font-size: 14px; }
.player__meta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__meta span { color: var(--text-muted); font-size: 12.5px; }
.card.is-paused .wave span { animation-play-state: paused; }

/* Widget art */
.widget-art {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.widget-art div {
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--bg-elev-2);
  font-size: 12px;
  text-align: center;
  color: var(--text-muted);
}
.widget-art strong { display: block; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.widget-art .on { background: linear-gradient(135deg, #5a2d96, #2a1758); color: #d9d3ff; }
.widget-art .on strong { color: #fff; }

/* Tasbih counter */
.tasbih {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: transparent;
  width: 100%;
  text-align: start;
  transition: background 0.2s;
}
.tasbih:hover { background: var(--bg-elev-2); }
.tasbih__text { font-family: var(--font-quran); font-size: 20px; direction: rtl; }
.tasbih__count {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1408;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s var(--ease);
}
.tasbih.is-bump .tasbih__count { transform: scale(1.18); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Qibla section ---------- */
.qibla {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) { .qibla { grid-template-columns: 1fr 1fr; } }

.compass-wrap { display: grid; place-items: center; }
.compass {
  position: relative;
  width: min(380px, 84vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--bg-elev) 55%, transparent 56%),
    conic-gradient(from 0deg, rgba(219, 177, 58, 0.5), rgba(132, 120, 246, 0.5), rgba(219, 177, 58, 0.5));
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line-strong);
  touch-action: none;
}
.compass__dial {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.compass__ticks { position: absolute; inset: 0; color: var(--text-muted); }
.compass__needle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease);
}
.compass__needle svg { width: 26%; height: 70%; }
.compass__kaaba {
  position: absolute;
  top: 3%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  border-radius: 10px;
  background: var(--gold);
  color: #1a1408;
  box-shadow: 0 0 0 6px rgba(219, 177, 58, 0.2);
}
.compass__kaaba svg { width: 22px; height: 22px; }
.compass__center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 5px var(--bg-elev);
}
.compass__readout {
  margin-top: 26px;
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
}
.compass__readout strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.compass.is-aligned { box-shadow: var(--shadow), 0 0 60px -6px rgba(219, 177, 58, 0.6); }

.checklist { display: grid; gap: 14px; margin: 30px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 12px; color: var(--text-muted); }
.checklist svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--accent); }
.checklist strong { color: var(--text); }

/* ---------- Reciters ---------- */
.reciters {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.reciter {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--bg-elev-2), var(--bg-elev));
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.reciter:hover { transform: translateY(-6px); border-color: var(--accent); }
.reciter__img {
  height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: radial-gradient(circle at 50% 90%, rgba(219, 177, 58, 0.25), transparent 60%);
}
.reciter__img img { height: 240px; width: auto; object-fit: contain; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.35)); }
.reciter__body {
  padding: 18px 20px 22px;
  border-top: 1px solid var(--line);
}
.reciter__body strong { display: block; font-size: 18px; }
.reciter__body span { font-family: var(--font-quran); font-size: 18px; color: var(--accent); }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  gap: 16px;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  position: relative;
  padding: 28px;
  border-top: 1px solid var(--line-strong);
}
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
}
.steps h3 { font-size: 20px; font-weight: 800; }
.steps p { margin: 8px 0 0; color: var(--text-muted); font-size: 15.5px; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 8vw, 90px) var(--gutter);
  border-radius: 32px;
  background:
    radial-gradient(500px 300px at 90% 0%, rgba(219, 177, 58, 0.35), transparent 70%),
    linear-gradient(135deg, #3b1e77, #29235c 55%, #1a1640);
  color: #fff;
  text-align: center;
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M40 8 L49 31 L72 40 L49 49 L40 72 L31 49 L8 40 L31 31 Z'/%3E%3Cpath d='M17 17 L40 26 L63 17 L54 40 L63 63 L40 54 L17 63 L26 40 Z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.cta > * { position: relative; z-index: 1; }
.cta img { width: 84px; height: 84px; margin: 0 auto 24px; border-radius: 22px; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5); }
.cta .section-title em { color: var(--gold-soft); }
.cta .lead { margin-inline: auto; color: rgba(255, 255, 255, 0.75); }
.cta__stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.cta .store-btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.cta .store-btn small { color: rgba(255, 255, 255, 0.65); }

/* ---------- Footer ---------- */
.footer {
  padding-block: 48px 36px;
  border-top: 1px solid var(--line);
  margin-top: clamp(60px, 10vw, 120px);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.footer__links a { color: var(--text-muted); transition: color 0.2s; }
.footer__links a:hover { color: var(--text); }
.footer__copy { width: 100%; margin: 18px 0 0; font-size: 13px; color: var(--text-muted); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Language visibility (used by privacy page) ---------- */
html[lang="en"] [data-lang="ar"],
html[lang="ar"] [data-lang="en"] { display: none !important; }

/* ==========================================================================
   Privacy policy page
   ========================================================================== */
.policy-hero { padding-top: 150px; padding-bottom: 40px; }
.policy-hero .display { font-size: clamp(44px, 7vw, 84px); }
.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 56px;
}
.summary__item {
  display: flex;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}
.summary__item svg { width: 24px; height: 24px; flex: none; color: var(--accent); }
.summary__item strong { display: block; font-size: 15.5px; }
.summary__item span { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

.policy {
  display: grid;
  gap: 48px;
  padding-bottom: 40px;
}
@media (min-width: 960px) { .policy { grid-template-columns: 250px 1fr; } }

.toc {
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}
@media (min-width: 960px) { .toc { position: sticky; top: 100px; } }
.toc__title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: 7px 12px;
  border-inline-start: 2px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--text); background: var(--line); }
.toc a.is-active { color: var(--accent); border-color: var(--accent); background: var(--line); }

.progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  z-index: 60;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--violet));
  transform: scaleX(0);
  transform-origin: left;
}
html[dir="rtl"] .progress { transform-origin: right; }

.prose { max-width: 760px; min-width: 0; }
.prose section { scroll-margin-top: 110px; padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.prose section:last-child { border-bottom: 0; }
.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
}
.prose h2 .num { font-family: var(--font-display); font-weight: 400; font-size: 1.1em; color: var(--accent); }
.prose h3 { margin: 24px 0 8px; font-size: 18px; font-weight: 800; }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--bg-elev); color: var(--text); font-weight: 700; }
.prose td { color: var(--text-muted); }
.prose tr:last-child td { border-bottom: 0; }

.callout {
  display: flex;
  gap: 14px;
  margin: 20px 0;
  padding: 18px 20px;
  border: 1px solid rgba(219, 177, 58, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(219, 177, 58, 0.08);
}
.callout svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 3px; }
.callout p { margin: 0; color: var(--text); }

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

/* ---------- Small screens ---------- */
.brand span { white-space: nowrap; }
@media (max-width: 440px) {
  .nav__actions .btn--sm { display: none; }
}
@media (max-width: 560px) {
  .mushaf { grid-template-columns: 1fr; }
  .mushaf__page:last-child { display: none; }
}
