/* ============================================================
   LEVEL 9 TUITION — style.css
   Single-file design system. No build step required.

   ARCHITECTURE: MOBILE-FIRST
   - Base styles target mobile (smallest screens).
   - Layout is progressively ENHANCED at larger screens using
     min-width media queries only. No max-width queries.

   BREAKPOINTS (single source of truth):
     sm  480px  — large phone / small tablet portrait
     md  768px  — tablet / where desktop nav appears
     lg  1024px — desktop
     xl  1280px — wide desktop

   RESPONSIVE TOKENS:
   - Values that differ between mobile and desktop are declared
     ONCE as CSS custom properties in :root (mobile value), then
     re-declared inside min-width queries (desktop value).
   - Components read the token (e.g. var(--container-pad)) and
     automatically get the correct value at every screen size.
   ============================================================ */

/* === 1. CSS CUSTOM PROPERTIES === */
:root {
  /* Brand Blues */
  --color-primary-50:  #e6f2fb;
  --color-primary-100: #bdddf5;
  --color-primary-200: #8ac5ee;
  --color-primary-300: #54abe6;
  --color-primary-400: #2896df;
  --color-primary-500: #0170c0;
  --color-primary-600: #015faa;
  --color-primary-700: #014d8e;
  --color-primary-800: #013b72;
  --color-primary-900: #012856;

  /* Accent */
  --color-accent:      #f59e0b;
  --color-accent-dark: #d97706;

  /* Neutrals */
  --color-white:     #ffffff;
  --color-gray-50:   #f9fafb;
  --color-gray-100:  #f3f4f6;
  --color-gray-200:  #e5e7eb;
  --color-gray-300:  #d1d5db;
  --color-gray-400:  #9ca3af;
  --color-gray-500:  #6b7280;
  --color-gray-600:  #4b5563;
  --color-gray-700:  #374151;
  --color-gray-800:  #1f2937;
  --color-gray-900:  #111827;

  /* Semantic */
  --color-success: #10b981;
  --color-error:   #ef4444;
  --color-text-primary:   var(--color-gray-900);
  --color-text-secondary: var(--color-gray-600);
  --color-text-muted:     var(--color-gray-400);
  --color-bg-page:        var(--color-white);
  --color-bg-subtle:      var(--color-gray-50);
  --color-bg-card:        var(--color-white);
  --color-border:         var(--color-gray-200);

  /* Typography — family & weights */
  --font-family-base: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-weight-normal:    400;
  --font-weight-medium:    500;
  --font-weight-semibold:  600;
  --font-weight-bold:      700;
  --font-weight-extrabold: 800;
  --line-height-tight:   1.2;
  --line-height-snug:    1.375;
  --line-height-normal:  1.5;
  --line-height-relaxed: 1.625;

  /* Static font scale (does not change per breakpoint) */
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.25rem;
  --font-size-2xl:  1.5rem;
  --font-size-3xl:  1.875rem;
  --font-size-4xl:  2.25rem;
  --font-size-5xl:  3rem;
  --font-size-6xl:  3.75rem;

  /* --- RESPONSIVE TYPE TOKENS (fluid via clamp) --- */
  /* Scale smoothly from mobile min to desktop max — no breakpoint jank. */
  --h1-size:      clamp(2.25rem, 6vw, 4rem);      /* hero heading */
  --h2-size:      clamp(1.75rem, 4vw, 2.25rem);   /* section heading */
  --lead-size:    clamp(1.0625rem, 2vw, 1.25rem); /* hero/section subheading */

  /* Spacing (8pt grid) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- RESPONSIVE LAYOUT TOKENS (mobile defaults) --- */
  --container-max:   1200px;
  --container-pad:   var(--space-4);   /* 16px mobile → 24px at md */
  --section-space:   var(--space-16);  /* 64px mobile → 96px at md */
  --section-header-space: var(--space-10); /* 40px mobile → 64px at md */
  --grid-gap:        var(--space-6);   /* 24px mobile → 32px at lg */
  --layout-gap:      var(--space-10);  /* 40px mobile → 64px at lg (2-col sections) */

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 20px 60px rgba(1,112,192,0.15), 0 4px 16px rgba(0,0,0,0.08);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Nav */
  --nav-height: 64px; /* mobile → 72px at md */

  /* Touch target minimum */
  --touch-min: 44px;

  /* Hero background image — change .jpg to .png here to swap format */
  --hero-image: url('/assets/images/hero-bg.jpg');
}

