/* =========================================================
   سوريانا التعليمية
   Token architecture: primitives -> semantic -> component
   Palette derived from the brand primary #00231F
   ========================================================= */

/* ---------------------------------------------------------
   1. PRIMITIVES
   --------------------------------------------------------- */
:root {
  /* Brand green ramp */
  --green-950: #00231F;
  --green-900: #002E28;
  --green-850: #003630;
  --green-800: #003B33;
  --green-700: #005348;
  --green-600: #0A6B5C;
  --green-500: #128571;
  --green-400: #1E9E87;
  --green-300: #4FBCA5;
  --green-200: #9CD9C9;
  --green-150: #C4E8DD;
  --green-100: #DEF0EA;
  --green-50:  #EDF7F4;
  --green-25:  #F5FAF8;

  /* Neutrals tuned toward the brand hue */
  --ink-900: #00231F;
  --ink-700: #29433E;
  --ink-600: #3E5C56;
  --ink-500: #4E6D66;   /* 5.67:1 on white, 5.38:1 on --green-25 */
  --white:   #FFFFFF;

  /* Spacing — 4px base, 8pt rhythm */
  --space-1:  .25rem;
  --space-2:  .5rem;
  --space-3:  .75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Fluid type scale */
  --fs-xs:   .8125rem;
  --fs-sm:   .875rem;
  --fs-base: 1rem;
  --fs-md:   clamp(1rem, .25vw + .94rem, 1.125rem);
  --fs-lg:   clamp(1.125rem, .4vw + 1.03rem, 1.3rem);
  --fs-xl:   clamp(1.35rem, .8vw + 1.15rem, 1.75rem);
  --fs-2xl:  clamp(1.6rem, 2vw + 1.1rem, 2.4rem);
  --fs-3xl:  clamp(2rem, 4vw + 1rem, 3.4rem);

  /* Line heights — Arabic needs a touch more than Latin, capped at 1.75 */
  --lh-tight: 1.25;
  --lh-snug:  1.45;
  --lh-body:  1.75;

  /* Radii */
  --r-xs:   8px;
  --r-sm:   12px;
  --r-md:   16px;
  --r-lg:   22px;
  --r-xl:   28px;
  --r-2xl:  36px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(0, 35, 31, .05);
  --shadow-2: 0 2px 10px -2px rgba(0, 35, 31, .08);
  --shadow-3: 0 12px 28px -14px rgba(0, 35, 31, .22);
  --shadow-4: 0 28px 60px -30px rgba(0, 35, 31, .38);

  /* Motion */
  --ease:      cubic-bezier(.22, .8, .32, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
  --dur-fast:  .16s;
  --dur-base:  .24s;
  --dur-slow:  .42s;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --section-y: clamp(3.5rem, 7vw, 6.5rem);
  --header-h: 68px;

  /* Stacking */
  --z-sticky: 60;
  --z-header: 100;
  --z-menu:   110;
  --z-skip:   200;
}

@media (min-width: 861px) {
  :root { --header-h: 78px; }
}

/* ---------------------------------------------------------
   2. SEMANTIC TOKENS
   Components reference only these, never the ramp directly.
   --------------------------------------------------------- */
:root {
  --surface:          var(--green-25);
  --surface-raised:   var(--white);
  --surface-sunken:   var(--green-50);
  --surface-inverse:  var(--green-950);

  --text-primary:     var(--ink-900);
  --text-secondary:   var(--ink-600);
  --text-tertiary:    var(--ink-500);
  --text-brand:       var(--green-600);
  --text-inverse:     #EAF6F2;
  --text-inverse-dim: #A9CCC3;

  --border-subtle:    #DCEAE5;
  --border-default:   #C3DCD4;
  --border-strong:    var(--green-200);
  --border-inverse:   rgba(255, 255, 255, .16);

  --brand:            var(--green-950);
  --brand-hover:      var(--green-800);
  --brand-soft:       var(--green-50);
  --accent:           var(--green-300);
  --focus:            var(--green-400);
}

/* ---------------------------------------------------------
   3. RESET & BASE
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* WCAG 2.2 "Focus Not Obscured": offset the sticky header. */
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  /* Arabic is a connected script: letter-spacing breaks the joins. */
  letter-spacing: normal;
  color: var(--text-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: var(--lh-tight);
  letter-spacing: normal;
  font-weight: 700;
  text-wrap: balance;
}
p, blockquote, figure { margin: 0; }
p { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; letter-spacing: normal; }
[inert] { pointer-events: none; }

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

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  top: -100px;
  transform: translateX(50%);
  z-index: var(--z-skip);
  padding: var(--space-3) var(--space-5);
  background: var(--brand);
  color: var(--white);
  font-weight: 600;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: top var(--dur-base) var(--ease);
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------
   4. LAYOUT PRIMITIVES
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: var(--section-y); }
.section--raised { background: var(--surface-raised); }
.section--inverse {
  background: linear-gradient(160deg, var(--green-850), var(--green-950) 72%);
  color: var(--text-inverse);
}

