/* Arabic Bridge – shared styles. Mobile-first (375px).
   "Golden hour" design: warm ivory and desert gold by day, deep green by night.
   Fonts are self-hosted in /fonts (SIL Open Font License); nothing loads from other sites. */

@font-face {
  font-family: "Cormorant";
  src: url("fonts/cormorant-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant";
  src: url("fonts/cormorant-italic-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("fonts/noto-naskh-arabic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  /* Brand colours (from the logo) */
  --green: #052724;
  --red: #A63220;
  --red-dark: #86281A;   /* hover shade of the brand red */
  --gold: #C79A56;
  --white: #FFFFFF;

  /* Light theme (default). Every colour below is used through these names,
     so the dark theme only has to redefine them. */
  color-scheme: light dark;
  --bg: #FFFBF4;           /* warm ivory */
  --text: var(--green);
  --muted: #3D524F;        /* tint of the green, 7.9:1 on the ivory */
  --panel: #F8EEDC;        /* sand: notes, switch track */
  --card: rgba(255, 255, 255, 0.78);  /* cards let the golden glow show through */
  --card-solid: var(--white);
  --gold-text: #7C5A22;    /* gold dark enough for small text, 6:1 on the ivory */
  --glow-a: rgba(242, 196, 107, 0.30);  /* drifting background light */
  --glow-b: rgba(224, 138, 76, 0.16);
  --spot: rgba(242, 196, 107, 0.28);    /* light that follows the pointer on cards */
  --band-top: #FCF0D8;     /* "book your free trial" band */
  --band-bottom: #F4DCAE;
  --field-bg: var(--white);
  --field-border: #6B7C7A; /* 4.4:1 against white */
  --soft-border: #E3D1B0;
  --link: var(--red);
  --link-hover: var(--red-dark);
  --accent: var(--red);    /* step numbers, FAQ +, contact icons */
  --error: var(--red);
  --focus: var(--green);
  --footer-bg: var(--green);
  --lift: 0 1px 2px rgba(5, 39, 36, 0.05), 0 12px 28px -16px rgba(5, 39, 36, 0.28); /* cards */
  --lift-hover: 0 2px 4px rgba(5, 39, 36, 0.06), 0 24px 44px -20px rgba(124, 90, 34, 0.45);
  --switch-on: var(--gold);       /* chosen option in the prices switch */
  --switch-on-text: var(--green); /* 6.2:1 on the gold */
  --feature-bg: var(--gold);      /* group classes card: desert gold */
  --feature-text: var(--green);   /* 6.2:1 on the gold */
  --feature-muted: #1E3A36;       /* 4.8:1 on the gold */
  --feature-rule: rgba(5, 39, 36, 0.22);
  --feature-chip-bg: var(--green);   /* "Save" badge on the gold card */
  --feature-chip-text: var(--gold);  /* 6.2:1 */
  --feature-highlight: var(--green);
  --feature-icon: var(--green);
  --feature-icon-bg: rgba(5, 39, 36, 0.08);
  --feature-icon-border: rgba(5, 39, 36, 0.3);

  --font-heading: "Cormorant", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-arabic: "Noto Naskh Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);  /* soft landing for everything that moves */

  /* One spacing scale for every margin, padding and gap (4px steps at the small end) */
  --space-1: 0.25rem;  /*  4px */
  --space-2: 0.5rem;   /*  8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 2rem;     /* 32px */
  --space-8: 3rem;     /* 48px */

  --gutter: var(--space-5);
  --radius: 10px;
  --button-edge: transparent;
}

/* Dark theme: deep brand green background, warm off-white text.
   Contrast (text on background): text 14.8:1, muted 9.7:1, gold links 6.6:1, errors 7.6:1. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06201D;
    --text: #F4EFE6;
    --muted: #B8C6C3;
    --panel: #0D302C;
    --card: rgba(17, 56, 51, 0.82);
    --card-solid: #113833;
    --gold-text: var(--gold);   /* 6.6:1 on the deep green */
    --glow-a: rgba(199, 154, 86, 0.16);
    --glow-b: rgba(242, 149, 127, 0.08);
    --spot: rgba(199, 154, 86, 0.18);
    --band-top: #0F3631;
    --band-bottom: #072420;
    --field-bg: #041815;
    --field-border: #7F9793;
    --soft-border: #2E4E49;
    --link: var(--gold);
    --link-hover: #E3C592;
    --accent: #F2957F;     /* lighter tint of the brand red, readable on dark */
    --error: #F2957F;
    --focus: var(--gold);
    --footer-bg: #021210;
    --button-edge: var(--gold); /* lifts the red button off the dark green */
    --lift: 0 12px 28px -18px rgba(0, 0, 0, 0.6);
    --lift-hover: 0 24px 44px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(199, 154, 86, 0.35);
    --switch-on: var(--gold);
    --switch-on-text: var(--green);
    --feature-bg: var(--panel);
    --feature-text: var(--text);
    --feature-muted: var(--muted);
    --feature-rule: var(--soft-border);
    --feature-chip-bg: var(--gold);
    --feature-chip-text: var(--green);
    --feature-highlight: var(--gold);
    --feature-icon: var(--gold);
    --feature-icon-bg: rgba(199, 154, 86, 0.14);
    --feature-icon-border: rgba(199, 154, 86, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }

[lang="ar"] {
  font-family: var(--font-arabic);
  line-height: 1.8;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-variant-numeric: lining-nums; /* full-height figures: "14 days", "5." */
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}
h1 { font-size: 2.3rem; }
h2 { font-size: 2.15rem; }
h3 { font-size: 1.45rem; }

p { margin: 0 0 var(--space-4); }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }

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

/* No double-tap-to-zoom delay on anything tappable */
a, button, summary, label, input { touch-action: manipulation; }

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 0.5rem; top: -4rem;
  background: var(--green);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  z-index: 10;
}
.skip-link:focus { top: 0.5rem; color: var(--white); }

