/* =========================================================
   Systemised Maths - global styles
   ========================================================= */

:root {
  --bg: #f7f7f5;
  --bg-alt: #ffffff;
  --ink: #14140f;
  --ink-soft: #35352f;
  --muted: #6f6f6a;
  --muted-light: #8c8c86;
  --line: #e4e4de;
  --line-soft: #eeeee9;
  --lav: #e4e8fd;
  --lav-line: #d2d8fb;
  --lav-ink: #3b5bf0;
  --card: #eaeae5;
  --dark: #141413;
  --dark-muted: #a3a39d;
  --trust: #00b67a;

  --font-display:
    "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --font-body:
    "Hanken Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shell: 1200px;
  --pad: clamp(22px, 5vw, 60px);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0;
}

button {
  font: inherit;
}

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

/* ---------- layout helpers ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin: 0 0 20px;
}

.lede {
  color: var(--muted);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.62;
  max-width: 46ch;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------- header ---------- */
.site-header {
  padding-block: clamp(18px, 2.4vw, 28px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 17.5px);
  letter-spacing: -0.025em;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 30px);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 15px;
  color: var(--ink-soft);
  transition: color 0.18s ease;
}
.site-nav a:hover {
  color: var(--ink);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn--dark {
  background: var(--dark);
  color: #fff;
}
.btn--dark:hover {
  background: #2a2a27;
}

.btn--light {
  background: #fff;
  color: var(--ink);
}
.btn--light:hover {
  background: #ececea;
}

.btn__arrow {
  font-size: 13px;
  line-height: 1;
  opacity: 0.85;
}

/* =========================================================
   Hero (two column)
   ========================================================= */
.hero {
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(48px, 7vw, 104px);
  align-items: start;
}

.hero__title {
  font-size: clamp(2.5rem, 5.2vw, 3.5rem);
  max-width: 20ch;
  margin-bottom: 26px;
}

.hero__title--wide {
  max-width: 22ch;
}

.hero__copy > p + p {
  margin-top: 18px;
}

.hero__note {
  margin-top: 22px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.hero__cta {
  margin-top: 32px;
}

/* ---------- numbered step list ---------- */
.steps {
  display: block;
}

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0 4px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}
.step:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.step:last-of-type {
  padding-bottom: 0;
}

.step__num {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lav-ink);
  padding-top: 5px;
}

.step__title {
  font-size: clamp(16.5px, 1.5vw, 18.5px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.step__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 42ch;
}

/* plain list variant (programme page - inline numbers, no rules) */
.steps--plain .step {
  grid-template-columns: minmax(0, 1fr);
  border-top: 0;
  padding-block: 0 22px;
}
.steps--plain .step:last-of-type {
  padding-bottom: 0;
}

.steps--plain .step__title {
  margin-bottom: 5px;
}
.steps--plain .step__title span {
  color: var(--ink);
  margin-right: 8px;
}

/* mini cards nested inside a step */
.step__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mini-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
}
.mini-card h4 {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 5px;
}
.mini-card p {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* =========================================================
   Trust strip
   ========================================================= */
.trust {
  padding-block: clamp(28px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.trust__title {
  font-size: clamp(19px, 2vw, 23px);
  margin-bottom: 6px;
}
.trust__text {
  font-size: 14.5px;
  color: var(--muted);
}

.trustpilot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.trustpilot:hover {
  opacity: 0.78;
  transform: translateY(-1px);
}
.trustpilot svg {
  flex: none;
}
.trustpilot span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 1.9vw, 23px);
  letter-spacing: -0.035em;
  color: var(--ink);
}

/* =========================================================
   Reviews
   ========================================================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.reviews {
  padding-block: clamp(44px, 6vw, 76px);
}

.reviews__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px 28px;
  flex-wrap: wrap;
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 24px);
  margin-top: clamp(28px, 4vw, 44px);
}

.review {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 2.6vw, 30px);
}

.stars {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 16px;
}
.stars .star {
  width: 21px;
  height: 21px;
  display: block;
}

.review__title {
  font-size: clamp(16px, 1.6vw, 18px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.review__text {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.review__author {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--muted);
}
.review__author::before {
  content: "- ";
}

.reviews__cta {
  margin-top: clamp(26px, 3.4vw, 38px);
  text-align: center;
}

/* =========================================================
   About / tutors
   ========================================================= */
.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  max-width: 15ch;
}

.tutors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 44px);
  margin-top: clamp(36px, 5vw, 56px);
}

.tutor__photo {
  position: relative;
  aspect-ratio: 16 / 8.6;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
/* headshots are shown whole - never cropped - on a white field */
.tutor__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.tutor__photo--lav {
  background: var(--lav);
}
.tutor__photo--white {
  background: #fff;
}

.tutor__tag {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tutor__photo--lav .tutor__tag {
  color: var(--lav-ink);
}

.tutor__name {
  font-size: clamp(20px, 2vw, 23px);
  margin: 20px 0 10px;
}
.tutor__text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 44ch;
}

/* =========================================================
   Pricing
   ========================================================= */
.pricing {
  text-align: center;
  padding-block: clamp(60px, 8vw, 108px);
}
.pricing .eyebrow {
  margin-bottom: 18px;
}

.pricing__title {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  margin-bottom: 22px;
}

.pricing__figure {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.pricing__amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 6vw, 4.25rem);
  letter-spacing: -0.045em;
  line-height: 1;
}
.pricing__unit {
  font-size: 13.5px;
  color: var(--muted);
}