.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }

/* Eyebrow: small rule + label, no letter-spacing (Arabic script) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--text-brand);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: .55;
}
.section-head--center .eyebrow { justify-content: center; }
.section--inverse .eyebrow { color: var(--accent); }

.section-title {
  font-size: var(--fs-2xl);
  color: var(--text-primary);
  max-inline-size: 22ch;
}
.section-head--center .section-title { margin-inline: auto; }
/* Held on one line where there is room; wraps below 620px and in English. */
.section-title--oneline { max-inline-size: none; white-space: nowrap; }
.section--inverse .section-title { color: var(--white); }

.section-sub {
  margin-top: var(--space-4);
  max-inline-size: 58ch;
  color: var(--text-secondary);
  font-size: var(--fs-md);
}
.section-head--center .section-sub { margin-inline: auto; }
.section--inverse .section-sub { color: var(--text-inverse-dim); }

/* ---------------------------------------------------------
   5. BUTTONS
   Min height 44px keeps every control comfortably above the
   24px WCAG 2.2 target minimum and matches native guidance.
   --------------------------------------------------------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: var(--white);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: var(--lh-snug);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              background-color var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-1); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--primary:hover { --btn-bg: var(--brand-hover); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text-primary);
  --btn-bd: var(--border-default);
}
.btn--ghost:hover { --btn-bg: var(--brand-soft); --btn-bd: var(--border-strong); }

.btn--light { --btn-bg: var(--white); --btn-fg: var(--green-950); }
.btn--light:hover { --btn-bg: var(--green-50); }

/* Mint on dark: 7.2:1 against the inverse surface */
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--green-950); }
.btn--accent:hover { --btn-bg: var(--green-200); }


.btn--lg { min-height: 52px; padding: var(--space-4) var(--space-8); font-size: var(--fs-base); }
.btn--block { display: flex; width: 100%; }

/* ---------------------------------------------------------
   6. HEADER & NAVIGATION
   --------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .header { background: rgba(245, 250, 248, .88); }
}
.header.is-scrolled { border-bottom-color: var(--border-subtle); box-shadow: var(--shadow-2); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.logo { display: inline-flex; align-items: center; gap: var(--space-3); }
.logo__mark {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: var(--shadow-2);
}
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__text b { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.logo__text small { font-size: var(--fs-xs); font-weight: 500; color: var(--text-brand); }

.nav { display: flex; align-items: center; gap: var(--space-1); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  white-space: nowrap;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease);
}
.nav__link:hover { color: var(--text-primary); background: var(--brand-soft); }
/* Scroll-spy state, set from JS */
.nav__link[aria-current="true"] { color: var(--text-primary); font-weight: 600; }
.nav__link[aria-current="true"]::after {
  content: "";
  position: absolute;
  inset-block-end: 2px;
  inset-inline-start: 50%;
  width: 18px;
  height: 2px;
  margin-inline-start: -9px;
  border-radius: 2px;
  background: var(--text-brand);
}

.header__actions { display: flex; align-items: center; gap: var(--space-3); }

/* Language toggle: shows the language you would switch TO */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  background: var(--surface-raised);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.lang-toggle:hover { background: var(--brand-soft); border-color: var(--border-strong); }
.lang-toggle svg { width: 18px; height: 18px; flex: none; color: var(--text-brand); }
.lang-toggle__label { min-width: 1.4em; text-align: center; }