/* The logo has a white background, so it always sits on a white plate.
   In light mode the plate is invisible; in dark mode it frames the logo. */
.logo-plate {
  display: inline-block;
  background: var(--white);
  border-radius: 16px;
  padding: var(--space-2) var(--space-3);
}

/* ---------- Buttons ---------- */
.button {
  position: relative;
  isolation: isolate;     /* keeps the light sweep behind the words */
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3.25rem;
  padding: var(--space-3) var(--space-7);
  border: 2px solid var(--button-edge);
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 12px 26px -14px rgba(166, 50, 32, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: var(--white); /* 6.8:1 on the brand red, in both themes */
  font: 700 1.0625rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--red-dark); color: var(--white); }
.button-wide { width: 100%; }
.button .icon { width: 1.35rem; height: 1.35rem; }
/* A band of golden light that sweeps across the button */
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 222, 160, 0.5) 50%, transparent 68%);
  transform: translateX(-110%);
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: background-color 0.2s ease, transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  }
  .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -14px rgba(166, 50, 32, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
  .button:hover::before { transition: transform 0.8s var(--ease-out); transform: translateX(110%); }
  /* The main "book" buttons catch the light every few seconds */
  .button-glow::before { animation: sweep 6s var(--ease-out) 1.5s infinite; }
  @keyframes sweep {
    0%, 62% { transform: translateX(-110%); }
    86%, 100% { transform: translateX(110%); }
  }
}

/* ---------- Hero text (used inside the "Cross the bridge" section) ---------- */
.crossing h1 { font-size: clamp(2rem, 3.8vw, 2.75rem); }
.crossing h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.hero-ar {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.hero-note {
  margin-top: var(--space-2);
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- The bridge motif ---------- */
.bridge-divider {
  width: min(240px, 64vw);
  height: auto;
  aspect-ratio: 320 / 60;
  margin: var(--space-6) auto;
}
/* With motion, the bridge draws itself when it comes into view */
.motion .bridge-divider { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion .bridge-divider.is-in { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease-out); }

/* ---------- Golden light behind the page (home page) ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  width: 80vmax; height: 80vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-a), transparent);
}
.ambient::before { top: -30vmax; left: -25vmax; }
.ambient::after { right: -30vmax; bottom: -35vmax; background: radial-gradient(closest-side, var(--glow-b), transparent); }
@media (prefers-reduced-motion: no-preference) {
  .ambient::before { animation: drift 38s ease-in-out infinite alternate; }
  .ambient::after { animation: drift 46s ease-in-out -12s infinite alternate-reverse; }
  @keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(18vmax, 14vmax) scale(1.15); }
  }
}

/* ---------- Section headings: a small Arabic line, then the title ---------- */
.section-head { margin-bottom: var(--space-7); text-align: center; }
.section-head h2 { margin-bottom: 0; }
.section-head .lead { max-width: 34rem; margin: var(--space-3) auto 0; color: var(--muted); text-wrap: balance; }
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
  color: var(--gold-text);
  font: 500 1.05rem/1.6 var(--font-arabic);
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 2.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}
.eyebrow::after { transform: scaleX(-1); }

/* ---------- Things that rise into view as you scroll (motion.js adds .motion) ---------- */
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Cards that catch the light under the pointer ---------- */
.spotlight { position: relative; }
.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.spotlight:hover::after { opacity: 1; }

/* ---------- Sections ---------- */
.section { padding: var(--space-6) 0 var(--space-7); }

/* What we teach: a grid of cards (two big, three small on wide screens) */
.subjects {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: grid;
  gap: var(--space-4);
}
.subject {
  position: relative;
  overflow: hidden;
  padding: var(--space-6) var(--space-6) var(--space-6);
  border: 1px solid var(--soft-border);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--lift);
}
@media (prefers-reduced-motion: no-preference) {
  .subject { transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s ease; }
  .subject:hover { transform: translateY(-4px); }
}
.subject:hover { border-color: var(--gold); box-shadow: var(--lift-hover); }
.subject-icon {
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  margin-bottom: var(--space-4);
  border-radius: 14px;
  background: linear-gradient(140deg, #F9E7C3, #E6C27F);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 18px -10px rgba(124, 90, 34, 0.6);
  color: var(--green);
}
.subject-icon svg { width: 1.5rem; height: 1.5rem; }
.subject-num {
  position: absolute;
  top: var(--space-4); right: var(--space-5);
  color: var(--gold-text);
  font: italic 500 1.9rem/1 var(--font-heading);
  opacity: 0.55;
}
.subjects h3 { margin-bottom: var(--space-2); font-size: 1.65rem; }
.subjects h3 [lang="ar"] {
  display: block;
  margin-top: var(--space-1);
  color: var(--gold-text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: left; /* sit under the English heading */
}
.subjects p { margin: 0; color: var(--muted); }
@media (min-width: 40rem) {
  .subjects { grid-template-columns: 1fr 1fr; }
  .subject:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 60rem) {
  .subjects { grid-template-columns: repeat(6, 1fr); gap: var(--space-5); }
  .subject { grid-column: span 2; }
  .subject:nth-child(-n+2) { grid-column: span 3; }
  .subject:last-child:nth-child(odd) { grid-column: span 2; }
}

/* Our teachers: a wide golden card */
.teachers-note {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: var(--space-3) var(--space-5);
  margin: 0;
  padding: var(--space-6);
  border: 1px solid var(--soft-border);
  border-radius: 22px;
  background: linear-gradient(120deg, var(--card), color-mix(in srgb, var(--gold) 14%, var(--card)));
  box-shadow: var(--lift);
}
.teachers-note p { margin: 0; font-size: 1.1rem; }
.teachers-note .note-title {
  font: 600 1.65rem/1.2 var(--font-heading);
}
.note-art {
  width: 4.5rem; height: auto;
  color: var(--gold);
}
@media (min-width: 40rem) {
  .teachers-note { grid-template-columns: auto 1fr; align-items: center; padding: var(--space-7); }
  .note-art { width: 6rem; grid-row: span 2; }
}

/* Numbered steps on a gold line that fills as you scroll (motion.js sets --progress) */
.steps {
  --dot: 2.75rem;
  position: relative;
  list-style: none;
  counter-reset: step;
  margin: 0 0 var(--space-7);
  padding: 0;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 1px);
  top: calc(var(--dot) / 2);
  bottom: calc(var(--dot) / 2 + var(--space-6));
  width: 2px;
  border-radius: 2px;
}
.steps::before { background: var(--soft-border); }
.steps::after {
  background: linear-gradient(var(--gold), #F2C46B);
  box-shadow: 0 0 10px rgba(242, 196, 107, 0.7);
  transform-origin: top;
  transform: scaleY(var(--progress, 1));
}
.steps li {
  counter-increment: step;
  position: relative;
  z-index: 1;
  padding: 0 0 var(--space-6) calc(var(--dot) + var(--space-5));
  min-height: var(--dot);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -0.2rem;
  width: var(--dot); height: var(--dot);
  display: grid; place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--bg);
  color: var(--gold-text);
  font: 600 1.35rem/1 var(--font-heading);
}
/* A step lights up once the gold line reaches it (all of them without motion) */
.steps li.is-reached::before,
html:not(.motion) .steps li::before {
  background: radial-gradient(circle at 35% 30%, #FBE3B0, var(--gold));
  color: var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 20%, transparent), 0 8px 18px -8px rgba(124, 90, 34, 0.7);
}
@media (prefers-reduced-motion: no-preference) {
  .steps li::before { transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease; }
}
.steps strong { display: block; margin-bottom: var(--space-1); font: 600 1.45rem/1.25 var(--font-heading); }

.promise {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: fit-content;
  margin: 0 auto var(--space-4);
  padding: var(--space-2) var(--space-6);
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 12%, var(--card));
  font: 600 1.3rem/1.4 var(--font-heading);
  text-align: center;
}
.how-note { text-align: center; color: var(--muted); }

