/* ============================================================================
   BRITISH LANGUAGE ACADEMY — Core stylesheet
   ----------------------------------------------------------------------------
   Design tokens extracted directly from the brand logo:
     #002147  Oxford Blue  (85.5% of logo pixels) -> primary
     #030630  Midnight     (deep shadow tone)     -> surface-deep
     #F9EEDF  Parchment    (crest highlight)      -> cream
     #BBB0A8  Stone        (crest mid-tone)       -> muted
   Heritage accents harmonised with Oxford Blue:
     #C9A227  Gold         -> CTA / accent
     #7B1E2B  Burgundy     -> secondary accent / badges
   ----------------------------------------------------------------------------
   Structure:
     1. Tokens
     2. Base & typography
     3. Layout helpers
     4. Motion primitives (reveal / reduced-motion)
     5. Components (buttons, cards, badges…)
     6. Sections (header, hero, courses, roadmap, quiz, teachers…)
     7. Overlays (modal, lightbox, toast)
     8. Responsive
   ========================================================================== */

/* ---------------------------------------------------------------- 1. TOKENS */
:root {
  /* Type. Wix Madefor (Dalton Maag) has a full Cyrillic set and enough
     character to not read as a template default; JetBrains Mono handles the
     small uppercase labels. */
  --font-display: "Wix Madefor Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Wix Madefor Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Brand */
  --navy-950: #000d1f;
  --navy-900: #001127;
  --navy-800: #002147; /* primary — straight from the logo */
  --navy-700: #06305f;
  --navy-600: #0b3f79;
  --navy-500: #14528f;

  --cream-50: #fdfaf5;
  --cream-100: #f9eedf; /* crest highlight */
  --cream-200: #f0e3d0;
  --stone-300: #bbb0a8; /* crest mid-tone */
  --stone-500: #7c7570;

  --gold-300: #f7ecd6;
  --gold-400: #e9d7ac;
  --gold-500: #dcc697;
  --gold-600: #8f7628;

  --burgundy-500: #9a2839;
  --burgundy-600: #7b1e2b;

  /* Semantic */
  --color-primary: var(--navy-800);
  --color-on-primary: var(--cream-50);
  --color-accent: var(--gold-500);
  --color-on-accent: var(--navy-900);
  --color-bg: var(--cream-50);
  --color-fg: #10161f;
  --color-muted-fg: #5a6472;
  --color-card: #ffffff;
  --color-border: #e6ddd0;
  --color-success: #1f7a4d;
  --color-danger: #b3261e;

  /* Spacing scale (density 4/10 — standard marketing rhythm) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Radii & elevation */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 33, 71, 0.06), 0 2px 8px rgba(0, 33, 71, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 33, 71, 0.08), 0 12px 32px rgba(0, 33, 71, 0.07);
  --shadow-lg: 0 12px 28px rgba(0, 33, 71, 0.12), 0 32px 64px rgba(0, 33, 71, 0.12);
  --shadow-gold: 0 8px 24px rgba(201, 162, 39, 0.32);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-base: 260ms;
  --dur-slow: 480ms;

  --header-h: 76px;
  --container: 1200px;
  /* Header only. Nine long Ukrainian nav labels plus brand, language switch
     and CTA need ~1720px to coexist; below that fitHeader() sheds items. */
  --container-mid: 1440px;
  --container-wide: 1800px;
}

/* ------------------------------------------------------- 2. BASE & TYPE */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Anchor targets must clear the sticky header */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

/* Grotesque headings: weight and tight tracking do the work a display serif
   used to do. */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4);
  color: var(--navy-900);
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
}

/* Visible focus for keyboard users — never removed, only refined. */
:focus-visible {
  outline: 3px solid var(--gold-600);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  background: var(--navy-800);
  color: var(--cream-50);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus {
  top: 16px;
}

/* --------------------------------------------------- 3. LAYOUT HELPERS */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
/* Card grids get more room than running text does. */
.container--mid { max-width: var(--container-mid); }

.section {
  position: relative;
  padding-block: clamp(4rem, 8vw, 7.5rem);
}

/* Flat stock, no colour blooms: sections read as different papers. */
.section--tint {
  background: var(--cream-50);
  border-block: 1px solid var(--color-border);
}

.section--navy {
  background: var(--navy-900);
  color: var(--cream-100);
}
.section--navy h2,
.section--navy h3,
.section--navy h4 { color: var(--cream-50); }

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
/* Editorial variant: title on the left, standfirst on the right, with a rule
   under the pair. Used where the section below is a wide grid. */
.section-head--split {
  max-width: none;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.section-head--split h2 { margin-bottom: 0; }
.section--navy .section-head--split { border-bottom-color: rgba(249, 238, 223, 0.18); }

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: clamp(2rem, 5vw, 4rem);
  }
  .section-head--split p { padding-bottom: 6px; }
}
.section-head p {
  color: var(--color-muted-fg);
  font-size: 1.075rem;
}
.section--navy .section-head p { color: rgba(249, 238, 223, 0.76); }

/* A rule on both sides of the label, not just the left. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: var(--space-4);
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 44px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}
.section--navy .eyebrow { color: var(--gold-400); }

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ----------------------------------------------- 4. MOTION PRIMITIVES */
/* Elements start hidden only when JS is available to reveal them again. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Global reduced-motion contract: nothing moves, everything is readable. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ------------------------------------------------------- 5. COMPONENTS */
.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: var(--cream-50);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px; /* ≥44px touch target */
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: 0.005em;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
/* No lift, no glow, no sheen sweep: the colour change carries the state. */
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; flex: none; }

.btn--gold {
  --btn-bg: var(--gold-500);
  --btn-fg: var(--navy-900);
  border-color: var(--gold-500);
}
.btn--gold:hover { --btn-bg: var(--gold-400); border-color: var(--gold-400); }