/* --- TOKEN OVERRIDES: TABLET (md, 768px+) --- */
@media (min-width: 768px) {
  :root {
    --container-pad: var(--space-6);        /* 24px */
    --section-space: var(--space-24);       /* 96px */
    --section-header-space: var(--space-16);/* 64px */
    --nav-height: 72px;
  }
}

/* --- TOKEN OVERRIDES: DESKTOP (lg, 1024px+) --- */
@media (min-width: 1024px) {
  :root {
    --grid-gap:   var(--space-8);   /* 32px */
    --layout-gap: var(--space-16);  /* 64px */
  }
}


/* === 2. RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* belt-and-braces against any horizontal overflow */
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}


/* === 3. SKIP LINK === */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary-500);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-semibold);
  z-index: 9999;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--space-4);
}


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

.section {
  padding-block: var(--section-space);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-500);
  margin-bottom: var(--space-4);
}

.section-heading {
  font-size: var(--h2-size);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.section-subheading {
  font-size: var(--lead-size);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  max-width: 640px;
}

.section-header {
  margin-bottom: var(--section-header-space);
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-subheading {
  margin-inline: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  min-height: var(--touch-min); /* touch-target minimum */
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-gray-900);
  box-shadow: 0 4px 14px rgba(245,158,11,0.35);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245,158,11,0.4);
}

.btn--secondary {
  background: var(--color-primary-500);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(1,112,192,0.3);
}
.btn--secondary:hover {
  background: var(--color-primary-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(1,112,192,0.35);
}

.btn--outline-white {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--color-white);
}

.btn--lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--font-size-lg);
}

/* Tags / Pills */
/* Non-interactive label pill: soft tint + subtle border reads as a "tag",
   not a button — keeps CTAs as the only bold, shadowed elements. */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  border: 1px solid var(--color-primary-100);
  letter-spacing: 0.02em;
}

/* Orange-tinted variant — use sparingly to highlight a standout credential */
.tag--accent {
  background: #fef3e2;
  color: var(--color-accent-dark);
  border-color: #fde4bd;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.check-list li::before {
  content: '✅';
  flex-shrink: 0;
  margin-top: 1px;
}


/* === 5. NAV ===
   MOBILE-FIRST: base = hamburger visible, desktop links hidden.
   Desktop nav is revealed at min-width: 768px. */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

#nav.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.nav-logo {
  display: flex;
  align-items: center;
  height: 100%; /* full nav height is tappable */
}

.nav-logo img {
  height: 40px; /* mobile → 48px at md */
  width: auto;
}

/* Desktop links + CTA — hidden on mobile by default */
.nav-links {
  display: none;
}

.nav-cta {
  display: none;
}

/* Hamburger — shown on mobile by default */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  transform-origin: center;
}

#nav.scrolled .nav-hamburger span {
  background: var(--color-gray-800);
}

.nav-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-gray-900);
  z-index: 1050;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-open .nav-drawer {
  display: flex;
  opacity: 1;
}

.nav-drawer a {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  transition: color var(--transition-fast);
}

.nav-drawer a:hover {
  color: var(--color-accent);
}

/* DESKTOP NAV (md, 768px+): reveal links + CTA, hide hamburger */
@media (min-width: 768px) {
  .nav-logo img {
    height: 48px;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
  }

  .nav-links a {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-white);
    transition: color var(--transition-fast);
    position: relative;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform var(--transition-base);
    border-radius: var(--radius-full);
  }

  .nav-links a:hover::after,
  .nav-links a.active::after {
    transform: scaleX(1);
  }

  #nav.scrolled .nav-links a {
    color: var(--color-text-primary);
  }

  #nav.scrolled .nav-links a:hover {
    color: var(--color-primary-500);
  }

  .nav-cta {
    display: inline-flex;
    margin-left: var(--space-4);
  }

  .nav-hamburger {
    display: none;
  }

  .nav-drawer {
    display: none !important; /* never show drawer on desktop */
  }
}


/* === 6. HERO ===
   MOBILE-FIRST: base = mobile padding & sizing. Fluid heading
   via clamp() scales smoothly to desktop with no breakpoint. */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--color-primary-900);
}