.nav-toggle {
  display: none;
  place-items: center;
  width: 46px; height: 46px;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  background: var(--surface-raised);
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease);
}
.nav-toggle:hover { background: var(--brand-soft); }
.nav-toggle__bars { position: relative; width: 20px; height: 2px; border-radius: 2px; background: var(--text-primary); transition: background-color var(--dur-fast) var(--ease); }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform var(--dur-base) var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: var(--z-menu);
  display: grid;
  grid-template-rows: 1fr;
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease),
              visibility 0s linear var(--dur-base);
}
.mobile-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.mobile-nav__panel {
  display: flex;
  flex-direction: column;
  padding-block: var(--space-4) calc(var(--space-8) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.mobile-nav__list { display: flex; flex-direction: column; gap: var(--space-1); }
.mobile-nav__list a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-secondary);
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.mobile-nav__list a:hover,
.mobile-nav__list a[aria-current="true"] { background: var(--brand-soft); color: var(--text-primary); }
.mobile-nav .btn { margin-top: var(--space-6); }

body.is-locked { overflow: hidden; }

/* ---------------------------------------------------------
   7. HERO
   --------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero::before {
  content: "";
  position: absolute;
  top: -35%;
  left: 50%;
  transform: translateX(-50%);
  width: min(70rem, 130vw);
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, rgba(79, 188, 165, .2), rgba(79, 188, 165, 0) 60%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__copy { max-width: 34rem; }
/* One line: the 14ch measure was the only thing forcing a break. */
.hero__title {
  font-size: var(--fs-3xl);
  line-height: 1.15;
  max-inline-size: none;
  white-space: nowrap;
}
.hero__title .dot { color: var(--green-400); }
/* Balanced so the ragged edge under the heading stays even. */
.hero__text {
  margin-top: var(--space-5);
  max-inline-size: 40ch;
  font-size: var(--fs-lg);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  text-wrap: balance;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: space-between;
  align-items: start;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.hero__stat b {
  display: block;
  font-size: var(--fs-xl);
  line-height: var(--lh-tight);
  color: var(--text-primary);
  /* Keeps "ترخيص رسمي" intact and all three values on one row. */
  white-space: nowrap;
}
.hero__stat span {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  color: var(--text-tertiary);
}

/* Brand composition */
.hero__visual { position: relative; display: grid; place-items: center; }
.hero__card {
  position: relative;
  display: grid;
  place-items: center;
  width: min(27rem, 100%);
  aspect-ratio: 1 / 1;
  border-radius: var(--r-2xl);
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(79, 188, 165, .35), transparent 55%),
    linear-gradient(155deg, var(--green-800), var(--green-950) 70%);
  box-shadow: var(--shadow-4);
  overflow: hidden;
}
/* Faint blueprint grid reads as "structured learning" without adding weight */
.hero__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 82%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 82%);
}
/* Spotlight behind the mark lifts it off the flat panel */
.hero__card::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74%;
  aspect-ratio: 1;
  border-radius: var(--r-pill);
  background: radial-gradient(circle at 50% 50%, rgba(79, 188, 165, .3), transparent 62%);
}
/* The artwork is white with generous built-in padding, so it needs no
   plate behind it — just room to breathe and a soft lift. */
.hero__logo {
  position: relative;
  z-index: 1;
  width: 82%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .45));
}
.hero__orbit {
  position: absolute;
  inset: 8%;
  border: 1.5px dashed rgba(156, 217, 201, .55);
  border-radius: var(--r-pill);
  animation: spin 70s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero__chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-pill);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--text-primary);
  white-space: nowrap;
}
.hero__chip svg { width: 20px; height: 20px; flex: none; color: var(--text-brand); }
.hero__chip--license { inset-block-end: 8%; inset-inline-start: -4%; }
.hero__chip--rating  { inset-block-start: 10%; inset-inline-end: -4%; }

/* ---------------------------------------------------------
   8. QUOTE
   --------------------------------------------------------- */
.quote__inner {
  position: relative;
  max-width: 52rem;
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.5rem);
  text-align: center;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
}
.quote__mark { width: 40px; height: 40px; margin-inline: auto; margin-bottom: var(--space-5); color: var(--green-300); }
.quote__text {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-primary);
  text-wrap: balance;
}
.quote__author { display: block; margin-top: var(--space-5); font-size: var(--fs-sm); font-weight: 600; color: var(--text-brand); }
.quote__author::before { content: "— "; }

/* ---------------------------------------------------------
   9. PACKAGES
   Two plans side by side. The Scientific plan is the dark, featured card;
   both share one structure so they compare line for line.
   --------------------------------------------------------- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
  max-width: 64rem;
  margin-inline: auto;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out),
              border-color var(--dur-base) var(--ease);
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-4); border-color: var(--border-strong); }

.plan--featured {
  background:
    radial-gradient(110% 70% at 85% 0%, rgba(79, 188, 165, .26), transparent 58%),
    linear-gradient(160deg, var(--green-800), var(--green-950) 75%);
  border-color: var(--green-800);
  color: var(--text-inverse);
}
.plan--featured:hover { border-color: var(--green-600); }

/* Sits on the card's top edge, so it takes no width from the header row. */
.plan__badge {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: var(--space-6);
  transform: translateY(-50%);
  box-shadow: var(--shadow-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--green-950);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: var(--lh-snug);
  white-space: nowrap;
}

.plan__head { display: flex; align-items: center; gap: var(--space-4); }
.plan__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  flex: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--green-600);
}
.plan__icon svg { width: 28px; height: 28px; }
.plan__name { font-size: var(--fs-xl); line-height: var(--lh-tight); color: var(--text-primary); }
.plan__for { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-tertiary); }

