/* ============================================================
   Feljib — feljib.com design system
   Palette: navy #211C50 · magenta #DA1A58 · black #231F20
   Fonts:   Cairo (Arabic pages) · Manrope (Latin pages)
   ============================================================ */

:root {
  --navy: #211C50;
  --navy-900: #171338;
  --navy-800: #1B1642;
  --navy-700: #2A2463;
  --navy-600: #363080;
  --pink: #DA1A58;
  --pink-700: #C0134B;
  --pink-100: #FCE8EF;
  --pink-50: #FEF3F7;
  --lav-200: #E6E4F2;
  --lav-100: #EFEEF7;
  --bg: #FAFAFD;
  --surface: #FFFFFF;
  --ink: #211C50;
  --text: #46425F;
  --muted: #757190;
  --line: #E7E5F1;
  --ok: #1C9E5A;
  --amber: #F5A623;

  --font-latin: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-arabic: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font: var(--font-latin);

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;
  --radius-xl: 32px;

  --shadow-s: 0 1px 2px rgba(33, 28, 80, 0.06), 0 2px 8px rgba(33, 28, 80, 0.06);
  --shadow-m: 0 4px 14px rgba(33, 28, 80, 0.08), 0 12px 32px rgba(33, 28, 80, 0.10);
  --shadow-l: 0 12px 32px rgba(23, 19, 56, 0.18), 0 32px 80px rgba(23, 19, 56, 0.22);

  --container: 1140px;
  --header-h: 72px;
}

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

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; font-weight: 800; letter-spacing: -0.015em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { letter-spacing: 0; line-height: 1.35; }

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -48px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-size: 16px; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn svg { flex: none; }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; transform: none; }
.btn:disabled:hover { transform: none; }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 6px 18px rgba(218, 26, 88, 0.35); }
.btn-primary:hover { background: var(--pink-700); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(218, 26, 88, 0.42); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-700); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-on-dark { background: #fff; color: var(--navy); }
.btn-on-dark:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.25); }

/* Store buttons */
.store-btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--navy); color: #fff; border-radius: 14px;
  padding: 10px 20px; min-height: 60px; text-decoration: none !important;
  border: 1.5px solid rgba(255,255,255,0.14);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(23,19,56,.35); background: var(--navy-700); }
.store-btn .s-icon { width: 28px; height: 28px; flex: none; }
.store-btn .s-lines { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
.store-btn .s-small { font-size: 11.5px; opacity: .85; font-weight: 600; letter-spacing: .02em; }
.store-btn .s-big { font-size: 18px; font-weight: 800; }
.store-btn.is-soon { background: transparent; color: var(--navy); border: 1.5px solid var(--line); cursor: default; }
.store-btn.is-soon:hover { transform: none; box-shadow: none; background: var(--lav-100); }
.on-dark .store-btn { background: #fff; color: var(--navy); border-color: transparent; }
.on-dark .store-btn:hover { background: #fff; }
.on-dark .store-btn.is-soon { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.on-dark .store-btn.is-soon:hover { background: rgba(255,255,255,0.08); }
.soon-badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  background: var(--pink-100); color: var(--pink-700);
  border-radius: 999px; padding: 3px 9px; margin-inline-start: 4px;
}
.on-dark .soon-badge { background: rgba(255,255,255,0.16); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(250, 250, 253, 0.85);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(33,28,80,.06); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none !important; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-size: 23px; font-weight: 800; color: var(--navy); letter-spacing: -0.01em; }

.main-nav { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: 15.5px; text-decoration: none; }
.main-nav a:hover { color: var(--pink); }

.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--lav-100); border-radius: 999px; padding: 4px;
}
.lang-switch a, .lang-switch span {
  font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  color: var(--muted); text-decoration: none !important;
}
.lang-switch a:hover { color: var(--navy); }
.lang-switch .active { background: var(--navy); color: #fff; }

.nav-cta { margin-inline-start: 4px; padding: 11px 22px; font-size: 15px; }

.nav-toggle {
  display: none; margin-inline-start: auto;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--navy); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset-inline: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 14px 24px 22px; margin: 0;
    box-shadow: 0 24px 40px rgba(33,28,80,.12);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 4px; font-size: 17px; }
  .main-nav .lang-switch { align-self: flex-start; margin-top: 10px; }
  .nav-cta { margin: 10px 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1100px 520px at 84% -10%, rgba(218,26,88,0.32), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(54,48,128,0.55), transparent 60%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy) 55%, var(--navy-900) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.055) 1.2px, transparent 1.3px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 75%);
}
.hero .container {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 96px;
}
.hero-copy { max-width: 560px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16);
  color: #fff; font-size: 13.5px; font-weight: 700;
  border-radius: 999px; padding: 7px 15px; margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px rgba(218,26,88,.3); }
