:root {
  --bg: #f1f5f9;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --copper: #e05a20;
  --copper-dark: #b84618;
  --teal: #0e7490;
  --teal-soft: #ecfeff;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 32px rgba(15, 23, 42, 0.05);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(14, 116, 144, 0.07), transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(224, 90, 32, 0.06), transparent 50%),
    var(--bg);
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
}

.container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(241, 245, 249, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-row,
.hero-grid,
.trust-grid,
.program-grid,
.subject-grid,
.story-grid,
.contact-grid,
.footer-row {
  display: grid;
  gap: 1.5rem;
}

.header-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0.75rem 0;
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

.hero {
  padding: 3.5rem 0 1.5rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.72);
}

h1,
h2,
h3 {
  margin: 0 0 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-title {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.2;
  font-weight: 800;
  max-width: 640px;
}

h2 {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
}

h3 {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-text,
.section-intro p,
.program-card p,
.subject-card p,
.story-list p,
.contact-grid p,
.trust-grid p,
.faq-list p,
.site-footer p,
.page-panel p,
.page-feature p,
#form-note {
  color: var(--muted);
}

.hero-text {
  max-width: 54ch;
  font-size: 0.975rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.button-primary {
  background: var(--copper);
  color: #fff;
  box-shadow: 0 4px 16px rgba(224, 90, 32, 0.28);
}

.button-primary:hover {
  background: var(--copper-dark);
  box-shadow: 0 6px 20px rgba(224, 90, 32, 0.34);
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-tags li {
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.hero-visual {
  position: relative;
  min-height: 460px;
}

.academy-card,
.program-card,
.subject-card,
.story-card,
.story-list article,
.trust-grid article,
.contact-card,
.faq-list details,
.page-panel,
.page-feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.cube-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  perspective: 900px;
  z-index: 4;
}

.rolling-cube {
  position: relative;
  width: 200px;
  height: 200px;
  transform-style: preserve-3d;
  animation: cube-roll 12s infinite ease-in-out;
}

.cube-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.2));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  overflow: hidden;
}

.cube-face::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.cube-face::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 14px;
  width: 60%;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.02));
}

.cube-face {
  isolation: isolate;
}

.cube-face > * {
  position: relative;
  z-index: 1;
}

.cube-front {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(240, 249, 255, 0.3));
  transform: translateZ(100px);
}

.cube-back {
  background: linear-gradient(160deg, rgba(14, 116, 144, 0.55), rgba(14, 116, 144, 0.25));
  color: #fff;
  transform: rotateY(180deg) translateZ(100px);
}

.cube-right {
  background: linear-gradient(160deg, rgba(224, 90, 32, 0.5), rgba(224, 90, 32, 0.2));
  color: #fff;
  transform: rotateY(90deg) translateZ(100px);
}

.cube-left {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.2));
  color: #f1f5f9;
  transform: rotateY(-90deg) translateZ(100px);
}

.cube-top {
  background: linear-gradient(160deg, rgba(14, 116, 144, 0.2), rgba(255, 255, 255, 0.1));
  transform: rotateX(90deg) translateZ(100px);
}

.cube-bottom {
  background: linear-gradient(160deg, rgba(224, 90, 32, 0.15), rgba(255, 255, 255, 0.1));
  transform: rotateX(-90deg) translateZ(100px);
}

@keyframes cube-roll {
  0% {
    transform: rotateX(-18deg) rotateY(22deg);
  }
  20% {
    transform: rotateX(-18deg) rotateY(112deg);
  }
  40% {
    transform: rotateX(72deg) rotateY(112deg);
  }
  60% {
    transform: rotateX(72deg) rotateY(202deg);
  }
  80% {
    transform: rotateX(-18deg) rotateY(202deg);
  }
  100% {
    transform: rotateX(-18deg) rotateY(382deg);
  }
}

.trust-strip {
  padding: 0.5rem 0 1.5rem;
}

.trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-grid article,
.program-card,
.subject-card,
.story-card,
.story-list article,
.faq-list details,
.page-panel,
.page-feature {
  padding: 1.1rem 1.25rem;
}

.section {
  padding: 2rem 0 3rem;
}

.section-soft,
.faq-section {
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.04), rgba(14, 116, 144, 0.07));
  border-top: 1px solid rgba(14, 116, 144, 0.1);
  border-bottom: 1px solid rgba(14, 116, 144, 0.1);
}

.section-intro {
  max-width: 640px;
  margin-bottom: 1.6rem;
}

.program-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.subject-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.program-card a,
.subject-card a,
.faq-list a,
.story-list a,
.page-panel a {
  color: var(--copper-dark);
}

.story-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: start;
}

.story-card-dark {
  background: var(--text);
  color: #fff;
}

.story-card-dark p {
  color: rgba(255, 255, 255, 0.76);
}

.story-list {
  display: grid;
  gap: 1rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 1.5rem;
  align-items: start;
}