.plan__pricing { margin-top: var(--space-6); padding-block: var(--space-5); border-block: 1px solid var(--border-subtle); }
.plan__price { display: flex; align-items: baseline; gap: var(--space-2); line-height: 1; }
.plan__price b { font-size: clamp(2.6rem, 4.6vw, 3.4rem); font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.plan__price span { font-size: var(--fs-lg); font-weight: 700; color: var(--text-tertiary); }
.plan__note { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--text-tertiary); }

.plan__label { margin-top: var(--space-5); font-size: var(--fs-xs); font-weight: 700; color: var(--text-tertiary); }
.plan__subjects { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-2); }
.plan__subjects li {
  padding: var(--space-1) 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--green-700);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.7;
}
.plan__list { display: grid; gap: var(--space-3); margin-block: var(--space-3) var(--space-8); }
.plan__list li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--text-secondary); }
.plan__list svg { width: 20px; height: 20px; flex: none; padding: 3px; border-radius: 50%; background: var(--brand-soft); color: var(--green-600); }
.plan__cta { margin-top: auto; }

/* Featured (dark) card */
.plan--featured .plan__icon { background: rgba(255, 255, 255, .1); border-color: var(--border-inverse); color: var(--white); }
.plan--featured .plan__name { color: var(--white); }
.plan--featured .plan__for,
.plan--featured .plan__note,
.plan--featured .plan__label,
.plan--featured .plan__price span { color: var(--text-inverse-dim); }
.plan--featured .plan__price b { color: var(--white); }
.plan--featured .plan__pricing { border-color: var(--border-inverse); }
.plan--featured .plan__subjects li { background: rgba(255, 255, 255, .08); border-color: var(--border-inverse); color: var(--text-inverse); }
.plan--featured .plan__list li { color: var(--text-inverse); }
.plan--featured .plan__list svg { background: rgba(79, 188, 165, .18); color: var(--accent); }

@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; max-width: 30rem; }
}

/* ---------------------------------------------------------
   10. STEPS
   --------------------------------------------------------- */
.steps {
  --steps-gap: clamp(1rem, 2.4vw, 1.75rem);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--steps-gap);
}
.step {
  --step-pad: clamp(1.6rem, 2.4vw, 2rem);
  position: relative;
  padding: var(--step-pad);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
/* Hovering one step dims the rest so the active one clearly leads.
   focus-within mirrors it for keyboard users. */
.steps:hover .step,
.steps:focus-within .step {
  opacity: .55;
  transform: scale(.99);
}
.steps .step:hover,
.steps .step:focus-within {
  opacity: 1;
  transform: translateY(-6px) scale(1);
  border-color: var(--green-300);
  box-shadow: var(--shadow-4);
}
.step { transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out), opacity var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease); }
.steps .step:hover .step__num,
.steps .step:focus-within .step__num {
  background: var(--green-600);
  transform: scale(1.06);
}
.step__num { transition: background-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); }
.step__num {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: var(--space-5);
  border-radius: var(--r-sm);
  background: var(--brand);
  color: var(--white);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1;
}
.step h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); }
.step p { color: var(--text-secondary); font-size: var(--fs-sm); line-height: var(--lh-body); }
/* Connector bridges toward the NEXT card, aligned to the badge centre.
   In RTL that is the inline-end (left) side. */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--step-pad) + 23px);
  inset-inline-end: calc(var(--steps-gap) * -1);
  width: var(--steps-gap);
  height: 2px;
  background-image: linear-gradient(to left, var(--green-200) 60%, transparent 0);
  background-size: 9px 2px;
}

/* ---------------------------------------------------------
   11. TEAM MARQUEE
   --------------------------------------------------------- */
/* A real scroll container: wheel, trackpad, drag and touch all work natively,
   and JS only nudges scrollLeft for the ambient drift. Scrollbar stays hidden. */
