/* Maktab Deeniyat — layout concept: night-blue mihrab heroes framing calm, paper-light reading pages; the arch is the one recurring motif. */
:root {
  /* Colour */
  --paper: #F2F5F3;
  --surface: #FFFFFF;
  --surface-2: #E7EEEB;
  --ink: #0F2A2E;
  --ink-soft: #4B6165;
  --line: #D3DEDA;
  --teal: #0E5A63;
  --teal-ink: #0B4D55;
  --gold: #9C6F00;
  --gold-fill: #EBB20F;
  --on-gold: #1C1400;
  --ok: #17734A;
  --ok-bg: #DCF1E5;
  --closed: #94392B;
  --closed-bg: #F6E2DD;
  --shadow: 0 1px 2px rgba(12, 40, 44, .06), 0 12px 32px -12px rgba(12, 40, 44, .18);

  /* Always-dark surfaces (header, heroes, footer) */
  --night: #0A2227;
  --night-2: #10343B;
  --on-night: #EAF2EF;
  --on-night-soft: #A8C0BC;
  --gold-night: #F2C04A;
  --wa: #25D366;

  /* Type */
  --font-display: "El Messiri", "Georgia", serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-arabic: "Amiri", "Traditional Arabic", "Scheherazade New", serif;
  --fs-hero: clamp(2.3rem, 5vw, 4.25rem);
  --fs-h2: clamp(1.85rem, 3.3vw, 2.75rem);
  --fs-h3: 1.32rem;
  --fs-body: 1.0625rem;
  --fs-small: .875rem;

  /* Space */
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 112px);
  --radius: 14px;
  --header-h: 76px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='84' viewBox='0 0 56 84'%3E%3Cg fill='none' stroke='%23F2C04A' stroke-opacity='.2' stroke-width='1'%3E%3Cpath d='M8 84V44C8 26 18 14 28 6C38 14 48 26 48 44V84'/%3E%3Cpath d='M0 84H56'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #081A1D;
    --surface: #0D2427;
    --surface-2: #123035;
    --ink: #E5EEEB;
    --ink-soft: #9DB4B0;
    --line: #1E3D42;
    --teal: #5DC1B8;
    --teal-ink: #84D5CD;
    --gold: #F2C04A;
    --ok: #67D7A0;
    --ok-bg: #12382A;
    --closed: #F2A698;
    --closed-bg: #3A1F1B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .6);
    --night: #061518;
    --night-2: #0C2A30;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #081A1D;
  --surface: #0D2427;
  --surface-2: #123035;
  --ink: #E5EEEB;
  --ink-soft: #9DB4B0;
  --line: #1E3D42;
  --teal: #5DC1B8;
  --teal-ink: #84D5CD;
  --gold: #F2C04A;
  --ok: #67D7A0;
  --ok-bg: #12382A;
  --closed: #F2A698;
  --closed-bg: #3A1F1B;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .6);
  --night: #061518;
  --night-2: #0C2A30;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold-fill); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.ar { font-family: var(--font-arabic); direction: rtl; unicode-bidi: isolate; font-weight: 400; letter-spacing: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--gold-fill); color: var(--on-gold); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.45em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn .icon { transition: transform .2s ease; }
.btn:hover .icon-arrow { transform: translateX(3px); }
.btn-gold { background: var(--gold-fill); color: var(--on-gold); box-shadow: 0 8px 22px -10px rgba(235, 178, 15, .8); }
.btn-gold:hover { transform: translateY(-2px); background: #F5C02A; }
.btn-ghost { border-color: rgba(234, 242, 239, .45); color: var(--on-night); }
.btn-ghost:hover { border-color: var(--on-night); background: rgba(234, 242, 239, .08); }
.btn-teal { background: var(--teal); color: var(--surface); }
.btn-teal:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-ink); }
.btn-wa { background: var(--wa); color: #06260F; }
.btn-wa:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--on-night);
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled, .site-header.menu-open {
  background: color-mix(in srgb, var(--night) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(242, 192, 74, .18);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); transition: height .3s ease; }
.site-header.scrolled .header-inner { height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { width: 50px; transition: width .3s ease; }
.site-header.scrolled .brand img { width: 42px; }
.brand-name { display: grid; line-height: 1.05; }
.brand-name strong { font-family: var(--font-display); font-size: 1.38rem; font-weight: 700; letter-spacing: .01em; }
.brand-name small { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-night); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a.nav-link {
  position: relative; color: var(--on-night); text-decoration: none; font-weight: 500;
  padding: 8px 14px; border-radius: 999px; transition: background-color .2s ease;
}
.nav a.nav-link:hover { background: rgba(234, 242, 239, .1); }
.nav a.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 6px; height: 6px; margin-left: -3px;
  background: var(--gold-night); transform: rotate(45deg);
}
.nav .btn { margin-left: 10px; padding: .7em 1.2em; font-size: .95rem; }
.menu-toggle { display: none; background: none; border: 0; color: var(--on-night); padding: 8px; cursor: pointer; border-radius: 10px; }
.menu-toggle .icon { width: 28px; height: 28px; }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }
.menu-open .menu-toggle .icon-menu { display: none; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px var(--gutter) 24px;
    background: var(--night); border-top: 1px solid rgba(242, 192, 74, .18);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s ease;
  }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a.nav-link { padding: 14px 12px; font-size: 1.1rem; border-radius: 10px; }
  .nav a.nav-link[aria-current="page"] { color: var(--gold-night); }
  .nav a.nav-link[aria-current="page"]::after { display: none; }
  .nav .btn { margin: 10px 0 0; }
  .brand-name strong { font-size: 1.2rem; }
}