.btn--navy {
  --btn-bg: var(--navy-800);
  --btn-fg: var(--cream-50);
  border-color: var(--navy-800);
}
.btn--navy:hover { --btn-bg: var(--navy-700); border-color: var(--navy-700); }
.btn--navy .icon { transition: transform var(--dur-base) var(--ease-out); }
.btn--navy:hover .icon { transform: translateX(3px); }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--navy-800);
  border-color: rgba(0, 33, 71, 0.3);
}
.btn--outline:hover { --btn-bg: rgba(0, 33, 71, 0.06); border-color: rgba(0, 33, 71, 0.5); }

/* Milky outline: stands out on a white card without shouting like a fill. */
.btn--outline-gold {
  --btn-bg: transparent;
  --btn-fg: var(--navy-800);
  border-width: 1.5px;
  border-color: var(--gold-500);
}
.btn--outline-gold .icon { color: var(--gold-600); }
.btn--outline-gold:hover { --btn-bg: rgba(220, 198, 151, 0.22); border-color: var(--gold-600); }

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--cream-50);
  border-color: rgba(249, 238, 223, 0.4);
}
.btn--ghost-light:hover { --btn-bg: rgba(249, 238, 223, 0.1); border-color: rgba(249, 238, 223, 0.7); }

.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* Cards ------------------------------------------------------------------ */
/* Paper, not glass: a hairline border and a flat face. Cards do not lift. */
.card {
  position: relative;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  transition: border-color var(--dur-base) var(--ease-out);
}
.card:hover { border-color: rgba(0, 33, 71, 0.28); }

.card--glass {
  background: rgba(249, 238, 223, 0.05);
  border: 1px solid rgba(249, 238, 223, 0.18);
}
.card--glass:hover { border-color: rgba(201, 162, 39, 0.5); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 33, 71, 0.07);
  color: var(--navy-700);
}
.badge--gold { background: rgba(201, 162, 39, 0.16); color: var(--gold-600); }
.badge--burgundy { background: rgba(123, 30, 43, 0.12); color: var(--burgundy-600); }
.badge--light { background: rgba(249, 238, 223, 0.14); color: var(--cream-100); }

.icon-tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(0, 33, 71, 0.16);
  background: rgba(0, 33, 71, 0.05);
  color: var(--navy-800);
  flex: none;
}
.icon-tile .icon { width: 22px; height: 22px; stroke-width: 1.6; }
.icon-tile--gold {
  border-color: rgba(201, 162, 39, 0.5);
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-600);
}
.section--navy .icon-tile {
  border-color: rgba(249, 238, 223, 0.22);
  background: rgba(249, 238, 223, 0.07);
  color: var(--gold-300);
}

/* Form controls ---------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
}
.section--navy .field label { color: var(--cream-100); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--color-fg);
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18);
}
.field .hint { font-size: 0.8rem; color: var(--color-muted-fg); }
.section--navy .field .hint { color: rgba(249, 238, 223, 0.6); }

.field .error {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-danger);
  display: none;
}
.field.has-error input { border-color: var(--color-danger); }
.field.has-error .error { display: block; }
.section--navy .field.has-error .error { color: #ffb4ad; }

/* --------------------------------------------------------- 6. SECTIONS */

/* 6.1 Preloader ---------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--navy-800);
  transition: opacity 500ms var(--ease-out), visibility 500ms;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(249, 238, 223, 0.22);
  border-top-color: var(--gold-400);
  animation: spin 900ms linear infinite;
}

/* 6.2 Header ------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(0, 33, 71, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(249, 238, 223, 0.1);
  transition: background-color var(--dur-base) var(--ease-out), height var(--dur-base) var(--ease-out);
}
.header.is-scrolled {
  background: rgba(0, 17, 39, 0.94);
  box-shadow: 0 8px 30px rgba(0, 8, 20, 0.3);
}

/* The header needs more room than the content container: nine nav links. */
.header .container {
  max-width: var(--container-wide);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  width: 100%;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream-50);
  letter-spacing: 0.01em;
}
.brand__tag {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-inline: auto;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden; /* fitHeader() sheds header items until nothing is clipped */
}
.nav a { flex: none; }
.nav a {
  position: relative;
  padding: 8px clamp(6px, 0.7vw, 11px);
  font-size: clamp(0.8rem, 0.7rem + 0.22vw, 0.875rem);
  font-weight: 600;
  color: rgba(249, 238, 223, 0.88);
  border-radius: 8px;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: clamp(6px, 0.7vw, 11px);
  right: clamp(6px, 0.7vw, 11px);
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav a:hover,
.nav a.is-active { color: var(--cream-50); }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* Progressive shedding driven by main.js → fitHeader(): the header measures
   the nav and gives up the least valuable thing first, in four steps —
   tighter gaps → CTA button → tighter nav typography → brand wordmark. */
.header.is-cozy .header__inner { gap: 0.6rem; }
.header.is-cozy .brand { gap: 8px; }

.header.is-tight .header__actions .btn { display: none; }

.header.is-snug .nav a { padding: 8px 6px; font-size: 0.76rem; letter-spacing: -0.005em; }
.header.is-snug .nav a::after { left: 6px; right: 6px; }

.header.is-tighter .brand__text { display: none; }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(249, 238, 223, 0.2);
}
.lang-switch button {
  min-width: 42px;
  min-height: 34px;
  padding: 4px 10px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: rgba(249, 238, 223, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.lang-switch button[aria-pressed="true"] {
  background: var(--gold-500);
  color: var(--navy-900);
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(249, 238, 223, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream-50);
}

/* Scroll progress rail under the header */
.scroll-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--gold-500);
  z-index: 99;
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 1fr min(360px, 88vw);
  visibility: hidden;
  pointer-events: none;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim {
  background: rgba(0, 8, 20, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  border: 0;
  cursor: pointer;
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  background: var(--navy-900);
  padding: 22px 22px 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  border-left: 1px solid rgba(201, 162, 39, 0.28);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.drawer__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(249, 238, 223, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream-50);
}
.drawer nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 24px; }
.drawer nav a {
  padding: 13px 14px;
  border-radius: 12px;
  color: rgba(249, 238, 223, 0.88);
  font-weight: 500;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.drawer nav a:hover { background: rgba(255, 255, 255, 0.08); }

/* 6.3 Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(86svh, 760px);
  display: flex;
  align-items: center;
  padding-block: calc(var(--header-h) + 3rem) clamp(3rem, 7vw, 6rem);
  overflow: hidden;
  /* Deep, flat Oxford Blue. A photograph at assets/hero.jpg sits on top of it
     at low opacity; without the file the flat colour stands on its own. */
  background: var(--navy-950);
  color: var(--cream-100);
  isolation: isolate;
}

/* Optional real photograph. Drop a file at assets/hero.jpg and it fades in;
   if the file is absent the CSS art below stands on its own (see main.js). */
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: -3;
  transition: opacity 900ms var(--ease-out);
}
.hero__photo.is-loaded { opacity: 0.28; }