.hero-bg {
  position: absolute;
  inset: 0;
  /* Hero image path — swap .jpg to .png here if your file is a PNG.
     (CSS backgrounds can't auto-fall-back like <picture>, so this is
     the single place to change the hero image format/name.) */
  background-image: var(--hero-image, url('/assets/images/hero-bg.jpg'));
  background-size: cover;
  /* focus the image slightly right so busy detail sits away from the
     left-aligned headline (which has the darkest part of the overlay) */
  background-position: right center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Layered overlay for depth:
     1) a left-to-right scrim — dark where the text sits, fading so
        the image breathes on the right (kills the flat blue wash);
     2) a diagonal brand gradient from deep navy to brand blue;
     3) a soft warm glow low-right to break the monochrome blue. */
  background:
    linear-gradient(
      90deg,
      rgba(1, 20, 44, 0.92) 0%,
      rgba(1, 30, 60, 0.80) 35%,
      rgba(1, 48, 90, 0.45) 75%,
      rgba(1, 48, 90, 0.35) 100%
    ),
    linear-gradient(
      135deg,
      rgba(1, 40, 86, 0.85) 0%,
      rgba(1, 95, 170, 0.55) 100%
    ),
    radial-gradient(
      120% 90% at 88% 92%,
      rgba(245, 158, 11, 0.18) 0%,
      rgba(245, 158, 11, 0) 55%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  /* The hero is min-height: 100svh with flex centering, so the content
     is already vertically centred. Padding only needs to clear the fixed
     nav (top) and keep clear of the scroll cue (bottom) — NOT add extra
     height on top of the full-viewport section. */
  padding-block: var(--nav-height) var(--space-16);
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
  margin-bottom: var(--space-6);
  letter-spacing: 0.04em;
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-heading {
  font-size: var(--h1-size);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-white);
  margin-bottom: var(--space-6);
  /* subtle shadow keeps text crisp over any part of the image */
  text-shadow: 0 2px 20px rgba(0, 20, 44, 0.35);
}

.hero-heading .highlight {
  color: var(--color-accent);
}

.hero-subheading {
  font-size: var(--lead-size);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  color: rgba(255,255,255,0.92);
  margin-bottom: var(--space-8);
  max-width: 620px;
  text-shadow: 0 1px 12px rgba(0, 20, 44, 0.3);
}

/* Actions: stacked full-width on mobile → inline row at sm */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
}

.hero-actions .btn {
  text-align: center;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.6);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid rgba(255,255,255,0.5);
  border-bottom: 2px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  animation: scrollBounce 1.8s ease infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(5px); opacity: 1; }
}

/* HERO at sm (480px+): buttons side-by-side, roomier padding */
@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    text-align: initial;
  }
}

@media (min-width: 768px) {
  .hero-subheading {
    margin-bottom: var(--space-10);
  }
}

/* Short viewports: let hero grow with content, hide scroll cue */
@media (max-height: 640px) {
  #hero {
    min-height: auto;
    padding-bottom: var(--space-12);
  }
  .hero-scroll {
    display: none;
  }
}


/* === 7. TRUST BAR ===
   MOBILE-FIRST: 2-col base → 4-col at md. */
#trust {
  background: var(--color-primary-50); /* soft brand-blue, airy */
  padding-block: var(--space-12);
}

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

/* Each stat is a white card that lifts off the soft-blue section */
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-5);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.trust-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.trust-value {
  font-size: var(--font-size-3xl); /* mobile → 4xl at md */
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary-500);
  line-height: 1;
  margin-bottom: var(--space-3);
}

/* Short orange accent line under each number — brings in the 2nd brand colour */
.trust-value::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  margin: var(--space-3) auto 0;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.trust-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  line-height: var(--line-height-snug);
  max-width: 160px;
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }

  .trust-value {
    font-size: var(--font-size-4xl);
  }
}


/* === 8. TUTORS SECTION ===
   MOBILE-FIRST: each tutor is a full-width CARD.
   Layout: a HEADER BAND (fixed-size circular headshot + name/school/chips)
   sits above full-width content (bio, quals, quote, footer).
   The headshot is ALWAYS the same size — it never stretches to match text. */
#tutors {
  background: var(--color-gray-50);
}

.tutors-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .tutors-list {
    gap: var(--space-10);
  }
}

