/* مجلس الإقراء — marketing site. The owner's identity of 2026-10-18 (apps/mobile/src/theme/tokens.ts): the logo's navy
   and teal, the cream of its open book, the white it is drawn on; one family, Zain. Names say what a colour does. */

@font-face { font-family: "Zain"; src: url("../fonts/zain-400.woff2") format("woff2"); font-weight: 300 400; font-display: swap; }
@font-face { font-family: "Zain"; src: url("../fonts/zain-700.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "Zain"; src: url("../fonts/zain-800.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }

:root {
  --bg: #F6F5F1;
  --surface: #F6F1E8;
  --elevated: #FFFFFF;
  --ink: #0C2235;
  --ink2: #33475A;
  --muted: #5C6C7B;
  --primary: #05355B;
  --deep: #042640;
  --deeper: #031B30;
  --accent: #05919C;
  --accent-ink: #027187;
  --accent-soft: #8FD8D3;
  --cream: #EAE1D1;
  --on-deep: #F2F6F7;
  --on-deep-muted: rgba(242, 246, 247, .76);
  --border: #E8E5DE;
  --border-accent: rgba(5, 145, 156, .35);
  --grad-deep: linear-gradient(200deg, #03617A 0%, #05355B 48%, #031B30 100%);
  --r2: 12px; --r3: 20px; --r4: 28px;
  --shadow: 0 10px 30px -12px rgba(11, 42, 68, .18);
  --shadow-deep: 0 30px 60px -20px rgba(3, 27, 48, .55);
  --font-ui: "Zain", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Zain", system-ui, "Segoe UI", Tahoma, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hh, 72px) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 19px; line-height: 1.8;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.3; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, summary { text-wrap: balance; }
ul, ol { padding: 0; margin: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--deep); color: #fff; padding: 8px 16px; border-radius: 10px; }
.skip:focus { top: 12px; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .55em 1.25em; border-radius: 999px;
  font: 600 .95rem/1.2 var(--font-ui); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; position: relative; overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease-out), background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .35s var(--ease-out);
}
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; }
/* sheen: a soft light sweeping from the start (right) to the end (left) of solid buttons */
.btn-accent::after, .btn-primary::after, .btn-dark::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, var(--sheen, .18)) 50%, transparent 70%);
  transform: translateX(105%);
}
.btn-accent { --sheen: .55; }
.btn-accent:hover { box-shadow: 0 14px 28px -12px rgba(5, 145, 156, .9); }
.btn-primary:hover, .btn-dark:hover { box-shadow: 0 14px 28px -14px rgba(4, 38, 64, .6); }
.btn-accent { background: var(--accent-soft); color: var(--deep); border-color: var(--accent-soft); box-shadow: 0 8px 20px -10px rgba(5, 145, 156, .8); }
.btn-accent:hover { background: #B6E6E2; color: var(--deeper); }
.btn-primary { background: var(--primary); color: #F2F6F7; }
.btn-primary:hover { background: var(--deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border-color: rgba(5, 53, 91, .3); }
.btn-ghost:hover { background: rgba(5, 53, 91, .06); color: var(--deep); }
.btn-ghost-light { background: rgba(242, 246, 247, .06); color: var(--on-deep); border-color: rgba(143, 216, 211, .5); }
.btn-ghost-light:hover { background: rgba(242, 246, 247, .12); color: #fff; }
.btn-sm { min-height: 40px; padding: .4em 1em; font-size: .85rem; }

.store-btn { min-height: 56px; padding: .45em 1.2em .45em 1.4em; border-radius: 16px; text-align: start; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.25; }
.store-btn small { font-size: .7rem; font-weight: 500; opacity: .8; }
.store-btn b { font-size: 1rem; font-weight: 700; }
.store-btn b[dir="ltr"] { font-family: var(--font-ui); }
.store-btn svg { width: 1.6em; height: 1.6em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 246, 247, .9); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color .4s ease, box-shadow .4s ease, margin .35s var(--ease-out);
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 72px; transition: min-height .35s var(--ease-out); }
/* condensed on scroll: 12px shorter, footprint kept by an equal margin so content never jumps */
.site-header.is-condensed {
  background: rgba(242, 246, 247, .8); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 12px 30px -20px rgba(4, 38, 64, .45);
}
@media (min-width: 1081px) {
  .site-header.is-condensed { margin-bottom: 12px; }
  .site-header.is-condensed .header-row { min-height: 60px; }
  .site-header.is-condensed .brand img { transform: scale(.88); }
}
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none;
  background: linear-gradient(to left, var(--accent-soft), var(--accent) 55%, var(--accent-ink));
  transform-origin: 100% 50%; transform: scaleX(var(--p, 0));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: auto; height: 42px; transition: transform .35s var(--ease-out); }
.brand b { font: 800 1.45rem/1 var(--font-display); color: var(--primary); }
.main-nav { flex: 1; min-width: 0; }
.main-nav ul { display: flex; gap: 4px; justify-content: center; position: relative; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink2); text-decoration: none; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.main-nav a { transition: color .3s ease, background-color .3s ease; }
.main-nav a:hover, .main-nav a.is-active { color: var(--deep); }
.main-nav a:hover { background: var(--surface); }
.nav-ink {
  position: absolute; left: 0; bottom: 1px; width: 100px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(to left, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
  transform-origin: 0 50%; opacity: 0;
  transition: transform .55s var(--ease-out), opacity .35s ease;
}
.nav-ink.jump { transition: opacity .35s ease; }
.header-cta { display: flex; gap: 8px; flex: none; }

@media (max-width: 1080px) {
  .header-row { flex-wrap: wrap; gap: 8px 12px; min-height: 0; padding-block: 10px 0; }
  .brand { margin-inline-end: auto; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 8px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav ul { justify-content: flex-start; width: max-content; }
  .main-nav a { padding: 5px 12px; background: var(--surface); font-size: .82rem; }
  .main-nav a.is-active { background: #E3F2F2; }
  .nav-ink { bottom: -5px; }
}
@media (max-width: 560px) {
  .header-cta .btn-web { display: none; }
  .brand b { font-size: 1.15rem; }
  .brand img { height: 36px; }
}

/* ---------- ornament ---------- */
.ornament { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.star-divider { display: flex; align-items: center; gap: 12px; color: var(--accent); margin-bottom: 14px; }
.star-divider::before, .star-divider::after { content: ""; height: 1px; width: 44px; background: linear-gradient(to left, transparent, currentColor); }
.star-divider::after { background: linear-gradient(to right, transparent, currentColor); }
.star-divider svg { width: 16px; height: 16px; }
.center .star-divider { justify-content: center; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-deep);
  background:
    radial-gradient(900px 520px at 100% 0%, rgba(18, 167, 166, .38), transparent 60%),
    var(--grad-deep);
}
.hero .ornament { color: var(--accent-soft); opacity: .16; }
.hero-arch { position: absolute; inset-inline-start: -8%; bottom: -40%; width: 70%; aspect-ratio: 1; border: 1.5px solid rgba(143, 216, 211, .22); border-radius: 50% 50% 0 0; pointer-events: none; }
.hero-arch::after { content: ""; position: absolute; inset: 28px; border: 1px solid rgba(143, 216, 211, .14); border-radius: inherit; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; padding-block: clamp(56px, 8vw, 104px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; background: rgba(242, 246, 247, .08); border: 1px solid rgba(143, 216, 211, .35); color: var(--accent-soft); font-size: .85rem; font-weight: 500; margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-soft); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); color: #F2F6F7; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--accent-soft); white-space: nowrap; }
.hero .lead { font-size: clamp(1.02rem, 1.8vw, 1.2rem); color: var(--on-deep-muted); max-width: 36em; margin-bottom: 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 22px; font-size: .88rem; color: var(--on-deep-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 16px; height: 16px; color: var(--accent-soft); }

.hero-visual { position: relative; display: flex; justify-content: center; min-height: 520px; }
.hero-visual .phone-main { width: min(300px, 70%); position: relative; z-index: 2; }
.hero-visual .phone-back { position: absolute; width: min(250px, 58%); inset-inline-start: 2%; top: 64px; transform: rotate(-7deg); opacity: .95; z-index: 1; }
.hero-glow { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(143, 216, 211, .3), transparent 65%); top: 10%; filter: blur(10px); }

/* ---------- phone frame ---------- */
.phone {
  margin: 0; padding: 9px; border-radius: 42px; background: #0B1C2C;
  box-shadow: 0 0 0 1.5px #1E3347, var(--shadow-deep);
  position: relative;
}
.phone img { border-radius: 33px; width: 100%; background: var(--surface); }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); color: var(--deep); }
.section-head p { color: var(--ink2); font-size: 1.05rem; }
.kicker { color: var(--accent-ink); font-weight: 600; font-size: .9rem; }

/* features grid */
.features-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature {
  background: var(--elevated); border: 1px solid var(--border); border-radius: var(--r3);
  padding: 24px 22px; box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
  position: relative; isolation: isolate;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .4s ease;
}
/* teal hairline that fades in around the card */
.feature::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(155deg, rgba(143, 216, 211, .95), rgba(5, 145, 156, .2) 38%, transparent 60%, rgba(143, 216, 211, .7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .5s ease;
}
.feature .ic { transition: background-color .45s ease, color .45s ease; }
.feature .ic svg { transition: transform .6s var(--ease-spring); }
@media (hover: hover) {
  .feature:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(4, 38, 64, .38), 0 2px 10px -6px rgba(5, 145, 156, .35); border-color: var(--border-accent); }
  .feature:hover::before { opacity: 1; }
  .feature:hover .ic { background: var(--deep); color: var(--accent-soft); }
  .feature:hover .ic svg { transform: translateY(-1px) rotate(-8deg) scale(1.08); }
}
.feature .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(5, 53, 91, .08); color: var(--primary); margin-bottom: 16px; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.15rem; margin-bottom: .35em; color: var(--ink); }
.feature p { font-size: .92rem; color: var(--ink2); margin: 0; line-height: 1.8; }

/* role split sections */
.role { overflow: hidden; }
.role.alt { background: var(--surface); }
.role.alt::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(5, 145, 156, .18) 1px, transparent 1.4px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }
.split { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.reverse .split-visual { order: -1; }
.split-copy h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); color: var(--deep); }
.split-copy > p { color: var(--ink2); font-size: 1.05rem; }
.checks { display: grid; gap: 14px; margin: 26px 0 30px; }
.checks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.checks li::before {
  content: ""; width: 28px; height: 28px; margin-top: 2px; border-radius: 9px;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238FD8D3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.checks b { display: block; color: var(--ink); font-weight: 600; }
.checks span { color: var(--ink2); font-size: .94rem; }
.badge-new { display: inline-block; margin-inline-start: 6px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--deep); font-size: .72rem; font-weight: 700; vertical-align: 2px; }