/* ---------- Heroes ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--night); color: var(--on-night);
  padding-block: calc(var(--header-h) + clamp(56px, 9vw, 120px)) clamp(64px, 9vw, 120px);
}
.hero-photo { position: absolute; inset: 0; z-index: -2; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(6, 21, 24, .96) 0%, rgba(6, 21, 24, .82) 42%, rgba(6, 21, 24, .25) 100%);
}
.hero-home .hero-copy { max-width: 640px; }
.hero .ar-line { font-size: clamp(1.6rem, 3.2vw, 2.4rem); color: var(--gold-night); line-height: 1.6; display: block; text-align: left; margin-bottom: 14px; }
.hero h1 { font-size: var(--fs-hero); font-weight: 600; }
.hero h1 .q { color: var(--gold-night); }
.hero cite { display: block; margin-top: 18px; font-style: normal; font-size: var(--fs-small); letter-spacing: .14em; text-transform: uppercase; color: var(--on-night-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* load sequence (finishes on its own, so the resting frame is always complete) */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-photo img { animation: zoom 2.4s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > *:nth-child(2) { animation-delay: .12s; }
.hero-copy > *:nth-child(3) { animation-delay: .24s; }
.hero-copy > *:nth-child(4) { animation-delay: .36s; }

/* Inner page hero: pattern + mihrab outline */
.hero-inner { border-bottom: 1px solid rgba(242, 192, 74, .2); padding-block: calc(var(--header-h) + clamp(44px, 7vw, 88px)) clamp(52px, 7vw, 88px); }
.hero-inner::before {
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(14, 90, 99, .55), transparent 60%),
    var(--pattern);
  opacity: 1;
}
.hero-inner::after {
  content: ""; position: absolute; z-index: -1; right: max(-60px, calc(50% - 640px)); bottom: -2px;
  width: min(380px, 52vw); aspect-ratio: 3 / 4;
  border: 1.5px solid rgba(242, 192, 74, .35); border-bottom: 0;
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
  box-shadow: inset 0 0 0 14px rgba(242, 192, 74, .05), 0 0 0 22px rgba(242, 192, 74, .04);
}
.hero-inner .hero-copy { max-width: 760px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--fs-small); color: var(--on-night-soft); margin-bottom: 18px; }
.crumbs a { color: var(--on-night-soft); text-decoration: none; }
.crumbs a:hover { color: var(--gold-night); }
.crumbs span[aria-hidden] { color: var(--gold-night); }
.hero-inner h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.hero-inner .lede { margin-top: 18px; color: var(--on-night-soft); font-size: 1.12rem; max-width: 60ch; }
.hero-quote { margin-top: 26px; padding-left: 18px; border-left: 2px solid var(--gold-night); max-width: 56ch; }
.hero-quote .ar { display: block; text-align: left; font-size: 1.5rem; color: var(--gold-night); line-height: 1.7; }
.hero-quote p { font-family: var(--font-display); font-size: 1.15rem; color: var(--on-night); }
.hero-quote cite { margin-top: 6px; }

/* ---------- Highlights strip ---------- */
.strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.strip li { display: flex; gap: 14px; align-items: flex-start; padding: 26px 22px; border-left: 1px solid var(--line); }
.strip li:first-child { border-left: 0; padding-left: 0; }
.strip .icon { width: 26px; height: 26px; color: var(--teal); margin-top: 2px; }
.strip strong { display: block; font-size: 1rem; line-height: 1.3; }
.strip span { display: block; font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.5; margin-top: 4px; }
@media (max-width: 960px) {
  .strip ul { grid-template-columns: repeat(2, 1fr); }
  .strip li { padding: 22px 16px; }
  .strip li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .strip li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .strip ul { grid-template-columns: 1fr; }
  .strip li { border-left: 0; padding-left: 0; }
  .strip li:nth-child(n+2) { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-alt { background: var(--surface-2); }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--gold); }
.eyebrow::before { content: ""; width: 9px; height: 9px; background: currentColor; transform: rotate(45deg); }
.section-head h2, .split h2 { font-size: var(--fs-h2); }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }
.prose p + p { margin-top: 1.1em; }
.prose p { color: var(--ink-soft); }
.prose { max-width: 66ch; }

.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split > * { min-width: 0; }
.split .copy { display: grid; gap: 18px; }
.split.reverse .media { order: -1; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .media { order: 0; }
}