/* ---------- "Free" badge (hero and booking panel) ---------- */
.free-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: var(--white);
  color: var(--green); /* fixed colours: readable in light and dark */
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}
.free-badge strong {
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.05rem;
}
/* "free" inside buttons gets a gold underline */
.button strong {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* ---------- Book the free trial ---------- */
.form-section { margin-top: var(--space-4); scroll-margin-top: 0; }
.form-section:focus { outline: none; }
.form-curve {
  width: 100%;
  height: 28px;
  margin-bottom: -1px;
}
.form-curve .curve-fill { fill: var(--band-top); }
/* A warm band like the sky at sunrise, with gold dust drifting up (motion.js) */
.form-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, var(--band-top), var(--band-bottom));
  padding: var(--space-5) 0 var(--space-8);
  border-bottom: 2px solid var(--gold);
}
.form-panel::before {      /* the sun's glow, just above the heading */
  content: "";
  position: absolute;
  left: 50%; top: -38%;
  z-index: -1;
  width: min(900px, 160vw); aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 196, 0.95), rgba(242, 196, 107, 0.35) 45%, transparent 72%);
}
@media (prefers-color-scheme: dark) {
  .form-panel::before { background: radial-gradient(closest-side, rgba(199, 154, 86, 0.32), rgba(199, 154, 86, 0.1) 45%, transparent 72%); }
}
.gold-dust {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}
html:not(.motion) .gold-dust { display: none; }
.book-section .wrap { text-align: center; }
.book-section h2 { font-size: 2.6rem; }
.book-lead { font-size: 1.15rem; text-wrap: balance; }
.book-points {
  list-style: none;
  margin: 0 0 var(--space-7);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
  font-weight: 600;
}
.book-points li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4) var(--space-1) var(--space-2);
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-solid) 55%, transparent);
}
.book-points li::before {
  content: "✓";
  display: grid; place-items: center;
  width: 1.4rem; height: 1.4rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
}
.book-button { min-height: 3.75rem; font-size: 1.2rem; }
@media (min-width: 48rem) {
  .book-section h2 { font-size: 3.6rem; }
}
.form-help {
  margin: var(--space-3) 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Prices ---------- */
/* Wider than the rest of the page, so three prices fit side by side */
.wrap-wide { max-width: 60rem; }

.prices-head {
  max-width: 38rem;
  margin: 0 auto var(--space-7);
  text-align: center;
}
.prices-lead { font-size: 1.1rem; text-wrap: balance; }
.currency-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
}
.currency-picker label { font-size: 0.95rem; font-weight: 600; color: var(--muted); }
/* The menu draws its own arrow, so it matches in every browser */
.select { position: relative; display: inline-block; color: var(--text); }
.select::after {
  content: "";
  position: absolute;
  right: 1.1rem; top: 50%;
  width: 0.45rem; height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.currency-picker select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 2.75rem;
  padding: var(--space-2) 2.75rem var(--space-2) var(--space-4);
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: var(--field-bg);
  color: var(--text);
  font: 600 1rem/1.3 var(--font-body); /* 16px or more stops iOS zooming in */
  cursor: pointer;
}
.currency-picker select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* A plan: its heading (and the switch), then its prices */
.plan { container: plan / inline-size; }
.plan + .plan { margin-top: var(--space-7); }
.plan p { margin: 0; }
.plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-5);
}
.plan-head > div { flex: 1 1 18rem; }
.plan h3 { margin-bottom: var(--space-1); font-size: 1.45rem; }
.plan-for { color: var(--muted); text-wrap: pretty; }

