/* =============================================================
   QuranSphere — Premium Homepage Design System
   Emerald · Gold · Glass. No build step required.
   ============================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --emerald-900: #042f23;
  --emerald-800: #064e3b;
  --emerald-700: #066a4f;
  --emerald-600: #0b8463;
  --emerald-500: #10b981;
  --emerald-300: #6ee7b7;
  --gold-600: #b8860b;
  --gold-500: #d4af37;
  --gold-400: #e8c869;
  --gold-300: #f3dd9a;
  --slate-950: #060d0b;
  --slate-900: #0a1512;
  --slate-800: #0f201b;
  --ink: #e8f3ee;
  --ink-soft: #a9c6ba;
  --white: #ffffff;

  /* Semantic */
  --bg: var(--slate-950);
  --bg-elev: var(--slate-900);
  --text: var(--ink);
  --text-dim: var(--ink-soft);
  --accent: var(--gold-500);
  --brand: var(--emerald-500);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-brd: rgba(255, 255, 255, 0.10);
  --glass-brd-strong: rgba(212, 175, 55, 0.28);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", "Inter", serif;
  --font-arabic: "Amiri", "Scheherazade New", "Traditional Arabic", serif;

  /* Rhythm */
  --container: 1200px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 60px -12px rgba(16, 185, 129, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; border-radius: 6px; }

/* ---------- Ambient backdrop ---------- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 700px at 75% -10%, rgba(16, 185, 129, 0.14), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(212, 175, 55, 0.10), transparent 60%),
    linear-gradient(180deg, var(--slate-950), var(--slate-900));
}

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(4rem, 9vw, 8rem) 0; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-400);
  padding: .4rem .9rem; border-radius: 999px;
  border: 1px solid var(--glass-brd-strong);
  background: rgba(212, 175, 55, 0.06);
}
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2.title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 1rem 0 .8rem; }
.lead { color: var(--text-dim); font-size: clamp(1rem, 1.6vw, 1.18rem); }
.text-gold { color: var(--gold-400); }
.text-grad {
  background: linear-gradient(100deg, var(--gold-300), var(--gold-500) 45%, var(--emerald-300));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .9rem 1.6rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; letter-spacing: .01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  color: var(--white);
  box-shadow: 0 10px 30px -8px rgba(16, 185, 129, 0.55);
}
.btn-primary:hover { box-shadow: 0 16px 40px -8px rgba(16, 185, 129, 0.7); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #2a1f00;
  box-shadow: 0 10px 30px -8px rgba(212, 175, 55, 0.5);
}
.btn-ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(12px);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--glass-brd-strong); background: rgba(255,255,255,0.07); }

/* ---------- Glass card ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

/* =============================================================
   Top bar (Islamic date + verse ticker)
   ============================================================= */
.topbar {
  font-size: .82rem; color: var(--text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(4, 15, 12, 0.6);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1.25rem; }
.topbar .hijri { display: inline-flex; gap: .5rem; align-items: center; }
.topbar .verse { overflow: hidden; white-space: nowrap; max-width: 60%; }
.topbar .verse em { color: var(--gold-300); font-style: normal; }
.topbar .links { display: flex; gap: 1rem; }
.topbar a:hover { color: var(--gold-300); }

/* =============================================================
   Navigation
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s, padding .3s;
}
.nav.scrolled {
  background: rgba(6, 13, 11, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 18px 40px -28px rgba(0,0,0,0.9);
}
.nav .inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.brand .mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-800));
  border: 1px solid var(--glass-brd-strong);
  box-shadow: var(--shadow-glow);
}
.brand .mark svg { width: 22px; height: 22px; }
.brand b { color: var(--white); }
.brand span { color: var(--gold-400); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .95rem; color: var(--text-dim); font-weight: 500; transition: color .2s; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gold-400); transition: width .25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: .75rem; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--glass-brd); }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px auto; transition: .3s; }

/* =============================================================
   HERO (3D)
   ============================================================= */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; z-index: 0; }