/* Arch-framed image — the signature motif */
.arch-frame { position: relative; max-width: 480px; margin-inline: auto; width: 100%; }
.arch-frame img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 50% 50% var(--radius) var(--radius) / 34% 34% var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.arch-frame::before {
  content: ""; position: absolute; inset: -14px -14px 28px 28px; z-index: -1;
  border: 1.5px solid var(--gold); opacity: .55;
  border-radius: 50% 50% var(--radius) var(--radius) / 34% 34% var(--radius) var(--radius);
}
.arch-frame figcaption {
  position: absolute; left: -10px; bottom: 28px; max-width: 78%;
  background: var(--night); color: var(--on-night); padding: 14px 18px; border-radius: 12px;
  font-size: var(--fs-small); line-height: 1.5; box-shadow: var(--shadow);
}
.arch-frame figcaption .ar { display: block; text-align: left; font-size: 1.3rem; color: var(--gold-night); line-height: 1.5; }
@media (max-width: 520px) { .arch-frame figcaption { left: 8px; } .arch-frame::before { inset: -10px -8px 24px 18px; } }

/* ---------- Course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .course-grid { grid-template-columns: 1fr; } }
.course-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.course-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.course-top {
  position: relative; isolation: isolate; height: 168px; background: var(--night); color: var(--on-night);
  display: grid; place-items: end start; padding: 20px 22px; overflow: hidden;
}
.course-top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pattern); opacity: 1; transition: transform .6s ease; }
.course-card:hover .course-top::before { transform: scale(1.08) rotate(2deg); }
.course-top::after {
  content: ""; position: absolute; z-index: -1; right: 22px; bottom: -1px; width: 118px; height: 138px;
  background: var(--night-2); border: 1.5px solid rgba(242, 192, 74, .45); border-bottom: 0;
  border-radius: 50% 50% 0 0 / 40% 40% 0 0;
}
.course-top .ar { position: absolute; right: 22px; bottom: 22px; width: 118px; text-align: center; font-size: 1.85rem; color: var(--gold-night); line-height: 1.3; }
.course-top .ar.long { font-size: 1.12rem; line-height: 1.5; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .03em; line-height: 1.3;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-open { background: var(--ok-bg); color: var(--ok); }
.pill-closed { background: var(--closed-bg); color: var(--closed); }
.course-top .pill-open { background: rgba(37, 211, 102, .16); color: #7CEBA6; }
.course-top .pill-closed { background: rgba(242, 166, 152, .14); color: #F5B4A8; }
.course-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 24px; flex: 1; }
.course-body h3 { font-size: 1.45rem; }
.course-body h3 a { color: inherit; text-decoration: none; }
.course-body h3 a:hover { color: var(--teal-ink); }
.course-body p { color: var(--ink-soft); font-size: .97rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.course-facts { list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 8px; font-size: .92rem; }
.course-facts li { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.course-facts .icon { color: var(--teal); }
.course-facts b { color: var(--ink); font-weight: 600; }
.course-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--font-body); font-size: .8rem; font-weight: 500; color: var(--ink-soft); }
.course-foot .btn { padding: .7em 1.15em; font-size: .93rem; }

/* filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  padding: .55em 1.1em; border-radius: 999px; font: 600 .93rem/1.2 var(--font-body); transition: all .2s ease;
}
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--surface); }
.chip .count { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ---------- Areas of focus ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
@media (max-width: 900px) { .focus-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .focus-grid { grid-template-columns: 1fr; } }
.focus { position: relative; background: var(--surface); padding: 30px 28px 32px; display: grid; gap: 10px; align-content: start; transition: background-color .3s ease; }
.focus:hover { background: color-mix(in srgb, var(--surface) 92%, var(--gold-fill)); }
.focus-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.focus h3 { font-size: 1.5rem; }
.focus .ar { font-size: 1.75rem; color: var(--gold); line-height: 1.2; }
.focus p { color: var(--ink-soft); font-size: .98rem; line-height: 1.65; }

/* ---------- Device row ---------- */
.needs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.need { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 20px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; line-height: 1.3; }
.need .icon { width: 30px; height: 30px; color: var(--teal); }
@media (max-width: 480px) { .needs { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Feature list (About) ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feature { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 24px; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); }
.feature > div { min-width: 0; }
.feature .badge { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50% 50% 10px 10px / 60% 60% 10px 10px; background: var(--night); color: var(--gold-night); }
.feature .badge .icon { width: 24px; height: 24px; }
.feature h3 { font-size: 1.22rem; margin-bottom: 6px; }
.feature p { color: var(--ink-soft); font-size: .97rem; line-height: 1.6; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; position: relative; padding: 26px 24px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--on-gold); background: var(--gold-fill);
  border-radius: 50% 50% 8px 8px / 60% 60% 8px 8px;
}
.steps h3 { font-size: 1.2rem; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); font-size: .97rem; line-height: 1.6; }

