:root {
  --ocean-ink: #10204a;
  --octimo-blue: #1677e8;
  --action-blue: #0d61c7;
  --action-blue-hover: #084fa7;
  --glow-aqua: #25cbea;
  --discovery-violet: #7048d7;
  --violet-soft: #e4dcfb;
  --mango-star: #ffb11b;
  --cloud: #f6faff;
  --white: #ffffff;
  --ink-muted: #4c5c80;

  /* Depth bands: each section sits a step deeper than the one above. */
  --band-surface: var(--cloud);
  --band-shallows: #e5f0fd;
  --band-reef: #d3e5fb;
  --band-deep: var(--ocean-ink);
  --band-abyss: #0a1534;
  --deep-text: #c7d4ef;
  --deep-rule: rgba(199, 212, 239, 0.22);

  --display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --band-pad: clamp(64px, 9vw, 120px);
  --radius-button: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cloud);
  color: var(--ocean-ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.05;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--glow-aqua);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ocean-ink);
  color: var(--white);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border: 2px solid var(--action-blue);
  border-radius: var(--radius-button);
  background: var(--action-blue);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.button:hover {
  background: var(--action-blue-hover);
  border-color: var(--action-blue-hover);
}

.button-quiet {
  background: transparent;
  color: var(--action-blue);
}

.button-quiet:hover {
  background: rgba(13, 97, 199, 0.08);
  color: var(--action-blue-hover);
}

.button-light {
  border-color: var(--white);
  background: var(--white);
  color: var(--ocean-ink);
}

.button-light:hover {
  border-color: var(--glow-aqua);
  background: var(--white);
}

.button-small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(246, 250, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16, 32, 74, 0.08);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}

.wordmark span {
  padding-top: 4px;
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 1rem;
  font-weight: 700;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ocean-ink);
}

/* ---------- Bands ---------- */

.band {
  padding: var(--band-pad) 0;
  scroll-margin-top: 72px;
}

.band-surface {
  background: var(--band-surface);
}

.band-shallows {
  background: var(--band-shallows);
}

.band-reef {
  background: var(--band-reef);
}

.band-deep {
  background: var(--band-deep);
  color: var(--white);
}

.band-abyss {
  background: var(--band-abyss);
  color: var(--white);
}

.section-head {
  max-width: 34rem;
}

.section-head h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-head p {
  margin-top: 16px;
  color: var(--ink-muted);
}

.band-deep .section-head p,
.band-abyss .section-head p {
  color: var(--deep-text);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  gap: 32px;
}

.hero-copy {
  padding-bottom: clamp(64px, 9vw, 120px);
}

