/* ============================================================
   Spartan Tuition — Design System
   Palette grounded in the live site's existing maroon accent (#A31223),
   extended into a full editorial system: deep maroon (Spartan identity)
   + warm bronze/gold + warm ink/paper neutrals.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---- Color: Maroon (primary / brand) ---- */
  --maroon-900: #4A0A13;
  --maroon-800: #5E0B15;
  --maroon-700: #7F0E1C;
  --maroon-600: #A31223; /* primary */
  --maroon-500: #C41B2E;
  --maroon-100: #F7E2E3;
  --maroon-050: #FCEEEE;

  /* ---- Color: Bronze / Gold (secondary accent) ---- */
  --gold-700: #8A6A2F;
  --gold-600: #A8823C;
  --gold-400: #C7A468;
  --gold-100: #F1E7D3;

  /* ---- Color: Ink (text neutrals, warm-black) ---- */
  --ink-900: #17110F;
  --ink-800: #221A16;
  --ink-700: #3A302A;
  --ink-500: #6B5F55;
  --ink-300: #9C8F84;

  /* ---- Color: Paper (background neutrals, warm-white) ---- */
  --paper-000: #FDFBF8;
  --paper-050: #FAF5EE;
  --paper-100: #F3EADB;
  --paper-200: #E9DCC5;
  --line: #E3D6C1;
  --line-dark: rgba(250, 245, 238, 0.14);
  --white: #FFFFFF;

  /* ---- Semantic tokens ---- */
  --color-bg: var(--paper-000);
  --color-surface: var(--white);
  --color-text: var(--ink-900);
  --color-text-muted: var(--ink-500);
  --color-primary: var(--maroon-600);
  --color-primary-hover: var(--maroon-700);
  --color-accent: var(--gold-600);
  --color-border: var(--line);
  --color-success: #2E6B45;
  --color-error: #B3261E;
  --color-focus-ring: var(--maroon-500);

  /* ---- Typography ---- */
  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --text-xs: clamp(0.78rem, 0.75rem + 0.15vw, 0.85rem);
  --text-sm: clamp(0.88rem, 0.85rem + 0.15vw, 0.95rem);
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --text-md: clamp(1.15rem, 1.1rem + 0.25vw, 1.3rem);
  --text-lg: clamp(1.35rem, 1.25rem + 0.5vw, 1.7rem);
  --text-xl: clamp(1.7rem, 1.5rem + 1vw, 2.3rem);
  --text-2xl: clamp(2.2rem, 1.85rem + 1.75vw, 3.4rem);
  --text-3xl: clamp(2.8rem, 2.2rem + 3vw, 4.6rem);

  /* ---- Spacing scale (8pt rhythm) ---- */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 6.5rem;
  --space-5xl: 9rem;

  /* ---- Layout ---- */
  --container-max: 1240px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* ---- Elevation ---- */
  --shadow-sm: 0 2px 8px rgba(23, 17, 15, 0.06);
  --shadow-md: 0 8px 30px rgba(23, 17, 15, 0.09);
  --shadow-lg: 0 20px 60px rgba(23, 17, 15, 0.14);
  --shadow-maroon: 0 12px 28px rgba(163, 18, 35, 0.24);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  --header-h: 84px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); font-weight: 700; }
h4 { font-size: var(--text-md); font-weight: 700; }

p { color: var(--color-text-muted); }
p + p { margin-top: 0.9em; }

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