/* Fine diagonal hatching instead of graph paper: it reads as engraved stock
   rather than a wireframe. */
.hero__grid {
  position: absolute;
  inset: -10%;
  z-index: -2;
  background-image: repeating-linear-gradient(
    122deg,
    rgba(249, 238, 223, 0.055) 0px,
    rgba(249, 238, 223, 0.055) 1px,
    transparent 1px,
    transparent 13px
  );
  mask-image: radial-gradient(ellipse 85% 75% at 62% 45%, #000 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 62% 45%, #000 15%, transparent 78%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  width: 100%;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.hero__rule { width: 44px; height: 1px; background: var(--gold-500); flex: none; opacity: 0.75; }

.hero h1 { margin-bottom: var(--space-6); color: var(--cream-50); }
.hero h1 .accent { color: var(--gold-400); }
.hero__sub {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  line-height: 1.62;
  color: rgba(249, 238, 223, 0.82);
  max-width: 54ch;
  margin-bottom: var(--space-8);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: var(--space-8); }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(249, 238, 223, 0.18);
}
.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--cream-50);
  line-height: 1;
}
.hero__stat span { font-size: 0.82rem; color: rgba(249, 238, 223, 0.66); }

/* --- Seal: the crest with the school's name set around it --------------- */
.hero__seal { margin: 0; display: grid; justify-items: center; gap: 20px; }
.hero__seal figcaption {
  max-width: 26ch;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(249, 238, 223, 0.62);
}

.seal {
  position: relative;
  width: min(70vw, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.seal:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 8px; }

.seal__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: seal-spin 64s linear infinite;
}
.seal__ring text {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.26em;
  fill: var(--gold-400);
  text-transform: uppercase;
}

/* A ring that breathes outwards while the crest is hovered or focused. */
.seal::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.55);
  opacity: 0;
  pointer-events: none;
}
.seal:hover::after,
.seal:focus-visible::after { animation: seal-pulse 1.9s var(--ease-out) infinite; }

.seal__plate {
  position: relative;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  /* Solid Oxford Blue, same plate the header sits on: a translucent disc let
     the crest sink into the background. */
  background: var(--navy-800);
  border: 1px solid rgba(249, 238, 223, 0.14);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform var(--dur-slow) var(--ease-spring), border-color var(--dur-base) var(--ease-out);
}
.seal:hover .seal__plate,
.seal:focus-visible .seal__plate { transform: scale(1.07); border-color: rgba(201, 162, 39, 0.65); }
.seal__plate img { width: 82%; height: auto; }

@keyframes seal-spin { to { transform: rotate(360deg); } }
@keyframes seal-pulse {
  0% { transform: scale(0.92); opacity: 0.75; }
  100% { transform: scale(1.28); opacity: 0; }
}

/* 6.3b Sub-page header (how.html, teachers.html) ------------------------- */
.pagehead {
  position: relative;
  background: var(--navy-950);
  color: var(--cream-100);
  padding-block: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)) clamp(2.5rem, 5vw, 4rem);
}
.pagehead h1 { color: var(--cream-50); max-width: 18ch; margin-bottom: var(--space-4); }
.pagehead__sub {
  max-width: 56ch;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.14rem);
  color: rgba(249, 238, 223, 0.76);
  margin: 0;
}
.pagehead__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-6); }

/* Closing call to action shared by both sub-pages. */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius-md);
  background: #fff;
}
.cta-band h2 { margin-bottom: 6px; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.cta-band p { margin: 0; color: var(--color-muted-fg); max-width: 52ch; }

/* 6.4 Course cards ------------------------------------------------------- */

/* Asymmetric grid: the six programmes alternate 7/5, 5/7, 6/6 on wide
   screens so the block reads as a spread rather than a table of boxes. */
.course-grid { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }

@media (min-width: 700px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .course-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .course-card:nth-child(1) { grid-column: span 7; }
  .course-card:nth-child(2) { grid-column: span 5; }
  .course-card:nth-child(3) { grid-column: span 5; }
  .course-card:nth-child(4) { grid-column: span 7; }
  .course-card:nth-child(5) { grid-column: span 6; }
  .course-card:nth-child(6) { grid-column: span 6; }
}

.course-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow: hidden;
  padding: clamp(1.4rem, 2.6vw, 2.1rem);
}

/* Running number, set large and quiet in the corner. */
.course-card__index {
  position: absolute;
  top: clamp(1.1rem, 2vw, 1.6rem);
  right: clamp(1.2rem, 2.4vw, 2rem);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(0, 33, 71, 0.07);
  pointer-events: none;
  transition: color var(--dur-base) var(--ease-out);
}
.course-card:hover .course-card__index { color: rgba(201, 162, 39, 0.3); }
.course-card:hover .icon-tile { border-color: var(--gold-500); background: rgba(220, 198, 151, 0.22); }
/* A rule across the top of the card, drawn in on hover. Flat gold, no
   gradient sweep. */