/* ---------- CTA band ---------- */
.cta {
  position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--on-night);
  border-radius: 28px; padding: clamp(36px, 6vw, 64px);
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
}
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 120% at 100% 50%, rgba(14, 90, 99, .7), transparent 60%), var(--pattern); }
.cta > div { min-width: 0; }
.cta h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cta p { color: var(--on-night-soft); margin-top: 10px; max-width: 56ch; }
.cta .pill { margin-bottom: 14px; }
.cta .pill-open { background: rgba(37, 211, 102, .16); color: #7CEBA6; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Course detail ---------- */
.hero-course .meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; color: var(--on-night-soft); font-size: .98rem; }
.hero-course .meta-row .item { display: inline-flex; align-items: center; gap: 8px; }
.hero-course .meta-row .icon { color: var(--gold-night); }
.hero-course .pill-open { background: rgba(37, 211, 102, .16); color: #7CEBA6; }
.hero-course .pill-closed { background: rgba(242, 166, 152, .14); color: #F5B4A8; }
.hero-course .ar-title { display: block; text-align: left; font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--gold-night); line-height: 1.5; margin-bottom: 6px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 980px) { .detail { grid-template-columns: 1fr; } }
.detail-main { min-width: 0; display: grid; gap: 34px; }
.detail-main .lead-img img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow); }
.detail-main h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
.detail-main .prose p { color: var(--ink-soft); }
.ayah {
  margin: 0; padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--gold-fill);
}
.ayah .ar { display: block; font-size: 1.7rem; color: var(--gold); line-height: 1.7; }
.ayah p { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin-top: 6px; }
.ayah cite { display: block; margin-top: 6px; font-style: normal; font-size: var(--fs-small); color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; }
.levels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 640px) { .levels { grid-template-columns: 1fr; } }
.level { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 12px; align-content: start; }
.level .tag { justify-self: start; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--on-gold); background: var(--gold-fill); padding: 4px 10px; border-radius: 6px; }
.level h3 { font-size: 1.35rem; }
.level p { color: var(--ink-soft); font-size: .98rem; line-height: 1.6; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; line-height: 1.5; }
.checklist .icon { color: var(--ok); margin-top: 3px; }
.covers { counter-reset: c; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .covers { grid-template-columns: 1fr; } }
.covers li { counter-increment: c; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-weight: 600; line-height: 1.35; }
.covers li::before { content: counter(c); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--teal-ink); font-family: var(--font-display); font-weight: 700; }
.note { padding: 18px 20px; border-radius: 14px; background: color-mix(in srgb, var(--gold-fill) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold-fill) 45%, var(--line)); color: var(--ink); font-size: .98rem; }
.note strong { color: var(--gold); }

.enroll-card { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 86px); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.enroll-head { position: relative; isolation: isolate; background: var(--night); color: var(--on-night); padding: 24px 24px 22px; }
.enroll-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pattern); }
.enroll-head .price { color: var(--on-night); font-size: 2.3rem; }
.enroll-head .price small { color: var(--on-night-soft); }
.enroll-head .label { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-night); font-weight: 700; margin-bottom: 8px; }
.enroll-body { padding: 8px 24px 24px; }
.facts { width: 100%; border-collapse: collapse; font-size: .95rem; }
.facts th, .facts td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.facts th { color: var(--ink-soft); font-weight: 500; width: 42%; padding-right: 12px; }
.facts td { font-weight: 600; color: var(--ink); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts .tbd { color: var(--ink-soft); font-weight: 500; font-style: italic; }
.enroll-body .btn { margin-top: 14px; }
.enroll-body .hint { margin-top: 12px; font-size: .85rem; color: var(--ink-soft); line-height: 1.5; text-align: center; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid > * { min-width: 0; }
.contact-info { display: grid; gap: 18px; }
.contact-info h2 { font-size: var(--fs-h2); }
.contact-info > p { color: var(--ink-soft); font-size: 1.1rem; }
.channel { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.channel > div { min-width: 0; }
.channel .badge { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--teal); }
.channel .badge.wa { background: rgba(37, 211, 102, .15); color: #14A84E; }
.channel small { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.channel a, .channel .value { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; overflow-wrap: anywhere; user-select: all; }
.channel a:hover { color: var(--teal-ink); }
.copy-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); border-radius: 10px; padding: 8px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: 600 .8rem/1 var(--font-body); }
.copy-btn:hover { color: var(--teal-ink); border-color: var(--teal); }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 4vw, 38px); box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.7rem; }
.form-card .sub { color: var(--ink-soft); margin: 6px 0 24px; font-size: .98rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-weight: 600; font-size: .92rem; }
.field label .req { color: var(--closed); }
.field input, .field textarea, .field select {
  width: 100%; font: 400 1rem/1.4 var(--font-body); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--teal); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 18%, transparent); }
.field .err { font-size: .82rem; color: var(--closed); min-height: 0; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--closed); }
.form-actions { margin-top: 22px; display: grid; gap: 10px; }
.form-actions .fine { font-size: .84rem; color: var(--ink-soft); text-align: center; }
.form-success { margin-top: 18px; padding: 18px 20px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); display: grid; gap: 10px; }
.form-success strong { font-size: 1.05rem; }
.form-success p { color: var(--ink); font-size: .95rem; }
.form-success .btn { justify-self: start; }