/* Kids & adults / GCSE & A-level switch (two radio buttons, no JavaScript) */
.plan-switch {
  display: flex;
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  padding: 0.3rem;
  border: 1px solid var(--soft-border);
  border-radius: 999px;
  background: var(--panel);
}
.plan-switch input {
  position: absolute;
  width: 1px; height: 1px;
  margin: 0;
  opacity: 0;
}
.plan-switch label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
}
.plan-switch label:hover { color: var(--text); }
.plan-switch input:checked + label {
  background: var(--switch-on);
  color: var(--switch-on-text);
  box-shadow: 0 2px 6px -2px rgba(5, 39, 36, 0.4);
}
.plan-switch input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
@container plan (min-width: 40rem) {
  .plan-switch { flex: none; }
}

/* Only the chosen prices are shown */
.plan:has(#aud-general:checked) .for-exam,
.plan:has(#aud-exam:checked) .for-general { display: none; }
/* Older browsers: no switch, both sets of prices, each labelled */
@supports not selector(:has(*)) {
  .plan-switch,
  .save.for-general,
  .save.for-exam { display: none; }
  .tier-price::before {
    display: block;
    margin: var(--space-4) 0 calc(-1 * var(--space-2));
    font-size: 0.85rem;
    font-weight: 700;
  }
  .tier-price.for-general::before { content: "Kids & adults"; }
  .tier-price.for-exam::before { content: "GCSE & A-level"; }
}

/* Price cards: stacked rows on phones … */
.tiers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.tier {
  container: tier / inline-size;
  padding: var(--space-4) var(--space-5) var(--space-5);
  border: 1px solid var(--soft-border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--lift);
}
.tier-best {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold), var(--lift);
}
.tier-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 1.75rem; /* the same with or without a saving */
}
.tier-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.save {
  padding: 0.2rem var(--space-3);
  border-radius: 999px;
  background: var(--gold);
  color: var(--green); /* 6:1 on the gold, both themes */
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.tier-price {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-3);
}
.per {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.per [data-money] { font-weight: 700; color: var(--text); white-space: nowrap; }
/* Phones: the price per session sits beside the price, on two lines if need be */
.tier .per { flex: 1 1 0; min-width: 4.5rem; padding-bottom: 0.2rem; text-align: right; }
.tier .per [data-money] { display: block; }

/* The price itself: large figures, with the currency sign or code small and raised */
.amount {
  display: block;
  font: 700 2.4rem/1 var(--font-heading);
  font-variant-numeric: lining-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.amount .cur {
  margin-right: 0.18em;
  font-size: 0.42em;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 0.95em;
}
.amount .cur-symbol {
  margin-right: 0.08em;
  font-size: 0.55em;
  letter-spacing: 0;
  vertical-align: 0.55em;
}
.approx {
  margin-right: 0.2em;
  font: 400 0.5em/1 var(--font-body);
  vertical-align: 0.6em;
  color: var(--muted);
}
.amount-gbp {
  display: block;
  margin-top: var(--space-2);
  font: 600 0.85rem/1.3 var(--font-body);
  color: var(--muted);
}

/* … and side by side wherever there's room */
@container plan (min-width: 40rem) {
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
  /* The cards share rows, so their prices line up even when a saving wraps */
  .tier {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
    padding: var(--space-5) var(--space-6) var(--space-6);
  }
  .tier-top { align-self: start; }
  /* Figures grow with the card, up to 52px, leaving room for long currencies */
  .tier .amount { font-size: clamp(2.25rem, 19cqi, 3.25rem); }
  .tier-price {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: var(--space-6);
  }
  .tier .per {
    flex: none;
    width: 100%;
    margin-top: var(--space-4);
    padding: var(--space-4) 0 0;
    border-top: 1px solid var(--soft-border);
    text-align: left;
  }
  .tier .per [data-money] { display: inline; }
}

/* Group classes: one card in desert gold (a lighter panel in dark mode) */
.group-card {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--feature-rule);
  border-radius: 16px;
  background: var(--feature-bg);
  box-shadow: var(--lift);
  color: var(--feature-text);
}
.group-card .save { background: var(--feature-chip-bg); color: var(--feature-chip-text); }
.group-info p + p { margin-top: var(--space-3); }
.group-for { font-weight: 600; color: var(--feature-muted); }
.group-compare { color: var(--feature-highlight); font-weight: 700; }
.group-price .per strong,
.group-price .per [data-money] { color: var(--feature-text); }
.group-price .tier-name,
.group-price .per,
.group-price .amount-gbp,
.group-price .approx { color: var(--feature-muted); }
.group-price .price { margin: var(--space-5) 0 var(--space-3); }
.group-price .amount { font-size: 3rem; }
.group-price {
  padding-top: var(--space-6);
  border-top: 1px solid var(--feature-rule);
}
@container plan (min-width: 40rem) {
  .group-card {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
    align-items: center;
    gap: var(--space-7);
    padding: var(--space-7);
  }
  .group-price {
    padding: var(--space-1) 0 var(--space-1) var(--space-7);
    border-top: 0;
    border-inline-start: 1px solid var(--feature-rule);
  }
  .group-how { grid-column: 1 / -1; }
}

/* "How group classes work": three points with icons, side by side when there's room */
.group-how {
  padding-top: var(--space-6);
  border-top: 1px solid var(--feature-rule);
}
.group-how h4 {
  margin: 0 0 var(--space-5);
  font: 700 0.8rem/1.4 var(--font-body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--feature-muted);
}
.how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}
.how-list li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: start;
  column-gap: var(--space-4);
}
.how-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid var(--feature-icon-border);
  border-radius: 50%;
  background: var(--feature-icon-bg);
  color: var(--feature-icon);
}
.how-icon svg { width: 1.3rem; height: 1.3rem; }
.how-list strong { padding-top: 0.15rem; color: var(--feature-text); }
.how-list p {
  margin-top: var(--space-1);
  color: var(--feature-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.how-list p [data-money] { white-space: nowrap; }
@container plan (min-width: 50rem) {
  .how-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
}

/* Two ways to join a group: with siblings (your times) or with other students (set times) */
.join-title {
  margin-top: var(--space-5) !important;
  font: 700 0.8rem/1.4 var(--font-body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--feature-muted);
}
.join-options {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.join-options li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-3);
  align-content: start;
  padding: var(--space-4);
  border: 1px solid var(--feature-rule);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.28);
}
.join-options li > :not(.join-icon) { grid-column: 2; }
.join-icon {
  grid-row: span 3;
  width: 1.5rem; height: 1.5rem;
  margin-top: 0.1rem;
  color: var(--feature-icon);
}
.join-options strong { color: var(--feature-text); line-height: 1.35; }
.join-options span { color: var(--feature-muted); font-size: 0.95rem; line-height: 1.45; }
.join-options .join-time {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding: 0.2rem var(--space-3) 0.2rem var(--space-2);
  border: 1px solid var(--feature-rule);
  border-radius: 999px;
  color: var(--feature-text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.join-time svg { width: 0.95rem; height: 0.95rem; }
/* "You choose the times" stands out as the perk */
.join-options .join-time-yours {
  border-color: transparent;
  background: var(--feature-chip-bg);
  color: var(--feature-chip-text);
}
@media (prefers-color-scheme: dark) {
  .join-options li { background: rgba(255, 255, 255, 0.04); }
}
@container plan (min-width: 56rem) {
  .join-options { grid-template-columns: 1fr 1fr; }
}

/* Small print at the foot of the group card */
.group-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--feature-rule);
  color: var(--feature-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.group-note svg { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.1rem; color: var(--feature-icon); }
@container plan (min-width: 40rem) {
  .group-note { grid-column: 1 / -1; }
}

/* GCSE and A-level aren't taught in groups, so the group card steps aside
   while those prices are showing, and slides back for kids & adults */
.prices:has(#aud-exam:checked) .plan-group { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .plan-group {
    transition: opacity 0.4s var(--ease-out), translate 0.4s var(--ease-out), display 0.4s allow-discrete;
  }
  .prices:has(#aud-exam:checked) .plan-group { opacity: 0; translate: 0 12px; }
  @starting-style {
    .plan-group { opacity: 0; translate: 0 12px; }
  }
}

/* Small print, with icons */
.price-facts {
  list-style: none;
  margin: var(--space-7) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-6);
  color: var(--muted);
  font-size: 0.95rem;
}
.price-facts li { display: flex; align-items: center; gap: var(--space-2); }
.price-facts .icon { flex: none; width: 1.25rem; height: 1.25rem; color: var(--accent); }
.prices-cancel {
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}
.currency-note {
  max-width: 38rem;
  margin: var(--space-5) auto 0;
  padding: var(--space-3) var(--space-4);
  border-inline-start: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--panel);
  font-size: 0.9rem;
}
.prices-cta { margin: var(--space-7) 0 0; text-align: center; }