.status {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: #4a2aa8;
  font-size: 0.95rem;
  font-weight: 700;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 7.4vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.lede {
  max-width: 33rem;
  margin: 24px 0 32px;
  color: var(--ink-muted);
  font-size: 1.25rem;
}

/* The mascot's lower arms dip below the surface into the next band. */
.hero-mascot {
  position: relative;
  z-index: 1;
  margin-bottom: -72px;
  justify-self: center;
}

.hero-mascot img {
  width: min(100%, 560px);
  height: auto;
  filter: drop-shadow(0 28px 40px rgba(16, 32, 74, 0.16));
}

/* ---------- Octo-path ---------- */

.band-shallows {
  padding-top: calc(var(--band-pad) + 40px);
}

.octo-path {
  position: relative;
  margin-top: 56px;
  --arm-top: #2f7ff0;
}

.arm {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 160px;
  overflow: visible;
}

.arm path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.arm-under {
  stroke: var(--discovery-violet);
  stroke-width: 38px;
  transform: translateY(5px);
}

.arm-top {
  stroke: var(--arm-top);
  stroke-width: 30px;
}

.cups {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.cups li {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cup centres follow the arm: y = 60 on odd steps, 100 on even steps. */
.cup {
  --size: 64px;
  --centre: 60px;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  margin-top: calc(var(--centre) - var(--size) / 2);
  border: 7px solid var(--discovery-violet);
  border-radius: 50%;
  background: #f1edff;
  color: var(--discovery-violet);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.cups li:nth-child(even) .cup {
  --centre: 100px;
}

.cups li:nth-child(even) h3 {
  margin-top: 28px;
}

.cup span {
  padding-top: 3px;
}

.cup-challenge {
  --size: 74px;
}

.cup-star {
  --size: 88px;
  border-color: #d98a00;
  background: #fff6e1;
}

.cup-star svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #b06f00;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.cups h3 {
  margin-top: 40px;
  font-size: 1.6rem;
  font-weight: 800;
}

.cups p {
  max-width: 15rem;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 1rem;
}

/* Filled state. With JS, cups start empty and fill once in sequence. */
.cup,
.cup-star svg {
  transition: background-color 260ms ease, color 260ms ease, fill 260ms ease, stroke 260ms ease;
}

.no-js .cup:not(.cup-star),
.is-filled .cup:not(.cup-star) {
  background: var(--octimo-blue);
  color: var(--white);
}

.no-js .cup-star,
.is-filled .cup-star {
  background: var(--mango-star);
}

.no-js .cup-star svg,
.is-filled .cup-star svg {
  fill: var(--white);
  stroke: var(--white);
}

.cups li:nth-child(2) .cup,
.cups li:nth-child(2) .cup svg {
  transition-delay: 160ms;
}

.cups li:nth-child(3) .cup {
  transition-delay: 320ms;
}

.cups li:nth-child(4) .cup {
  transition-delay: 480ms;
}

.cups li:nth-child(5) .cup,
.cups li:nth-child(5) .cup svg {
  transition-delay: 680ms;
}

.is-filled .cup-star {
  animation: star-settle 420ms ease-out 680ms both;
}

@keyframes star-settle {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- Eight ways ---------- */

.ways-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.ways-head {
  position: sticky;
  top: 112px;
}

.ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ways li {
  position: relative;
  padding-left: 40px;
}

/* A small suction cup marks each way in. */
.ways li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 24px;
  height: 24px;
  border: 5px solid var(--discovery-violet);
  border-radius: 50%;
  background: var(--white);
}

.ways h3 {
  font-size: 1.55rem;
  font-weight: 700;
}

.ways p {
  margin-top: 4px;
  color: var(--ink-muted);
}

/* ---------- Deep: parents and schools ---------- */

.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 72px);
  margin: 56px 0 48px;
}

.promises article {
  padding: 28px 0 32px;
  border-top: 1px solid var(--deep-rule);
}

.promises h3 {
  font-size: 1.6rem;
  font-weight: 700;
}

.promises p {
  max-width: 32rem;
  margin-top: 10px;
  color: var(--deep-text);
}

/* ---------- Abyss: roadmap ---------- */

.roadmap-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.roadmap {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

/* The roadmap is a true sequence, so its markers carry numbers. */
.roadmap li {
  position: relative;
  padding: 0 0 32px 64px;
  counter-increment: step;
}

.roadmap li:last-child {
  padding-bottom: 0;
}

.roadmap li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--deep-rule);
  border-radius: 50%;
  color: var(--deep-text);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.roadmap li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 42px;
  bottom: 2px;
  width: 2px;
  background: var(--deep-rule);
}

.roadmap li.is-current::before {
  border-color: var(--glow-aqua);
  background: var(--glow-aqua);
  color: var(--ocean-ink);
}

.roadmap h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.roadmap p {
  margin-top: 2px;
  color: var(--deep-text);
}

.roadmap li.is-current p {
  color: var(--glow-aqua);
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--deep-rule);
  background: var(--band-abyss);
  color: var(--deep-text);
  font-size: 1rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-row p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.wordmark-small {
  color: var(--white);
  font-size: 1.5rem;
}

.footer-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-row nav a {
  color: var(--white);
  text-underline-offset: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .site-nav {
    display: none;
  }

  .header-row {
    justify-content: space-between;
  }

  .hero-grid,
  .ways-grid,
  .roadmap-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    padding-bottom: 8px;
  }

  .hero-mascot img {
    width: min(78vw, 440px);
  }

  .ways-head {
    position: static;
  }
}

/* Narrow screens: the arm turns vertical and the cups stack down it. */
@media (max-width: 760px) {
  .arm {
    display: none;
  }

  .cups {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    text-align: left;
  }

  .cups li {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 16px;
    align-items: start;
    position: relative;
    padding-bottom: 28px;
  }

  .cups li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 31px;
    top: 30px;
    bottom: -30px;
    width: 26px;
    border-radius: 13px;
    background: var(--arm-top);
    box-shadow: 4px 0 0 var(--discovery-violet);
  }

  .cup,
  .cups li:nth-child(even) .cup {
    position: relative;
    grid-row: 1 / span 2;
    justify-self: center;
    margin-top: 0;
  }

  .cups h3,
  .cups li:nth-child(even) h3 {
    margin-top: 8px;
  }

  .cups p {
    max-width: none;
  }

  .ways,
  .promises {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-mascot {
    margin-bottom: -48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