.hero h1 {
  color: #fff; font-size: clamp(38px, 5.2vw, 58px); font-weight: 800; margin-bottom: 18px;
}
.hero h1 .accent { color: transparent; background: linear-gradient(92deg, #FF5C8A, var(--pink)); background-clip: text; -webkit-background-clip: text; }
.hero .sub { font-size: clamp(17px, 1.7vw, 19.5px); line-height: 1.7; color: rgba(255,255,255,0.82); margin-bottom: 32px; max-width: 52ch; }
.hero .store-btns { margin-bottom: 26px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14.5px; color: rgba(255,255,255,0.75); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 17px; height: 17px; flex: none; }

/* Phone mockup */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: 310px; border-radius: 46px; z-index: 2;
  background: #100d29; padding: 12px;
  box-shadow: var(--shadow-l), inset 0 0 0 2px rgba(255,255,255,0.08);
  transform: rotate(-3deg);
}
.phone-screen {
  border-radius: 36px; overflow: hidden; background: #F7F6FB;
  aspect-ratio: 9 / 19.2; position: relative;
  display: flex; flex-direction: column;
  font-size: 13px; line-height: 1.45;
}
.phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 22px; border-radius: 999px; background: #100d29; z-index: 10;
}
.app-head {
  background: linear-gradient(150deg, #9D6BFF, #7C4DE8);
  color: #fff; padding: 42px 18px 30px;
  border-bottom-left-radius: 46% 32px; border-bottom-right-radius: 46% 32px;
  display: flex; align-items: center; gap: 10px;
}
.app-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #fff; flex: none;
  display: grid; place-items: center; overflow: hidden;
}
.app-avatar svg { width: 26px; height: 26px; }
.app-greet .g1 { font-size: 12px; opacity: .9; }
.app-greet .g2 { font-size: 15px; font-weight: 800; }
.app-bell { margin-inline-start: auto; width: 20px; height: 20px; opacity: .95; }
.app-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.app-card-daily {
  background: linear-gradient(150deg, #A379FF, #8B5CF6);
  border-radius: 18px; color: #fff; text-align: center; padding: 15px 14px 16px;
  box-shadow: 0 10px 22px rgba(139, 92, 246, 0.35);
}
.app-card-daily .t { font-weight: 800; font-size: 14.5px; margin-bottom: 4px; }
.app-card-daily .d { font-size: 11px; opacity: .92; margin-bottom: 10px; }
.app-card-daily .start {
  display: inline-block; background: #fff; color: #7C4DE8; font-weight: 800;
  font-size: 12.5px; border-radius: 999px; padding: 7px 26px;
}
.app-row { border-radius: 15px; padding: 13px 15px; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 13px; }
.app-row svg { width: 18px; height: 18px; flex: none; }
.app-row .arr { margin-inline-start: auto; width: 16px; height: 16px; }
.app-row.quiz { background: linear-gradient(150deg, #F58C9C, #EF7285); box-shadow: 0 8px 18px rgba(239, 114, 133, .3); }
.app-row.cards { background: linear-gradient(150deg, #7FD8BE, #5EC9A9); box-shadow: 0 8px 18px rgba(94, 201, 169, .3); }
.app-subjects .label { font-size: 12px; font-weight: 800; color: #211C50; margin-bottom: 8px; }
.app-chips { display: flex; gap: 8px; }
.app-chip {
  flex: 1; background: #fff; border: 1px solid #ECEAF6; border-radius: 13px;
  display: grid; place-items: center; padding: 10px 0 8px; gap: 4px;
  font-size: 10px; color: #46425F; font-weight: 700;
}
.app-chip .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.app-chip .ico svg { width: 16px; height: 16px; }
.app-chip .i-teal { background: #DFF6EE; } .app-chip .i-amber { background: #FdF0D7; } .app-chip .i-blue { background: #E3EDFB; }

/* floating cards around phone */
.float-card {
  position: absolute; z-index: 3; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-m); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 700; font-size: 13.5px; line-height: 1.3;
  animation: floaty 5.5s ease-in-out infinite;
}
.float-card .fc-ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
}
.float-card small { display: block; font-weight: 600; color: var(--muted); font-size: 11.5px; }
.fc-streak { top: 9%; inset-inline-end: -4%; animation-delay: .4s; }
.fc-streak .fc-ico { background: #FFF1E3; }
.fc-badge { bottom: 14%; inset-inline-end: -7%; animation-delay: 1.6s; }
.fc-badge .fc-ico { background: var(--pink-100); }
.fc-exam { top: 34%; inset-inline-start: -9%; animation-delay: 2.6s; }
.fc-exam .fc-ico { background: var(--lav-100); }
@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, var(--z, 60px)); }
  50%      { transform: translate3d(0, -9px, var(--z, 60px)); }
}

.hero-glow {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(218,26,88,.4), transparent 65%);
  filter: blur(30px); z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -46%);
}

@media (max-width: 940px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 64px; }
  .hero-copy { max-width: 640px; }
  .hero-visual { margin-top: 10px; }
  .fc-exam { inset-inline-start: 0; }
  .fc-streak { inset-inline-end: 0; }
  .fc-badge { inset-inline-end: 2%; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--surface); }