.course-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.course-card:hover::before { transform: scaleX(1); }
/* Icon and badge both sit left; the running number owns the right corner. */
.course-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 3.5rem;
  flex-wrap: wrap;
}
.course-card h3 { margin: 0; }
.course-card__desc { color: var(--color-muted-fg); font-size: 0.94rem; flex: 1; }
.course-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--color-border);
}
.course-card__price {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--navy-800);
  white-space: nowrap; /* "від 750 ₴" must never break across lines */
  line-height: 1.2;
}
.course-card__price small { font-size: 0.7rem; font-weight: 500; color: var(--color-muted-fg); display: block; }
/* Programmes quoted on request have no figure to set in the display face. */
.course-card__price--soft {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
  white-space: normal;
}

/* Card footer: price on one side, the two explicit actions on the other. */
.course-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--color-border);
}
.course-card__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.course-card__actions .btn { white-space: nowrap; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(0, 33, 71, 0.06);
  color: var(--navy-700);
}
/* Variants must follow the base rule to win the cascade. */
.tag--dark { background: rgba(249, 238, 223, 0.09); color: rgba(249, 238, 223, 0.86); }
.tag--level { background: var(--gold-500); color: var(--navy-900); font-weight: 700; }

/* 6.5 Roadmap ------------------------------------------------------------ */
.roadmap { position: relative; display: grid; gap: var(--space-8); }
.roadmap__rail {
  position: absolute;
  left: 27px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: rgba(0, 33, 71, 0.12);
  overflow: hidden;
}
.roadmap__rail span {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  background: var(--gold-500);
  transform: scaleY(0);
  transform-origin: top;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}
.step__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-400);
  background: var(--navy-800);
  border: 1.5px solid var(--navy-800);
  box-shadow: 0 0 0 6px var(--cream-50);
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.step.is-visible .step__dot {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}
/* The copy sits on a white card so the block reads as a document, not as
   text floating on a dark field. */
.step__body {
  max-width: 72ch;
  margin-bottom: var(--space-5);
  padding: clamp(1.35rem, 2.6vw, 1.9rem);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.step__body h3 { margin-bottom: 10px; color: var(--navy-900); font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem); }
.step__body p { color: var(--color-fg); margin: 0; font-size: 1.06rem; line-height: 1.6; }
.step__note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.step__note .icon { width: 15px; height: 15px; }

.step__list {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 60ch;
}
.step__list li {
  position: relative;
  padding-left: 24px;
  font-size: 1rem;
  color: var(--color-muted-fg);
}
.step__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 1px;
  background: var(--gold-500);
}

.step__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: var(--space-5);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-800);
  border-bottom: 1.5px solid var(--gold-500);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.step__link .icon { width: 16px; height: 16px; color: var(--gold-600); transition: transform var(--dur-base) var(--ease-out); }
.step__link:hover { color: var(--burgundy-600); border-color: var(--burgundy-600); }
.step__link:hover .icon { transform: translateX(3px); }

/* Step choreography. Driven purely by the `.is-visible` class so the reveal
   sweep in main.js is the single guarantee that nothing stays hidden. */
.js .step__dot {
  transform: scale(0.55);
  opacity: 0;
  transition: transform 520ms var(--ease-spring), opacity 320ms var(--ease-out);
}
.js .step.is-visible .step__dot { transform: none; opacity: 1; }

.js .step__body > * {
  opacity: 0;
  transform: translate3d(-14px, 0, 0);
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}
.js .step.is-visible .step__body > * { opacity: 1; transform: none; }
.js .step.is-visible .step__body > *:nth-child(1) { transition-delay: 90ms; }
.js .step.is-visible .step__body > *:nth-child(2) { transition-delay: 150ms; }
.js .step.is-visible .step__body > *:nth-child(3) { transition-delay: 210ms; }
.js .step.is-visible .step__body > *:nth-child(4) { transition-delay: 270ms; }
.js .step.is-visible .step__body > *:nth-child(5) { transition-delay: 330ms; }

.js .step__list li { opacity: 0; transform: translate3d(-8px, 0, 0); transition: inherit; }
.js .step.is-visible .step__list li { opacity: 1; transform: none; }
.js .step.is-visible .step__list li:nth-child(2) { transition-delay: 340ms; }
.js .step.is-visible .step__list li:nth-child(3) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .js .step__dot,
  .js .step__body > *,
  .js .step__list li { opacity: 1 !important; transform: none !important; }
}

/* 6.6 Why-us index ------------------------------------------------------- */
/* A ruled index rather than a row of cards: the numbers and the hairlines
   carry the structure, so nothing needs a box around it. */
.featlist { list-style: none; margin: 0; padding: 0; }

.featrow {
  display: grid;
  gap: 10px var(--space-6);
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-top: 1px solid var(--color-border);
  transition: background-color var(--dur-base) var(--ease-out);
}
/* The split section head already draws a rule above the first row. */
.featrow:first-child { border-top: 0; padding-top: 0; }
.featrow:last-child { border-bottom: 1px solid var(--color-border); }

.featrow__num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-muted-fg);
  padding-top: 6px;
  transition: color var(--dur-base) var(--ease-out);
}
.featrow:hover .featrow__num { color: var(--gold-600); }

.featrow__head { display: flex; align-items: center; gap: 12px; }
.featrow__icon { width: 22px; height: 22px; color: var(--gold-600); flex: none; stroke-width: 1.7; }
.featrow__head h3 { margin: 0; font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.55rem); }
.featrow__text { margin: 0; color: var(--color-muted-fg); font-size: 1.02rem; line-height: 1.6; max-width: 46ch; }
.featrow__extra { display: flex; align-items: center; }
.featrow__extra:empty { display: none; }