/* ---------- Still have a question? (WhatsApp) ---------- */
.ask-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-7);
  padding: var(--space-6);
  border: 1px solid var(--soft-border);
  border-radius: 22px;
  background: linear-gradient(120deg, var(--card), color-mix(in srgb, var(--gold) 12%, var(--card)));
  box-shadow: var(--lift);
}
.ask-icon { flex: none; width: 2.25rem; height: 2.25rem; color: var(--accent); }
.ask-card h3 { margin-bottom: var(--space-1); }
.ask-card p { margin: 0 0 var(--space-3); }
.ask-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: 0 !important;
}
.ask-alt { font-size: 0.95rem; color: var(--muted); }
.button-outline {
  background: var(--bg);
  color: var(--text);
  border-color: var(--accent);
}
.button-outline:hover { background: var(--red); border-color: var(--red); color: var(--white); }

[hidden] { display: none !important; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--space-3); }
.faq details {
  border: 1px solid var(--soft-border);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq details[open] { border-color: var(--gold); box-shadow: var(--lift); }
.faq summary {
  cursor: pointer;
  padding: var(--space-4) calc(var(--space-6) + 1.75rem) var(--space-4) var(--space-5);
  font-weight: 700;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
/* A plus that turns into a cross */
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: var(--space-5); top: 50%;
  width: 0.9rem; height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: var(--accent);
  transition: transform 0.35s var(--ease-out);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details p { margin: 0; padding: 0 var(--space-5) var(--space-5); color: var(--muted); }
/* Answers glide open where the browser can animate it */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .faq { interpolate-size: allow-keywords; }
    .faq details::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 0.4s var(--ease-out), content-visibility 0.4s allow-discrete;
    }
    .faq details[open]::details-content { block-size: auto; }
  }
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.contact-list a {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 4rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--soft-border);
  border-radius: 18px;
  background: var(--card);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