.split-visual { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 0; min-height: 480px; }
.split-visual::before { content: ""; position: absolute; width: 82%; aspect-ratio: 1; top: 6%; border-radius: 50% 50% 0 0; background: linear-gradient(180deg, rgba(5, 53, 91, .1), rgba(5, 53, 91, 0)); border: 1px solid var(--border-accent); }
.split-visual .phone { width: min(270px, 56%); z-index: 1; }
.split-visual .phone + .phone { margin-top: 70px; margin-inline-start: -40px; z-index: 0; transform: rotate(4deg); }
.split.reverse .split-visual .phone + .phone { transform: rotate(-4deg); }

/* examiner mini cards */
.marks-demo { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.marks-demo div { background: var(--elevated); border: 1px solid var(--border); border-radius: 14px; padding: 8px 14px; font-size: .85rem; color: var(--ink2); }
.marks-demo b { unicode-bidi: isolate; color: var(--primary); font-size: 1.05rem; margin-inline-start: 6px; }

/* ---------- mushaf ---------- */
.mushaf { background: linear-gradient(180deg, var(--bg), var(--surface)); }
.mushaf-stage { background: var(--elevated); border: 1px solid var(--border-accent); border-radius: var(--r4); padding: clamp(10px, 2vw, 18px); box-shadow: var(--shadow); }
.mushaf-stage img { border-radius: 18px; width: 100%; }
.mushaf-stage figcaption { padding: 14px 6px 4px; color: var(--muted); font-size: .88rem; text-align: center; }
.riwaya-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.riwaya-chips li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--elevated); border: 1px solid var(--border); font-size: .85rem; color: var(--ink); }
.riwaya-chips li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.mushaf-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; margin-top: 56px; align-items: center; }
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 30px; }
.books li { background: var(--elevated); border: 1px solid var(--border); border-inline-start: 3px solid var(--accent); border-radius: 12px; padding: 12px 14px; }
.books b { display: block; font-family: var(--font-display); font-size: 1.12rem; color: var(--deep); }
.books span { font-size: .84rem; color: var(--ink2); }
.mushaf-grid .phone { width: min(280px, 72%); margin-inline: auto; }