/* Tutor Card */
.tutor-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
}

.tutor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

/* HEADER BAND — headshot + identity, on a soft brand-blue tint.
   Mobile: stacked & centred. Larger screens: headshot left, text right. */
.tutor-card__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
  padding: var(--space-8);
  background: var(--color-primary-50);
}

/* FIXED-SIZE circular headshot — supply SQUARE photos (e.g. 800×800). */
.tutor-card__photo,
.tutor-card__photo-placeholder {
  width: 140px;
  height: 140px;
  flex-shrink: 0;               /* never squashed by the text beside it */
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: center top;  /* keep faces in frame */
  background-color: var(--color-white);
  border: 5px solid var(--color-white);
  box-shadow: 0 10px 28px rgba(1, 48, 90, 0.18);
}

.tutor-card__photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--color-primary-100), var(--color-primary-200));
}

.tutor-card__identity {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tutor-card__body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
}

/* Larger, bolder subject chips */
.tutor-card__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Bold, standout subject pills — solid brand blue on the light header */
.tutor-card__tags .tag {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  background: var(--color-primary-500);
  color: var(--color-white);
  border: none;
  box-shadow: 0 3px 10px rgba(1, 112, 192, 0.30);
  letter-spacing: 0.01em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.tutor-card__tags .tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(1, 112, 192, 0.40);
}

.tutor-card__name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-2);
}

/* Current role/school — orange-accented callout that stands out and
   handles long, multi-line role text elegantly. */
.tutor-card__school {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: #fef3e2;                 /* soft amber tint */
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--font-size-sm);
  color: var(--color-accent-dark);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  text-align: left;
}

/* Small "current role" marker before the text */
.tutor-card__school::before {
  content: '📌';
  flex-shrink: 0;
  font-size: 0.85em;
}

.tutor-card__bio {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-6);
}

/* Highlighted selling points inside bios */
.tutor-card__bio strong {
  color: var(--color-text-primary); /* darker → pops against grey body */
  font-weight: var(--font-weight-bold);
}

.tutor-card__bio em {
  color: var(--color-text-primary);
  font-style: italic;
  font-weight: var(--font-weight-medium);
}

.tutor-card__quals {
  margin-bottom: var(--space-6);
}

.tutor-card__quals-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

/* Two-column check list on wider rows for compactness */
@media (min-width: 640px) {
  .tutor-card__quals .check-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2) var(--space-6);
  }
}

/* HERO PULL-QUOTE — large, eye-catching, decorative curly marks */
.tutor-card__quote {
  position: relative;
  margin-top: auto;
  padding: var(--space-8) var(--space-6) var(--space-6) var(--space-10);
  background: linear-gradient(135deg, var(--color-primary-50), var(--color-white));
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-primary-100);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  font-style: italic;
  color: var(--color-primary-800);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-6);
}

/* Big decorative opening quotation mark */
.tutor-card__quote::before {
  content: '\201C'; /* “ */
  position: absolute;
  top: -0.35em;
  left: var(--space-3);
  font-size: 5rem;
  line-height: 1;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary-300);
  opacity: 0.6;
  font-family: Georgia, 'Times New Roman', serif;
  pointer-events: none;
}

.tutor-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.tutor-card__mode {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.tutor-card__linkedin {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  min-height: var(--touch-min);
  border-radius: var(--radius-full);
  background: #0a66c2;
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.tutor-card__linkedin:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.tutor-card__linkedin svg {
  width: 18px;
  height: 18px;
}

/* TABLET+ (md): header band becomes horizontal — headshot left, text right. */
@media (min-width: 768px) {
  .tutor-card__header {
    flex-direction: row;
    text-align: left;
    gap: var(--space-8);
    padding: var(--space-10);
  }

  .tutor-card__photo,
  .tutor-card__photo-placeholder {
    width: 160px;
    height: 160px;
  }

  .tutor-card__identity {
    align-items: flex-start;
  }

  .tutor-card__name {
    font-size: var(--font-size-3xl);
  }

  .tutor-card__school {
    font-size: var(--font-size-base);
  }

  .tutor-card__tags {
    justify-content: flex-start;
  }

  .tutor-card__body {
    padding: var(--space-10);
  }
}


/* === 9. SUBJECTS SECTION ===
   MOBILE-FIRST: 1-col base → auto-fit multi-col at sm. */
#subjects {
  background: var(--color-white);
}

.subjects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

@media (min-width: 600px) {
  .subjects-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  }
}