/* Name above, handle or number below */
.contact-text { display: grid; min-width: 0; line-height: 1.35; }
.contact-list .handle { overflow-wrap: anywhere; }
.contact-list a:hover { border-color: var(--gold); box-shadow: var(--lift-hover); color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .contact-list a { transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s ease; }
  .contact-list a:hover { transform: translateY(-3px); }
}
.contact-list .icon {
  flex: none;
  box-sizing: content-box;
  width: 1.4rem; height: 1.4rem;
  padding: 0.6rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--accent);
}
/* Handle / number shown after a contact link's name */
.contact-list .handle { font-weight: 400; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: var(--space-7);
  padding: var(--space-8) 0 var(--space-8);
  background: radial-gradient(120% 90% at 100% 0%, rgba(199, 154, 86, 0.16), transparent 55%), var(--footer-bg);
  border-top: 2px solid var(--gold);
  color: var(--white);
  font-size: 0.95rem;
}
/* "The Arabic Bridge" in large faint calligraphy behind the footer */
.footer-watermark {
  position: absolute;
  right: -0.05em; bottom: -0.32em;
  z-index: -1;
  margin: 0;
  color: var(--gold);
  font: 700 clamp(4.5rem, 16vw, 11rem)/1 var(--font-arabic);
  opacity: 0.08;
  white-space: nowrap;
  pointer-events: none;
}
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--gold); }
.site-footer :focus-visible { outline-color: var(--gold); }
.footer-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--gold); /* 6:1 or better on both footer greens */
}
.footer-name [lang="ar"] { margin-inline-start: var(--space-2); font-weight: 400; }
.footer-links {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}
.footer-links a { display: inline-block; padding: var(--space-2) 0; }

/* ---------- Legal pages ---------- */
.page-header {
  padding: var(--space-4) 0;
  border-bottom: 2px solid var(--gold);
}
.page-header .logo-plate { padding: var(--space-1) var(--space-2); border-radius: 12px; }
.page-header img { width: 150px; height: auto; }
.legal { padding: var(--space-7) 0 var(--space-4); }
.legal h1 { font-size: 2.6rem; }
.legal h2 { font-size: 1.7rem; margin-top: var(--space-7); }
.legal ul { padding-inline-start: var(--space-5); }
.legal li { margin-bottom: var(--space-2); }
.updated { color: var(--muted); font-size: 0.95rem; }

/* ---------- Larger screens ---------- */
@media (min-width: 48rem) {
  body { font-size: 1.125rem; }
  h1 { font-size: 3.4rem; }
  h2 { font-size: 2.9rem; }
  .section { padding: var(--space-8) 0; }
  .form-curve { height: 48px; }
  .form-panel { padding-bottom: var(--space-8); }
  .form-panel .wrap { max-width: 42rem; }
  .contact-list { grid-template-columns: 1fr 1fr; column-gap: var(--space-7); }
  .page-header img { width: 180px; }
}

/* ---------- Page not found ---------- */
.not-found { text-align: center; padding-bottom: var(--space-8); }
.not-found .bridge-divider { margin-top: var(--space-4); }

/* Sections the page jumps to get focus for screen readers, without an outline box */
[tabindex="-1"]:focus { outline: none; }

/* ==========================================================================
   "Cross the bridge" (index.html hero, driven by crossing.js)
   Default = a normal stacked section: used for reduced motion, no JavaScript,
   older browsers, or if the scene can't load. The pinned, scroll-driven
   version is switched on further down only when motion is allowed.
   ========================================================================== */
.crossing-stage {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--space-6) var(--gutter) var(--space-4);
  text-align: center;
}
.crossing-scene { order: 1; }
.crossing-panel[data-step="logo"] { order: 2; }
.crossing-cta { order: 3; }
.crossing-panel, .crossing-nav { order: 4; }
.crossing-skip, .crossing-hint, .crossing-sky, .journey { display: none; }
.crossing .gold-dust { z-index: auto; } /* sits between the sky and the drawing */
.crossing.is-static .gold-dust { display: none; }

.crossing-scene img,
.crossing-scene svg,
.crossing-illustration {
  display: block;
  width: 100%;
  max-width: 34rem;
  height: auto;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--lift);
}
.crossing-illustration { max-width: 26rem; margin-bottom: var(--space-4); aspect-ratio: 16 / 9; }

.crossing-copy h2 { margin-bottom: var(--space-2); }
.crossing-copy p:last-child { margin-bottom: 0; }
.crossing-cta .button { width: 100%; max-width: 22rem; }
.crossing-cta .hero-note { margin-bottom: 0; }

.crossing-markers {
  counter-reset: marker;
  list-style: none;
  max-width: 28rem;
  margin: var(--space-4) auto 0;
  padding: 0;
  text-align: left;
  display: grid;
  gap: var(--space-3);
}
.crossing-markers li {
  counter-increment: marker;
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  font-weight: 600;
}
.crossing-markers li::before {
  content: counter(marker);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font: 700 0.95rem/1 var(--font-heading);
}

.crossing-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}
.crossing-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 var(--space-4);
  border: 2px solid var(--gold);
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.crossing-nav a:hover { color: var(--link); }