.marquee {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(to left, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to left, transparent, #000 7%, #000 93%, transparent);
}
.marquee::-webkit-scrollbar { width: 0; height: 0; display: none; }
.marquee.is-dragging { cursor: grabbing; user-select: none; }
.marquee.is-dragging .teacher { pointer-events: none; }
.marquee__track { display: flex; width: max-content; }

.teacher {
  flex: none;
  width: 13.5rem;
  margin-inline-end: var(--space-4);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.teacher:hover { transform: translateY(-5px); box-shadow: var(--shadow-3); }

.avatar {
  display: grid;
  place-items: center;
  width: 88px; height: 88px;
  margin-inline: auto;
  margin-bottom: var(--space-4);
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--green-700);
  box-shadow: 0 0 0 4px var(--surface-raised), 0 0 0 6px var(--green-100);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--a { background: linear-gradient(160deg, var(--green-600), var(--green-950)); }
.avatar--b { background: linear-gradient(160deg, var(--green-400), var(--green-700)); }
.avatar--c { background: linear-gradient(160deg, var(--green-500), var(--green-900)); }
.avatar--d { background: linear-gradient(160deg, var(--green-300), var(--green-600)); }

.teacher__name { font-size: var(--fs-base); font-weight: 700; line-height: var(--lh-snug); color: var(--text-primary); }
.teacher__subject { margin-top: 2px; font-size: var(--fs-sm); font-weight: 500; color: var(--text-brand); }

/* ---------------------------------------------------------
   12. APP PROMO (inverse anchor section)
   --------------------------------------------------------- */
.promo__grid {
  display: grid;
  grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.promo__visual { position: relative; display: grid; place-items: center; }
.promo__visual::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  aspect-ratio: 1;
  border-radius: var(--r-pill);
  background: radial-gradient(circle at 50% 45%, rgba(79, 188, 165, .32), transparent 62%);
}
.promo__visual img {
  position: relative;
  width: min(19rem, 78%);
  height: auto;
  filter: drop-shadow(0 34px 48px rgba(0, 0, 0, .45));
}
/* Single line: the copy column is the constraint, so the size is tuned to it
   and only unlocks to wrap once the layout stacks. */
.promo__title {
  /* The cap matters most: past ~1260px the container stops growing but vw
     does not, so an uncapped size would overflow the fixed column. */
  font-size: clamp(1.05rem, 1.6vw, 1.5rem);
  line-height: var(--lh-snug);
  color: var(--white);
  white-space: nowrap;
  max-inline-size: none;
  text-wrap: nowrap;
}
.promo__text { margin-top: var(--space-5); max-inline-size: 52ch; color: var(--text-inverse-dim); }
.promo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
  /* Target of every download CTA: stop a little above the badges. */
  scroll-margin-top: 7rem;
}

/* Store badges: black, as both stores present their own, with a hairline edge
   so they still separate from the dark green section. */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 60px;
  min-width: 11.5rem;
  padding: var(--space-2) var(--space-5);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--r-md);
  background: #000;
  color: var(--white);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7);
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease);
}
.store-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .6);
  background: #0B0F0E;
  box-shadow: 0 18px 32px -16px rgba(0, 0, 0, .8);
}
.store-btn:active { transform: translateY(0); }
.store-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.store-btn__logo { width: 28px; height: 28px; flex: none; }
.store-btn__label { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
.store-btn__label small { font-size: .72rem; font-weight: 500; opacity: .85; }
.store-btn__label b { font-size: 1.2rem; font-weight: 700; white-space: nowrap; }

/* ---------------------------------------------------------
   13. FEATURES (bento board)
   Each tile shows its promise as a small piece of product UI rather than an
   icon and a paragraph, so the six features read at a glance.
   --------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.25rem);
}
.feat {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out),
              border-color var(--dur-base) var(--ease);
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--border-strong); }
.feat > * { position: relative; z-index: 1; }

/* 12-column board: the price tile runs two rows at the start edge, the
   packages tile gets the wide slot its sum needs, the gifts tile balances it. */
.feat--price      { grid-column: span 4; grid-row: span 2; }
.feat--curriculum { grid-column: span 8; }
.feat--payments   { grid-column: span 4; }
.feat--offline    { grid-column: span 4; }
.feat--packages   { grid-column: span 8; }
.feat--free       { grid-column: span 4; }

.feat__index {
  position: absolute;
  inset-block-start: var(--space-4);
  inset-inline-end: var(--space-5);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.feat__visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-block: var(--space-4) var(--space-5);
}
/* A sunken screen behind the mini UI */
.feat__visual--panel { padding: var(--space-4); border-radius: var(--r-lg); background: var(--surface-sunken); }
.feat__title { font-size: var(--fs-lg); line-height: var(--lh-snug); color: var(--text-primary); }
.feat__text { margin-top: var(--space-2); font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--text-secondary); }

/* 01 price: the one dark tile, so the lowest price is the first thing seen */
.feat--price {
  background:
    radial-gradient(110% 80% at 85% 0%, rgba(79, 188, 165, .28), transparent 60%),
    linear-gradient(160deg, var(--green-800), var(--green-950) 78%);
  border-color: var(--green-800);
  color: var(--text-inverse);
}
.feat--price::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset-inline-end: -7rem;
  inset-block-end: -7rem;
  width: 16rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 2.25rem rgba(255, 255, 255, .03), 0 0 0 4.5rem rgba(255, 255, 255, .02);
  pointer-events: none;
}
.feat--price:hover { border-color: var(--green-600); }
.feat--price .feat__index { color: var(--accent); }
.feat--price .feat__title { font-size: var(--fs-xl); color: var(--white); }
.feat--price .feat__text  { color: var(--text-inverse-dim); }