.subject-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  background: var(--color-white);
}

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.subject-card__image-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--color-primary-100); /* fallback tint if no photo loads */
}

.subject-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.subject-card:hover .subject-card__image-wrap img {
  transform: scale(1.06);
}

.subject-card__body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.subject-card__levels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.subject-card__name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
}

.subject-card__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  flex: 1;
  margin-bottom: var(--space-5);
}

.subject-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-2); /* larger tap area */
  min-height: var(--touch-min);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-500);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.subject-card__link:hover {
  color: var(--color-primary-700);
  gap: var(--space-3);
}

/* Per-subject accent colours for the "Discover..." links */
.subject-card__link--purple {
  color: #4338ca;
}
.subject-card__link--purple:hover {
  color: #312e81;
}

.subject-card__link--green {
  color: #065f46;
}
.subject-card__link--green:hover {
  color: #022c22;
}


/* === 10. LOCATION SECTION ===
   MOBILE-FIRST: 1-col base → 2-col at lg. */
#location {
  background: var(--color-gray-50);
}

/* Venue photo gallery — 2 photos, stacked on mobile → side-by-side at sm */
.location-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  margin-bottom: var(--space-12);
}

.location-photo {
  margin: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  background: var(--color-primary-50);
}

.location-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder shown if a photo file is missing (JS adds .is-empty) */
.location-photo.is-empty::after {
  content: '📷  Photo coming soon';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-400);
}

@media (min-width: 640px) {
  .location-gallery {
    grid-template-columns: 1fr 1fr;
  }
}

.location-lead {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.location-lead strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--layout-gap);
  align-items: center;
}

.location-modes {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.location-mode {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.location-mode__icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.location-mode__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
}

.location-mode__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.location-callout {
  padding: var(--space-5) var(--space-6);
  background: var(--color-primary-50);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-accent);
}

.location-callout p {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-800);
  line-height: var(--line-height-relaxed);
}

.location-map {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  background: var(--color-gray-200);
}

.location-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (min-width: 1024px) {
  .location-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* === 11. ETHICAL PRICING SECTION ===
   Light, on-brand: soft-blue section, white pillar cards (matches trust bar).
   MOBILE-FIRST: 1-col base → 2-col at lg. */
#pricing {
  background: var(--color-primary-50); /* soft brand-blue, airy */
}

.pricing-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--layout-gap);
  align-items: start;
}

.pricing-prose p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-6);
}

.pricing-prose p:last-child {
  margin-bottom: 0;
}

.pricing-prose strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

.pricing-pillars {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* White pillar cards that lift off the soft-blue section */
.pricing-pillar {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.pricing-pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pricing-pillar__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.pricing-pillar__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.pricing-pillar__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

@media (min-width: 1024px) {
  .pricing-body {
    grid-template-columns: 1fr 1fr;
  }
}

/* Price cards — white cards, big blue price with an orange accent line.
   MOBILE-FIRST: 1-col base → 3-col at md. */
.price-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  margin-top: var(--space-16);
}

.price-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.price-card__subject {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-700);
  margin-bottom: var(--space-4);
}

.price-card__amount {
  font-size: var(--font-size-6xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary-500);
  line-height: 1;
}

.price-card__only {
  display: block;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-1);
}

.price-card__unit {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-top: var(--space-2);
}

.price-card__unit-note {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Orange accent divider (via ::before) above the notes block */
.price-card__notes {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.price-card__notes::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.price-card__notes li {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

@media (min-width: 768px) {
  .price-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* === 12. CONTACT SECTION ===
   MOBILE-FIRST: form single-col base; grid stacks; both expand at lg. */
#contact {
  background: var(--color-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--layout-gap);
  align-items: start;
}

.contact-form {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6); /* mobile → 40px at sm */
  box-shadow: var(--shadow-md);
}

/* form-row: single column on mobile, two columns at sm */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-group label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base); /* 16px — prevents iOS zoom on focus */
  color: var(--color-text-primary);
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px var(--color-primary-50);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

.form-submit {
  width: 100%;
  padding: var(--space-4);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.form-status {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  display: none;
}

.form-status--success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  display: block;
}

.form-status--error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  display: block;
}