.pricing__note {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42ch;
  margin-inline: auto;
}

/* =========================================================
   Week by week (split section)
   ========================================================= */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.split__title {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  max-width: 14ch;
  margin-bottom: 20px;
}

/* =========================================================
   Product galleries
   ========================================================= */
.gallery-section--lav {
  background: var(--lav);
}

.gallery-head {
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
}
.gallery-head .eyebrow {
  margin-bottom: 16px;
}
.gallery-head h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  margin-bottom: 18px;
}
.gallery-head p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
.gallery-head .hint {
  display: block;
  margin-top: 14px;
  font-size: 11.5px;
  font-style: italic;
  color: var(--muted-light);
}

.gallery-head--left {
  text-align: left;
  margin-inline: 0;
  max-width: 640px;
}
.gallery-head--left p {
  max-width: 52ch;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
  margin-top: clamp(32px, 4.5vw, 52px);
}

.shot {
  display: block;
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 2px rgba(20, 20, 15, 0.04),
    0 8px 24px rgba(20, 20, 15, 0.05);
  cursor: zoom-in;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}
.shot:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgba(20, 20, 15, 0.05),
    0 16px 34px rgba(20, 20, 15, 0.09);
}
.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-sm);
}

/* =========================================================
   Contact
   ========================================================= */
.contact-card {
  background: var(--lav);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3vw, 34px);
}
.contact-card h2 {
  font-size: clamp(19px, 2vw, 22px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--lav-line);
}

.contact-row {
  padding-block: 18px;
  border-bottom: 1px solid var(--lav-line);
}
.contact-row:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.contact-row dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.contact-row dd {
  margin: 0;
  font-size: clamp(15.5px, 1.5vw, 17px);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  word-break: break-word;
}
.contact-row dd a {
  transition: color 0.18s ease;
}
.contact-row dd a:hover {
  color: var(--lav-ink);
}

/* =========================================================
   Dark CTA + footer
   ========================================================= */
.dark-zone {
  background: var(--dark);
  color: #fff;
}

.cta {
  text-align: center;
  padding-block: clamp(84px, 12vw, 152px);
}
.cta h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.85rem);
  max-width: 18ch;
  margin-inline: auto;
  margin-bottom: 18px;
  color: #fff;
}
.cta p {
  font-size: 14.5px;
  color: var(--dark-muted);
  max-width: 46ch;
  margin-inline: auto;
}
.cta .btn {
  margin-top: 30px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 24px;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.site-footer .wordmark {
  color: #fff;
  font-size: 15px;
}
.site-footer small {
  font-size: 13px;
  color: var(--dark-muted);
}

/* =========================================================
   Lightbox
   ========================================================= */
html.is-locked,
html.is-locked body {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #fff;
}
.lightbox:not([open]) {
  display: none;
}

.lightbox::backdrop {
  background: rgba(10, 10, 8, 0.9);
  backdrop-filter: blur(6px);
}
/* fallback for browsers without ::backdrop support */
@supports not selector(::backdrop) {
  .lightbox {
    background: rgba(10, 10, 8, 0.92);
  }
}

.lightbox__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: clamp(52px, 8vh, 72px) clamp(14px, 4vw, 40px) clamp(18px, 3vh, 28px);
  animation: lb-in 0.22s ease both;
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lightbox__frame {
  background: #fff;
  padding: 10px;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  line-height: 0;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.lightbox__frame img {
  width: auto;
  height: auto;
  max-width: min(1500px, calc(100vw - clamp(48px, 9vw, 100px)));
  max-height: calc(100dvh - 210px);
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.lightbox__hint {
  display: none;
}

/* On narrow screens a whole screenshot scaled to fit is unreadable, so lock it
   to a legible height and let the frame pan sideways instead. */
@media (max-width: 700px) {
  .lightbox__frame img {
    max-width: none;
    min-width: 100%;
    height: calc(100dvh - 230px);
    max-height: none;
  }

  .lightbox__hint {
    display: block;
    font-size: 11.5px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
  }
}

.lightbox__caption {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  line-height: 1.4;
}

.lightbox__controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lightbox__count {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.55);
  min-width: 46px;
  text-align: center;
}

.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}
.lb-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}
.lb-btn:active {
  transform: scale(0.94);
}

.lightbox__close {
  position: absolute;
  top: clamp(12px, 2.4vw, 22px);
  right: clamp(12px, 2.4vw, 22px);
  width: 40px;
  height: 40px;
  font-size: 22px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero__grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(40px, 7vw, 56px);
  }

  .hero__title {
    max-width: 18ch;
  }
  .lede,
  .step__text,
  .tutor__text {
    max-width: 56ch;
  }

  .tutors {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .site-header__inner {
    align-items: flex-start;
  }
  .site-nav {
    gap: 18px;
  }

  .hero__title {
    font-size: clamp(2.15rem, 9vw, 2.75rem);
  }
  .step__cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .trust {
    align-items: flex-start;
  }
  .reviews__head {
    align-items: flex-start;
  }
  .reviews__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .reviews__cta .btn {
    width: 100%;
    justify-content: center;
  }
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover,
  .shot:hover {
    transform: none;
  }
}