.price-tag { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.price-tag__label { font-size: var(--fs-sm); font-weight: 600; color: var(--accent); }
.price-tag__amount { display: flex; align-items: baseline; gap: var(--space-2); line-height: 1; }
.price-tag__amount b { font-size: clamp(3.25rem, 6vw, 5.25rem); font-weight: 700; color: var(--white); font-variant-numeric: tabular-nums; }
.price-tag__amount span { font-size: var(--fs-xl); font-weight: 700; color: var(--text-inverse-dim); }
.price-tag__note {
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--border-inverse);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--white);
}

/* 02 curriculum */
.streams { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.stream {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-pill);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.stream svg { width: 18px; height: 18px; color: var(--green-500); }
.meter { display: block; height: 8px; margin-top: var(--space-4); border-radius: var(--r-pill); background: var(--green-100); overflow: hidden; }
.meter__fill { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(to left, var(--green-400), var(--green-600)); }
@keyframes meter-fill { from { width: 0; } }
.feat.in-view .meter__fill { animation: meter-fill 1.4s var(--ease-out) .3s both; }
.meter__label { display: block; margin-top: var(--space-2); font-size: var(--fs-xs); font-weight: 600; color: var(--text-tertiary); }

/* 03 payments: a checkout selector */
.pay { display: flex; flex-direction: column; gap: var(--space-2); }
.pay__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  background: var(--surface-raised);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: var(--lh-snug);
}
.pay__row svg { width: 18px; height: 18px; margin-inline-start: auto; flex: none; color: var(--text-tertiary); }
.pay__radio { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--border-default); }
.pay__row.is-selected { border-color: var(--green-400); box-shadow: 0 0 0 3px rgba(30, 158, 135, .14); }
.pay__row.is-selected .pay__radio { border-color: var(--green-500); background: radial-gradient(circle, var(--green-500) 42%, transparent 48%); }
.pay__row.is-selected svg { color: var(--green-600); }

/* 04 offline */
.dl {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--surface-raised);
}
.dl__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--r-sm); background: var(--brand); color: var(--white); }
.dl__icon svg { width: 20px; height: 20px; }
.dl__body { flex: 1; min-width: 0; }
.dl__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--space-2); font-size: var(--fs-xs); }
.dl__row b, .dl__row em { white-space: nowrap; }
.dl__row b { font-weight: 700; color: var(--text-primary); }
.dl__row em { font-style: normal; font-weight: 600; color: var(--green-600); }
.dl .meter { height: 6px; margin-top: var(--space-2); }
.offline {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.offline svg { width: 16px; height: 16px; }

/* 05 packages: the contents written as a sum */
.formula { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.formula__parts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
/* Each "+" travels with the item after it, so a wrapped line starts with the
   operator instead of ending on one. */
.formula__pair { display: inline-flex; align-items: center; gap: var(--space-3); white-space: nowrap; }
/* The total sits under a dashed rule, like the answer line of a sum. */
.formula__total {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 2px dashed var(--border-default);
}
.formula__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--surface-raised);
  box-shadow: var(--shadow-1);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.formula__item svg { width: 20px; height: 20px; color: var(--green-600); }
.formula__op { font-size: var(--fs-lg); font-weight: 700; line-height: 1; color: var(--green-500); }
.formula__result {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  background: var(--brand);
  box-shadow: var(--shadow-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}
.formula__result svg { width: 18px; height: 18px; color: var(--accent); }

/* 06 free access and gifts: the one mint tile */
.feat--free { background: linear-gradient(160deg, var(--green-100), var(--green-50)); border-color: var(--green-150); }
.bonus { position: relative; display: grid; place-items: center; min-height: 128px; }
.bonus__box {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  border-radius: 22px;
  background: linear-gradient(150deg, var(--green-600), var(--green-950));
  color: var(--white);
  box-shadow: var(--shadow-3);
  transition: transform var(--dur-slow) var(--ease-out);
}
.bonus__box svg { width: 38px; height: 38px; }
.feat--free:hover .bonus__box { transform: translateY(-6px) rotate(-6deg); }
.bonus__tag {
  position: absolute;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
}
.bonus__tag--free { inset-block-start: 8%; inset-inline-start: 14%; background: var(--surface-raised); border: 1px solid var(--border-subtle); color: var(--green-700); transform: rotate(-6deg); }
.bonus__tag--gift { inset-block-end: 8%; inset-inline-end: 14%; background: var(--green-600); color: var(--white); transform: rotate(5deg); }

/* ---------------------------------------------------------
   14. FAQ
   --------------------------------------------------------- */
.faq { max-width: 52rem; margin-inline: auto; }
.faq__item {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.faq__item.is-open { border-color: var(--border-strong); box-shadow: var(--shadow-2); }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  min-height: 60px;
  padding: var(--space-4) var(--space-5);
  border: 0;
  background: transparent;
  text-align: start;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--text-primary);
  cursor: pointer;
}
.faq__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--green-600);
  transition: transform var(--dur-slow) var(--ease), background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.faq__icon svg { width: 16px; height: 16px; }