/* Per-field inline validation error message (hidden until populated) */
.form-error {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-error);
  min-height: 0;
  margin-top: calc(-1 * var(--space-1));
}

.form-error:empty {
  display: none;
}

/* Red border on a field flagged invalid by our JS */
.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid {
  border-color: var(--color-error);
}

.form-group input.is-invalid:focus,
.form-group select.is-invalid:focus,
.form-group textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px #fee2e2;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-info-card {
  padding: var(--space-6);
  background: var(--color-gray-50);
  border-radius: var(--radius-xl);
}

.contact-info-card h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.contact-detail:last-child { margin-bottom: 0; }

.contact-detail__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Two-column form fields once there's room */
@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .contact-form {
    padding: var(--space-10);
  }
}

/* Form beside info column on desktop */
@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 3fr 2fr;
  }
}


/* === 13. FOOTER ===
   Light, on-brand: soft-blue section matching trust bar & pricing.
   MOBILE-FIRST: 1-col base → 3-col at md. */
#footer {
  background: var(--color-primary-50); /* soft brand-blue, airy */
  color: var(--color-text-secondary);
  padding-block: var(--space-16) var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-primary-100);
  margin-bottom: var(--space-8);
}

.footer-brand__logo {
  height: 48px;
  width: auto;
  margin-bottom: var(--space-4);
  /* Logo shows in its natural brand colours on the light background */
}

.footer-brand__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  max-width: 280px;
  margin-bottom: var(--space-6);
}

.footer-col h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary-700);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col ul li a {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-primary-500);
}

.footer-contact-item {
  display: flex;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  line-height: var(--line-height-relaxed);
}

.footer-contact-item a:hover {
  color: var(--color-primary-500);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-12);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}


/* === 14. SCROLL ANIMATIONS === */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 100ms; }
.animate-on-scroll.delay-2 { transition-delay: 200ms; }
.animate-on-scroll.delay-3 { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}


/* === 15. FOCUS STYLES === */
:focus-visible {
  outline: 3px solid var(--color-primary-400);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ============================================================
   16. SUBJECT PAGES (e.g. /maths)
   Shared styles for the dedicated subject approach pages.
   ============================================================ */

/* Compact page hero (not full-viewport like the homepage hero) */
.page-hero {
  position: relative;
  padding-block: calc(var(--nav-height) + var(--space-16)) var(--space-16);
  background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-900));
  color: var(--color-white);
  overflow: hidden;
}

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-5);
}

.page-hero__title {
  font-size: var(--h1-size);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  max-width: 900px;
  margin-bottom: var(--space-4);
}

.page-hero__lead {
  font-size: var(--lead-size);
  color: rgba(255,255,255,0.85);
  line-height: var(--line-height-relaxed);
  max-width: 720px;
}

/* Back link to homepage */
.page-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: rgba(255,255,255,0.8);
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.page-back:hover {
  color: var(--color-white);
  gap: var(--space-3);
}

/* Prose block for subject method explanation */
.subject-intro {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.subject-intro p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.subject-intro strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

/* "How it works" benefit cards */
.method-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  margin-top: var(--space-12);
}

.method-card {
  padding: var(--space-8);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.method-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.method-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-4);
  display: block;
}

.method-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-700);
  margin-bottom: var(--space-3);
}

.method-card__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Result callout */
.method-result {
  max-width: 820px;
  margin: var(--space-12) auto 0;
  padding: var(--space-6) var(--space-8);
  background: var(--color-primary-50);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-lg);
  color: var(--color-primary-800);
  line-height: var(--line-height-relaxed);
}

.method-result strong {
  font-weight: var(--font-weight-bold);
}

