:root {
  --ink: #1a1b2e;
  --muted: #5f6078;
  --orange: #ff7a2f;
  --pink: #ff5c8a;
  --sun: #ffc94d;
  --mint: #5fd6a8;
  --peri: #7b8cff;
  --head: "Outfit", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: #fff; }
body { color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
section { scroll-margin-top: 40px; }

/* ───────── header ───────── */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(26, 27, 46, .05);
}
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: conic-gradient(var(--sun), var(--orange), var(--pink), var(--peri), var(--sun)); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: 14px; color: var(--muted); }
nav a:hover { color: var(--ink); }
nav .pill { background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 999px; }
nav .pill:hover { color: #fff; background: #2d2f4d; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--orange), var(--pink), var(--peri)); }
@media (max-width: 600px) { .hide-sm { display: none; } nav { gap: 12px; font-size: 13px; } .mark { font-size: 15px; } }
@media (max-width: 420px) { nav a:not(.pill) { display: none; } nav .pill { padding: 7px 14px; } }

/* ───────── the journey: white page, gradients float on top of it ───────── */
.journey { position: relative; overflow: hidden; background: #fff; }
.scenery, .marks { position: absolute; inset: 0; pointer-events: none; }
.scenery { z-index: 0; }
.road { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; }
.marks { z-index: 2; }

.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.lm { position: absolute; font-family: var(--head); font-weight: 600; line-height: 1; transform: translate(-50%, -50%); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
.shape { position: absolute; transform: translate(-50%, -50%); }

.ms { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 5px solid var(--orange); box-shadow: 0 4px 14px -4px rgba(60,50,120,.4); }
.ms.big { width: 30px; height: 30px; border-width: 7px; border-color: var(--ink); }
.sign { position: absolute; transform: translateY(-50%); font: 500 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.sign.l { transform: translate(-100%, -50%); }
.sign.c { transform: translate(-50%, -50%); box-shadow: 0 6px 18px -6px rgba(26,27,46,.45); }

.flag { position: absolute; z-index: 3; width: 44px; height: 88px; transform: translate(-6px, -100%); pointer-events: none; }
.flag svg, .car svg { width: 100%; height: 100%; display: block; }

.car { position: absolute; top: 0; left: 0; z-index: 4; width: 40px; height: 66px; will-change: transform; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(40, 30, 90, .28)); }
@media (max-width: 760px) { .car { width: 28px; height: 46px; } .flag { width: 32px; height: 64px; } }

/* ───────── sections ───────── */
.hero, .stop { position: relative; z-index: 3; display: flex; align-items: center; }
.hero { min-height: 100vh; min-height: 100svh; justify-content: center; text-align: center; padding: 110px 20px 160px; }
.hero .inner { max-width: 980px; display: flex; flex-direction: column; align-items: center; }
.stop { min-height: 64vh; padding: 7vh 6vw; }
.stop.left  { justify-content: flex-start; }
.stop.right { justify-content: flex-end; }
.stop > .inner, .stop > .card { width: min(46vw, 540px); }
.story { min-height: 80vh; }
.finish { min-height: 78vh; }

/* mobile: switchback road. Content runs nearly full width with a narrow lane for the
   road on one side; between stops the road swoops across the screen (see script.js). */
@media (max-width: 760px) {
  .stop { min-height: 0; padding: 124px 20px; justify-content: flex-start !important; }
  .stop.left  { padding-right: 58px; }
  .stop.right { padding-left: 58px; }
  .stop > .inner, .stop > .card { width: 100%; }
  .hero { padding-bottom: 150px; }
}

.tag {
  display: inline-block; align-self: flex-start;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  background: rgba(255,255,255,.72); border: 1px solid rgba(26,27,46,.08);
  padding: 6px 12px; border-radius: 999px;
}
.hero .tag { align-self: center; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -0.025em; line-height: 1.08; }
h1 { font-size: clamp(36px, 6vw, 76px); margin-top: 24px; font-weight: 300; }
h2 { font-size: clamp(30px, 3.8vw, 50px); margin-top: 18px; font-weight: 300; }
h3 { font-weight: 500; }
em { font-style: normal; font-weight: 500; -webkit-background-clip: text; background-clip: text; color: transparent; }
em.warm { background-image: linear-gradient(90deg, var(--orange), var(--pink)); }
em.cool { background-image: linear-gradient(90deg, var(--peri), #3fbf9a); }
/* short screens (landscape phones): smaller hero type, slimmer header */
@media (max-height: 520px) {
  .top { padding-top: 10px; padding-bottom: 10px; }
  h1 { font-size: clamp(28px, 4.4vw, 46px); margin-top: 16px; }
  h2 { font-size: clamp(26px, 3.4vw, 40px); }
  .hero { padding-top: 80px; padding-bottom: 120px; }
  .hint { margin-top: 20px; }
}
.lede { margin-top: 20px; max-width: 34em; font-size: clamp(15px, 1.4vw, 18px); color: var(--muted); }
.hint { margin-top: 40px; font-size: 14px; color: var(--muted); }
.hint span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }

/* story */
.story .inner { display: flex; flex-direction: column; gap: clamp(14px, 3vh, 26px); }
.story p { font-family: var(--head); font-weight: 300; font-size: clamp(24px, 3vw, 38px); line-height: 1.2; letter-spacing: -0.02em; }
.story .grad { font-weight: 400; background: linear-gradient(90deg, var(--orange), var(--pink), var(--peri)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story .soft { color: var(--muted); }

/* demos */
.demo { display: flex; align-items: center; margin: 5vh 0 10px; padding: 1vh 0; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.demo:focus-visible { outline: 2px solid var(--peri); outline-offset: 6px; border-radius: 12px; }
.caption { font-size: 14px; color: var(--muted); }
.caption b { color: var(--ink); font-weight: 500; }

.blend span {
  font-family: var(--head); font-weight: 500; font-size: clamp(64px, 9vw, 120px); line-height: 1;
  margin-right: .5em; transition: margin .9s cubic-bezier(.65,0,.35,1), color .5s ease .5s;
}
.blend span:last-child { margin-right: 0; }
.blend.go span { margin-right: .02em; color: var(--orange); }
.blend.go span:nth-child(2) { color: var(--pink); }
.blend.go span:nth-child(3) { color: var(--peri); margin-right: 0; }

.sum { gap: clamp(12px, 2vw, 22px); font-family: var(--head); font-size: clamp(40px, 5vw, 60px); font-weight: 300; }
.sum .grp { display: inline-flex; gap: 8px; }
.sum i { width: clamp(16px, 1.8vw, 22px); height: clamp(16px, 1.8vw, 22px); border-radius: 50%; background: var(--ink); transition: background .4s ease, transform .4s ease; }
.sum .op { color: var(--muted); }
.sum .eq, .sum .res { opacity: 0; transform: translateX(-8px); transition: opacity .5s ease, transform .5s ease; }
.sum .res { font-weight: 500; font-size: 1.5em; line-height: 1; background: linear-gradient(135deg, var(--orange), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sum.go .grp:first-child i { background: var(--orange); transform: scale(1.12); }
.sum.go .grp:nth-child(3) i { background: var(--peri); transform: scale(1.12); }
.sum.go .grp:first-child i:nth-child(2) { transition-delay: .15s; }
.sum.go .grp:nth-child(3) i:nth-child(1) { transition-delay: .3s; }
.sum.go .grp:nth-child(3) i:nth-child(2) { transition-delay: .45s; }
.sum.go .grp:nth-child(3) i:nth-child(3) { transition-delay: .6s; }
.sum.go .eq  { opacity: 1; transform: none; transition-delay: .9s; }
.sum.go .res { opacity: 1; transform: none; transition-delay: 1.1s; }

/* course cards */
.card {
  max-width: 420px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(26,27,46,.07);
  border-radius: 24px; padding: 14px 14px 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 30px 60px -30px rgba(60, 50, 120, .3);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.stop.right > .card { max-width: 420px; }
.swatch {
  position: relative; overflow: hidden; height: 120px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 500; font-size: 46px; color: #fff; letter-spacing: -0.02em;
}
.swatch::before, .swatch::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.22); }
.swatch::before { width: 160px; height: 160px; right: -50px; top: -70px; }
.swatch::after  { width: 80px; height: 80px; left: -24px; bottom: -36px; }
.swatch span { position: relative; }
.g-peach { background: linear-gradient(135deg, #ffb37a, #ff7a2f 60%, #ff5c8a); }
.g-sun   { background: linear-gradient(135deg, #ffe08a, #ffb347 60%, #ff8a4c); }
.g-mint  { background: linear-gradient(135deg, #a8f0d1, #5fd6a8 55%, #49b8c9); }
.g-peri  { background: linear-gradient(135deg, #c8b8ff, #8b9cff 55%, #6a7bff); }
.g-pink  { background: linear-gradient(135deg, #ffc1d6, #ff7aa8 55%, #b98aff); }
.card .age { margin: 16px 8px 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 4px 8px 0; font-size: 26px; }
.card .sub { margin: 2px 8px 0; color: var(--muted); }
.card ul { list-style: none; margin: 14px 8px 0; display: grid; gap: 7px; }
.card li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.4; }
.card li::before { content: ""; position: absolute; left: 0; top: .48em; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--pink)); }
[data-zone="maths"] .card li::before { background: linear-gradient(135deg, var(--mint), var(--peri)); }

/* approach */
.pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4vh; }
.pills .p { background: rgba(255,255,255,.78); border: 1px solid rgba(26,27,46,.07); border-radius: 18px; padding: 16px 18px; }
.pills b { display: block; font-family: var(--head); font-weight: 500; font-size: 18px; }
.pills span { color: var(--muted); font-size: 14px; }
@media (max-width: 1000px) { .pills { grid-template-columns: 1fr; } }

/* finish */
.finish .inner { display: flex; flex-direction: column; align-items: flex-start; }
.cta { margin-top: 28px; background: var(--ink); color: #fff; padding: 14px 26px; border-radius: 999px; font-weight: 500; transition: transform .2s ease, background .2s ease; }
.cta:hover { background: #2d2f4d; transform: translateY(-1px); }
.mail { margin-top: 12px; font-size: 14px; color: var(--muted); }
.foot { position: relative; z-index: 3; padding: 24px 6vw 40px; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .foot { padding: 24px 20px 40px; } }

/* reveal */
.js .r { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .r.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .r { opacity: 1; transform: none; }
}