.section-head { max-width: 680px; margin: 0 auto 54px; text-align: center; }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .06em;
  color: var(--pink); background: var(--pink-100); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 16px; text-transform: uppercase;
}
html[lang="ar"] .kicker { letter-spacing: 0; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }
.section-head p { font-size: 17.5px; color: var(--muted); }

/* Trust strip */
.trust { border-block: 1px solid var(--line); background: var(--surface); }
.trust .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-block: 30px; }
.trust-item { display: flex; align-items: center; gap: 14px; font-weight: 700; color: var(--ink); font-size: 15.5px; line-height: 1.4; }
.trust-item .t-ico {
  width: 46px; height: 46px; border-radius: 14px; background: var(--lav-100);
  display: grid; place-items: center; flex: none;
}
.trust-item .t-ico svg { width: 24px; height: 24px; }
@media (max-width: 800px) { .trust .container { grid-template-columns: 1fr; gap: 16px; } }

/* Features grid */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 30px 26px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); border-color: transparent; }
.feature-ico {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
}
.feature-ico svg { width: 27px; height: 27px; }
.fi-pink { background: var(--pink-100); } .fi-lav { background: var(--lav-100); }
.fi-mint { background: #E2F6EE; } .fi-amber { background: #FDF0D7; }
.fi-blue { background: #E3EDFB; } .fi-rose { background: #FDEAE3; }
.feature-card h3 { font-size: 19.5px; margin-bottom: 9px; }
.feature-card p { font-size: 15.5px; color: var(--muted); }
@media (max-width: 940px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features-grid { grid-template-columns: 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative; background: var(--surface); border-radius: var(--radius-l);
  border: 1px solid var(--line); padding: 34px 28px 30px;
}
.step-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 18px;
}
.step:nth-child(2) .step-num { background: var(--pink); }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 15.5px; color: var(--muted); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* Method / content moat */
.method { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.method-visual { position: relative; }
.method-copy h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 16px; }
.method-copy > p { font-size: 17px; color: var(--muted); margin-bottom: 26px; }
.method-list { display: flex; flex-direction: column; gap: 18px; }
.method-list li { display: flex; gap: 14px; }
.m-ico {
  width: 40px; height: 40px; border-radius: 12px; background: var(--pink-100);
  display: grid; place-items: center; flex: none; margin-top: 2px;
}
.m-ico svg { width: 21px; height: 21px; }
.method-list h3 { font-size: 17px; margin-bottom: 3px; }
.method-list p { font-size: 15px; color: var(--muted); }
@media (max-width: 940px) { .method { grid-template-columns: 1fr; gap: 40px; } }

/* exam→quiz transformation graphic */
.transform-visual { display: flex; flex-direction: column; gap: 0; align-items: center; }
.tv-paper {
  width: min(360px, 88%); background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-m); padding: 22px 24px; position: relative;
}
.tv-paper .tv-tag {
  position: absolute; top: -13px; inset-inline-end: 18px;
  background: var(--navy); color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 5px 12px; border-radius: 999px;
}
.tv-paper .tv-title { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 14.5px; margin-bottom: 12px; }
.tv-paper .tv-title svg { width: 20px; height: 20px; flex: none; }
.tv-lines { display: flex; flex-direction: column; gap: 8px; }
.tv-lines i { display: block; height: 8px; border-radius: 999px; background: var(--lav-100); }
.tv-lines i:nth-child(1) { width: 92%; } .tv-lines i:nth-child(2) { width: 78%; }
.tv-lines i:nth-child(3) { width: 86%; background: var(--pink-100); } .tv-lines i:nth-child(4) { width: 60%; }
.tv-arrow { padding: 14px 0; color: var(--pink); }
.tv-arrow svg { width: 30px; height: 30px; }
.tv-quiz {
  width: min(320px, 82%); background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-m); padding: 20px 22px;
}
.tv-quiz .q { font-weight: 800; color: var(--ink); font-size: 14px; margin-bottom: 12px; }
.tv-opt {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 13px;
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px;
  display: flex; align-items: center; gap: 9px;
}
.tv-opt.correct { border-color: var(--ok); background: #EDFAF3; color: #157A46; }
.tv-opt.correct svg { width: 16px; height: 16px; flex: none; }

/* Subjects */
.streams { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.stream-card {
  border-radius: var(--radius-l); padding: 32px 30px; color: #fff; position: relative; overflow: hidden;
}
.stream-card.sci { background: linear-gradient(150deg, var(--navy-700), var(--navy)); }
.stream-card.lit { background: linear-gradient(150deg, #B2164A, var(--pink-700)); }
.stream-card::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  border: 34px solid rgba(255,255,255,0.07); inset-inline-end: -70px; top: -70px;
}
.stream-card h3 { color: #fff; font-size: 21px; margin-bottom: 6px; }
.stream-card .s-sub { font-size: 14px; opacity: .8; margin-bottom: 20px; }
.chiplist { display: flex; flex-wrap: wrap; gap: 9px; position: relative; z-index: 1; }
.chip {
  background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.2);
  font-size: 13.5px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
}
.streams-note { text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 22px; }
@media (max-width: 800px) { .streams { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s ease;
}
.faq-item[open] { box-shadow: var(--shadow-s); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 19px 22px; font-weight: 700; color: var(--ink); font-size: 16.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-item summary .chev { margin-inline-start: auto; flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform .25s ease; }
.faq-item[open] summary .chev { transform: rotate(180deg); color: var(--pink); }
.faq-item .faq-a { padding: 0 22px 20px; color: var(--muted); font-size: 15.5px; }
.faq-a p { margin-bottom: 10px; }
.faq-a ul { list-style: disc; padding-inline-start: 22px; margin: 10px 0 4px; }
.faq-a li { margin-bottom: 9px; }
.faq-a strong { color: var(--ink); font-weight: 800; }
.faq-more { text-align: center; margin-top: 30px; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(218,26,88,0.35), transparent 60%),
    radial-gradient(700px 300px at 85% 100%, rgba(54,48,128,0.6), transparent 60%),
    linear-gradient(150deg, var(--navy) 0%, var(--navy-900) 100%);
  border-radius: var(--radius-xl); padding: 72px 30px;
}
.cta-band .mark { width: 64px; margin: 0 auto 24px; color: var(--pink); }
.cta-band h2 { color: #fff; font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,.8); font-size: 17.5px; max-width: 55ch; margin: 0 auto 34px; }
.cta-band .store-btns { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.72); margin-top: 96px; }
.footer-main {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding: 64px 0 48px;
}
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: 14.5px; margin-top: 14px; max-width: 30ch; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px; }
html[lang="ar"] .footer-col h4 { letter-spacing: 0; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: rgba(255,255,255,0.72); font-size: 15px; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 0 26px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: rgba(255,255,255,0.5);
}
.footer-bottom .langs a { color: rgba(255,255,255,0.6); margin-inline-start: 14px; }
.footer-bottom .langs a:hover { color: #fff; }
@media (max-width: 940px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-main { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Inner pages ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--navy-800), var(--navy));
  color: #fff; padding: 64px 0 56px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  border: 46px solid rgba(255,255,255,0.05); inset-inline-end: -110px; bottom: -160px;
}
.page-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.78); font-size: 17.5px; max-width: 62ch; }
.page-body { padding: 64px 0 20px; }
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { font-size: 24px; margin: 42px 0 14px; }
.prose h3 { font-size: 19px; margin: 28px 0 10px; }
.prose p, .prose li { font-size: 16.5px; color: var(--text); }
.prose p { margin-bottom: 14px; }
.prose ul { list-style: disc; padding-inline-start: 24px; margin-bottom: 14px; }
.prose ul li { margin-bottom: 7px; }
.prose .updated { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
.prose a { font-weight: 600; }

/* Contact cards */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 860px; margin: 0 auto; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 34px 30px; text-align: center;
}
.contact-card .c-ico {
  width: 56px; height: 56px; border-radius: 16px; background: var(--pink-100);
  display: grid; place-items: center; margin: 0 auto 18px;
}
.contact-card .c-ico svg { width: 28px; height: 28px; }
.contact-card h3 { font-size: 19px; margin-bottom: 8px; }
.contact-card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.contact-card .btn { font-size: 15px; padding: 12px 22px; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

/* 404 */
.err-wrap { text-align: center; padding: 110px 24px 90px; }
.err-code { font-size: 90px; font-weight: 800; color: var(--navy); line-height: 1; letter-spacing: -.03em; }
.err-code .accent { color: var(--pink); }
.err-wrap p { color: var(--muted); font-size: 18px; margin: 14px 0 30px; }

/* ============================================================
   Motion system — scroll reveals, hero cascade, parallax
   All entrance states are gated behind html.js (set by an inline
   head script) and prefers-reduced-motion: no-preference, so the
   site is fully visible without JS and calm for reduced-motion.
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  /* --- scroll reveals --- */
  html.js .reveal,
  html.js .reveal-left,
  html.js .reveal-right,
  html.js .reveal-scale {
    opacity: 0;
    transition:
      opacity .75s cubic-bezier(.22, 1, .36, 1),
      transform .75s cubic-bezier(.22, 1, .36, 1);
    transition-delay: var(--d, 0s);
    will-change: opacity, transform;
  }
  html.js .reveal { transform: translateY(34px); }
  html.js .reveal-scale { transform: translateY(18px) scale(.94); }
  html.js .reveal-left { transform: translateX(-40px); }
  html.js .reveal-right { transform: translateX(40px); }
  html[dir="rtl"].js .reveal-left { transform: translateX(40px); }
  html[dir="rtl"].js .reveal-right { transform: translateX(-40px); }
  html.js .reveal.in, html.js .reveal-left.in, html.js .reveal-right.in, html.js .reveal-scale.in {
    opacity: 1; transform: none;
  }

  /* --- method visual: paper → arrow → quiz cascade --- */
  html.js .method-visual .tv-paper,
  html.js .method-visual .tv-arrow,
  html.js .method-visual .tv-quiz {
    opacity: 0; transform: translateY(26px);
    transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  }
  html.js .method-visual .tv-arrow { transform: translateY(10px) scale(.6); }
  html.js .method-visual.in .tv-paper { opacity: 1; transform: none; transition-delay: .05s; }
  html.js .method-visual.in .tv-arrow { opacity: 1; transform: none; transition-delay: .4s; }
  html.js .method-visual.in .tv-quiz  { opacity: 1; transform: none; transition-delay: .6s; }

  /* --- CTA band: pocket mark draws itself --- */
  html.js .cta-band .mark path {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    transition: stroke-dashoffset 1s ease-out;
  }
  html.js .cta-band.in .mark path:nth-child(1) { stroke-dashoffset: 0; transition-delay: .15s; }
  html.js .cta-band.in .mark path:nth-child(2) { stroke-dashoffset: 0; transition-delay: .5s; }
  html.js .cta-band.in .mark path:nth-child(3) { stroke-dashoffset: 0; transition-delay: .85s; }

  /* --- hero entrance cascade (plays on load) --- */
  @keyframes rise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes phone-in {
    from { opacity: 0; transform: translateY(46px) scale(.95); }
    to   { opacity: 1; transform: none; }
  }
  /* float-card keyframes carry translateZ so depth survives the animation */
  @keyframes pop {
    0%   { opacity: 0; transform: translate3d(0, 10px, var(--z, 60px)) scale(.6); }
    70%  { transform: translate3d(0, 0, var(--z, 60px)) scale(1.06); }
    100% { opacity: 1; transform: translate3d(0, 0, var(--z, 60px)) scale(1); }
  }
  html.js .hero-copy > * { animation: rise .7s cubic-bezier(.22,1,.36,1) both; }
  html.js .hero-copy > *:nth-child(1) { animation-delay: .05s; }
  html.js .hero-copy > *:nth-child(2) { animation-delay: .16s; }
  html.js .hero-copy > *:nth-child(3) { animation-delay: .28s; }
  html.js .hero-copy > *:nth-child(4) { animation-delay: .42s; }
  html.js .hero-copy > *:nth-child(5) { animation-delay: .56s; }
  html.js .hero-visual { animation: phone-in .9s cubic-bezier(.22,1,.36,1) both .3s; }

  html.js .float-card {
    animation:
      pop .55s cubic-bezier(.22,1,.36,1) both var(--pd, 1s),
      floaty 5.5s ease-in-out infinite calc(var(--pd, 1s) + .55s);
  }
  .fc-streak { --pd: 1.05s; }
  .fc-exam   { --pd: 1.25s; }
  .fc-badge  { --pd: 1.45s; }

  /* --- inner page heroes --- */
  html.js .page-hero h1 { animation: rise .65s cubic-bezier(.22,1,.36,1) both .05s; }
  html.js .page-hero p  { animation: rise .65s cubic-bezier(.22,1,.36,1) both .18s; }
}

/* ============================================================
   3D layer — real perspective via CSS transforms.
   Deliberately no WebGL library: the audience is on mid-range
   Android over mobile data, and this delivers depth for ~0 KB.
   Every effect here is pointer-driven and reduced-motion gated.
   ============================================================ */

.scene { perspective: 1200px; perspective-origin: 50% 40%; }

.tilt {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.tilt.is-live { transition: transform .12s linear; }

/* hero stage: phone and cards sit at different depths */
.hero-stage { position: relative; transform-style: preserve-3d; }
.hero-stage .phone { transform: rotate(-3deg) translateY(var(--py, 0px)) translateZ(0px); }
.float-card { transform: translateZ(var(--z, 60px)); }
.fc-streak { --z: 90px; }
.fc-exam   { --z: 70px; }
.fc-badge  { --z: 110px; }

/* specular sheen that tracks the pointer across the phone */
.phone::after {
  content: ""; position: absolute; inset: 0; border-radius: 46px;
  pointer-events: none; opacity: var(--sheen, 0);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
              rgba(255, 255, 255, .28), transparent 62%);
  transition: opacity .35s ease;
}

/* card lift with depth */
.card3d { transform-style: preserve-3d; }
.card3d > * { transform: translateZ(28px); }

/* cursor spotlight on dark panels */
.spotlight { position: relative; isolation: isolate; }
.spotlight::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit; opacity: var(--sp-o, 0); transition: opacity .4s ease;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 50%),
              rgba(218, 26, 88, .22), transparent 60%);
}
.spotlight > * { position: relative; z-index: 1; }