/* ---------- gallery ---------- */
.gallery { background: var(--grad-deep); color: var(--on-deep); overflow: hidden; }
.gallery .ornament { color: var(--accent-soft); opacity: .08; }
.gallery .section-head h2 { color: #F2F6F7; }
.gallery .section-head p { color: var(--on-deep-muted); }
.gallery .kicker { color: var(--accent-soft); }
.gallery-track {
  position: relative; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px var(--gutter) 28px; scroll-padding-inline: var(--gutter);
  scrollbar-width: thin; scrollbar-color: rgba(143, 216, 211, .5) transparent;
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto;
}
.gallery-track:focus-visible { outline-offset: -3px; }
.gallery-track { --gw: min(260px, 72vw); }
/* spacers so the first and last shots can rest in the centre */
.gallery-track::before, .gallery-track::after { content: ""; flex: 0 0 max(0px, calc(50% - var(--gw) / 2 - 20px)); }
.gallery-track li { flex: 0 0 auto; width: var(--gw); scroll-snap-align: center; }
.gallery-track figure { transform-origin: 50% 60%; }
.gallery-track.is-dragging { scroll-snap-type: none; user-select: none; -webkit-user-select: none; cursor: grabbing; }
@media (hover: hover) and (pointer: fine) { .gallery-track { cursor: grab; } }
.gallery-track figure { margin: 0; }
.gallery-track img { border-radius: 26px; border: 1px solid rgba(143, 216, 211, .3); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6); }
.gallery-track figcaption { margin-top: 10px; text-align: center; font-size: .88rem; color: var(--on-deep-muted); }
.gallery-controls { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.gallery-controls button {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(143, 216, 211, .5);
  background: rgba(242, 246, 247, .06); color: var(--accent-soft); cursor: pointer; display: grid; place-items: center;
  transition: transform .35s var(--ease-out), background-color .25s ease, border-color .25s ease;
}
.gallery-controls button:hover { background: rgba(242, 246, 247, .14); border-color: var(--accent-soft); transform: scale(1.06); }
.gallery-controls button:active { transform: scale(.94); transition-duration: .08s; }
.gallery-controls svg { width: 22px; height: 22px; }
.no-js .gallery-controls { display: none; }

/* ---------- teacher CTA ---------- */
.teacher-card {
  position: relative; overflow: hidden; border-radius: var(--r4); color: var(--on-deep);
  background: radial-gradient(700px 380px at 100% 0%, rgba(18, 167, 166, .32), transparent 60%), var(--grad-deep);
  padding: clamp(32px, 5vw, 64px); box-shadow: var(--shadow-deep);
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.teacher-card .ornament { color: var(--accent-soft); opacity: .12; }
.teacher-card h2 { color: #F2F6F7; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.teacher-card p { color: var(--on-deep-muted); }
.steps { position: relative; display: grid; gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: rgba(242, 246, 247, .07); border: 1px solid rgba(143, 216, 211, .28); border-radius: 16px; padding: 14px 16px; }
.steps li::before { content: counter(step); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--deep); font: 700 1.15rem/1 var(--font-display); }
.steps b { display: block; color: #F2F6F7; font-weight: 600; }
.steps span { font-size: .9rem; color: var(--on-deep-muted); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq-list details { background: var(--elevated); border: 1px solid var(--border); border-radius: 16px; transition: border-color .2s ease, box-shadow .2s ease; }
.faq-list details[open] { border-color: var(--border-accent); box-shadow: var(--shadow); }
.faq-list summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; font-size: 1.02rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ink); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(5, 53, 91, .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2305355B' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .5s var(--ease-spring), background-color .3s ease; }
.faq-list details[open] summary::after { transform: rotate(135deg); background-color: rgba(5, 145, 156, .18); }
.faq-list summary { transition: color .25s ease; }
.faq-list summary:hover { color: var(--deep); }
.faq-list .answer { padding: 0 22px 18px; color: var(--ink2); }
.faq-list .answer p:last-child { margin: 0; }

/* ---------- download band ---------- */
.download { text-align: center; }
.download .cta-row { justify-content: center; }
.download h2 { color: var(--deep); font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.download p { color: var(--ink2); }
.download img.app-icon { width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 20px; box-shadow: var(--shadow-deep); }
/* QR codes: for a visitor on a computer, who reaches the store with his phone's camera (hidden on phones: a tap does it) */
.qr-row { display: flex; justify-content: center; gap: 56px; margin: 8px 0 6px; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px; text-decoration: none; color: var(--ink); transition: transform .35s var(--ease-out); }
.qr-card:hover { transform: translateY(-3px); }
.qr-card img { width: 168px; height: 168px; }
.qr-card span { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.qr-card b { font-size: 1.05rem; color: var(--primary); }
.qr-card small { font-size: .8rem; color: var(--muted); }
.qr-hint { font-size: .88rem; color: var(--muted); margin: 4px 0 22px; }
@media (max-width: 860px), (pointer: coarse) { .qr-row, .qr-hint { display: none; } }
.btn-dark { background: var(--deep); color: #F2F6F7; }
.btn-dark:hover { background: var(--deeper); color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--deeper); color: var(--on-deep-muted); padding-block: 44px 28px; font-size: .92rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .brand b { color: #F2F6F7; }
.site-footer .brand img { box-shadow: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { color: var(--on-deep); text-decoration: none; }
.footer-links a:hover { color: var(--accent-soft); text-decoration: underline; }
.footer-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(143, 216, 211, .18); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .85rem; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); }
.notfound h1 { font-size: clamp(2rem, 6vw, 3rem); color: #F2F6F7; }
.notfound p { color: var(--on-deep-muted); }
.notfound .cta-row { justify-content: center; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mushaf-grid, .teacher-card { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-grid { gap: 28px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .cta-row, .hero-note { justify-content: center; }
  .hero-visual { min-height: 0; }
  .split.reverse .split-visual { order: 0; }
  .split-visual { min-height: 0; }
}
@media (max-width: 560px) {
  body { font-size: 18px; }
  .features-grid, .books { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 100%; }

  .hero-visual .phone-back { width: 50%; top: 40px; inset-inline-start: 0; }
  .split-visual .phone { width: 58%; }
  .split-visual .phone + .phone { margin-inline-start: -28px; margin-top: 46px; }
  .phone { padding: 6px; border-radius: 30px; }
  .phone img, .screen { border-radius: 24px; }
  .hero-visual .phone-main { width: 68%; }
  .feature { padding: 20px 18px; }
}

/* ---------- hero rosette (decorative) ---------- */
.rosette {
  position: absolute; top: 50%; left: 27%; width: min(780px, 120vw); aspect-ratio: 1;
  translate: -50% -50%; color: var(--accent-soft); opacity: .2; pointer-events: none;
}
.rosette--center { position: fixed; left: 50%; top: 50%; width: min(720px, 130vw); opacity: .1; }
.hero h1 .w { display: inline-block; }
.hero-grid { perspective: 1400px; }
.hero-visual { transform: rotateX(calc(var(--py, 0) * -4deg)) rotateY(calc(var(--px, 0) * 6deg)); }
.hero-visual .phone-main { transform: translate(calc(var(--px, 0) * 6px), calc(var(--py, 0) * 5px)); }
.hero-visual .phone-back { transform: translate(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -7px)) rotate(-7deg); }
@media (max-width: 860px) { .rosette:not(.rosette--center) { left: 50%; top: 76%; } }

/* ---------- motion (only when the visitor has not asked for less) ---------- */
@keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes rise-blur { from { opacity: 0; translate: 0 .45em; filter: blur(10px); } to { opacity: 1; translate: 0 0; filter: none; } }
@keyframes stage-in { from { opacity: 0; translate: 0 56px; rotate: x 16deg; scale: .95; } to { opacity: 1; translate: 0 0; rotate: x 0deg; scale: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes breathe { 0%, 100% { opacity: .75; scale: .96; } 50% { opacity: 1; scale: 1.04; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes glimmer { 0%, 100% { opacity: .2; } 50% { opacity: .13; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drift { from { translate: 0 36px; } to { translate: 0 -36px; } }
@keyframes settle { from { scale: .95; } to { scale: 1; } }

@media (prefers-reduced-motion: no-preference) {
  /* hero entrance: copy rises in line by line, headline words sharpen from a soft blur */
  .hero-copy > * { animation: rise .9s var(--ease-out) both; }
  .hero-copy > .eyebrow { animation-delay: .1s; }
  .hero-copy > .lead { animation-delay: .62s; }
  .hero-copy > .cta-row { animation-delay: .76s; }
  .hero-copy > .hero-note { animation-delay: .9s; }
  .hero-copy > h1 { animation: none; }
  .hero h1 .w { animation: rise-blur 1.05s var(--ease-out) both; }
  .hero h1 .w:nth-child(1) { animation-delay: .2s; }
  .hero h1 .w:nth-child(2) { animation-delay: .3s; }
  .hero h1 .w:nth-child(3) { animation-delay: .4s; }
  .hero h1 .w:nth-child(4) { animation-delay: .52s; }
  .hero-visual { animation: stage-in 1.5s var(--ease-out) .3s both; }
  .hero-visual .phone-main { animation: float 7s ease-in-out 1.8s infinite; }
  .hero-visual .phone-back { animation: float 9s ease-in-out 2.4s infinite; }
  .hero-glow { animation: breathe 9s ease-in-out infinite; }
  .rosette { animation: spin 240s linear infinite, glimmer 12s ease-in-out infinite; }
  .rosette--center { animation: spin 300s linear infinite; }
  .rosette .d { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 3.4s cubic-bezier(.6, .1, .2, 1) calc(.25s + var(--i, 0) * .22s) forwards; }
  .hero.is-off :is(.rosette, .phone, .hero-glow) { animation-play-state: paused; }

  .notfound > div > * { animation: rise .9s var(--ease-out) both; }
  .notfound > div > :nth-child(2) { animation-delay: .1s; }
  .notfound > div > :nth-child(3) { animation-delay: .2s; }
  .notfound > div > :nth-child(4) { animation-delay: .3s; }
  .notfound > div > :nth-child(5) { animation-delay: .4s; }

  /* scroll reveals: pre-states exist only once JS has opted in (html.js) */
  .js .reveal { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out), filter .9s var(--ease-out); }
  .js :where(.section-head).reveal { filter: blur(6px); }
  .js :where(.mushaf-stage, .teacher-card).reveal { transform: translate3d(0, 28px, 0) scale(.985); }
  .js .reveal.in { opacity: 1; transform: none; filter: none; }
  @media (min-width: 861px) {
    /* RTL: each column glides in from its own outer edge */
    .js :where(.split) > :where(.split-copy).reveal, .js :where(.split.reverse) > :where(.split-visual).reveal { transform: translate3d(32px, 0, 0); }
    .js :where(.split) > :where(.split-visual).reveal, .js :where(.split.reverse) > :where(.split-copy).reveal { transform: translate3d(-32px, 0, 0); }
  }
  .js .reveal :where(.checks > li, .steps > li) { opacity: 0; transform: translate3d(16px, 0, 0); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); }
  .js .reveal.in :where(.checks > li, .steps > li) { opacity: 1; transform: none; }
  .js .reveal.in :where(.checks, .steps) > li:nth-child(1) { transition-delay: .18s; }
  .js .reveal.in :where(.checks, .steps) > li:nth-child(2) { transition-delay: .26s; }
  .js .reveal.in :where(.checks, .steps) > li:nth-child(3) { transition-delay: .34s; }
  .js .reveal.in :where(.checks, .steps) > li:nth-child(4) { transition-delay: .42s; }
  .js .reveal.in :where(.checks, .steps) > li:nth-child(5) { transition-delay: .5s; }
  .js .reveal :where(.star-divider)::before, .js .reveal :where(.star-divider)::after { transform: scaleX(0); transition: transform 1s var(--ease-out) .25s; }
  .js .reveal :where(.star-divider)::before { transform-origin: 0 50%; }
  .js .reveal :where(.star-divider)::after { transform-origin: 100% 50%; }
  .js .reveal :where(.star-divider) svg { transform: rotate(-90deg) scale(.4); opacity: 0; transition: transform 1s var(--ease-spring) .1s, opacity .6s ease .1s; }
  .js .reveal.in :where(.star-divider)::before, .js .reveal.in :where(.star-divider)::after, .js .reveal.in :where(.star-divider) svg { transform: none; opacity: 1; }
  .js :where(.split-visual).reveal .phone + .phone { opacity: 0; transition: opacity 1s var(--ease-out) .2s; }
  .js .reveal.in .phone + .phone { opacity: 1; }
  .js :where(.download) .reveal .app-icon { transform: scale(.8) rotate(-8deg); transition: transform 1.1s var(--ease-spring) .1s; }
  .js :where(.download) .reveal.in .app-icon { transform: none; }

  /* button sheen and FAQ answer fade */
  @media (hover: hover) {
    .btn:hover::after { transform: translateX(-105%); transition: transform .95s var(--ease-out); }
  }
  .faq-list .answer { transition: opacity .45s ease .05s; }
  .faq-list details:not([open]) .answer { opacity: 0; }

  /* reading progress driven by the scroll itself where supported (JS fallback otherwise) */
  @supports (animation-timeline: scroll()) {
    .read-progress { animation: progress linear both; animation-timeline: scroll(root block); }
  }
  /* scroll-driven niceties, progressive enhancement */
  @supports (animation-timeline: view()) {
    .split-visual .phone + .phone { animation: drift linear both; animation-timeline: view(); }
    .mushaf-stage img { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  }

  /* FAQ: smooth height where the browser can animate to `auto` (JS fallback otherwise) */
  :root { interpolate-size: allow-keywords; }
  @supports selector(::details-content) {
    .faq-list details::details-content { block-size: 0; overflow: hidden; transition: block-size .5s var(--ease-out), content-visibility .5s allow-discrete; }
    .faq-list details[open]::details-content { block-size: auto; }
  }
}

/* soft cross-fade between pages (e.g. 404 -> home) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: ease; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