.hero::after { /* readability vignette */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(80% 80% at 30% 45%, transparent 30%, rgba(6,13,11,0.55) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 7rem 0 5rem; max-width: 760px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 1.5rem 0 1.2rem; }
.hero p.sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text-dim); max-width: 600px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 2.4rem; margin-top: 3.5rem;
  padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stats .stat .num { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: var(--white); font-weight: 700; }
.hero-stats .stat .lbl { font-size: .82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; }
.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2;
  color: var(--text-dim); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.scroll-cue .line { width: 1px; height: 40px; background: linear-gradient(var(--gold-400), transparent); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* =============================================================
   Reveal animations
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

/* =============================================================
   Features grid ("Everything You Need")
   ============================================================= */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.feature-card { padding: 2rem; transition: transform .35s var(--ease), border-color .35s; }
.feature-card:hover { transform: translateY(-6px); border-color: var(--glass-brd-strong); }
.feature-card .ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.2rem;
  background: linear-gradient(135deg, rgba(16,185,129,0.22), rgba(212,175,55,0.14));
  border: 1px solid var(--glass-brd-strong);
}
.feature-card .ico svg { width: 26px; height: 26px; stroke: var(--gold-300); }
.feature-card h3 { font-size: 1.25rem; margin-bottom: .5rem; color: var(--white); }
.feature-card p { color: var(--text-dim); font-size: .95rem; }

/* =============================================================
   Reader preview
   ============================================================= */
.reader-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.reader-mock { padding: 2rem; position: relative; }
.reader-mock .surah-head {
  text-align: center; padding-bottom: 1.4rem; margin-bottom: 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.reader-mock .surah-head .name-ar { font-family: var(--font-arabic); font-size: 2.2rem; color: var(--gold-300); }
.reader-mock .surah-head .name-en { color: var(--text-dim); font-size: .9rem; letter-spacing: .1em; }
.ayah { padding: 1.1rem 0; border-bottom: 1px dashed rgba(255,255,255,0.07); }
.ayah .ar { font-family: var(--font-arabic); font-size: 1.9rem; line-height: 2.2; text-align: right; color: var(--ink); direction: rtl; }
.ayah .tr { color: var(--text-dim); font-size: .96rem; margin-top: .5rem; }
.ayah .num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; font-size: .72rem; margin-left: .4rem;
  border-radius: 50%; border: 1px solid var(--glass-brd-strong); color: var(--gold-400);
}
.reader-feats li { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; color: var(--text-dim); }
.reader-feats li svg { flex: none; width: 22px; height: 22px; stroke: var(--emerald-300); margin-top: 2px; }
.reader-feats li b { color: var(--white); display: block; font-family: var(--font-sans); font-weight: 600; }

/* =============================================================
   Quick listen / audio
   ============================================================= */
.listen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.track {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem;
  transition: transform .3s var(--ease), border-color .3s;
}
.track:hover { transform: translateY(-4px); border-color: var(--glass-brd-strong); }
.track .play {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  box-shadow: 0 8px 20px -8px rgba(16,185,129,0.6);
}
.track .play svg { width: 18px; height: 18px; fill: var(--white); }
.track .meta .t { font-weight: 600; color: var(--white); }
.track .meta .s { font-size: .82rem; color: var(--text-dim); }

/* =============================================================
   Reciter showcase
   ============================================================= */
.reciter-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.2rem; }
.reciter {
  text-align: center; padding: 1.8rem 1.2rem; transition: transform .35s var(--ease), border-color .35s;
}
.reciter:hover { transform: translateY(-6px); border-color: var(--glass-brd-strong); }
.reciter .avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1rem;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.8rem; color: var(--gold-300);
  background: linear-gradient(135deg, var(--emerald-700), var(--slate-800));
  border: 2px solid var(--glass-brd-strong);
}
.reciter .name { font-weight: 600; color: var(--white); }
.reciter .role { font-size: .8rem; color: var(--text-dim); }

/* =============================================================
   Memorization (Hifz)
   ============================================================= */