/* ---------- Legal pages ---------- */
.legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .legal { grid-template-columns: 1fr; } .toc { position: static !important; } }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 86px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.toc h2 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; font-weight: 700; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-size: .92rem; line-height: 1.4; }
.toc a:hover, .toc a.active { background: var(--surface-2); color: var(--teal-ink); }
.legal-body { max-width: 74ch; }
.legal-body h2 { font-size: 1.55rem; margin: 2.2em 0 .6em; scroll-margin-top: 100px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--ink-soft); }
.legal-body p + p { margin-top: 1em; }
.legal-body ul { padding-left: 1.2em; display: grid; gap: 6px; margin: .8em 0; }
.legal-body li::marker { color: var(--gold); }
.legal-body .intro { font-size: 1.1rem; color: var(--ink); }
.updated { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-small); color: var(--on-night-soft); margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--on-night); margin-top: var(--section); }
.site-footer::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pattern); opacity: .8; }
.site-footer::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--night) 0%, transparent 40%, var(--night) 100%); }
.footer-ayah { text-align: center; padding-block: 56px 40px; border-bottom: 1px solid rgba(242, 192, 74, .16); }
.footer-ayah .ar { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--gold-night); line-height: 1.7; }
.footer-ayah p { color: var(--on-night-soft); margin-top: 4px; font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 36px; padding-block: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid > div { min-width: 0; }
.footer-grid h2 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-night); margin-bottom: 14px; font-weight: 700; }
.footer-grid p { color: var(--on-night-soft); font-size: .97rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--on-night); text-decoration: none; opacity: .85; transition: opacity .2s ease, color .2s ease; }
.footer-grid a:hover { opacity: 1; color: var(--gold-night); }
.footer-brand { display: grid; gap: 14px; }
.footer-brand .brand img { width: 56px; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(234, 242, 239, .25); opacity: 1; }
.socials a:hover { background: var(--gold-night); color: var(--on-gold); border-color: var(--gold-night); }
.footer-bottom { border-top: 1px solid rgba(234, 242, 239, .1); padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: .88rem; color: var(--on-night-soft); }
.footer-bottom a { color: var(--on-night); text-decoration: none; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px; border-radius: 999px;
  background: var(--wa); color: #06260F; text-decoration: none; font-weight: 700; font-size: .95rem;
  box-shadow: 0 10px 28px -8px rgba(37, 211, 102, .7);
  transition: transform .2s ease, padding .25s ease;
}
.wa-float .icon { width: 30px; height: 30px; }
.wa-float span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .3s ease; }
.wa-float:hover { transform: translateY(-3px); padding-right: 18px; }
.wa-float:hover span { max-width: 160px; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--wa); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.45); opacity: 0; } }

/* Scroll reveal: only applied by JS to things below the first screen */
.reveal-pre { opacity: 0; transform: translateY(22px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }

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

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-lg { margin-top: clamp(40px, 6vw, 64px); }
.center { text-align: center; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--teal-ink); text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .2s ease; }

/* =====================================================================
   Motion layer
   ===================================================================== */