@media (min-width: 1000px) {
  .featrow {
    grid-template-columns: 56px minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(0, 0.8fr);
    align-items: start;
  }
  .featrow__extra { justify-content: flex-end; }
}

/* The CEFR run as one continuous bar: milky at A0, Oxford Blue at C2, with a
   burgundy band through the middle so the scale actually has colour. */
.cefr { display: flex; width: 100%; max-width: 280px; border-radius: 8px; overflow: hidden; }
.cefr span {
  flex: 1;
  text-align: center;
  padding: 9px 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy-800);
  transition: transform var(--dur-base) var(--ease-out);
}
.cefr span:nth-child(1) { background: rgba(220, 198, 151, 0.3); }
.cefr span:nth-child(2) { background: rgba(220, 198, 151, 0.55); }
.cefr span:nth-child(3) { background: var(--gold-500); }
.cefr span:nth-child(4) { background: #c9a06f; }
.cefr span:nth-child(5) { background: var(--burgundy-500); color: #fff; }
.cefr span:nth-child(6) { background: var(--navy-700); color: var(--cream-50); }
.cefr span:nth-child(7) { background: var(--navy-900); color: var(--gold-400); }

/* 6.7 Quiz --------------------------------------------------------------- */
.quiz {
  max-width: 780px;
  margin-inline: auto;
  border-radius: var(--radius-md);
  background: rgba(249, 238, 223, 0.05);
  border: 1px solid rgba(249, 238, 223, 0.2);
  overflow: hidden;
}
.quiz__bar {
  height: 5px;
  background: rgba(249, 238, 223, 0.14);
}
.quiz__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold-500);
  transition: width var(--dur-slow) var(--ease-out);
}
.quiz__body { padding: clamp(1.5rem, 4vw, 2.75rem); }
.quiz__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-6);
  font-size: 0.82rem;
  color: rgba(249, 238, 223, 0.66);
  letter-spacing: 0.04em;
}
.quiz__question {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem);
  color: var(--cream-50);
  margin-bottom: var(--space-6);
  min-height: 2.4em;
}
.quiz__options { display: grid; gap: 10px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  text-align: left;
  color: var(--cream-100);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(249, 238, 223, 0.16);
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.quiz-option:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(201, 162, 39, 0.6);
  transform: translateX(4px);
}
.quiz-option__key {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: rgba(249, 238, 223, 0.12);
  font-size: 0.82rem;
  font-weight: 700;
}
.quiz-option.is-picked {
  border-color: var(--gold-400);
  background: rgba(201, 162, 39, 0.2);
  animation: pop-in 260ms var(--ease-spring);
}
.quiz-option.is-picked .quiz-option__key { background: var(--gold-500); color: var(--navy-900); }
.quiz-option:disabled { cursor: default; }

.quiz__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: var(--space-6); }

.quiz__result { text-align: center; animation: pop-in 420ms var(--ease-spring); }
.quiz__level {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 3vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold-400);
  margin-bottom: 6px;
}
.quiz__scorebar {
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(249, 238, 223, 0.14);
  overflow: hidden;
  margin: var(--space-6) 0 var(--space-2);
}
.quiz__scorebar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--gold-500);
  transition: width 900ms var(--ease-out);
}
.quiz__scale { display: flex; justify-content: space-between; font-size: 0.72rem; color: rgba(249, 238, 223, 0.55); }
.quiz__result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: var(--space-8); }

/* 6.8 Teachers & certificates ------------------------------------------- */
/* --- Teacher profiles (teachers.html) --- */
.teachers {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .teachers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.teacher {
  position: relative;
  padding-top: var(--space-6);
  border-top: 2px solid var(--navy-800);
}
/* Initials as a quiet watermark instead of a filled avatar tile. */
.teacher__mark {
  position: absolute;
  top: calc(var(--space-6) - 0.15em);
  right: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(0, 33, 71, 0.16);
  pointer-events: none;
  user-select: none;
}
.teacher__role {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.teacher__name {
  margin: 0 0 var(--space-4);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  letter-spacing: -0.035em;
  padding-right: 3.5rem;
}
.teacher__bio {
  margin: 0 0 var(--space-6);
  font-size: 1.05rem;
  line-height: 1.62;
  color: var(--color-fg);
  max-width: 46ch;
}

.teacher__label {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
}
.teacher__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-6); }
.teacher__chips span {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gold-500);
  background: rgba(220, 198, 151, 0.18);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
}

.teacher__facts { margin: 0; display: grid; gap: 0; }
.teacher__facts > div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}
.teacher__facts dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
  padding-top: 2px;
}
.teacher__facts dd { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--navy-800); }

.teacher-card { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.teacher-card__avatar {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold-300);
  background: var(--navy-800);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--shadow-md);
  overflow: hidden;
  flex: none;
}
.teacher-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.teacher-card h3 { margin-bottom: 2px; }
.teacher-card__role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 12px;
}
.teacher-card__bio { font-size: 0.96rem; color: rgba(249, 238, 223, 0.82); margin-bottom: 18px; }

/* What they run and which levels, as two labelled rows. */
.teacher-card__meta {
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
  padding-block: 14px;
  border-block: 1px solid rgba(249, 238, 223, 0.14);
}
.teacher-card__meta > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.teacher-card__meta dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.teacher-card__meta dd { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--cream-50); }