/* ---------- Pinned, scroll-driven version ---------- */
@media (prefers-reduced-motion: no-preference) and (scripting: enabled) {
  .crossing:not(.is-static) {
    height: 360vh;
    height: 360svh; /* about three and a half screens of scrolling */
  }
  .crossing:not(.is-static) .crossing-stage {
    /* The scene is an illustration with its own light palette, in both themes */
    --text: var(--green);
    --muted: #3D524F;
    --link: var(--red);
    --link-hover: var(--red-dark);
    --focus: var(--green);
    --button-edge: transparent;
    position: sticky;
    top: 0;
    display: block;
    max-width: none;
    height: 100vh;
    height: 100svh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* crossing.js sets --sky (horizon), --sky-top and the sun's --sun-* values as you scroll */
    background-color: var(--sky, #FFF4E0);
    background-image: linear-gradient(180deg, var(--sky-top, #FFFDF8) 0%, var(--sky, #FFF4E0) 80%);
    color: var(--text);
  }
  .crossing:not(.is-static) .crossing-scene {
    position: absolute;
    inset: 0;
  }

  /* The sun, its glow and slowly turning rays, behind the drawing */
  .crossing:not(.is-static) .crossing-sky {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .crossing-sky .sun,
  .crossing-sky .sun-rays {
    position: absolute;
    left: calc(var(--sun-x, 0.5) * 100%);
    top: calc(var(--sun-y, 0.5) * 100%);
    aspect-ratio: 1;
    border-radius: 50%;
    translate: -50% -50%;
  }
  .crossing-sky .sun {
    width: calc(var(--sun-size, 0.9) * 100vmax);
    background: radial-gradient(closest-side,
      rgba(255, 252, 238, 0.95),
      var(--sun-colour, #FFE2A6) 18%,
      color-mix(in srgb, var(--sun-colour, #FFE2A6) 38%, transparent) 46%,
      transparent 72%);
    opacity: var(--sun-op, 0.5);
  }
  .crossing-sky .sun-rays {
    width: 170vmax;
    background: repeating-conic-gradient(rgba(255, 240, 205, 0) 0deg 6deg, rgba(255, 240, 205, 0.6) 8deg 10deg, rgba(255, 240, 205, 0) 12deg 18deg);
    -webkit-mask-image: radial-gradient(closest-side, #000 4%, transparent 66%);
    mask-image: radial-gradient(closest-side, #000 4%, transparent 66%);
    opacity: calc(var(--sun-op, 0.5) * 0.5);
    animation: rays 180s linear infinite;
    will-change: rotate;
  }
  @keyframes rays { to { rotate: 360deg; } }

  /* Progress along the journey, London to Cairo */
  .crossing:not(.is-static) .journey {
    display: block;
    position: absolute;
    left: 0; right: 0; top: 0;
    z-index: 3;
    height: 3px;
    background: rgba(5, 39, 36, 0.08);
  }
  .journey span {
    display: block;
    height: 100%;
    transform-origin: left;
    transform: scaleX(var(--journey, 0));
    background: linear-gradient(90deg, var(--gold), #F2C46B);
    box-shadow: 0 0 12px rgba(242, 196, 107, 0.9);
  }
  .crossing:not(.is-static) .crossing-scene img,
  .crossing:not(.is-static) .crossing-scene svg {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    background: none;
  }
  .crossing:not(.is-static) .crossing-scene img { object-fit: contain; padding: 30vh 4vw 18vh; }

  .crossing:not(.is-static) .crossing-panel,
  .crossing:not(.is-static) .crossing-nav {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
  }
  .crossing:not(.is-static) .crossing-panel[data-step="logo"] { opacity: 1; }
  /* Words sit on a frosted-glass card, so the drawing can pass behind them */
  .crossing:not(.is-static) .crossing-copy {
    width: fit-content;
    max-width: min(44rem, calc(100% - 2 * var(--gutter)));
    margin: calc(3.75rem + env(safe-area-inset-top)) auto 0;
    padding: var(--space-4) var(--space-6) var(--space-5);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    background: var(--sky, #FFF4E0);
    background: color-mix(in srgb, var(--sky, #FFF4E0) 30%, rgba(255, 255, 255, 0.42));
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 24px 48px -28px rgba(124, 90, 34, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }
  .crossing:not(.is-static) .crossing-copy > .free-badge { box-shadow: 0 6px 16px -10px rgba(124, 90, 34, 0.6); }
  .crossing:not(.is-static) .crossing-copy h1 { margin-bottom: var(--space-2); }
  .crossing:not(.is-static) .crossing-hint {
    display: block;
    margin-top: var(--space-3);
    font-weight: 700;
    font-size: 0.95rem;
  }
  .crossing:not(.is-static) .crossing-hint::after { content: " ↓"; }

  /* "How it works" markers ride along the bridge (positioned by crossing.js) */
  .crossing:not(.is-static) .crossing-markers { margin: 0; max-width: none; display: block; }
  .crossing:not(.is-static) .crossing-markers li {
    position: absolute;
    left: 0;
    top: 0;
    width: min(15rem, 72vw);
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 16px 30px -18px rgba(124, 90, 34, 0.6);
    opacity: 0;
    will-change: transform, opacity;
  }

  /* The logo becomes navigation at the end (hotspots placed by crossing.js) */
  .crossing:not(.is-static) .crossing-nav { display: block; }
  .crossing:not(.is-static) .crossing-nav a {
    position: absolute;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
  }
  .crossing:not(.is-static) .crossing-nav.is-live a { pointer-events: auto; }
  .crossing:not(.is-static) .crossing-nav span {
    transform: translate(var(--shift, 0px), -60%); /* on top of each part, clear of the wordmark */
    padding: var(--space-1) var(--space-3);
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 0 0 4px rgba(242, 196, 107, 0.45), 0 10px 22px -10px rgba(166, 50, 32, 0.8);
    color: var(--white);
    font-size: 0.9rem;
    white-space: nowrap;
  }
  .crossing:not(.is-static) .crossing-nav a:hover span { background: var(--red-dark); }
  .crossing:not(.is-static) .crossing-nav.is-live span { animation: label-in 0.7s var(--ease-out) both; }
  .crossing:not(.is-static) .crossing-nav a:nth-child(2) span { animation-delay: 0.12s; }
  .crossing:not(.is-static) .crossing-nav a:nth-child(3) span { animation-delay: 0.24s; }
  @keyframes label-in {
    from { opacity: 0; scale: 0.7; }
    to { opacity: 1; scale: 1; }
  }

  /* The trial button stays on screen for the whole animation */
  .crossing:not(.is-static) .crossing-cta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
    text-align: center;
  }
  .crossing:not(.is-static) .crossing-cta .hero-note { margin-top: var(--space-1); font-size: 0.85rem; }

  .crossing:not(.is-static) .crossing-skip {
    display: block;
    position: absolute;
    top: calc(var(--space-3) + env(safe-area-inset-top));
    right: var(--gutter);
    z-index: 2;
    padding: var(--space-2) var(--space-3);
    border-radius: 999px;
    background: var(--white);
    border: 2px solid var(--gold);
    color: var(--green);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
  }
  .crossing:not(.is-static) .crossing-skip:hover { color: var(--red); }
}

@media (min-width: 48rem) {
  .crossing:not(.is-static) .crossing-copy { margin-top: var(--space-8); padding-inline: var(--space-7); }
}

/* Short screens (phones on their side, small laptop windows): tighter
   opening words so the whole logo still gets a good share of the height */
@media (prefers-reduced-motion: no-preference) and (scripting: enabled) and (max-height: 520px) {
  .crossing:not(.is-static) .crossing-copy {
    max-width: calc(100% - 11rem); /* room for Skip at the side */
    margin-top: calc(var(--space-2) + env(safe-area-inset-top));
    padding: var(--space-2) var(--space-4);
  }
  .crossing:not(.is-static) .crossing-copy h1,
  .crossing:not(.is-static) .crossing-copy h2 { font-size: 1.3rem; margin-bottom: var(--space-1); }
  .crossing:not(.is-static) .crossing-copy p { font-size: 0.9rem; margin-bottom: 0; }
  .crossing:not(.is-static) .crossing-copy .hero-ar { line-height: 1.5; }
  .crossing:not(.is-static) .crossing-hint { margin-top: var(--space-1); }
  .crossing:not(.is-static) .crossing-cta { padding-top: var(--space-2); padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom)); }
  .crossing:not(.is-static) .crossing-cta .button { min-height: 2.75rem; padding-block: var(--space-2); }
  .crossing:not(.is-static) .crossing-cta .hero-note { display: none; }
  .crossing:not(.is-static) .free-badge { margin-bottom: var(--space-1); font-size: 0.8rem; }
}

.footer-note { color: var(--white); opacity: 0.9; }

/* The hero's "Free" badge pops in once (not for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .crossing .free-badge { animation: badge-in 0.7s cubic-bezier(.2,.8,.3,1.2) 0.4s both; }
  @keyframes badge-in {
    from { opacity: 0; transform: translateY(8px) scale(0.92); }
    to { opacity: 1; transform: none; }
  }
}

/* Small or short screens: the logo needs the room more than the Arabic tagline does */
@media (prefers-reduced-motion: no-preference) and (scripting: enabled) and (max-height: 640px) {
  .crossing:not(.is-static) [data-step="logo"] .hero-ar { display: none; }
  .crossing:not(.is-static) .crossing-hint { margin-top: var(--space-1); }
}

/* ---------- Privacy policy: summary box and tables ---------- */
.legal-summary {
  margin: var(--space-5) 0 var(--space-7);
  padding: var(--space-4) var(--space-5);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius);
  background: var(--panel);
}
.legal .legal-summary h2 { margin-top: 0; }
.legal-summary p { margin: var(--space-3) 0 0; }
.legal-table {
  width: 100%;
  margin: var(--space-3) 0 var(--space-4);
  border-collapse: collapse;
  font-size: 0.95rem;
}
.legal-table th,
.legal-table td {
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
  border-top: 1px solid var(--soft-border);
  text-align: left;
  vertical-align: top;
}
.legal-table thead th { border-top: 0; color: var(--muted); font-size: 0.85rem; }
.legal-table tbody th { width: 34%; font-weight: 700; }
/* Phones: each row becomes a small block, so nothing is squashed */
@media (max-width: 34rem) {
  .legal-table thead { display: none; }
  .legal-table tr { display: block; padding: var(--space-3) 0; border-top: 1px solid var(--soft-border); }
  .legal-table th, .legal-table td { display: block; width: auto; padding: 0; border: 0; }
  .legal-table tbody th { width: auto; margin-bottom: var(--space-1); }
  /* Tables with several columns keep each value's label */
  .legal-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

/* ---------- Lesson terms ---------- */
.legal h3 { margin: var(--space-5) 0 var(--space-2); font-size: 1.35rem; }
.legal-table.price-table td { font-variant-numeric: lining-nums; }
.examples-table td:nth-child(3),
.examples-table td:nth-child(4) { font-weight: 700; }
.examples-table td:nth-child(3) { white-space: nowrap; }

/* "On this page" */
.toc {
  margin: 0 0 var(--space-6);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--soft-border);
  border-radius: 16px;
  background: var(--card);
}
.toc-title {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.toc ol { margin: 0; padding-inline-start: var(--space-5); }
.toc li { margin-bottom: var(--space-1); }
@media (min-width: 40rem) {
  .toc ol { columns: 2; column-gap: var(--space-7); }
  .toc li { break-inside: avoid; }
}

/* The 14-day right to cancel: impossible to miss */
.cancel-box {
  position: relative;
  margin: var(--space-7) 0;
  padding: var(--space-6) var(--space-5);
  border: 2px solid var(--gold);
  border-radius: 22px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--gold) 16%, var(--card-solid)), var(--card-solid) 60%);
  box-shadow: var(--lift);
  scroll-margin-top: var(--space-4);
}
.legal .cancel-box h2 { margin-top: 0; }
.cancel-days {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  padding: 0 var(--space-4);
  border-radius: 999px;
  background: var(--gold);
  color: var(--green); /* 6.2:1 on the gold */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}
.cancel-days span { font: 700 1.7rem/1.3 var(--font-heading); letter-spacing: 0; }
.cancel-lead { font-size: 1.15rem; font-weight: 600; }
.cancel-box ul { margin-bottom: var(--space-4); }
@media (min-width: 40rem) {
  .cancel-box { padding: var(--space-7); }
}

/* The model cancellation form, laid out like a letter */
.cancel-form {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px dashed var(--field-border);
  border-radius: 14px;
  background: var(--bg);
}
.cancel-form p { margin: 0 0 var(--space-3); }
.cancel-form p:last-child { margin-bottom: 0; }
.cancel-form-title {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.form-hint { color: var(--muted); font-style: italic; }