::selection { background: var(--maroon-100); color: var(--maroon-900); }

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--space-4xl); }
.section--tight { padding-block: var(--space-3xl); }
.section--flush-top { padding-top: 0; }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-2xl);
}
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.grid { display: grid; gap: var(--space-xl); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.visually-hidden {
  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: fixed; top: -100px; left: var(--space-lg);
  z-index: 1000;
  background: var(--maroon-900); color: var(--white);
  padding: 0.8em 1.4em; border-radius: var(--radius-sm);
  font-weight: 600; transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--space-lg); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.9em;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  min-height: 48px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: var(--white);
  box-shadow: var(--shadow-maroon);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 16px 36px rgba(163, 18, 35, 0.32);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-inverse {
  background: var(--white);
  color: var(--maroon-700);
}
.btn-inverse:hover {
  background: var(--gold-100);
  transform: translateY(-2px);
}

.btn-sm { padding: 0.7em 1.4em; min-height: 40px; font-size: var(--text-xs); }
.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-primary);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform var(--dur-base) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(253, 251, 248, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--maroon-800);
}
.brand .crest { height: 40px; width: auto; flex-shrink: 0; object-fit: contain; }
.brand span { line-height: 1.05; }
.brand small { display: block; font-size: 0.6em; font-weight: 600; letter-spacing: 0.1em; color: var(--gold-600); text-transform: uppercase; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav-links a {
  position: relative;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink-700);
  padding: 0.4em 0;
  transition: color var(--dur-base) var(--ease-out);
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--maroon-700); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---- Nav dropdown ("What We Offer" → Group Classes / 1:1 Tuition) ---- */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink-700);
  padding: 0.4em 0;
  position: relative;
  transition: color var(--dur-base) var(--ease-out);
}
.nav-dropdown-trigger svg { width: 13px; height: 13px; transition: transform var(--dur-base) var(--ease-out); }
.nav-dropdown-trigger::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.is-open .nav-dropdown-trigger,
.nav-dropdown-trigger[aria-current="page"] { color: var(--maroon-700); }
.nav-dropdown:hover .nav-dropdown-trigger::after,
.nav-dropdown.is-open .nav-dropdown-trigger::after,
.nav-dropdown-trigger[aria-current="page"]::after { transform: scaleX(1); }
.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown.is-open .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 14px; /* invisible hover bridge — no dead zone between trigger and menu */
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base);
  z-index: 20;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.nav-dropdown-menu-inner {
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 0.7em 1em;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink-800);
  white-space: nowrap;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] { background: var(--maroon-050); color: var(--maroon-700); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; display: block; width: 22px; height: 2px;
  background: var(--maroon-800); border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--paper-000);
  z-index: 800;
  padding: var(--space-2xl) var(--container-pad);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow) var(--ease-out), visibility var(--dur-slow);
  overflow-y: auto;
}
.nav-mobile.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
.nav-mobile a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-lg);
  padding: 0.5em 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--ink-800);
}
.nav-mobile .btn { margin-top: var(--space-md); }

@media (max-width: 940px) {
  .nav-desktop .nav-links { display: none; }
  .nav-toggle { display: flex; }
}
@media (min-width: 941px) {
  .nav-mobile { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + var(--space-4xl));
  padding-bottom: var(--space-4xl);
  overflow: hidden;
  background: linear-gradient(180deg, var(--paper-050) 0%, var(--paper-000) 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(163,18,35,0.10) 0%, rgba(163,18,35,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -25%; left: -12%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(168,130,60,0.13) 0%, rgba(168,130,60,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-3xl);
  align-items: center;
}
.hero h1 { margin-bottom: var(--space-lg); }
.hero h1 em {
  font-style: normal;
  color: var(--maroon-600);
  position: relative;
}
.hero-lede { font-size: var(--text-md); max-width: 46ch; margin-bottom: var(--space-xl); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-bottom: var(--space-2xl); }

.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}
.hero-stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: var(--text-xl);
  color: var(--maroon-700);
  font-weight: 800;
}
.hero-stat > span { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: 16/10; order: -1; }
}

/* ============================================================
   Placeholder media blocks (used until real photography arrives)
   ============================================================ */