/* Carousel */
.carousel { position: relative; }
.carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: grab;
  /* Soften the right-hand cut so the clipped slide reads as "more ahead". */
  mask-image: linear-gradient(90deg, #000 0 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0 92%, transparent 100%);
}
.carousel__viewport:active { cursor: grabbing; }
.carousel__track {
  display: flex;
  gap: var(--space-6);
  transition: transform var(--dur-slow) var(--ease-out);
  will-change: transform;
}
.carousel__slide {
  flex: 0 0 auto;
  width: clamp(230px, 26vw, 300px);
}
.cert-thumb {
  position: relative;
  width: 100%;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  transition: border-color var(--dur-base) var(--ease-out);
  display: block;
}
.section--navy .cert-thumb { border-color: rgba(249, 238, 223, 0.18); }
.cert-thumb img {
  width: 100%;
  aspect-ratio: 546 / 750;
  object-fit: cover;
  object-position: top center;
}
.cert-thumb:hover { border-color: var(--gold-500); }
.cert-thumb__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 14px 12px;
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(0, 17, 39, 0.92));
  color: var(--cream-50);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}
.cert-thumb__cap small { display: block; font-weight: 400; opacity: 0.75; font-size: 0.72rem; }
.cert-thumb__zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 17, 39, 0.62);
  color: var(--cream-50);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.cert-thumb:hover .cert-thumb__zoom,
.cert-thumb:focus-visible .cert-thumb__zoom { opacity: 1; }

.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: var(--space-6); }
.carousel__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--navy-800);
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.section--navy .carousel__btn,
.lightbox .carousel__btn {
  border-color: rgba(249, 238, 223, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream-50);
}
.carousel__btn:hover { background: var(--gold-500); color: var(--navy-900); transform: scale(1.06); }
.carousel__dots { display: flex; gap: 7px; }
.carousel__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 33, 71, 0.22);
  transition: background-color var(--dur-fast) var(--ease-out), width var(--dur-base) var(--ease-out);
}
.section--navy .carousel__dot { background: rgba(249, 238, 223, 0.3); }
.carousel__dot.is-active { background: var(--gold-600); width: 24px; border-radius: var(--radius-full); }
.section--navy .carousel__dot.is-active { background: var(--gold-400); }

/* 6.9 Booking ------------------------------------------------------------ */
/* Programme list on the left, the picker for that programme on the right.
   The picker markup is swapped per programme mode by booking.js. */
.booking {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: start;
}
.booking__main { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); min-width: 0; }

.booking__legend { margin: 0 0 var(--space-4); }

.booking__pick,
.booking__contacts {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}
.booking__contacts { display: grid; gap: var(--space-4); }
.booking__contacts form { display: grid; gap: 16px; }

/* Calendar and its side column, split by a hairline rule. */
.booking__panes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.booking__side {
  min-width: 0;
  padding-left: clamp(1.25rem, 3vw, 2rem);
  border-left: 1px solid var(--color-border);
}

/* --- Programme list (stacked link-list) --- */
.proglist { display: grid; gap: 8px; }
.proglist__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  color: var(--navy-800);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.proglist__item:hover { border-color: rgba(201, 162, 39, 0.7); }
.proglist__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 33, 71, 0.06);
  color: var(--navy-800);
}
.proglist__mark .icon { width: 19px; height: 19px; }
.proglist__text { display: grid; gap: 2px; min-width: 0; }
.proglist__name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
}
.proglist__note {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--color-muted-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proglist__chevron { width: 16px; height: 16px; color: var(--color-muted-fg); }

.proglist__item.is-active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--cream-50);
}
.proglist__item.is-active .proglist__mark { background: rgba(249, 238, 223, 0.14); color: var(--gold-300); }
.proglist__item.is-active .proglist__note { color: rgba(249, 238, 223, 0.66); }
.proglist__item.is-active .proglist__chevron { color: var(--gold-400); }

/* Quiet helper card under the programme list. */
.booking__help {
  margin-top: var(--space-5);
  padding: 18px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
}
.booking__help h3 { margin: 0; font-size: 1.02rem; }
.booking__help p { margin: 0; font-size: 0.86rem; color: var(--color-muted-fg); }

/* --- Shared picker furniture --- */
.pick-block {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}
.pick-block__label {
  margin: 0 0 12px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
}
.pick-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.88rem;
  color: var(--navy-800);
}
.pick-note .icon { width: 16px; height: 16px; color: var(--gold-600); flex: none; }

/* --- Session chips --- */
.chips { display: grid; gap: 8px; }
.chip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--navy-800);
  font-size: 0.9rem;
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: rgba(201, 162, 39, 0.7); }
.chip__date { font-weight: 600; }
.chip__time { font-variant-numeric: tabular-nums; color: var(--color-muted-fg); }
.chip.is-on { background: var(--navy-800); border-color: var(--navy-800); color: var(--cream-50); }
.chip.is-on .chip__time { color: var(--gold-300); }

/* --- Segmented control (level streams) --- */
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}
.segmented__item {
  padding: 10px 20px;
  min-height: 44px;
  background: #fff;
  color: var(--navy-800);
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.segmented__item + .segmented__item { border-left: 1px solid var(--color-border); }
.segmented__item.is-on { background: var(--navy-800); color: var(--gold-300); }

/* --- Option list (groups, contact preference) --- */
.optlist { display: grid; gap: 8px; }
.optlist--inline { grid-auto-flow: row; }
.optlist__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--navy-800);
  text-align: left;
  font-size: 0.9rem;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.optlist__item:hover { border-color: rgba(201, 162, 39, 0.7); }
.optlist__item .icon { width: 17px; height: 17px; color: var(--color-muted-fg); flex: none; }
.optlist__tick {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.optlist__text { display: grid; gap: 2px; min-width: 0; }
.optlist__text strong { font-weight: 600; }
.optlist__text small { font-size: 0.79rem; color: var(--color-muted-fg); }
.optlist__item.is-on { border-color: var(--navy-800); background: rgba(0, 33, 71, 0.04); }
.optlist__item.is-on .optlist__tick {
  border-color: var(--navy-800);
  box-shadow: inset 0 0 0 3.5px #fff, inset 0 0 0 16px var(--navy-800);
}
.optlist__item.is-on .icon { color: var(--navy-800); }

.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-4);
}
/* No text-transform here: Intl already returns "серпень 2026 р." and
   capitalize would also upper-case the "р." abbreviation. JS capitalises
   only the first letter. */