.hifz-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hifz-card { padding: 2.2rem; }
.progress-ring { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.6rem; }
.progress-ring svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.progress-ring .track-c { stroke: rgba(255,255,255,0.08); }
.progress-ring .bar-c { stroke: var(--gold-400); stroke-linecap: round; transition: stroke-dashoffset 1.4s var(--ease); }
.progress-ring .pct { font-family: var(--font-display); font-size: 1.5rem; color: var(--white); }
.hifz-stat-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hifz-stat { flex: 1; min-width: 120px; padding: 1.1rem; text-align: center; }
.hifz-stat .n { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-300); }
.hifz-stat .l { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

/* =============================================================
   Prayer times
   ============================================================= */
.prayer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.prayer {
  text-align: center; padding: 1.5rem 1rem; transition: transform .3s var(--ease);
  position: relative; overflow: hidden;
}
.prayer.active { border-color: var(--glass-brd-strong); background: rgba(212,175,55,0.07); }
.prayer.active::before {
  content: "Now"; position: absolute; top: .6rem; right: .6rem; font-size: .62rem;
  color: #2a1f00; background: var(--gold-400); padding: .12rem .5rem; border-radius: 999px; font-weight: 700;
}
.prayer .ico svg { width: 28px; height: 28px; stroke: var(--gold-300); margin: 0 auto .6rem; }
.prayer .name { font-weight: 600; color: var(--white); }
.prayer .time { color: var(--text-dim); font-size: .95rem; }

/* =============================================================
   Blog
   ============================================================= */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.6rem; }
.post { overflow: hidden; transition: transform .35s var(--ease), border-color .35s; }
.post:hover { transform: translateY(-6px); border-color: var(--glass-brd-strong); }
.post .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--emerald-700), var(--slate-800)); display: grid; place-items: center; }
.post .thumb svg { width: 48px; height: 48px; stroke: rgba(212,175,55,0.5); }
.post .body { padding: 1.5rem; }
.post .tag { font-size: .72rem; color: var(--gold-400); letter-spacing: .1em; text-transform: uppercase; }
.post h3 { font-size: 1.2rem; margin: .6rem 0; color: var(--white); }
.post p { color: var(--text-dim); font-size: .92rem; }
.post .more { color: var(--gold-300); font-size: .88rem; font-weight: 600; margin-top: 1rem; display: inline-flex; gap: .4rem; }

/* =============================================================
   App download (multi-store)
   ============================================================= */
.app-section { position: relative; }
.app-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; margin-top: 1.8rem; }
.store-btn {
  display: flex; align-items: center; gap: .8rem; padding: .8rem 1.1rem; border-radius: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--glass-brd);
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.store-btn:hover { transform: translateY(-3px); border-color: var(--glass-brd-strong); background: rgba(255,255,255,0.07); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn .txt small { display: block; font-size: .66rem; color: var(--text-dim); }
.store-btn .txt b { font-size: .92rem; color: var(--white); }
/* Phone mockup */
.phone {
  width: 280px; height: 560px; margin: 0 auto; border-radius: 40px; position: relative;
  background: linear-gradient(160deg, var(--slate-800), var(--slate-950));
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  padding: 14px; animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(-2deg); } }
.phone .screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden;
  background: linear-gradient(180deg, var(--emerald-900), var(--slate-900));
  display: flex; flex-direction: column; align-items: center; padding: 2.4rem 1.2rem; text-align: center;
}
.phone .notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 90px; height: 20px; border-radius: 999px; background: #000; z-index: 2; }
.phone .screen .ph-ar { font-family: var(--font-arabic); font-size: 2.4rem; color: var(--gold-300); margin-bottom: .4rem; }
.phone .screen .ph-t { color: var(--white); font-weight: 600; margin-top: 1.4rem; }
.phone .screen .ph-wave { display: flex; gap: 3px; align-items: flex-end; height: 40px; margin-top: 1.4rem; }
.phone .screen .ph-wave i { width: 4px; background: var(--emerald-500); border-radius: 4px; animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 0%,100% { height: 8px; } 50% { height: 36px; } }

/* =============================================================
   Streaming platforms
   ============================================================= */