.media-placeholder {
  position: relative;
  width: 100%; height: 100%;
  background:
    linear-gradient(135deg, var(--maroon-700) 0%, var(--maroon-900) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper-100);
  overflow: hidden;
}
.media-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(250,245,238,0.06) 0 2px, transparent 2px 26px);
}
.media-placeholder .ph-icon { width: 30%; max-width: 84px; opacity: 0.85; position: relative; z-index: 1; }
.media-placeholder .ph-label {
  position: absolute; bottom: var(--space-md); left: var(--space-md); right: var(--space-md);
  font-family: var(--font-head); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(250,245,238,0.75);
  z-index: 1;
}
.media-placeholder.gold { background: linear-gradient(135deg, var(--gold-600) 0%, var(--gold-700) 100%); }
.media-placeholder.ink { background: linear-gradient(135deg, var(--ink-700) 0%, var(--ink-900) 100%); }
.media-placeholder.soft { background: linear-gradient(135deg, var(--paper-200) 0%, var(--paper-100) 100%); color: var(--maroon-600); }
.media-placeholder.soft .ph-label { color: var(--ink-500); }

/* ============================================================
   Photo carousel
   ============================================================ */
.media-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: var(--ink-800);
}
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms var(--ease-in-out);
  z-index: 0;
}
.carousel-slide.is-active { opacity: 1; z-index: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.media-carousel::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 90px;
  background: linear-gradient(180deg, transparent, rgba(15, 10, 8, 0.45));
  pointer-events: none;
  z-index: 1;
}

.carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; align-items: center; gap: 0.15em;
  z-index: 2;
  padding-bottom: var(--space-xs);
}
.carousel-dot {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
}
.carousel-dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  transition: width var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.carousel-dot.is-active::before { background: var(--white); width: 22px; }

.carousel-arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(23, 17, 15, 0.35);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  opacity: 0;
}
.media-carousel:hover .carousel-arrow,
.media-carousel:focus-within .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(23, 17, 15, 0.6); }
.carousel-arrow:focus-visible { opacity: 1; }
.carousel-arrow.prev { left: var(--space-sm); }
.carousel-arrow.next { right: var(--space-sm); }
.carousel-arrow svg { width: 20px; height: 20px; }

@media (max-width: 640px) {
  /* No hover on touch — keep arrows visible so they're discoverable */
  .carousel-arrow { opacity: 1; }
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out), border-color var(--dur-slow) var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(163,18,35,0.18); }

.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--maroon-100);
  color: var(--maroon-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-lg);
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 { margin-bottom: var(--space-sm); }
.check-points { display: flex; flex-direction: column; gap: 0.5em; }
.check-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.55em;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.check-points li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 0.2em; color: var(--maroon-600); }

.benefits-grid { gap: var(--space-md); }
.benefits-grid .card { padding: var(--space-lg) var(--space-md); }
.benefits-grid .card h3 { font-size: var(--text-md); white-space: nowrap; }
@media (max-width: 900px) {
  .benefits-grid .card h3 { white-space: normal; }
}

/* ---- Exam component breakdown (Selective Exams page) ---- */
.exam-breakdown {
  display: flex;
  flex-direction: column;
  margin: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}