.faq__item.is-open .faq__icon { transform: rotate(180deg); background: var(--brand); color: var(--white); }

.faq__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease); }
.faq__item.is-open .faq__panel { grid-template-rows: 1fr; }
.faq__panel > div { overflow: hidden; }
.faq__panel p { padding: 0 var(--space-5) var(--space-5); font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--text-secondary); }

/* ---------------------------------------------------------
   15. GIFT / WHATSAPP CTA
   --------------------------------------------------------- */
.gift {
  position: relative;
  overflow: hidden;
  max-width: 48rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 3.4vw, 2.5rem) clamp(1.25rem, 3vw, 2.5rem);
  border-radius: var(--r-xl);
  background:
    radial-gradient(85% 120% at 88% -10%, rgba(79, 188, 165, .26), transparent 58%),
    linear-gradient(150deg, var(--green-800), var(--green-950) 74%);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--text-inverse);
  text-align: center;
  box-shadow: var(--shadow-4);
}
/* Hairline of light along the top edge reads as a lit surface */
.gift::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 12%;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(255, 255, 255, .38), transparent);
}
.gift__inner { position: relative; max-width: 38rem; margin-inline: auto; }

.gift__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: var(--lh-snug);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--border-inverse);
  color: var(--white);
}
.gift__tag svg { width: 15px; height: 15px; color: var(--accent); }

.gift__title { font-size: var(--fs-xl); color: var(--white); }

.gift__text {
  margin-top: var(--space-3);
  margin-inline: auto;
  max-inline-size: 46ch;
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-inverse-dim);
}