.stream-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.stream-btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.4rem; border-radius: 999px;
  border: 1px solid var(--glass-brd); background: var(--glass-bg); font-weight: 600; font-size: .92rem;
  transition: transform .25s var(--ease), border-color .25s;
}
.stream-btn:hover { transform: translateY(-3px); border-color: var(--glass-brd-strong); }
.stream-btn svg { width: 20px; height: 20px; }

/* =============================================================
   Footer
   ============================================================= */
.footer { border-top: 1px solid rgba(255,255,255,0.07); padding: 4rem 0 2rem; background: rgba(4,15,12,0.5); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer h4 { font-family: var(--font-sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 1.1rem; }
.footer a { color: var(--text-dim); font-size: .92rem; display: block; margin-bottom: .65rem; transition: color .2s; }
.footer a:hover { color: var(--text); }
.footer .about p { color: var(--text-dim); font-size: .92rem; margin: 1rem 0; max-width: 320px; }
.socials { display: flex; gap: .7rem; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--glass-brd); margin: 0; }
.socials a:hover { border-color: var(--glass-brd-strong); color: var(--gold-300); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,0.06); text-align: center; color: var(--text-dim); font-size: .85rem; }

/* =============================================================
   Floating download button (sticky CTA)
   ============================================================= */
.float-dl {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90;
  display: inline-flex; align-items: center; gap: .6rem; padding: .9rem 1.4rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); color: #2a1f00; font-weight: 700;
  box-shadow: 0 14px 36px -10px rgba(212,175,55,0.6);
  transform: translateY(140%); transition: transform .45s var(--ease);
}
.float-dl.show { transform: none; }
.float-dl svg { width: 20px; height: 20px; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 980px) {
  .reader-wrap, .hifz-wrap, .app-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .topbar .verse { display: none; }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(6,13,11,0.96); backdrop-filter: blur(18px); padding: 1.5rem; gap: 1.2rem;
    border-bottom: 1px solid var(--glass-brd);
  }
  .hero-stats { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .float-dl span { display: none; }
}

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

/* =============================================================
   v2 ADDITIONS — accessibility, homepage sections, blog upgrade
   ============================================================= */

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--gold-400); color: #2a1f00; padding: .7rem 1.2rem; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Card grid (Tafsir / Books) ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.4rem; }
.tile {
  padding: 1.6rem; display: flex; flex-direction: column; gap: .8rem;
  transition: transform .35s var(--ease), border-color .35s;
}
.tile:hover { transform: translateY(-6px); border-color: var(--glass-brd-strong); }
.tile .tico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(16,185,129,.2), rgba(212,175,55,.14)); border: 1px solid var(--glass-brd-strong); }
.tile .tico svg { width: 24px; height: 24px; stroke: var(--gold-300); }
.tile h3 { color: #fff; font-size: 1.12rem; }
.tile p { color: var(--text-dim); font-size: .9rem; }
.tile .tlink { color: var(--gold-300); font-size: .85rem; font-weight: 600; margin-top: auto; }
.tile.book .spine { font-family: var(--font-arabic); font-size: 1.6rem; color: var(--gold-300); }

/* ---------- Donation ---------- */
.donate { position: relative; }
.donate .glass { padding: clamp(2.2rem, 5vw, 3.5rem); text-align: center; position: relative; overflow: hidden; }
.donate .glass::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(600px 300px at 50% -10%, rgba(212,175,55,.14), transparent 60%); }
.donate h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .8rem; }
.donate p { color: var(--text-dim); max-width: 540px; margin: 0 auto 1.6rem; }
.donate-amounts { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.4rem; }
.donate-amounts a { padding: .7rem 1.3rem; border-radius: 999px; border: 1px solid var(--glass-brd); background: var(--glass-bg); font-weight: 700; transition: transform .25s var(--ease), border-color .25s; }
.donate-amounts a:hover, .donate-amounts a.feat { transform: translateY(-3px); border-color: var(--gold-500); color: var(--gold-300); }