.exam-breakdown-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3em var(--space-md);
  padding-block: 0.7em;
  border-bottom: 1px solid var(--color-border);
}
.exam-breakdown-row .name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--ink-900);
}
.exam-breakdown-row .meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.exam-stats {
  gap: var(--space-xl);
  row-gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   Feature squares (bold paired-statement cards)
   ============================================================ */
.feature-square {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
.feature-square:hover { transform: translateY(-6px); }
.feature-square.is-maroon {
  background: linear-gradient(160deg, var(--maroon-700) 0%, var(--maroon-900) 100%);
  color: var(--paper-050);
  box-shadow: var(--shadow-maroon);
}
.feature-square.is-paper {
  background: var(--white);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}
.feature-square:hover.is-paper { box-shadow: var(--shadow-md); }
.feature-index {
  /* In normal flow (not absolute) with margin-bottom:auto — pushes the
     heading/body to the bottom on tall squares, but safely collapses to a
     normal gap instead of overlapping when the card is short on space. */
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--gold-400);
  line-height: 1;
  margin-bottom: auto;
  padding-bottom: var(--space-lg);
}
.feature-square.is-paper .feature-index { color: var(--maroon-600); }
.feature-square h3 {
  font-size: var(--text-xl);
  color: inherit;
  margin-bottom: var(--space-sm);
}
.feature-square p {
  color: inherit;
  opacity: 0.86;
  font-size: var(--text-md);
  max-width: 46ch;
}
@media (max-width: 780px) {
  .feature-square { aspect-ratio: auto; min-height: 320px; }
}

/* ============================================================
   Offer split (Group vs 1:1)
   ============================================================ */
.offer-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}
.offer-card {
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.offer-card.is-maroon {
  background: linear-gradient(160deg, var(--maroon-700) 0%, var(--maroon-900) 100%);
  color: var(--paper-050);
}
.offer-card.is-paper {
  background: var(--white);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}
.offer-card .eyebrow { color: var(--gold-400); }
.offer-card.is-paper .eyebrow { color: var(--maroon-600); }
.offer-card h3 { font-size: var(--text-xl); color: inherit; margin-bottom: var(--space-sm); }
.offer-card p { color: inherit; opacity: 0.86; }
.offer-card .price {
  font-family: var(--font-head);
  font-size: var(--text-2xl);
  font-weight: 800;
  margin: var(--space-lg) 0;
}
.offer-card .price span { font-size: var(--text-sm); font-weight: 600; opacity: 0.7; }
.offer-card ul { display: flex; flex-direction: column; gap: 0.65em; margin-bottom: var(--space-xl); }
.offer-card li { display: flex; align-items: flex-start; gap: 0.6em; font-size: var(--text-sm); }
.offer-card li svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.15em; color: var(--gold-400); }
.offer-card.is-paper li svg { color: var(--maroon-600); }
.offer-card .btn { margin-top: auto; align-self: flex-start; }

@media (max-width: 780px) { .offer-split { grid-template-columns: 1fr; } }

/* ============================================================
   Testimonials / Reviews
   ============================================================ */
.review-strip {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}
.review-strip .stars { display: flex; gap: 2px; color: var(--gold-600); }
.review-strip .stars svg { width: 20px; height: 20px; }
.review-strip strong { font-family: var(--font-head); }

.review-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  height: 100%;
}
.review-card .stars { display: flex; gap: 2px; color: var(--gold-600); margin-bottom: var(--space-md); }
.review-card .stars svg { width: 16px; height: 16px; }
.review-card p { color: var(--ink-700); font-size: var(--text-sm); }
.review-card .reviewer {
  display: flex; align-items: center; gap: 0.7em;
  margin-top: var(--space-lg);
}
.review-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--maroon-100); color: var(--maroon-700);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: var(--text-sm);
  flex-shrink: 0;
}
.reviewer .name { font-family: var(--font-head); font-weight: 700; font-size: var(--text-sm); color: var(--ink-900); }
.reviewer .meta { font-size: var(--text-xs); color: var(--color-text-muted); }

/* Wrapper for the embedded Google reviews widget (Featurable) */
.reviews-embed { max-width: 1120px; margin-inline: auto; }
.reviews-embed__fallback { text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); }
.reviews-embed__fallback a { color: var(--maroon-700); font-weight: 600; }
/* Featurable appends its widget after the fallback once it mounts; hide the
   fallback whenever a sibling follows it, so it only shows if the widget fails. */
.reviews-embed__fallback:not(:last-child) { display: none; }

.placeholder-note {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: var(--text-xs);
  color: var(--gold-700);
  background: var(--gold-100);
  border-radius: var(--radius-pill);
  padding: 0.4em 0.9em;
  margin-top: var(--space-md);
}

.story-tenets {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  margin: var(--space-lg) 0;
}
.story-tenets li {
  display: flex;
  align-items: flex-start;
  gap: 0.65em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--ink-900);
}
.story-tenets li svg {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.2em;
  color: var(--maroon-600);
}

