/* ==========================================================================
   NG Tutoring — site styles
   Design tokens follow the approved mockup: navy + gold, Libre Franklin
   headings, Source Sans 3 body, IBM Plex Mono eyebrows.
   ========================================================================== */

:root {
  /* Brand */
  --navy:        #0e2748;
  --navy-deep:   #0a1c33;
  --navy-mid:    #163a68;
  --navy-rule:   #1b3252;
  --gold:        #e3b449;
  --gold-hover:  #f0c25c;
  --gold-ink:    #8a6a1c;

  /* Text */
  --ink:         #17263c;
  --ink-2:       #43536b;
  --ink-3:       #56637a;
  --ink-4:       #616e7f;   /* 4.9:1 on every light surface */
  --ink-5:       #6b7688;   /* 4.6:1 on white */
  --ink-invert:  #ffffff;
  --ink-invert-2:#c3cddb;

  /* Surfaces & lines */
  --surface:     #ffffff;
  --surface-alt: #fafbfc;
  --surface-warm:#fdf8ec;
  --line:        #e6e9ef;
  --line-2:      #e0e4ec;
  --line-3:      #8b919d;   /* input borders: 3.2:1 on white */
  --line-warm:   #e0d3b3;

  /* Type */
  --font-display: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --wrap:        1180px;
  --gutter:      24px;
  --header-h:    71px;
  --radius:      4px;

  --shadow-sm:   0 1px 2px rgba(14, 39, 72, 0.18);
  --shadow-md:   0 2px 6px rgba(14, 39, 72, 0.16);
  --shadow-lg:   0 12px 32px rgba(14, 39, 72, 0.12);
  --shadow-xl:   0 24px 60px rgba(10, 28, 51, 0.35);

  --ease:        160ms ease;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* stop the sticky header from covering anchored sections */
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

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

a { color: var(--navy); text-decoration: none; transition: color var(--ease); }
a:hover { color: #b8862b; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }
hr { border: 0; }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Navy is invisible on the navy bands, so flip the ring to white there. */
.band-navy :focus-visible,
.site-footer :focus-visible { outline-color: #ffffff; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff;
  padding: 10px 16px; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  transition: top var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: var(--shadow-md);
}
.btn-gold:hover { background: var(--gold-hover); color: var(--navy); }

.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

/* Outline button for use on the navy bands. */
.btn-outline-invert {
  background: transparent;
  border-color: #ffffff;
  color: #ffffff;
}
.btn-outline-invert:hover { background: #ffffff; color: var(--navy); }

.btn-sm  { font-size: 15px;   padding: 11px 20px; box-shadow: var(--shadow-sm); }
.btn-lg  { font-size: 17px;   padding: 15px 28px; }
.btn-xl  { font-size: 18px;   padding: 18px 34px; }
.btn-block { width: 100%; }

.btn[disabled], .btn[aria-busy="true"] { opacity: 0.65; pointer-events: none; }

/* --------------------------------------------------------------------------
   Header + navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--ease);
}
.site-header.is-stuck { box-shadow: 0 2px 12px rgba(14, 39, 72, 0.08); }

.header-inner {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
  display: block;
  height: 42px;
  width: auto;
  flex: none;
  border-radius: 3px;   /* the logo carries its own navy background */
}
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  letter-spacing: -0.01em; color: var(--navy);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 500;
}
.site-nav > a:not(.btn) { color: var(--ink-2); }
.site-nav > a:not(.btn):hover { color: var(--navy); }
.site-nav > a.is-active { color: var(--navy); }
.site-nav > a:not(.btn).is-active {
  box-shadow: inset 0 -2px 0 var(--gold);
}
.nav-cta { margin-left: 2px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-left: auto;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bars { display: block; width: 20px; height: 14px; position: relative; }
.nav-toggle-bars span {
  position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: transform 200ms ease, opacity 140ms ease, top 200ms ease;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-inner { gap: 16px; }

  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(14, 39, 72, 0.12);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a {
    padding: 14px 2px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav > a:not(.btn).is-active { box-shadow: inset 3px 0 0 var(--gold); padding-left: 12px; }
  .nav-cta { margin-top: 18px; border-bottom: none; }
  .site-nav > a.btn { padding: 14px 20px; }
}

/* --------------------------------------------------------------------------
   Section shells
   -------------------------------------------------------------------------- */

.section > .wrap { padding-top: clamp(56px, 6vw, 96px); padding-bottom: clamp(56px, 6vw, 96px); }

.band-white { background: var(--surface); }
.band-grey  { background: var(--surface-alt); border-bottom: 1px solid var(--line); }
.band-grey-top { border-top: 1px solid var(--line); }
.band-navy  { background: var(--navy); }
.band-navy > .wrap { padding-top: clamp(48px, 6vw, 84px); padding-bottom: clamp(48px, 6vw, 84px); }

.section h2 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: 8px; }
.h2-spaced { margin-bottom: 40px !important; }
.h2-tight  { margin-bottom: 6px !important; }
.h2-invert { color: var(--ink-invert); font-size: clamp(27px, 3vw, 38px); line-height: 1.15; }

.section-sub { margin-bottom: 40px; font-size: 17px; color: var(--ink-4); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.eyebrow-gold-dark { color: var(--gold-ink); font-size: 11.5px; margin-bottom: 12px; }

.p-invert { font-size: 17px; line-height: 1.65; color: var(--ink-invert-2); }
.stack { display: grid; gap: 18px; }

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { background: var(--surface); }
.hero > .wrap {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow-badge {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line-warm);
  background: var(--surface-warm);
  color: var(--gold-ink);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 3px;
  margin-bottom: 24px;
}

.hero h1 {
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.hero-lede {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 14.5px; color: var(--ink-4); }

.hero-media {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.hero-disc { position: absolute; inset: 0; border-radius: 50%; background: var(--navy-mid); }
.hero-media img {
  position: relative;
  width: 94%; height: 94%;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(1) contrast(1.05);
}

/* --------------------------------------------------------------------------
   Stats band
   -------------------------------------------------------------------------- */

.stats-band {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-band > .wrap {
  padding-top: clamp(36px, 4vw, 56px);
  padding-bottom: clamp(36px, 4vw, 56px);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 32px;
}
.stat { padding-left: 18px; border-left: 2px solid var(--gold); }
.stat-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: 40px; line-height: 1; letter-spacing: -0.03em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Schools — partner logo strip
   -------------------------------------------------------------------------- */

/* The strip sits outside .wrap so it is full-bleed without any 100vw trick,
   which would otherwise reintroduce horizontal overflow once a scrollbar
   is present (WCAG 1.4.10). */
.schools-section > .wrap { padding-bottom: 0; }
.schools-sub { margin-bottom: clamp(28px, 3.5vw, 44px); }

.logo-strip {
  overflow: hidden;
  padding-bottom: clamp(52px, 6vw, 92px);
}

.logo-track {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 72px);
}

/* Marquee mode — only switched on by JS when motion is allowed. */
.logo-track.is-marquee {
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: max-content;
  will-change: transform;
}

.logo-track li { display: flex; }

.logo {
  height: 74px;
  width: auto;
  flex: none;
  object-fit: contain;
  /* A couple of these logos ship with a solid dark background baked in;
     rounding every tile makes those read as deliberate rather than clipped. */
  border-radius: 6px;
}
.logo-wide { height: 96px; }

@media (max-width: 600px) {
  .logo { height: 58px; }
  .logo-wide { height: 74px; }
}

/* --------------------------------------------------------------------------
   Plans
   -------------------------------------------------------------------------- */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  gap: 24px;
  align-items: stretch;
  padding-top: 4px;
}
.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-2);
  padding: 32px 28px 28px;
  display: flex; flex-direction: column; gap: 22px;
  transition: transform var(--ease), box-shadow var(--ease);
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.plan-featured {
  border: 1.5px solid var(--gold);
  padding-top: 40px;
  box-shadow: var(--shadow-lg);
}
.plan-flag {
  position: absolute; top: 0; left: 28px;
  transform: translateY(-50%);
  background: var(--gold); color: var(--navy);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px;
}
.plan-name { font-weight: 600; font-size: 20px; letter-spacing: 0; }
.plan-meta { margin-top: 6px; font-size: 15px; color: var(--ink-4); }
.plan-rule { height: 1px; background: #eceff4; margin: 0; }
.plan-desc { font-size: 15.5px; line-height: 1.6; color: var(--ink-3); }
.plan-cta { margin-top: auto; font-size: 15.5px; padding: 13px 20px; }

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}
.member {
  border: 1px solid var(--line-2);
  padding: 28px;
  display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap;
}
.member-photo {
  width: 116px; height: 116px; flex: none;
  border: 1px solid #dfe4ec;
  object-fit: cover; object-position: 50% 22%;
}
.member-body { flex: 1 1 180px; }
.member-name { font-weight: 600; font-size: 20px; letter-spacing: 0; }
.member-role {
  margin-top: 4px; font-size: 14px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-ink);
}
.member-bio { margin-top: 14px; font-size: 15.5px; line-height: 1.6; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.band-grey.band-grey-top > .wrap {
  padding-top: clamp(48px, 5vw, 80px);
  padding-bottom: clamp(48px, 5vw, 80px);
}
/* This section is centred on the page. The paragraphs themselves stay
   left-aligned — centring three long paragraphs gives both edges a ragged
   shape and makes them noticeably harder to read. */
#about { text-align: center; }
.about-kicker {
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  color: var(--gold-ink); margin-bottom: 34px;
}
.prose {
  display: grid;
  gap: 26px;
  max-width: 56rem;        /* was 68ch — too narrow for the space it sits in */
  margin-inline: auto;
  text-align: left;
}
.prose p { font-size: 18px; line-height: 1.85; color: var(--ink-2); }
.prose-emphasis { color: var(--navy) !important; font-weight: 600; }

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */

.cta-band > .wrap {
  padding-top: clamp(52px, 6vw, 88px);
  padding-bottom: clamp(52px, 6vw, 88px);
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.cta-inner h2 { margin-bottom: 10px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-sub { font-size: 17px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--navy-deep); color: #b6c1d1; }
.site-footer > .wrap {
  padding-top: clamp(44px, 5vw, 68px);
  padding-bottom: 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 36px;
}
.brand-footer { margin-right: 0; }
.brand-lockup {
  display: block;
  height: 74px;
  width: auto;
  /* The logo's own navy is within a couple of shades of the footer, so it
     reads as part of the background rather than as a pasted-on rectangle. */
}
.footer-blurb { margin-top: 16px; font-size: 15px; line-height: 1.6; color: #8d9cb1; max-width: 32ch; }
.footer-heading {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15.5px; }
.footer-links a { color: #d6dee9; }
.footer-links a:hover { color: var(--gold); }
.footer-legal {
  margin-top: 44px; padding-top: 20px;
  border-top: 1px solid var(--navy-rule);
  font-size: 14px; color: #7c8ca3;
}

/* --------------------------------------------------------------------------
   Call-button confirmation
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  z-index: 120;
  max-width: min(92vw, 26rem);
  padding: 14px 20px;
  background: var(--navy);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.4;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(10, 28, 51, 0.35);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.toast[hidden] { display: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) {
  .toast { bottom: 16px; font-size: 15px; padding: 13px 16px; }
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */

/* Content is visible by default. It is only hidden once JS has reached the
   point where it can reveal it again, so a script failure can never leave the
   page blank. */
.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}
.js-reveal-ready .reveal.is-visible { opacity: 1; transform: none; }

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

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  body { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .cta-actions { width: 100%; flex-direction: column; }
  .member { gap: 18px; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
}

@media (max-width: 400px) {
  :root { --gutter: 18px; }
  .stat-num { font-size: 36px; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .nav-toggle, .skip-link { display: none !important; }
  body { font-size: 12pt; }
  .band-navy { background: #fff !important; }
  .h2-invert, .p-invert { color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