.calendar__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--navy-900); }
.calendar__nav {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--navy-800);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.calendar__nav:hover:not(:disabled) { background: rgba(0, 33, 71, 0.06); }
.calendar__nav:disabled { opacity: 0.35; cursor: not-allowed; }

/* min-width:0 lets the seven columns actually compress; without it the grid
   keeps its intrinsic width and pushes the whole page sideways. */
.calendar { min-width: 0; }
.calendar__weekdays,
.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.calendar__weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
  padding-bottom: 6px;
}
.day {
  position: relative;
  aspect-ratio: 1;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: rgba(0, 33, 71, 0.04);
  color: var(--navy-800);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.day:hover:not(:disabled) { background: rgba(0, 33, 71, 0.1); transform: scale(1.05); }
.day:disabled { color: #c2c8d0; background: transparent; cursor: not-allowed; }
.day.is-empty { background: transparent; border: 0; pointer-events: none; }
.day.is-today { border-color: rgba(0, 33, 71, 0.35); }
.day.is-selected {
  background: var(--navy-800);
  color: var(--cream-50);
  border-color: var(--navy-800);
}
.day.has-slots::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-500);
}
.day.is-selected.has-slots::after { background: var(--gold-300); }

.calendar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--color-muted-fg);
}
.calendar__legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar__legend .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }
.calendar__legend .box { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid rgba(0, 33, 71, 0.35); }

/* Two fields side by side; collapses on narrow screens. */
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field--fieldset { border: 0; padding: 0; margin: 0; }
.field--fieldset legend {
  padding: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy-800);
}
.hint--center { text-align: center; font-size: 0.78rem; color: var(--color-muted-fg); }

@media (max-width: 980px) {
  .booking { grid-template-columns: minmax(0, 1fr); }
  .booking__panes { grid-template-columns: minmax(0, 1fr); }
  .booking__side { padding-left: 0; border-left: 0; padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
}

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot {
  min-height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border);
  background: #fff;
  color: var(--navy-800);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--dur-fast) var(--ease-out);
}
.slot:hover { border-color: var(--gold-500); transform: translateY(-2px); }
.slot[aria-pressed="true"] { background: var(--navy-800); color: var(--gold-300); border-color: var(--navy-800); }

.empty-note {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
  color: var(--color-muted-fg);
  font-size: 0.9rem;
  text-align: center;
}

.summary {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(0, 33, 71, 0.05);
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.summary__row { display: flex; justify-content: space-between; gap: 12px; }
.summary__row span:first-child { color: var(--color-muted-fg); }
.summary__row strong { color: var(--navy-800); text-align: right; }

/* 6.10 FAQ --------------------------------------------------------------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.faq-item.is-open { border-color: rgba(201, 162, 39, 0.55); box-shadow: var(--shadow-md); }
.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  padding: 18px 20px;
  background: none;
  border: 0;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy-900);
}
.faq-item__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: rgba(0, 33, 71, 0.06);
  color: var(--navy-800);
  transition: transform var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.faq-item.is-open .faq-item__icon { transform: rotate(45deg); background: var(--gold-500); color: var(--navy-900); }
.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-out);
}
.faq-item.is-open .faq-item__a { grid-template-rows: 1fr; }
.faq-item__a > div { overflow: hidden; }
.faq-item__a p {
  padding: 0 20px 20px;
  margin: 0;
  color: var(--color-muted-fg);
  font-size: 0.95rem;
}

/* 6.11 Footer ------------------------------------------------------------ */
.footer {
  background: var(--navy-950);
  color: rgba(249, 238, 223, 0.76);
  padding-block: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid rgba(201, 162, 39, 0.24);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: var(--space-12);
}
.footer h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--space-4);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a { transition: color var(--dur-fast) var(--ease-out); font-size: 0.92rem; }
.footer a:hover { color: var(--gold-300); }
.footer__desc { font-size: 0.92rem; max-width: 42ch; margin: var(--space-4) 0; }

.footer__hours { display: grid; gap: 7px; font-size: 0.9rem; }
.footer__hours div { display: flex; justify-content: space-between; gap: 14px; }
.footer__hours span:last-child { color: var(--cream-100); }

.contact-line { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; margin-bottom: 12px; }
.contact-line .icon { width: 17px; height: 17px; color: var(--gold-400); flex: none; margin-top: 3px; }

.social-row { display: flex; gap: 10px; margin-top: var(--space-4); }
.social-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(249, 238, 223, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream-100);
  transition: transform var(--dur-base) var(--ease-spring), background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.social-btn:hover { transform: translateY(-3px) rotate(-4deg); background: var(--gold-500); color: var(--navy-900); }
.social-btn .icon { width: 20px; height: 20px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: var(--space-6);
  border-top: 1px solid rgba(249, 238, 223, 0.12);
  font-size: 0.84rem;
  color: rgba(249, 238, 223, 0.56);
}

/* 6.12 Floating action --------------------------------------------------- */
.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-spring);
}
.fab.is-shown { opacity: 1; transform: none; pointer-events: auto; }

/* --------------------------------------------------------- 7. OVERLAYS */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base);
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 8, 20, 0.74);
  backdrop-filter: blur(6px);
  border: 0;
  cursor: pointer;
}
.modal__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow-y: auto;
  background: var(--cream-50);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(0.97);
  transition: transform var(--dur-slow) var(--ease-spring);
}
.modal.is-open .modal__panel { transform: none; }
.modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) 1rem;
  background: linear-gradient(180deg, var(--cream-50) 72%, transparent);
}
/* The badge sits inside an <h3>, so it would inherit the display serif. */
.modal__head .badge { font-family: var(--font-sans); }