/* ---------- Curtain: page-to-page transition + first-visit intro ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: var(--night); color: var(--gold-night); pointer-events: none;
  animation: curtain-out .55s .1s cubic-bezier(.7, 0, .3, 1) forwards;
}
.curtain::before { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: .6; }
.curtain-inner { position: relative; display: grid; justify-items: center; gap: 18px; }
.curtain-rosette { width: 120px; height: 120px; animation: spin 6s linear infinite; }
.curtain-rosette .d { stroke-dasharray: 1; stroke-dashoffset: 0; }
.curtain-rosette .dot { opacity: 1; }
.curtain-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--on-night); letter-spacing: .04em; opacity: 0; }
@keyframes curtain-out { to { opacity: 0; visibility: hidden; } }
@keyframes curtain-in { from { opacity: 0; visibility: visible; } to { opacity: 1; visibility: visible; } }
html.intro .curtain { animation: curtain-out .7s 1.35s cubic-bezier(.7, 0, .3, 1) forwards; }
html.intro .curtain-rosette { width: 150px; height: 150px; }
html.intro .curtain-rosette .d { stroke-dashoffset: 1; animation: draw 1.1s calc(var(--d) * .6) cubic-bezier(.6, 0, .2, 1) forwards; }
html.intro .curtain-rosette .dot { opacity: 0; animation: fade-in .4s .9s forwards; }
html.intro .curtain-name { animation: rise .7s .55s cubic-bezier(.2, .7, .2, 1) forwards; }
html.leaving .curtain { animation: curtain-in .32s cubic-bezier(.7, 0, .3, 1) forwards; pointer-events: auto; }
html.leaving .curtain-name { opacity: 0; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--gold-fill), var(--gold-night), #FFE08A); box-shadow: 0 0 12px rgba(242, 192, 74, .7); }

/* ---------- Nav underline ---------- */
.nav a.nav-link::before {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1.5px; background: var(--gold-night);
  transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.nav a.nav-link:hover::before { transform: scaleX(1); transform-origin: left; }
@media (max-width: 860px) { .nav a.nav-link::before { display: none; } }

/* ---------- Rosettes ---------- */
.rosette { width: 100%; height: 100%; display: block; color: var(--gold-night); overflow: visible; }
.rosette .d { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s calc(var(--d) + .2s) cubic-bezier(.6, 0, .2, 1) forwards; }
.rosette .dot { opacity: 0; animation: fade-in .6s 1.8s forwards; }
.hero-rosette { position: absolute; z-index: -1; pointer-events: none; }
.hero-rosette .rosette { animation: spin 140s linear infinite; }
.hero-home .hero-rosette { width: clamp(420px, 46vw, 680px); aspect-ratio: 1; left: clamp(-260px, -14vw, -120px); top: 50%; margin-top: calc(clamp(420px, 46vw, 680px) / -2); opacity: .2; }
.hero-inner::after { content: none; }
.hero-inner .hero-rosette { width: clamp(320px, 38vw, 520px); aspect-ratio: 1; right: max(-140px, calc(50% - 760px)); top: 50%; transform: translateY(-46%); opacity: .5; }
@media (max-width: 700px) { .hero-inner .hero-rosette { right: -170px; opacity: .3; } }

/* ---------- Hero: words, shimmer, dust, parallax, scroll cue ---------- */
.hero-copy > h1.words { animation: none; }
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.words .w > span { display: inline-block; animation: word-up .9s calc(var(--i) * 65ms + .25s) cubic-bezier(.2, .8, .2, 1) both; }
html.intro .words .w > span { animation-delay: calc(var(--i) * 65ms + 1.55s); }
@keyframes word-up { from { transform: translateY(110%) rotate(4deg); } to { transform: none; } }
.shimmer {
  background: linear-gradient(100deg, var(--gold-night) 0%, var(--gold-night) 40%, #FFF3C4 50%, var(--gold-night) 60%, var(--gold-night) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise .9s cubic-bezier(.2, .7, .2, 1) both, shimmer 6s 1.2s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 35%, 100% { background-position: -50% 0; } }
.dust { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-photo { transition: transform .8s cubic-bezier(.2, .7, .2, 1); will-change: transform; inset: -24px; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(234, 242, 239, .5); border-radius: 14px; animation: fade-in 1s 1.4s both; opacity: 0; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold-night); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 700px) { .scroll-cue { display: none; } }

/* ---------- Split headings on scroll ---------- */
.split-pre .w > span { transform: translateY(110%); }
.split-in .w > span { transform: none; transition: transform .85s calc(var(--i) * 55ms) cubic-bezier(.2, .8, .2, 1); }
.section-head h2 .w > span, .split h2 .w > span, .contact-info h2 .w > span { animation: none; }

/* eyebrow diamond spins in */
.eyebrow::before { transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal-in .eyebrow::before, .split-in .eyebrow::before { transform: rotate(225deg); }

/* ---------- Arch image reveal + parallax ---------- */
.arch-frame img { transition: transform .2s linear; }
.arch-frame.arch-pre { clip-path: inset(100% 0 0 0 round 40%); }
.arch-frame.arch-pre img { transform: scale(1.18); }
.arch-frame.arch-in { clip-path: inset(-40px -40px -40px -40px); transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1); }
.arch-frame.arch-in img { transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.arch-frame figcaption { transition: transform .8s .7s cubic-bezier(.2, .8, .2, 1), opacity .8s .7s; }
.arch-frame.arch-pre figcaption { transform: translateX(-20px); opacity: 0; }

/* ---------- Course cards: tilt + glare ---------- */
.course-grid { perspective: 1200px; }
.course-card { transform-style: preserve-3d; will-change: transform; position: relative; }
.course-card.tilting { transition: transform .08s linear, box-shadow .3s ease, border-color .3s ease; }
.course-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 236, 170, .22), transparent 45%);
}
.course-card:hover::after { opacity: 1; }
.course-top .ar { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.course-card:hover .course-top .ar { transform: translateY(-6px) scale(1.08); }
.course-top::after { transition: box-shadow .5s ease; }
.course-card:hover .course-top::after { box-shadow: 0 0 0 6px rgba(242, 192, 74, .08), 0 0 40px rgba(242, 192, 74, .25); }

/* ---------- Night band: marquee + counters ---------- */
.night-band { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--on-night); padding-block: 0 clamp(48px, 7vw, 80px); }
.night-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 50% 120%, rgba(14, 90, 99, .55), transparent 70%), var(--pattern); }
.marquee { overflow: hidden; border-block: 1px solid rgba(242, 192, 74, .18); padding-block: 18px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee ul { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover ul { animation-play-state: paused; }
.marquee li { display: inline-flex; align-items: center; gap: 14px; padding-right: 14px; white-space: nowrap; }
.marquee .ar { font-size: 1.9rem; color: var(--gold-night); line-height: 1.4; }
.marquee .en { font-family: var(--font-display); font-size: 1.3rem; color: var(--on-night); }
.marquee .sep { color: var(--gold-night); opacity: .6; padding-left: 14px; font-size: .9rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(40px, 6vw, 64px); }
.stat { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 8px 16px; border-left: 1px solid rgba(242, 192, 74, .18); }
.stat:first-child { border-left: 0; }
.stat .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; color: var(--gold-night); font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--on-night-soft); font-size: .95rem; line-height: 1.4; max-width: 18ch; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 32px; } .stat:nth-child(3) { border-left: 0; } }