/* ---------- FAQ (shared homepage + app) ---------- */
.faq-list { max-width: 760px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid rgba(255,255,255,.08); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.4rem 0; text-align: left; font-weight: 600; color: #fff; font-size: 1.05rem; }
.faq-q .ic { flex: none; width: 24px; height: 24px; transition: transform .3s var(--ease); }
.faq-q .ic svg { width: 24px; height: 24px; stroke: var(--gold-300); }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-a p { color: var(--text-dim); padding-bottom: 1.4rem; }

/* ---------- Newsletter form ---------- */
.newsletter { display: flex; gap: .6rem; flex-wrap: wrap; max-width: 460px; }
.newsletter input[type=email] {
  flex: 1; min-width: 200px; padding: .85rem 1.1rem; border-radius: 999px; color: var(--text);
  background: rgba(255,255,255,.05); border: 1px solid var(--glass-brd); font: inherit;
}
.newsletter input[type=email]:focus { outline: none; border-color: var(--gold-500); }
.newsletter .nl-note { width: 100%; font-size: .8rem; color: var(--text-dim); margin-top: .2rem; }
.nl-ok { color: var(--emerald-300); font-weight: 600; }

/* ---------- Reading progress bar (blog) ---------- */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 120;
  background: linear-gradient(90deg, var(--gold-500), var(--emerald-400, var(--emerald-300))); transition: width .1s linear; }
body.admin-bar .read-progress { top: 32px; }
@media (max-width: 782px) { body.admin-bar .read-progress { top: 46px; } }

/* ---------- Article layout (TOC + content) ---------- */
.article-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 3rem; align-items: start; }
.toc { position: sticky; top: 100px; }
.toc h4 { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-400); margin-bottom: .9rem; }
.toc a { display: block; color: var(--text-dim); font-size: .9rem; padding: .35rem 0 .35rem .8rem; border-left: 2px solid rgba(255,255,255,.08); transition: color .2s, border-color .2s; }
.toc a:hover, .toc a.active { color: var(--gold-300); border-color: var(--gold-400); }
.post-content h2 { color: var(--gold-300); font-size: 1.5rem; margin: 2.6rem 0 1rem; padding-left: .8rem; border-left: 3px solid var(--gold-400); scroll-margin-top: 100px; }
.post-content h3 { color: #fff; font-size: 1.2rem; margin: 2rem 0 .8rem; scroll-margin-top: 100px; }
.post-content p { margin-bottom: 1.3rem; }
.post-content ul, .post-content ol { margin: 0 0 1.3rem 1.4rem; }
.post-content li { margin-bottom: .5rem; }
.post-content blockquote { background: rgba(212,175,55,.07); border-left: 3px solid var(--gold-400); padding: 1.1rem 1.4rem; margin: 1.8rem 0; color: #e8dcc8; font-style: italic; border-radius: 0 10px 10px 0; }
.post-content img { border-radius: 12px; margin: 1.2rem 0; }
.post-content a { color: var(--gold-300); text-decoration: underline; text-underline-offset: 3px; }
.post-content strong { color: #fff; }

/* ---------- Share + author ---------- */
.share-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 2.5rem 0; }
.share-row span.lab { color: var(--text-dim); font-size: .85rem; margin-right: .3rem; }
.share-row a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--glass-brd); color: var(--text); transition: transform .25s var(--ease), border-color .25s; }
.share-row a:hover { transform: translateY(-3px); border-color: var(--glass-brd-strong); color: var(--gold-300); }
.share-row a svg { width: 18px; height: 18px; }
.author-box { display: flex; gap: 1.2rem; align-items: center; padding: 1.6rem; margin: 2.5rem 0; }
.author-box .ava { width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-300); background: linear-gradient(135deg, var(--emerald-600), var(--slate-800)); }
.author-box .ab-name { color: #fff; font-weight: 700; }
.author-box .ab-bio { color: var(--text-dim); font-size: .9rem; }

@media (max-width: 900px) {
  .article-wrap { grid-template-columns: 1fr; }
  .toc { position: static; margin-bottom: 1.5rem; }
}