.enquiry-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.enquiry-card label {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.enquiry-card span {
  font-size: 0.94rem;
}

.enquiry-card input,
.enquiry-card select,
.enquiry-card textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.enquiry-card input:focus,
.enquiry-card select:focus,
.enquiry-card textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12);
}

.enquiry-card textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

#form-status {
  margin: 0.35rem 0 0;
  font-weight: 600;
}

.form-status-pending {
  color: var(--muted);
}

.form-status-success {
  color: var(--teal);
}

.form-status-error {
  color: #b42318;
}

.section-dark {
  background: #0f172a;
  color: #fff;
}

.section-dark p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  align-items: center;
}

.contact-card {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.contact-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.contact-link-secondary {
  margin-top: 0.8rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.contact-link-tertiary {
  margin-top: 0.8rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.site-footer {
  padding: 1.25rem 0 2rem;
}

.footer-row {
  grid-template-columns: 1fr auto auto;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.footer-credit {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.page-hero-copy {
  max-width: 760px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.5rem;
}

.page-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  a {
    transition: none;
  }

  .rolling-cube {
    animation: none;
    transform: rotateX(-18deg) rotateY(28deg);
  }
}

@media (max-width: 960px) {
  .header-row,
  .hero-grid,
  .trust-grid,
  .program-grid,
  .subject-grid,
  .story-grid,
  .contact-grid,
  .footer-row,
  .page-grid,
  .page-feature-grid,
  .form-shell,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-visual {
    min-height: 330px;
  }

  .cube-stage {
    width: 100%;
    height: 100%;
  }

  .rolling-cube {
    width: 155px;
    height: 155px;
  }

  .footer-credit {
    text-align: left;
  }

  .cube-front,
  .cube-back,
  .cube-right,
  .cube-left,
  .cube-top,
  .cube-bottom {
    font-size: 0.8rem;
  }

  .cube-front {
    transform: translateZ(77.5px);
  }

  .cube-back {
    transform: rotateY(180deg) translateZ(77.5px);
  }

  .cube-right {
    transform: rotateY(90deg) translateZ(77.5px);
  }

  .cube-left {
    transform: rotateY(-90deg) translateZ(77.5px);
  }

  .cube-top {
    transform: rotateX(90deg) translateZ(77.5px);
  }

  .cube-bottom {
    transform: rotateX(-90deg) translateZ(77.5px);
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.25rem;
  }

  .hero-visual {
    min-height: 260px;
  }

  .cube-stage {
    width: 100%;
    height: 100%;
  }

  .rolling-cube {
    width: 128px;
    height: 128px;
  }

  .cube-face {
    font-size: 0.9rem;
  }

  .cube-front {
    transform: translateZ(64px);
  }

  .cube-back {
    transform: rotateY(180deg) translateZ(64px);
  }

  .cube-right {
    transform: rotateY(90deg) translateZ(64px);
  }

  .cube-left {
    transform: rotateY(-90deg) translateZ(64px);
  }

  .cube-top {
    transform: rotateX(90deg) translateZ(64px);
  }

  .cube-bottom {
    transform: rotateX(-90deg) translateZ(64px);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.35rem;
  }
}

/* ── Hamburger nav toggle ───────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ── Stats strip ────────────────────────────────────── */
.stats-strip {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.stat-item strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.stat-item span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── State grid spacing ─────────────────────────────── */
.state-grid {
  margin-top: 1rem;
}

/* ── Testimonials ───────────────────────────────────── */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.testimonial-card p {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
  margin: 0;
}

.testimonial-stars {
  color: #f59e0b;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.testimonial-card footer {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.testimonial-card footer strong {
  font-size: 0.9rem;
  color: var(--text);
}

.testimonial-card footer span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Form optional label ────────────────────────────── */
.field-optional {
  font-style: normal;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Footer expanded ────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col-brand {
  gap: 0.5rem;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.footer-email {
  font-size: 0.88rem;
  color: var(--copper-dark);
  font-weight: 600;
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0;
}

.footer-col nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col nav a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 140ms ease;
}

.footer-col nav a:hover {
  color: var(--teal);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.footer-bottom a {
  color: var(--muted);
}

.footer-bottom a:hover {
  color: var(--copper-dark);
}

/* ── Breadcrumb ─────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--muted);
  opacity: 0.5;
}

.breadcrumb a {
  color: var(--copper-dark);
}

/* ── Card hover ─────────────────────────────────────── */
.program-card,
.subject-card {
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.program-card:hover,
.subject-card:hover {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1), 0 1px 3px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.card-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.card-note {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.inline-links a {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--copper-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ── Nav hover states ───────────────────────────────── */
.site-nav a:hover {
  color: var(--teal);
  background: rgba(14, 116, 144, 0.08);
  transition: color 140ms ease, background 140ms ease;
}

/* ── Mobile: hamburger + stacked footer ─────────────── */
@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(241, 245, 249, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    z-index: 19;
  }

  .site-nav.nav-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .header-row {
    position: relative;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-col-brand {
    grid-column: auto;
  }
}