/* ============================================================
   Logo marquee (infinite auto-scroll strip)
   ============================================================ */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-lg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.logo-chip {
  height: 76px;
  min-width: 120px;
  padding-inline: var(--space-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-chip img {
  max-height: 100%;
  max-width: 190px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) opacity(0.55);
  transition: filter var(--dur-slow) var(--ease-out);
}
.logo-chip:hover img { filter: grayscale(0) opacity(1); }

/* ============================================================
   Timetable
   ============================================================ */
.timetable-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}
.filter-chip {
  padding: 0.55em 1.2em;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-border);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--ink-700);
  transition: all var(--dur-base) var(--ease-out);
}
.filter-chip:hover { border-color: var(--maroon-500); color: var(--maroon-700); }
.filter-chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--white); }

.timetable-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}
table.timetable {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
table.timetable th, table.timetable td {
  padding: 1em 1.2em;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
table.timetable thead th {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--white);
  background: var(--maroon-800);
  white-space: nowrap;
}
table.timetable thead th:first-child { border-top-left-radius: var(--radius-sm); }
table.timetable thead th:last-child { border-top-right-radius: var(--radius-sm); }
table.timetable tbody tr:hover { background: var(--paper-050); }
table.timetable tbody tr:last-child td { border-bottom: none; }
.tt-subject { font-family: var(--font-head); font-weight: 700; color: var(--ink-900); }
.tt-badge {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-size: var(--text-xs); font-weight: 700;
  padding: 0.3em 0.7em; border-radius: var(--radius-pill);
}
.tt-badge.open { background: #E4F2E8; color: var(--color-success); }
.tt-badge.limited { background: var(--gold-100); color: var(--gold-700); }
.tt-badge.full { background: var(--maroon-050); color: var(--maroon-700); }

/* ============================================================
   Forms
   ============================================================ */
.form-panel {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: var(--space-lg); }
.field label {
  display: flex; align-items: center; gap: 0.4em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 0.5em;
  color: var(--ink-800);
}
.field .req { color: var(--maroon-600); }
.field .hint { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 0.4em; }
.field .error-msg {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: 0.4em;
  display: none;
  align-items: center;
  gap: 0.35em;
}
.field.has-error .error-msg { display: flex; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--color-error); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 0.9em 1.1em;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--paper-000);
  font-size: var(--text-base);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
  min-height: 48px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--maroon-500);
  background: var(--white);
  outline: none;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.radio-group { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.radio-pill {
  position: relative;
}
.radio-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-pill span {
  display: inline-flex; align-items: center;
  padding: 0.7em 1.3em;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm); font-weight: 600;
  transition: all var(--dur-base) var(--ease-out);
}
.radio-pill input:checked + span { background: var(--maroon-100); border-color: var(--maroon-500); color: var(--maroon-700); }
.radio-pill input:focus-visible + span { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.form-panel .form-success { padding: 0; }
.form-success.is-visible { display: block; }
.form-success .check-badge {
  width: 64px; height: 64px; border-radius: 50%;
  background: #E4F2E8; color: var(--color-success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-lg);
}
.form-success .check-badge svg { width: 32px; height: 32px; }
form.is-submitted { display: none; }

.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  display: flex; gap: 0.5em; align-items: flex-start;
}
.form-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 0.15em; color: var(--gold-600); }

/* ============================================================
   FAQ Accordion
   ============================================================ */
.accordion { border-top: 1px solid var(--color-border); }
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-lg);
  padding: 1.4em 0.2em;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--ink-900);
}
.accordion-trigger .plus {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.accordion-trigger .plus::before, .accordion-trigger .plus::after {
  content: ''; position: absolute;
  background: var(--maroon-600);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.accordion-trigger .plus::before { width: 12px; height: 2px; }
.accordion-trigger .plus::after { width: 2px; height: 12px; }
.accordion-trigger[aria-expanded="true"] .plus { background: var(--maroon-600); border-color: var(--maroon-600); }
.accordion-trigger[aria-expanded="true"] .plus::before, .accordion-trigger[aria-expanded="true"] .plus::after { background: var(--white); }
.accordion-trigger[aria-expanded="true"] .plus::after { transform: rotate(90deg); opacity: 0; }

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-in-out);
}
.accordion-panel > div { overflow: hidden; }
.accordion-item.is-open .accordion-panel { grid-template-rows: 1fr; }
.accordion-panel p { padding-bottom: 1.4em; max-width: 68ch; }

