/* مجلس الإقراء — marketing site. Palette & type mirror apps/mobile/src/theme/tokens.ts */

@font-face { font-family: "Alexandria"; src: url("../fonts/alexandria-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alexandria"; src: url("../fonts/alexandria-500.woff") format("woff"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Alexandria"; src: url("../fonts/alexandria-700.woff") format("woff"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "El Messiri"; src: url("../fonts/elmessiri-600.woff") format("woff"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "El Messiri"; src: url("../fonts/elmessiri-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #FBF7EF;
  --surface: #F4ECDB;
  --elevated: #FFFDF8;
  --ink: #2B2622;
  --ink2: #5E5A52;
  --muted: #6F695E;
  --emerald: #0E5B47;
  --deep: #073B31;
  --deeper: #052b24;
  --gold: #B89452;
  --gold-ink: #8A6423;
  --gold-soft: #D9C38C;
  --on-deep: #EDE6D4;
  --on-deep-muted: rgba(237, 230, 212, .78);
  --border: #E6DCC5;
  --border-gold: rgba(217, 195, 140, .55);
  --r2: 12px; --r3: 18px; --r4: 28px;
  --shadow: 0 10px 30px -12px rgba(43, 38, 34, .22);
  --shadow-deep: 0 30px 60px -20px rgba(3, 30, 24, .55);
  --font-ui: "Alexandria", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-display: "El Messiri", "Alexandria", serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 17px; line-height: 1.85;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
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; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold-soft); color: var(--deep); border-color: var(--gold-soft); box-shadow: 0 8px 20px -10px rgba(184, 148, 82, .8); }
.btn-gold:hover { background: #e3cf9d; color: var(--deeper); }
.btn-emerald { background: var(--emerald); color: #FBF7EF; }
.btn-emerald:hover { background: var(--deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--emerald); border-color: rgba(14, 91, 71, .3); }
.btn-ghost:hover { background: rgba(14, 91, 71, .06); color: var(--deep); }
.btn-ghost-light { background: rgba(251, 247, 239, .06); color: var(--on-deep); border-color: rgba(217, 195, 140, .5); }
.btn-ghost-light:hover { background: rgba(251, 247, 239, .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(251, 247, 239, .9); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 4px 12px -4px rgba(7, 59, 49, .5); }
.brand b { font: 700 1.3rem/1 var(--font-display); color: var(--deep); }
.main-nav { flex: 1; min-width: 0; }
.main-nav ul { display: flex; gap: 4px; justify-content: center; }
.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:hover { background: var(--surface); color: var(--deep); }
.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; }
}
@media (max-width: 560px) {
  .header-cta .btn-web { display: none; }
  .brand b { font-size: 1.15rem; }
  .brand img { width: 36px; 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(--gold); 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(1000px 520px at 85% 0%, rgba(30, 120, 95, .55), transparent 60%),
    radial-gradient(800px 500px at 10% 100%, rgba(184, 148, 82, .18), transparent 60%),
    linear-gradient(160deg, #0d5a46 0%, var(--deep) 55%, var(--deeper) 100%);
}
.hero .ornament { color: var(--gold-soft); opacity: .16; }
.hero-arch { position: absolute; inset-inline-start: -8%; bottom: -40%; width: 70%; aspect-ratio: 1; border: 1.5px solid rgba(217, 195, 140, .22); border-radius: 50% 50% 0 0; pointer-events: none; }
.hero-arch::after { content: ""; position: absolute; inset: 28px; border: 1px solid rgba(217, 195, 140, .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(251, 247, 239, .08); border: 1px solid rgba(217, 195, 140, .35); color: var(--gold-soft); font-size: .85rem; font-weight: 500; margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-soft); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); color: #FBF7EF; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--gold-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(--gold-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(217, 195, 140, .3), transparent 65%); top: 10%; filter: blur(10px); }

/* ---------- phone frame ---------- */
.phone {
  margin: 0; padding: 9px; border-radius: 42px; background: #121513;
  box-shadow: 0 0 0 1.5px #2f3a35, 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(--gold-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;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-gold); }
.feature .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(14, 91, 71, .08); color: var(--emerald); 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(184, 148, 82, .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(--emerald) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9C38C' 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(--gold-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(14, 91, 71, .1), rgba(14, 91, 71, 0)); border: 1px solid var(--border-gold); }
.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 { color: var(--emerald); 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-gold); 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(--gold); 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(--deep); color: var(--on-deep); overflow: hidden; }
.gallery .ornament { color: var(--gold-soft); opacity: .08; }
.gallery .section-head h2 { color: #FBF7EF; }
.gallery .section-head p { color: var(--on-deep-muted); }
.gallery .kicker { color: var(--gold-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(217, 195, 140, .5) transparent;
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto;
}
.gallery-track:focus-visible { outline-offset: -3px; }
.gallery-track li { flex: 0 0 auto; width: min(260px, 72vw); scroll-snap-align: start; }
.gallery-track figure { margin: 0; }
.gallery-track img { border-radius: 26px; border: 1px solid rgba(217, 195, 140, .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(217, 195, 140, .5);
  background: rgba(251, 247, 239, .06); color: var(--gold-soft); cursor: pointer; display: grid; place-items: center;
}
.gallery-controls button:hover { background: rgba(251, 247, 239, .14); }
.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: linear-gradient(135deg, var(--emerald), var(--deep) 70%);
  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(--gold-soft); opacity: .12; }
.teacher-card h2 { color: #FBF7EF; 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(251, 247, 239, .07); border: 1px solid rgba(217, 195, 140, .28); border-radius: 16px; padding: 14px 16px; }
.steps li::before { content: counter(step, arabic-indic); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--deep); font: 700 1.15rem/1 var(--font-display); }
.steps b { display: block; color: #FBF7EF; 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-gold); 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(14, 91, 71, .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5B47' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .2s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.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); }
.btn-dark { background: var(--deep); color: #FBF7EF; }
.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: #FBF7EF; }
.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(--gold-soft); text-decoration: underline; }
.footer-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(217, 195, 140, .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: #FBF7EF; }
.notfound p { color: var(--on-deep-muted); }
.notfound .cta-row { justify-content: center; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 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: 16px; }
  .features-grid, .books { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 100%; }
  .hero-visual .phone-main { width: 62%; }
  .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 { border-radius: 24px; }
  .feature { padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