@media (min-width: 768px) {
  .method-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- CURRICULUM TABLE ---
   Desktop: real table. Mobile: each row becomes a stacked card
   (the standard responsive-table technique). */
.curriculum {
  margin-top: var(--space-12);
}

.curriculum-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Mobile-first: hide the thead; each row is a card */
.curriculum-table thead {
  display: none;
}

.curriculum-table tr {
  display: block;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.curriculum-table td {
  display: block;
  padding: var(--space-2) 0;
}

/* Label each cell using the data-label attribute on mobile */
.curriculum-table td::before {
  content: attr(data-label);
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary-500);
  margin-bottom: var(--space-1);
}

.curriculum-table .cell-strand {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
}

.curriculum-table td {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Desktop: switch to a real table layout */
@media (min-width: 900px) {
  .curriculum-table thead {
    display: table-header-group;
  }

  .curriculum-table tr {
    display: table-row;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  .curriculum-table thead th {
    text-align: left;
    padding: var(--space-4) var(--space-5);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    background: var(--color-primary-500);
    border: none;
  }

  .curriculum-table thead th:first-child { border-top-left-radius: var(--radius-md); }
  .curriculum-table thead th:last-child  { border-top-right-radius: var(--radius-md); }

  .curriculum-table tbody td {
    display: table-cell;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
  }

  .curriculum-table td::before {
    display: none; /* headers come from thead on desktop */
  }

  .curriculum-table tbody tr:nth-child(even) {
    background: var(--color-gray-50);
  }

  .curriculum-table .cell-strand {
    font-size: var(--font-size-sm);
    color: var(--color-primary-700);
  }
}

/* Bulleted unit lists inside curriculum cells (used on the CS page) */
.cell-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cell-list li {
  position: relative;
  padding-left: var(--space-4);
}

.cell-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary-500);
  font-weight: var(--font-weight-bold);
}

/* Sub-label under a component name, e.g. "(Computer Systems & Architecture)" */
.cell-strand__sub {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}


/* ============================================================
   FEATURE ROW — reusable image + text block to break up
   text-heavy subject pages. MOBILE: image on top, text below.
   DESKTOP: side-by-side; add .subject-feature--reverse to
   flip the image to the right.
   ============================================================ */
.subject-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
  max-width: 980px;
  margin-inline: auto;
}

.subject-feature__media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background: var(--color-primary-50);
}

.subject-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder if the image file is missing (JS adds .is-empty) */
.subject-feature__media.is-empty::after {
  content: '📷  Photo coming soon';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-400);
}

.subject-feature__eyebrow {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-500);
  margin-bottom: var(--space-3);
}

.subject-feature__title {
  font-size: var(--h2-size);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.subject-feature__text {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.subject-feature__text strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

@media (min-width: 900px) {
  .subject-feature {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }

  /* Flip: image on the right, text on the left */
  .subject-feature--reverse .subject-feature__media {
    order: 2;
  }
}


/* ============================================================
   17. ENGLISH PAGE — narrative-style components
   (a problem callout + a numbered process cycle)
   ============================================================ */

/* Generic prose block for narrative sections */
.subject-prose {
  max-width: 760px;
  margin-inline: auto;
}

.subject-prose > p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-5);
}

.subject-prose > p:last-child {
  margin-bottom: 0;
}

.subject-prose strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

.subject-prose em {
  color: var(--color-primary-700);
  font-style: italic;
}

/* Emphasised "problem" callout — e.g. the Feedback Gap statistic */
.problem-callout {
  max-width: 760px;
  margin: var(--space-8) auto;
  padding: var(--space-8);
  background: var(--color-white);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.problem-callout p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-4);
}

.problem-callout p:last-child {
  margin-bottom: 0;
}

.problem-callout strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

/* ============================================================
   THE LEVEL 9 FEEDBACK LOOP — vertical timeline (all sizes)
   Steps flow straight down 1 → 2 → 3 → 4, with a down-arrow
   between each. Numbers and flow always agree. Identical logic
   on mobile and desktop — just capped in width on larger screens.
   ============================================================ */
.process-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  max-width: 720px;
  margin: var(--space-16) auto 0;
  counter-reset: step;
  list-style: none;
}

.process-step {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--color-primary-500);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.process-step:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* Down-arrow between consecutive steps */
.process-step:not(:last-child)::after {
  content: '↓';
  position: absolute;
  left: 27px;
  bottom: calc(-1 * var(--space-8));
  transform: translate(-50%, 10%);
  height: var(--space-8);
  display: flex;
  align-items: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-400);
  z-index: 2;
}

/* Auto-numbered gradient badge with a soft ring */
.process-step__num {
  counter-increment: step;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-700));
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  box-shadow: 0 6px 16px rgba(1,112,192,0.35);
  border: 4px solid var(--color-white);
}

.process-step__num::before {
  content: counter(step);
}

.process-step__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-700);
  margin-bottom: var(--space-2);
}

.process-step__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}