/* ============================================================
   CTA banner
   ============================================================ */
.cta-banner {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-3xl) var(--space-2xl);
  background: linear-gradient(135deg, var(--maroon-700) 0%, var(--maroon-900) 100%);
  color: var(--paper-050);
  text-align: center;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(250,245,238,0.05) 0 2px, transparent 2px 30px);
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { color: var(--white); margin-bottom: var(--space-sm); }
.cta-banner p { color: var(--paper-100); max-width: 52ch; margin-inline: auto; margin-bottom: var(--space-xl); }
.cta-banner .hero-ctas { justify-content: center; }

/* ============================================================
   Map / location
   ============================================================ */
.location-card {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}
.location-card .card-icon { margin-bottom: 0; }
.location-card-body { flex: 1; min-width: 0; }
.location-card dl { display: flex; flex-direction: column; gap: var(--space-xs); margin-top: var(--space-sm); }
.location-card dt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.location-card dd { font-size: var(--text-sm); color: var(--ink-800); margin-bottom: var(--space-sm); }

.contact-people {
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}
.contact-people-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}
.contact-person {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5em var(--space-md);
  padding-block: 0.35em;
}
.contact-person .name { font-size: var(--text-sm); font-weight: 600; color: var(--ink-800); }
.contact-person .role { font-weight: 400; color: var(--color-text-muted); }
.contact-person a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--maroon-600);
  white-space: nowrap;
  transition: color var(--dur-base) var(--ease-out);
}
.contact-person a:hover { color: var(--maroon-700); text-decoration: underline; }

.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 16/10;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink-900);
  color: var(--paper-100);
  margin-top: auto;
}
.footer-top {
  padding-block: var(--space-3xl);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: var(--space-2xl);
}
.footer-brand .brand { color: var(--white); }
.footer-brand p { color: var(--ink-300); margin-top: var(--space-md); max-width: 34ch; }
.footer-col h4 { color: var(--white); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-md); }
.footer-col ul { display: flex; flex-direction: column; gap: 0.7em; }
.footer-col a { color: var(--ink-300); font-size: var(--text-sm); transition: color var(--dur-base) var(--ease-out); }
.footer-col a:hover { color: var(--gold-400); }
.footer-social { display: flex; gap: var(--space-sm); margin-top: var(--space-lg); }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-dark);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur-base) var(--ease-out);
}
.footer-social a:hover { background: var(--maroon-600); border-color: var(--maroon-600); transform: translateY(-3px); }
.footer-social svg { width: 17px; height: 17px; }

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-block: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: var(--ink-300);
}
.footer-bottom a { color: var(--ink-300); }
.footer-bottom a:hover { color: var(--gold-400); }
.footer-legal { display: flex; gap: var(--space-lg); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ============================================================
   Scroll-reveal base state (GSAP animates from these)
   ============================================================ */
[data-reveal] { opacity: 1; }
.js-anim-ready [data-reveal] { opacity: 0; }

/* ============================================================
   Page hero (interior pages)
   ============================================================ */
.page-hero {
  padding-top: calc(var(--header-h) + var(--space-3xl));
  padding-bottom: var(--space-3xl);
  background: linear-gradient(180deg, var(--paper-050) 0%, var(--paper-000) 100%);
}
.page-hero .eyebrow { justify-content: center; }
.page-hero.center { text-align: center; }
.page-hero h1 { max-width: 20ch; }
.page-hero.center h1 { margin-inline: auto; }
.page-hero .hero-lede { margin-top: var(--space-lg); }
.page-hero .hero-lede.center { margin-inline: auto; text-align: center; }

.breadcrumb {
  display: flex; align-items: center; gap: 0.5em;
  font-size: var(--text-xs); color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}
.breadcrumb a { color: var(--maroon-600); font-weight: 600; }