/* aurora field behind the hero */
.aurora { position: absolute; inset: -20% -10%; z-index: 0; pointer-events: none; filter: blur(60px); opacity: .55; }
.aurora span {
  position: absolute; display: block; border-radius: 50%;
  mix-blend-mode: screen; will-change: transform;
}
.aurora .a1 { width: 46%; height: 60%; left: 4%;  top: 6%;  background: radial-gradient(circle, #DA1A58, transparent 66%); animation: drift1 22s ease-in-out infinite; }
.aurora .a2 { width: 52%; height: 66%; right: 2%; top: -8%; background: radial-gradient(circle, #5B4BD6, transparent 66%); animation: drift2 26s ease-in-out infinite; }
.aurora .a3 { width: 40%; height: 52%; left: 32%; bottom: -12%; background: radial-gradient(circle, #2E7CF6, transparent 66%); animation: drift3 30s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(8%, 6%, 0) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate3d(0,0,0) scale(1.05); } 50% { transform: translate3d(-7%, 9%, 0) scale(.94); } }
@keyframes drift3 { 0%,100% { transform: translate3d(0,0,0) scale(.96); } 50% { transform: translate3d(6%, -8%, 0) scale(1.14); } }
.hero > .container { position: relative; z-index: 1; }

/* Budget Android is the common device here: three continuously animating
   blur(60px) layers is real GPU work, so below tablet the aurora keeps its
   colour but stops moving and stops being promoted to its own layer. */
@media (max-width: 900px) {
  .aurora { filter: blur(48px); opacity: .45; }
  .aurora span { animation: none; will-change: auto; }
}

/* magnetic buttons */
.magnetic { transition: transform .35s cubic-bezier(.22,1,.36,1); }
.magnetic.is-live { transition: transform .1s linear; }

/* ============================================================
   Scroll story — an official BAC paper becomes a book, the book
   opens, its pages become quiz cards, everything lands in a phone.

   A tall .story-track scrolls past a pinned .story-sticky. site.js
   writes --p (0→1 across the whole section) and --s0…--s3 (0→1
   within each quarter). All motion is derived from those, so the
   scene is a pure function of scroll position.
   ============================================================ */

.story { position: relative; }
.story-track { height: 420vh; }
.story-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center;
  color: #fff;
  background: var(--navy-900);
}
.story-inner {
  position: relative; z-index: 2; width: 100%;
  display: grid; grid-template-rows: auto 1fr auto auto; gap: 18px;
  height: 100%; padding-top: 84px; padding-bottom: 40px;
}
.story-head { text-align: center; }
.story-head .kicker { background: rgba(255,255,255,.12); color: #fff; }
.story-head h2 { color: #fff; font-size: clamp(23px, 3vw, 36px); margin-top: 6px; }

/* colour field that shifts as you scroll */
.story-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.story-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg,
    hsl(calc(248 - var(--p, 0) * 14) 48% 16%),
    hsl(calc(255 + var(--p, 0) * 70) 55% 11%));
}
.story-bg span {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(70px); mix-blend-mode: screen; z-index: 1;
}
.story-bg span:nth-child(1) {
  width: 46vw; height: 46vw; background: radial-gradient(circle, #DA1A58, transparent 68%);
  left: 4%; top: 8%;
  transform: translate3d(calc(var(--p, 0) * 34vw), calc(var(--p, 0) * 18vh), 0) scale(calc(1 + var(--p, 0) * .5));
  opacity: calc(.45 + var(--p, 0) * .35);
}
.story-bg span:nth-child(2) {
  width: 52vw; height: 52vw; background: radial-gradient(circle, #5B4BD6, transparent 68%);
  right: 2%; top: -6%;
  transform: translate3d(calc(var(--p, 0) * -26vw), calc(var(--p, 0) * 26vh), 0) scale(calc(1.1 - var(--p, 0) * .25));
  opacity: .5;
}
.story-bg span:nth-child(3) {
  width: 40vw; height: 40vw; background: radial-gradient(circle, #2E7CF6, transparent 68%);
  left: 30%; bottom: -16%;
  transform: translate3d(0, calc(var(--p, 0) * -30vh), 0) scale(calc(.9 + var(--p, 0) * .45));
  opacity: calc(.25 + var(--p, 0) * .4);
}

/* ---------------- the 3D stage ---------------- */
.story-stage {
  position: relative; display: grid; place-items: center;
  perspective: 1500px; perspective-origin: 50% 45%;
  min-height: 0;
}

.book {
  /* 3:4, so capping width at 31vh keeps the whole book inside the pinned
     viewport alongside the heading, caption and rail */
  position: relative; width: min(290px, 58vw, 31vh); aspect-ratio: 3 / 4;
  transform-style: preserve-3d;
  transform:
    translateY(calc(var(--s3, 0) * -8%))
    rotateX(calc(14deg - var(--p, 0) * 12deg))
    rotateY(calc(-34deg + var(--p, 0) * 30deg))
    rotateZ(calc(-4deg + var(--p, 0) * 4deg))
    scale(calc(1 - var(--s3, 0) * .42));
  opacity: calc(1 - var(--s3, 0) * .55);
}
html[dir="rtl"] .book { transform:
    translateY(calc(var(--s3, 0) * -8%))
    rotateX(calc(14deg - var(--p, 0) * 12deg))
    rotateY(calc(34deg - var(--p, 0) * 30deg))
    rotateZ(calc(4deg - var(--p, 0) * 4deg))
    scale(calc(1 - var(--s3, 0) * .42)); }

.book > * { position: absolute; inset: 0; border-radius: 4px 10px 10px 4px; }
html[dir="rtl"] .book > * { border-radius: 10px 4px 4px 10px; }

/* spine block giving the book thickness */
.book-side {
  width: 20px; left: -10px; border-radius: 4px;
  background: linear-gradient(90deg, #120F2E, #2A2463);
  transform: rotateY(-90deg) translateZ(-10px);
  transform-origin: left center;
}
html[dir="rtl"] .book-side { left: auto; right: -10px; transform: rotateY(90deg) translateZ(-10px); transform-origin: right center; }

.cover {
  background: linear-gradient(145deg, #2E2770, var(--navy) 55%, #16123A);
  box-shadow: 0 30px 60px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
}
/* the back board sits a touch proud of the pages so the book keeps a
   visible hard cover once it is open */
.cover-back { transform: translateZ(-16px) scale(1.035); }

.cover-front {
  transform-origin: left center; transform-style: preserve-3d;
  background: none; border: 0; box-shadow: none;
  transform: rotateY(calc(var(--s1, 0) * -168deg)) translateZ(3px);
}
html[dir="rtl"] .cover-front { transform-origin: right center; transform: rotateY(calc(var(--s1, 0) * 168deg)) translateZ(3px); }

/* two real faces, so the opened cover shows its inside rather than
   disappearing to backface culling */
.cv-face {
  position: absolute; inset: 0; border-radius: inherit;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 22px;
}
.cv-out {
  background: linear-gradient(145deg, #2E2770, var(--navy) 55%, #16123A);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 60px rgba(0,0,0,.45);
}
.cv-out::after {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 14px;
  background: linear-gradient(90deg, rgba(0,0,0,.45), transparent);
}
html[dir="rtl"] .cv-out::after { background: linear-gradient(270deg, rgba(0,0,0,.45), transparent); }
.cv-in {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #F6F4FE, #EDEAF9);
  border: 1px solid #E1DDF0;
  align-items: stretch; justify-content: flex-start; gap: 9px; padding: 28px 22px;
}
.cv-in::after {
  content: ""; position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: 18px;
  background: linear-gradient(270deg, rgba(33,28,80,.16), transparent);
}
html[dir="rtl"] .cv-in::after { background: linear-gradient(90deg, rgba(33,28,80,.16), transparent); }
.cv-mark { width: 54px; color: var(--pink); }
.cv-mark svg { width: 100%; }
.cv-t { font-size: 27px; font-weight: 800; color: #fff; letter-spacing: .02em; }
.cv-s { font-size: 12.5px; color: rgba(255,255,255,.62); max-width: 18ch; line-height: 1.5; }

/* leaves — the exam pages that turn */
.leaf { transform-origin: left center; transform-style: preserve-3d; }
html[dir="rtl"] .leaf { transform-origin: right center; }
.leaf-face {
  position: absolute; inset: 0; border-radius: inherit;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: #FBFAFF; border: 1px solid #E5E2F2;
  padding: 26px 20px; display: flex; flex-direction: column; gap: 9px;
}
.leaf-b { transform: rotateY(180deg); background: #F3F1FB; }
.ln { display: block; height: 7px; border-radius: 999px; background: #E2DFF1; }
.ln:nth-child(1) { width: 86%; }
.ln:nth-child(2) { width: 68%; }
.ln:nth-child(3) { width: 78%; background: #F7D3E0; }
.ln:nth-child(4) { width: 52%; }
.l1 { transform: rotateY(calc(var(--s2a, 0) * -170deg)) translateZ(1px); }
.l2 { transform: rotateY(calc(var(--s2b, 0) * -170deg)) translateZ(0px); }
.l3 { transform: rotateY(calc(var(--s2c, 0) * -170deg)) translateZ(-1px); }
html[dir="rtl"] .l1 { transform: rotateY(calc(var(--s2a, 0) * 170deg)) translateZ(1px); }
html[dir="rtl"] .l2 { transform: rotateY(calc(var(--s2b, 0) * 170deg)) translateZ(0px); }
html[dir="rtl"] .l3 { transform: rotateY(calc(var(--s2c, 0) * 170deg)) translateZ(-1px); }

/* quiz cards that rise out of the opened book */
.qcards { inset: 0; transform-style: preserve-3d; pointer-events: none; }
.qcard {
  position: absolute; left: 8%; width: 84%; border-radius: 14px;
  background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.35);
  padding: 14px 15px; display: flex; flex-direction: column; gap: 8px;
  opacity: var(--s2, 0);
}
.qc-bar { height: 9px; width: 58%; border-radius: 999px; background: var(--pink); }
.qc-ln { height: 7px; border-radius: 999px; background: #E7E5F1; }
.qc-ln:last-child { width: 72%; }
.c1 { top: 26%; transform: translate3d(0, calc(var(--s2, 0) * -34%), calc(40px + var(--s2, 0) * 90px)) rotate(-5deg); }
.c2 { top: 42%; transform: translate3d(calc(var(--s2, 0) * 16%), calc(var(--s2, 0) * -8%), calc(30px + var(--s2, 0) * 62px)) rotate(3deg); }
.c3 { top: 58%; transform: translate3d(calc(var(--s2, 0) * -14%), calc(var(--s2, 0) * 16%), calc(20px + var(--s2, 0) * 38px)) rotate(-2deg); }

/* the phone the whole thing collapses into */
.story-phone {
  position: absolute; width: min(200px, 42vw, 19vh); aspect-ratio: 9 / 18.6;
  border-radius: 30px; background: #100D29; padding: 9px;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
  opacity: var(--s3, 0);
  transform: translateY(calc(28% - var(--s3, 0) * 28%)) scale(calc(.82 + var(--s3, 0) * .18));
}
.sp-screen {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 22px;
  background: linear-gradient(160deg, #8B5CF6, #6D3FE0 55%, #DA1A58);
}
.sp-mark { width: 42%; color: #fff; }
.sp-mark svg { width: 100%; }

/* captions + progress rail */
.story-caps { position: relative; min-height: 96px; text-align: center; }
.story-cap {
  position: absolute; inset-inline: 0; top: 0; margin-inline: auto; max-width: 46ch;
  font-size: clamp(16px, 2vw, 21px); line-height: 1.6; color: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease;
}
.story-cap.on { opacity: 1; transform: none; }
.cap-n {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13.5px; font-weight: 800;
  background: var(--pink); color: #fff;
}
.story-rail { height: 4px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; }
.rail-fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), #FF7BA3);
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
}
html[dir="rtl"] .rail-fill { transform-origin: 100% 50%; }

@media (max-width: 760px) {
  .story-track { height: 360vh; }
  .story-bg span { filter: blur(48px); }
  .story-inner { padding-top: 74px; gap: 12px; }
}

/* Short viewports (and landscape phones) cannot fit a 100vh pinned scene
   comfortably; fall back to a static, readable version. */
@media (max-height: 560px) {
  .story-track { height: auto; }
  .story-sticky { position: static; height: auto; padding: 56px 0; }
  .story-stage { min-height: 340px; margin-bottom: 24px; }
  .story-cap { position: static; opacity: 1; transform: none; margin-bottom: 10px; }
  .story-rail { display: none; }
}

/* No JS and reduced motion both land here: the book sits open mid-story,
   every caption is listed, and nothing depends on scroll. */
html:not(.js) .story-track { height: auto; }
html:not(.js) .story-sticky { position: static; height: auto; padding: 56px 0; }
html:not(.js) .story-stage { min-height: 360px; margin-bottom: 26px; }
html:not(.js) .story-cap { position: static; opacity: 1; transform: none; margin-bottom: 10px; }
html:not(.js) .story-rail { display: none; }
html:not(.js) .story-phone { opacity: .001; }

@media (prefers-reduced-motion: reduce) {
  .story-track { height: auto; }
  .story-sticky { position: static; height: auto; padding: 56px 0; }
  .story-stage { min-height: 360px; margin-bottom: 26px; }
  .book { transform: rotateX(8deg) rotateY(-18deg); opacity: 1; }
  .cover-front { transform: rotateY(-150deg) translateZ(2px); }
  .l1, .l2, .l3 { transform: none; }
  .qcard { opacity: 1; }
  .story-cap { position: static; opacity: 1; transform: none; margin-bottom: 10px; }
  .story-rail { display: none; }
  .story-phone { display: none; }
}

/* scroll progress bar (element injected by JS) */
.scroll-progress {
  position: fixed; top: 0; inset-inline-start: 0; width: 100%;
  height: 3px; z-index: 300; pointer-events: none;
  background: linear-gradient(90deg, var(--pink), #FF6E96);
  transform: scaleX(var(--sp, 0));
  transform-origin: 0 50%;
}
html[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

/* parallax hook (JS drives --py while the hero is in view) */
.phone { transform: rotate(-3deg) translateY(var(--py, 0px)); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; }
  .scroll-progress { display: none; }
  /* 3D layer off: no tilt, no drift, no sheen — the flashcard still
     flips (it is the control, not decoration) but without the spin */
  .tilt { transform: none !important; }
  .float-card { transform: none; }
  .phone::after, .spotlight::before { display: none; }
  .aurora span { animation: none; }
  .card3d > * { transform: none; }
  .magnetic { transform: none !important; }
}

/* utility */
.center { text-align: center; }
.mt-40 { margin-top: 40px; }