/* Timer and CTA sit together: the deadline is the reason to press the button */
.gift__action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* Numeric time stays MM:SS regardless of page direction */
.countdown {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--border-inverse);
}
.countdown__unit {
  min-width: 52px;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, .06);
  text-align: center;
}
.countdown__unit b {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.countdown__unit span {
  display: block;
  font-size: .6875rem;
  line-height: 1.4;
  color: var(--text-inverse-dim);
}
.countdown__sep {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  transform: translateY(-5px);
}
.countdown.is-done { opacity: .6; }

/* ---------------------------------------------------------
   15b. STORE "COMING SOON" DIALOG
   Native <dialog>: focus is trapped, Esc closes it, the page goes inert.
   --------------------------------------------------------- */
.store-dialog {
  width: min(24rem, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  overflow: visible;
}
.store-dialog::backdrop {
  background: rgba(0, 35, 31, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.store-dialog[open] .store-dialog__panel { animation: dialog-in var(--dur-slow) var(--ease-out); }
.store-dialog[open]::backdrop { animation: backdrop-in var(--dur-base) var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes backdrop-in { from { opacity: 0; } }

.store-dialog__panel {
  position: relative;
  padding: var(--space-8) var(--space-6) var(--space-6);
  text-align: center;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-4);
}
.store-dialog__close {
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-end: var(--space-3);
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.store-dialog__close:hover { background: var(--brand-soft); color: var(--text-primary); }
.store-dialog__close svg { width: 20px; height: 20px; }
.store-dialog__logo {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  margin: 0 auto var(--space-5);
  border-radius: 20px;
  background: #000;
  color: var(--white);
  box-shadow: var(--shadow-3);
}
.store-dialog__logo svg { width: 36px; height: 36px; }
.store-dialog__title { font-size: var(--fs-xl); color: var(--text-primary); }
.store-dialog__text {
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}
/* A store name must never split across lines ("Google / Play"). */
.store-dialog [data-store-slot] { white-space: nowrap; }
.store-dialog__ok { margin-top: var(--space-6); min-width: 9rem; }

/* Page scroll is locked only while the dialog is open. */
html:has(.store-dialog[open]) { overflow: hidden; }

/* ---------------------------------------------------------
   16. STICKY MOBILE CTA
   Repeats the existing primary action once the hero scrolls away.
   --------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  display: none;
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  transform: translateY(110%);
  transition: transform var(--dur-slow) var(--ease-out);
}
.sticky-cta.is-visible { transform: none; }

/* ---------------------------------------------------------
   17. FOOTER
   --------------------------------------------------------- */
.footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-raised);
  text-align: center;
}
.footer p { font-size: var(--fs-sm); color: var(--text-tertiary); }

/* ---------------------------------------------------------
   18. SCROLL REVEAL
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms),
              transform var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------------------------------------------------------
   19. RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero__chip--license { inset-inline-start: 0; }
  .hero__chip--rating  { inset-inline-end: 0; }
}

/* Between the stacking breakpoint and ~1120px the copy column is at its
   narrowest while --fs-3xl is already capped, so the one-line title needs
   its own scale here. */
@media (min-width: 961px) and (max-width: 1120px) {
  .hero__title { font-size: clamp(2.4rem, 4.6vw, 3.05rem); }
}

@media (max-width: 960px) {
  .hero__grid, .promo__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__copy, .promo__copy { max-width: 40rem; margin-inline: auto; }
  .hero__title, .hero__text, .promo__title, .promo__text { margin-inline: auto; }
  .promo__title {
    font-size: var(--fs-2xl);
    line-height: var(--lh-tight);
    white-space: normal;
    text-wrap: balance;
    max-inline-size: 20ch;
  }
  .hero__actions, .promo__actions { justify-content: center; }
  .hero__visual, .promo__visual { order: -1; }
  /* Once it stacks above the copy, full-size phone art filled most of a
     phone screen before any of the section's content. */
  .promo__visual { width: 100%; max-width: 15rem; margin-inline: auto; }
  .promo__visual img { width: 72%; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat--price, .feat--curriculum, .feat--packages, .feat--free { grid-column: span 2; grid-row: auto; }
  .feat--payments, .feat--offline { grid-column: span 1; }
  .hero__card { width: min(22rem, 82%); }

  .steps { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; }
  .step:not(:last-child)::after { display: none; }


  /* Stacked card below the wide breakpoint */
}

/* Six section links need the width; below this they move into the drawer. */
@media (max-width: 1100px) {
  .nav { display: none; }
  .nav-toggle { display: grid; }
}

@media (max-width: 860px) {
  .header__cta { display: none; }
  .sticky-cta { display: block; }
}

@media (max-width: 620px) {
  /* Below this width one line no longer fits; let it wrap rather than clip. */
  .section-title--oneline { white-space: normal; max-inline-size: 22ch; }

  .hero__stats { grid-template-columns: 1fr 1fr; gap: var(--space-5); text-align: start; }
  .hero__stat:last-child { grid-column: span 2; }
  .hero__chip { font-size: var(--fs-xs); padding: var(--space-2) var(--space-3); }
  .hero__chip--rating { inset-block-start: 4%; }


  .promo__visual { max-width: 12rem; }
  .bento { grid-template-columns: 1fr; }
  .bento > .feat { grid-column: 1 / -1; }
  .formula__parts { flex-direction: column; align-items: flex-start; }
  .store-btn { flex: 1 1 11.5rem; justify-content: center; }
  .teacher { width: 11.5rem; }
  .avatar { width: 76px; height: 76px; }
  .gift__action { gap: var(--space-3); }
  .countdown__unit { min-width: 46px; }
  .countdown__unit b { font-size: 1.2rem; }
}

/* ---------------------------------------------------------
   19b. ENGLISH / LEFT-TO-RIGHT
   Logical properties carry most of the layout across. These are the few
   physical or Arabic-tuned rules that need an English counterpart.
   --------------------------------------------------------- */
/* Hidden only for a returning English visitor, until the text is swapped. */
.i18n-pending body { visibility: hidden; }

[dir="ltr"] .skip-link { transform: translateX(-50%); }
[dir="ltr"] .meter__fill { background: linear-gradient(to right, var(--green-400), var(--green-600)); }

/* The one-line rules were tuned to the Arabic copy; English runs longer. */
:root[lang="en"] .hero__title,
:root[lang="en"] .promo__title,
:root[lang="en"] .section-title--oneline { white-space: normal; text-wrap: balance; }

/* ---------------------------------------------------------
   20. MOTION PREFERENCES
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Still fully scrollable by hand; only the ambient drift stops (in JS). */
  .hero__orbit { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sticky-cta { transition: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    /* Durations alone leave delays intact, which would stall the drawer's
       visibility flip by 240ms. */
    transition-delay: 0s !important;
    animation-delay: 0s !important;
  }
}