.modal__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--navy-800);
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.modal__close:hover { background: var(--burgundy-600); color: #fff; transform: rotate(90deg); }
.modal__body { padding: 0 clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem); }

.modal__section { margin-bottom: var(--space-6); }
.modal__section h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 10px;
}
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.check-list li { display: flex; gap: 10px; font-size: 0.94rem; color: var(--color-fg); }
.check-list .icon { width: 18px; height: 18px; color: var(--color-success); flex: none; margin-top: 3px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.info-tile {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--color-border);
}
.info-tile small { display: block; font-size: 0.74rem; color: var(--color-muted-fg); margin-bottom: 3px; }
.info-tile strong { font-size: 0.98rem; color: var(--navy-800); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(0, 8, 20, 0.94);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base);
}
.lightbox.is-open { visibility: visible; opacity: 1; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; color: var(--cream-100); }
.lightbox__stage { display: grid; place-items: center; padding: 0 clamp(0.5rem, 5vw, 4rem); overflow: auto; }
.lightbox__stage img {
  max-width: 100%;
  max-height: 74vh;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: pop-in 320ms var(--ease-out);
}
.lightbox__foot { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 18px; }

/* Toast */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--navy-900);
  color: var(--cream-50);
  border: 1px solid rgba(201, 162, 39, 0.4);
  box-shadow: var(--shadow-lg);
  animation: pop-in 360ms var(--ease-spring);
  pointer-events: auto;
}
.toast.is-leaving { opacity: 0; transform: translateY(12px); transition: all var(--dur-base) var(--ease-out); }
.toast__icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: rgba(201, 162, 39, 0.22); color: var(--gold-300); }
.toast strong { display: block; font-size: 0.96rem; }
.toast p { margin: 2px 0 0; font-size: 0.86rem; color: rgba(249, 238, 223, 0.76); }
.toast--error { border-color: rgba(179, 38, 30, 0.6); }
.toast--error .toast__icon { background: rgba(179, 38, 30, 0.24); color: #ffb4ad; }

/* ------------------------------------------------------- 8. RESPONSIVE */
@media (max-width: 1180px) {
  .header .brand__tag { display: none; }
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .burger { display: grid; }
  /* Without the nav, the brand must yield space so the burger stays on screen.
     Scoped to the header — the footer brand keeps its full wordmark. */
  .header .brand { min-width: 0; flex: 0 1 auto; }
  .header .brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header__inner { gap: 10px; }
  /* The hidden nav no longer pushes the actions across. */
  .header__actions { margin-left: auto; }
  .hero__inner { grid-template-columns: 1fr; }
  .booking { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --header-h: 66px; }
  .header__actions .btn { display: none; }
  .hero { min-height: auto; padding-block: calc(var(--header-h) + 2.5rem) 3rem; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__stats { gap: 1.25rem 2rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .card { padding: var(--space-6); }
  .carousel__slide { width: min(74vw, 280px); }
  /* Icon only on a phone: a labelled pill sat on top of card content. */
  .fab {
    right: 14px;
    bottom: 14px;
    width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 50%;
  }
  .fab span { display: none; }
  .fab .icon { width: 22px; height: 22px; }

  /* A wrapped label between two rules reads as a broken line, so the trailing
     rule steps aside on narrow screens. */
  .eyebrow::after,
  .hero__eyebrow .hero__rule:last-child { display: none; }
  .eyebrow,
  .hero__eyebrow { font-size: 0.78rem; letter-spacing: 0.14em; gap: 10px; }
  .eyebrow::before,
  .hero__rule { width: 28px; }

  /* Seal sits under the copy; keep it from eating a whole screen. */
  .hero__seal { margin-top: var(--space-6); }
  .seal { width: min(64vw, 240px); }
  .seal__ring text { font-size: 11px; letter-spacing: 0.2em; }

  .teacher__facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .featrow__text { max-width: none; }
  .cefr { max-width: none; }
  .course-card__index { font-size: 2.6rem; }
}

@media (max-width: 480px) {
  /* Logo mark alone in the header — the wordmark would crowd out the burger. */
  .header .brand__text { display: none; }
  .booking__pick,
  .booking__contacts { padding: var(--space-5); }

  /* A fixed 40px floor on a square cell sets a 40px floor on the column too,
     so seven of them plus gaps could not fit a 320px phone. Let the cell take
     its height from the column width instead. */
  .calendar__weekdays,
  .calendar__days { gap: 4px; }
  .day { min-height: 0; font-size: 0.82rem; border-radius: 9px; }
  .calendar__weekdays span { font-size: 0.62rem; letter-spacing: 0.03em; }
  .calendar__title { font-size: 1rem; }
  .calendar__nav { width: 36px; height: 36px; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}

/* Touch targets: anything tappable needs room for a thumb, not a cursor. */
@media (pointer: coarse), (max-width: 720px) {
  .lang-switch button { min-width: 46px; min-height: 44px; }
  .footer ul a,
  .footer .contact-line {
    display: flex;
    align-items: center;
    min-height: 40px;
  }
  .social-btn { min-width: 44px; min-height: 44px; }
  .carousel__dot { min-width: 16px; min-height: 16px; }
}

@media (max-width: 420px) {
  .quiz__nav { flex-direction: column-reverse; }
  .quiz__nav .btn { width: 100%; }

  /* Below this width a nowrap label is wider than the column it sits in, so
     the button stops shrinking and pushes the page sideways. Let it wrap. */
  .btn { white-space: normal; padding-inline: 18px; }
  .course-card__actions .btn { white-space: normal; }
  .proglist__note { white-space: normal; }
}

/* Print: keep the page usable on paper (schedules, prices). */
@media print {
  .header, .drawer, .fab, .scroll-progress, .preloader, .carousel__controls, .scroll-cue { display: none !important; }
  body { background: #fff; color: #000; }
  .section--navy, .hero { background: #fff !important; color: #000 !important; }
}