/* ---------- Focus wheel ---------- */
.wheel-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .wheel-wrap { grid-template-columns: 1fr; justify-items: center; } }
.wheel { --R: 205px; --node: 104px; position: relative; width: 520px; max-width: 100%; aspect-ratio: 1; margin-inline: auto; }
.wheel-ring { position: absolute; inset: calc(50% - var(--R)); border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--gold) 55%, transparent); animation: spin 90s linear infinite reverse; }
.wheel-core { position: absolute; inset: 27%; color: var(--gold); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gold-fill) 12%, transparent), transparent 70%); }
.wheel-core .rosette { color: var(--gold); animation: spin 60s linear infinite; }
.wheel .node {
  position: absolute; left: 50%; top: 50%; width: var(--node); height: var(--node); margin: calc(var(--node) / -2) 0 0 calc(var(--node) / -2);
  transform: rotate(var(--a)) translate(var(--R)) rotate(calc(var(--a) * -1));
  display: grid; place-content: center; gap: 0; text-align: center; border-radius: 50%; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); box-shadow: var(--shadow);
  font: inherit; transition: background-color .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.wheel .node .ar { font-size: 1.35rem; line-height: 1.3; color: var(--gold); transition: color .35s ease; }
.wheel .node .en { font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.wheel .node:hover { border-color: var(--gold); }
.wheel .node.active { background: var(--night); border-color: var(--gold-night); color: var(--on-night); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold-fill) 22%, transparent), 0 18px 40px -16px rgba(0, 0, 0, .5); }
.wheel .node.active .ar { color: var(--gold-night); }
.wheel .node::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1.5px solid var(--gold-night); opacity: 0; transform: scale(.8); }
.wheel .node.active::after { animation: node-ping 1.2s ease-out; }
@keyframes node-ping { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
@media (max-width: 560px) { .wheel { --R: 128px; --node: 70px; width: 340px; } .wheel .node .en { display: none; } .wheel .node .ar { font-size: 1.05rem; } }
@media (max-width: 380px) { .wheel { --R: 112px; --node: 62px; width: 300px; } }
.focus-panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); overflow: hidden; display: grid; gap: 10px; width: 100%; max-width: 560px; }
.focus-panel::before { content: ""; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.focus-panel template { display: none; }
.fp-ar { font-size: clamp(2.6rem, 5vw, 3.6rem); color: var(--gold); line-height: 1.3; text-align: left; }
.fp-title { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.fp-text { color: var(--ink-soft); font-size: 1.08rem; line-height: 1.7; min-height: 5.1em; }
.fp-progress { height: 3px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.fp-progress span { display: block; height: 100%; width: 100%; background: var(--gold-fill); transform-origin: 0 50%; transform: scaleX(0); }
.fp-progress.run span { animation: fp-run var(--fp-dur, 5s) linear forwards; }
@keyframes fp-run { to { transform: scaleX(1); } }
.fp-hint { font-size: .85rem; color: var(--ink-soft); }
.focus-panel.swap .fp-ar, .focus-panel.swap .fp-title, .focus-panel.swap .fp-text { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.focus-panel.swap .fp-title { animation-delay: .06s; }
.focus-panel.swap .fp-text { animation-delay: .12s; }

/* ---------- CTA rosette ---------- */
.cta-rosette { position: absolute; z-index: -1; right: -120px; top: 50%; width: 420px; aspect-ratio: 1; transform: translateY(-50%); opacity: .35; pointer-events: none; }
.cta-rosette .rosette { animation: spin 80s linear infinite; }
.cta .btn-gold { animation: glow 2.8s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 8px 22px -10px rgba(235, 178, 15, .8); } 50% { box-shadow: 0 8px 34px -4px rgba(235, 178, 15, .95), 0 0 0 6px rgba(235, 178, 15, .12); } }

/* ---------- Magnetic buttons ---------- */
.btn.magnet { transition: transform .25s cubic-bezier(.2, .8, .2, 1), background-color .2s ease, box-shadow .2s ease; }

/* ---------- Footer ayah shimmer ---------- */
.footer-ayah .ar { background: linear-gradient(100deg, var(--gold-night) 40%, #FFF3C4 50%, var(--gold-night) 60%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s ease-in-out infinite; }

/* ---------- Sticky enroll bar (course pages, phones/tablets) ---------- */
.enroll-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 65;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 18px; background: color-mix(in srgb, var(--night) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--on-night);
  border: 1px solid rgba(242, 192, 74, .25); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55);
  transform: translateY(140%); transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.enroll-bar .eb-info { display: grid; gap: 4px; }
.enroll-bar .price { color: var(--on-night); font-size: 1.4rem; }
.enroll-bar .price small { color: var(--on-night-soft); }
.enroll-bar .pill { justify-self: start; font-size: .7rem; padding: 3px 9px; }
.enroll-bar .pill-open { background: rgba(37, 211, 102, .16); color: #7CEBA6; }
.enroll-bar .pill-closed { background: rgba(242, 166, 152, .14); color: #F5B4A8; }
.enroll-bar .btn { padding: .75em 1.1em; font-size: .93rem; }
@media (max-width: 980px) { .enroll-bar { display: flex; } }
.enroll-bar.show { transform: none; }
body.bar-up .wa-float { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.wa-float { transition: transform .2s ease, padding .25s ease, bottom .4s cubic-bezier(.2, .8, .2, 1); }

/* ---------- Filter animation ---------- */
.course-card.pop { animation: pop .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Form success check ---------- */
.form-success svg.tick { width: 44px; height: 44px; }
.form-success svg.tick circle, .form-success svg.tick path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s cubic-bezier(.6, 0, .2, 1) forwards; }
.form-success svg.tick path { animation-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
  .curtain { display: none; }
  .rosette .d { stroke-dashoffset: 0; } .rosette .dot { opacity: 1; }
  .split-pre .w > span { transform: none; }
  .arch-frame.arch-pre { clip-path: none; } .arch-frame.arch-pre img { transform: none; } .arch-frame.arch-pre figcaption { transform: none; opacity: 1; }
  .shimmer, .footer-ayah .ar { color: var(--gold-night); background: none; }
  .marquee ul { flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee li:nth-child(n+10) { display: none; }
  .scroll-cue { opacity: 1; }
}
.arch-frame img { transform: scale(1.06) translateY(var(--py, 0px)); }
.arch-frame.arch-pre img { transform: scale(1.25); }
.arch-frame.settled img { transition: transform .25s linear; }
.hero .ar-title { animation: rise .8s .1s cubic-bezier(.2, .7, .2, 1) both; }


/* =====================================================================
   Mihrab ornament (replaces the star rosette) + arcade of doors
   ===================================================================== */
.rosette { animation: none !important; }
.hero-rosette .rosette, .cta-rosette .rosette, .curtain-rosette { animation: none !important; }
.rosette .lamp, .curtain-rosette .lamp { transform-box: view-box; transform-origin: 200px 106px; animation: lamp-swing 5s ease-in-out infinite; }
@keyframes lamp-swing { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.rosette .glow, .curtain-rosette .glow { fill: var(--gold-night); stroke: none; opacity: 0; filter: drop-shadow(0 0 10px rgba(242, 192, 74, .9)); animation: lamp-glow 3.2s 2s ease-in-out infinite; }
@keyframes lamp-glow { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
.hero-home .hero-rosette { width: clamp(380px, 40vw, 560px); aspect-ratio: 5 / 6; height: auto; left: clamp(-60px, -3vw, -20px); top: auto; bottom: 0; margin-top: 0; opacity: .22; }
.hero-inner .hero-rosette { width: clamp(260px, 30vw, 400px); aspect-ratio: 5 / 6; top: auto; bottom: 0; transform: none; right: max(-60px, calc(50% - 700px)); opacity: .6; }
@media (max-width: 700px) { .hero-inner .hero-rosette { right: -110px; opacity: .3; } }
.cta-rosette { width: 300px; aspect-ratio: 5 / 6; right: 4%; top: auto; bottom: 0; transform: none; opacity: .35; }
@media (max-width: 820px) { .cta-rosette { right: -80px; opacity: .2; } }
.curtain-rosette { width: 120px; height: 144px; }
html.intro .curtain-rosette { width: 150px; height: 180px; }
.marquee .sep { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-night); opacity: .55; padding: 0; margin-left: 14px; }
.eyebrow::before { border-radius: 50% 50% 0 0; transform: none !important; width: 8px; height: 11px; }

/* Arcade */
.arcade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%; max-width: 540px; margin-inline: auto; }
.door {
  position: relative; aspect-ratio: 3 / 4; display: grid; place-content: center; gap: 4px; text-align: center; cursor: pointer;
  border-radius: 50% 50% 12px 12px / 34% 34% 12px 12px; padding: 18px 8px 10px;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow); font: inherit;
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
.door::before { content: ""; position: absolute; inset: 8px; border-radius: inherit; border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); pointer-events: none; transition: border-color .35s ease; }
.door .ar { font-size: clamp(1.25rem, 2.4vw, 1.7rem); color: var(--gold); line-height: 1.3; transition: color .35s ease; }
.door .en { font-size: .85rem; font-weight: 600; }
.door:hover { transform: translateY(-4px); border-color: var(--gold); }
.door.active { background: var(--night); color: var(--on-night); border-color: var(--gold-night); transform: translateY(-6px); box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold-fill) 20%, transparent), 0 20px 40px -18px rgba(0, 0, 0, .55); }
.door.active::before { border-color: rgba(242, 192, 74, .5); }
.door.active .ar { color: var(--gold-night); }
.door-lamp { position: absolute; top: 16%; left: 50%; width: 1.5px; height: 18%; margin-left: -.75px; background: var(--gold-night); opacity: 0; transform-origin: top center; transition: opacity .35s ease; }
.door-lamp::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 12px; height: 14px; margin-left: -6px; border-radius: 50% 50% 45% 45%; background: var(--gold-night); box-shadow: 0 0 14px 3px rgba(242, 192, 74, .7); }
.door.active .door-lamp { opacity: 1; animation: lamp-swing 4s ease-in-out infinite; }
.door.active .ar { margin-top: 22%; }
@media (max-width: 560px) { .arcade { gap: 10px; } .door { padding: 14px 4px 8px; } .door .en { font-size: .74rem; } .door-lamp { display: none; } .door.active .ar { margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { .rosette .glow { opacity: .7; } }
.nav a.nav-link[aria-current="page"]::after { transform: none; border-radius: 50%; width: 5px; height: 5px; margin-left: -2.5px; }
.focus-panel::before { top: -1px; right: 28px; width: 110px; height: 150px; border-radius: 0 0 50% 50% / 0 0 30% 30%; border-top: 0; transform: rotate(180deg); }
