/* Lanemark launch site. Palette, type and logo from docs/site/BRIEF.md. */

:root {
  /* light (default) */
  --bg: #eef7fb;
  --bg-deep: #d9eff7;
  --surface: #ffffff;
  --border: #c3dfea;
  --text: #0b2a3a;
  --text-muted: #43606d;
  --primary: #0a6f94;
  --primary-hover: #085a78;
  --on-primary: #ffffff;
  --teal: #0f8a80;
  --on-teal: #ffffff;
  --lane: #0369a1;
  --lane-alt: #ffffff;
  --ready: #f6a723;
  --ready-soft: #fff1d6;
  --on-ready: #3a2300;
  --ready-text: #9a4a00;
  --focus: #0a6f94;
  --paper: #ffffff;
  --ink: #0b2a3a;
  --ink-muted: #43606d;
  --medal-star: #ffd56b;
  --level-1: #0369a1;
  --level-2: #0f766e;
  --level-3: #15803d;
  --level-4: #a16207;
  --shadow-sm: 0 1px 2px rgb(8 52 72 / 0.08), 0 1px 1px rgb(8 52 72 / 0.04);
  --shadow-md: 0 6px 18px rgb(8 52 72 / 0.1), 0 2px 4px rgb(8 52 72 / 0.06);
  --shadow-lg: 0 24px 60px -20px rgb(8 52 72 / 0.3), 0 8px 18px rgb(8 52 72 / 0.08);

  --font-display: "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-cert: "Fraunces", Georgia, "Times New Roman", serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 22px;
  --gutter: 24px;
  --rhythm: 64px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06161f;
    --bg-deep: #0b2532;
    --surface: #0e2633;
    --border: #21485a;
    --text: #e5f3f9;
    --text-muted: #9cbac7;
    --primary: #4fc4e8;
    --primary-hover: #7ad4ef;
    --on-primary: #03202b;
    --teal: #43cdbf;
    --on-teal: #03202b;
    --lane: #4fc4e8;
    --lane-alt: #0e2633;
    --ready: #fbbf3c;
    --ready-soft: #3a2a0a;
    --on-ready: #2b1900;
    --ready-text: #ffcf6b;
    --focus: #7ad4ef;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 6px 18px rgb(0 0 0 / 0.45);
    --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 0.7);
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 40px;
    --rhythm: 96px;
  }
}

/* ---------- base ---------- */

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  /* One gradient for the whole page: surface water at the top, the deep end at the bottom. */
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 18%, var(--bg-deep) 100%);
  font-variant-numeric: tabular-nums;
}

p {
  margin: 0;
  max-width: 62ch;
}

h1,
h2,
h3 {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--primary);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

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

.defs {
  position: absolute;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: calc(72rem + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

.section {
  padding-block: var(--rhythm);
}

.section__title {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  max-width: 20ch;
}

.section__intro {
  margin-top: 16px;
  color: var(--text-muted);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.small-print {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 120ms var(--ease-out),
    opacity 120ms;
}

.btn--lg {
  min-height: 52px;
  padding: 0 28px;
  font-size: 1.0625rem;
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--secondary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn--secondary:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.btn:active,
.chip:active,
.text-btn:active,
.text-link:active,
.site-nav__link:active,
.brand:active,
.try-skill:active,
.faq summary:active {
  transform: scale(0.97);
}

.text-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  cursor: pointer;
  transition: transform 120ms var(--ease-out);
}

.text-btn:hover,
.text-link:hover {
  color: var(--primary-hover);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: transform 120ms var(--ease-out);
}

.chip:hover {
  border-color: var(--primary);
}

.chip[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* ---------- header ---------- */

.sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  transition: transform 120ms var(--ease-out);
}

.brand:hover .brand__word {
  color: var(--primary);
}

.brand__mark {
  flex: none;
  /* Centre the wordmark on the ring (cy 13 of 32), not on the whole badge. */
  margin-top: 6px;
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.mark__ring {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
}

.mark__dot {
  fill: var(--ready);
}

.mark__tail {
  fill: var(--teal);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__link {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: transform 120ms var(--ease-out);
}

.site-nav__link:hover {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.site-nav .btn {
  margin-left: 8px;
  white-space: nowrap;
}

@media (max-width: 359px) {
  .site-nav .btn {
    padding: 0 14px;
    font-size: 0.9375rem;
  }

  .brand__word {
    font-size: 1.125rem;
  }
}

@media (min-width: 720px) {
  .site-nav__link {
    display: inline-flex;
  }
}

/* ---------- shared mockup pieces ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.paper {
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.mock {
  padding: 18px;
  font-size: 0.875rem;
}

.mock__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: nowrap;
}

.pill--ready {
  background: var(--ready);
  color: var(--on-ready);
}

.level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--lvl);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.875rem;
  line-height: 1.5;
}

.lvl-dot {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lvl);
}

.swimmer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress {
  margin-top: 12px;
}

.progress__track {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 16%, var(--surface));
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transform-origin: left center;
  transform: scaleX(var(--p, 1));
}

.progress__label {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.skills {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.skill {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  font-size: 0.875rem;
  line-height: 1.3;
}

.skill__date {
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.skill:not(.is-on) .skill__date {
  opacity: 0;
}

.tick {
  --size: 22px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border: 2px solid color-mix(in srgb, var(--text-muted) 55%, transparent);
  border-radius: 7px;
}

.tick::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--teal);
  opacity: 0;
}

.tick svg {
  position: relative;
  width: 74%;
  height: 74%;
  fill: none;
  stroke: var(--on-teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.is-on .tick::before,
[aria-pressed="true"] .tick::before {
  opacity: 1;
}

.is-on .tick svg,
[aria-pressed="true"] .tick svg {
  stroke-dashoffset: 0;
}

.paper .tick {
  border-color: color-mix(in srgb, var(--ink-muted) 55%, transparent);
}

.paper .tick::before {
  background: #0f8a80;
}

.paper .tick svg {
  stroke: #ffffff;
}

.medallion {
  --m: 48px;
  display: inline-grid;
  place-items: center;
  width: var(--m);
  height: var(--m);
  border-radius: 50%;
  background: var(--lvl);
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 6px var(--lvl);
}

.medallion svg {
  width: 56%;
  height: 56%;
}

.star {
  fill: var(--medal-star);
}

.medallion--sm {
  --m: 34px;
}

.medallion--lg {
  --m: clamp(44px, 8vw, 68px);
}

.cert__kicker {
  margin-top: 14px;
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 0.875rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  line-height: 1.3;
}

.cert__name {
  font-family: var(--font-cert);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--ink);
}

/* ---------- lane ropes ---------- */

.ropes {
  display: block;
  pointer-events: none;
}

.rope__line {
  stroke: var(--lane);
  stroke-width: 2;
}

/* Floats are round-capped dashes: 4 px dash + 9 px caps reads as a 13 x 9 ellipse. */
.rope__float {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 4 24;
}

.rope__float--a {
  stroke: var(--lane);
  stroke-width: 9;
}

.rope__float--edge {
  stroke: var(--lane);
  stroke-width: 10;
  stroke-dashoffset: -14;
}

.rope__float--b {
  stroke: var(--lane-alt);
  stroke-width: 7;
  stroke-dashoffset: -14;
}

/* ---------- 1. hero ---------- */

.hero {
  display: grid;
  gap: 48px;
  padding-top: 40px;
  padding-bottom: var(--rhythm);
}

.hero__title {
  font-size: clamp(2.6rem, 1.4rem + 6vw, 6rem);
  max-width: 12ch;
}

.hero__sub {
  margin-top: 24px;
  font-size: 1.125rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.stack {
  margin: 0;
  min-width: 0;
}

.stack__tilt {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 4px 8px;
  transform-style: preserve-3d;
  will-change: transform;
}

.water {
  position: absolute;
  inset: 0 0 24px;
  z-index: 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--bg-deep);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.water .ropes {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -12px;
  width: calc(100% + 24px);
  height: 100%;
}

.water__waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--teal);
  stroke-width: 10;
  stroke-linecap: round;
  opacity: 0.12;
}

.ropes--drift {
  animation: drift 6s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translateX(-4px);
  }
  to {
    transform: translateX(4px);
  }
}

.stack__card {
  position: relative;
}

.stack__card--back {
  display: none;
  z-index: 1;
}

.stack__card--middle {
  z-index: 2;
  width: 94%;
  margin-top: 16px;
  padding-bottom: 48px;
  transform: rotate(1.5deg);
}

.stack__card--front {
  z-index: 3;
  align-self: flex-end;
  width: 70%;
  margin-top: -34px;
  margin-right: 2%;
  transform: rotate(-2deg);
}

.hero-swimmer__ready {
  margin-top: 10px;
}

.hero-swimmer .progress__label {
  display: grid;
}

.hero-swimmer__count {
  grid-area: 1 / 1;
}

.hero-swimmer__count--before {
  opacity: 0;
}

.roster__list {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.roster__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-deep) 55%, transparent);
  font-weight: 600;
}

.roster__list .pill {
  margin-left: auto;
}

.cert-corner {
  padding: 18px 18px 20px;
  border: 1px solid #e3eef3;
}

.cert-corner .cert__name {
  font-size: 1.625rem;
}

.cert__rule {
  display: block;
  width: 60%;
  height: 2px;
  margin-top: 10px;
  background: color-mix(in srgb, var(--ink-muted) 30%, transparent);
}

/* Load sequence: three cards rise and fade in, then Maya's last skill ticks itself. */
.stack__card {
  animation: rise 500ms var(--ease-out) both;
}

.stack__card--back {
  animation-delay: 100ms;
}

.stack__card--middle {
  animation-delay: 180ms;
}

.stack__card--front {
  animation-delay: 260ms;
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

/* 260 + 500 + 600 = 1360 ms */
.hero-swimmer__last .tick::before {
  animation: fade-in 200ms ease-out 1360ms both;
}

.hero-swimmer__last .tick svg {
  animation: draw 320ms var(--ease-out) 1440ms both;
}

.hero-swimmer__last .skill__date {
  animation: fade-in 300ms ease-out 1500ms both;
}

.hero-swimmer__fill {
  animation: fill-up 600ms var(--ease-out) 1440ms both;
}

.hero-swimmer__count--after {
  animation: fade-in 200ms ease-out 1600ms both;
}

.hero-swimmer__count--before {
  animation: fade-out 200ms ease-out 1600ms both;
}

.hero-swimmer__ready {
  animation: pop 260ms var(--ease-out) 1900ms both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes fill-up {
  from {
    transform: scaleX(0.8);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
}

@media (min-width: 720px) {
  .hero {
    padding-top: 56px;
  }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 7fr 5fr;
    align-items: center;
    gap: 56px;
  }

  .stack__tilt {
    display: grid;
    grid-template-areas: "s";
    padding: 8px 0 0;
  }

  .stack__card {
    grid-area: s;
  }

  .water {
    inset: 40px -16px 16px 32px;
  }

  .stack__card--back {
    display: block;
    width: 74%;
    justify-self: start;
    align-self: start;
    transform: rotate(-6deg);
  }

  .stack__card--middle {
    width: 80%;
    justify-self: end;
    align-self: start;
    margin-top: 176px;
    margin-bottom: 104px;
    padding-bottom: 56px;
    transform: rotate(2deg);
  }

  .stack__card--front {
    width: 58%;
    justify-self: end;
    align-self: end;
    margin: 0 -8px 0 0;
  }
}

/* ---------- 2. problem ---------- */

.problem {
  padding-bottom: var(--rhythm);
}

.problem__line {
  font-weight: 800;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 26ch;
}

.problem__line span {
  color: var(--text-muted);
}

/* ---------- 3. how it works ---------- */

.how__steps {
  position: relative;
  margin-top: 40px;
}

.lane {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}

.lane__dash {
  stroke: var(--lane);
  stroke-width: 2;
  stroke-dasharray: 10 8;
}

.lane__draw {
  stroke: #ffffff;
  stroke-width: 4;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.lane--h {
  display: none;
  left: 0;
  right: 0;
  width: 100%;
  height: 4px;
}

.lane--v {
  left: 10px;
  top: 0;
  bottom: 0;
  width: 4px;
  height: 100%;
}

.steps {
  position: relative;
  display: grid;
  gap: 20px;
  padding-left: 36px;
}

.step {
  padding: 16px 16px 24px;
}

.step__panel {
  display: grid;
  align-items: center;
  min-height: 150px;
  margin-bottom: 20px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-deep);
}

.step__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
}

.skills--mini {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface);
}

.class-mini {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  border-left: 4px solid var(--ready);
}

.class-mini__bar {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 22%, transparent);
}

.class-mini__bar--short {
  width: 60%;
}

.cert-thumb {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(220px, 100%);
  aspect-ratio: 1.414;
  margin-inline: auto;
  padding: 16px;
  align-content: center;
  box-shadow: var(--shadow-md);
  border: 6px double #d5e6ee;
}

.cert-thumb__line {
  display: block;
  width: 70%;
  height: 7px;
  border-radius: 999px;
  background: #c9dbe3;
}

.cert-thumb__line--short {
  width: 44%;
}

/* Reveal: the lane draws, then each step rises as the line reaches it. */
.js .how .lane__draw {
  stroke-dashoffset: 1;
}

.js .how .step {
  opacity: 0;
  transform: translateY(12px);
}

.how.in .lane__draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 900ms ease-in-out;
}

.how.in .step {
  opacity: 1;
  transform: none;
  transition:
    opacity 500ms var(--ease-out),
    transform 500ms var(--ease-out);
}

.how.in .step:nth-child(1) {
  transition-delay: 200ms;
}

.how.in .step:nth-child(2) {
  transition-delay: 450ms;
}

.how.in .step:nth-child(3) {
  transition-delay: 650ms;
}

@media (min-width: 720px) {
  /* The lane runs above the cards, through a dot over each one. */
  .how__steps {
    padding-top: 40px;
  }

  .lane--h {
    display: block;
    top: 16px;
    translate: 0 -50%;
  }

  .step {
    position: relative;
  }

  .step::before {
    content: "";
    position: absolute;
    top: -31px;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--lane);
    translate: -50% 0;
  }

  .lane--v {
    display: none;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-left: 0;
  }
}

/* ---------- 4. try a level ---------- */

.try {
  position: relative;
}

.try__inner {
  position: relative;
  isolation: isolate;
  padding-block: 48px;
}

.try__inner::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) / 2);
  z-index: -1;
  border-radius: 36px;
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent);
}

.try__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin-top: 32px;
  align-items: start;
}

.try-card {
  padding: 22px 18px;
  border-left: 4px solid var(--border);
}

.is-ready .try-card {
  border-left-color: var(--ready);
}

.try-card__name {
  font-size: 1.5rem;
}

.try-card__ready {
  margin-top: 12px;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 200ms ease-out,
    transform 260ms var(--ease-out);
}

.is-ready .try-card__ready {
  opacity: 1;
  transform: none;
}

.try-card .progress__fill {
  transition: transform 400ms var(--ease-out);
}

.try-skills {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.try-skill {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms var(--ease-out);
}

.try-skill:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.try-skill .tick {
  --size: 28px;
}

.try-skill .tick::before {
  transition: opacity 160ms ease-out;
}

.try-skill .tick svg {
  transition: stroke-dashoffset 280ms var(--ease-out) 60ms;
}

.try-skill .skill__date {
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.try-skill[aria-pressed="true"] .skill__date {
  opacity: 1;
}

.try-cert-col {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-width: 0;
}

.cert {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1.414;
  padding: clamp(14px, 3.5vw, 36px);
  background: transparent;
  box-shadow: none;
  text-align: center;
  transition: transform 500ms var(--ease-out);
}

/* The paper itself: a ghost at 75% until every skill is ticked. */
.cert::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  opacity: 0.75;
  transition: opacity 400ms ease-out;
}

.cert::after {
  content: "";
  position: absolute;
  inset: clamp(6px, 1.4vw, 12px);
  border: 2px solid color-mix(in srgb, var(--level-2) 45%, transparent);
  border-radius: 8px;
  outline: 1px dashed color-mix(in srgb, var(--text-muted) 50%, transparent);
  outline-offset: 4px;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 400ms ease-out;
}

.cert__ghost {
  position: absolute;
  z-index: 2;
  top: 74%;
  left: 50%;
  width: max-content;
  max-width: 80%;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
  font-size: clamp(0.875rem, 0.8rem + 0.4vw, 1.0625rem);
  line-height: 1.3;
  translate: -50% -50%;
  transition: opacity 300ms ease-out;
}

.cert__body {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 300ms ease-out;
}

.cert__medal-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.cert .medallion {
  transform: scale(0.6);
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 120ms;
}

.cert .medallion svg {
  transform: rotate(20deg);
  transition: transform 600ms var(--ease-out) 200ms;
}

.cert .cert__kicker {
  margin-top: clamp(6px, 1.5vw, 14px);
}

/* The dashed line is the blank to be filled in; only the name inside is clipped, so the line shows. */
.cert__name--write {
  font-size: clamp(1.375rem, 0.9rem + 2.4vw, 2.5rem);
  min-width: 8ch;
  border-bottom: 2px dashed var(--ink-muted);
  transition: border-color 400ms ease-out 700ms;
}

.cert__name--write span {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 700ms ease-in-out 300ms;
}

.try__grid:not(.is-ready) .cert__body {
  opacity: 0.22;
}

.cert__details {
  display: grid;
  justify-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 400ms ease-out 900ms;
}

.cert__level {
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(0.875rem, 0.8rem + 0.4vw, 1.0625rem);
}

.cert__date {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.cert__skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 6px;
  max-width: 46ch;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.cert__skills li:not(:last-child)::after {
  content: " ·";
}

.is-ready .cert {
  transform: translateY(-8px);
}

.is-ready .cert::before,
.is-ready .cert::after {
  opacity: 1;
}

.is-ready .cert__ghost {
  opacity: 0;
}

.is-ready .cert__body,
.is-ready .cert__details {
  opacity: 1;
}

.is-ready .cert .medallion,
.is-ready .cert .medallion svg {
  transform: none;
}

.is-ready .cert__name--write {
  border-bottom-color: transparent;
}

.is-ready .cert__name--write span {
  clip-path: inset(0 0 0 0);
}

/* Unticking: snap back without replaying the reveal delays. */
.try__grid:not(.is-ready) .cert *,
.try__grid:not(.is-ready) .cert {
  transition-delay: 0ms;
}

.burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 160px;
  overflow: visible;
  translate: -50% -50%;
  pointer-events: none;
}

.burst circle {
  opacity: 0;
}

.burst circle:nth-child(odd) {
  fill: var(--primary);
}

.burst circle:nth-child(even) {
  fill: #0f8a80;
}

.burst.go circle {
  animation: burst 800ms var(--ease-out) 250ms both;
}

@keyframes burst {
  from {
    opacity: 1;
    transform: rotate(var(--a)) translateX(18px);
  }
  70% {
    opacity: 0.9;
  }
  to {
    opacity: 0;
    transform: rotate(var(--a)) translateX(64px);
  }
}

.try__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 36px;
}

.try__foot p {
  color: var(--text-muted);
}

@media (min-width: 720px) {
  .try__inner {
    padding-block: 64px;
  }

  .try__inner::before {
    inset: 0;
  }

  .try__inner {
    padding-inline: calc(var(--gutter) + 24px);
  }
}

@media (min-width: 960px) {
  .try {
    display: grid;
    align-items: center;
    min-height: 100vh;
  }

  .try__grid {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    align-items: center;
  }
}

/* ---------- 5. features ---------- */

.bento {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.tile {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    opacity 500ms var(--ease-out),
    transform 500ms var(--ease-out);
}

.tile h3 {
  margin: 14px 0 6px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tile p {
  color: var(--text-muted);
  font-size: 1rem;
}

.tile--big h3 {
  font-size: 1.625rem;
}

.glyph {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.level-pills {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  max-width: 320px;
}

.level-pills span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--lvl);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.level-pills span:nth-child(2) {
  margin-left: 16px;
}

.level-pills span:nth-child(3) {
  margin-left: 32px;
}

.level-pills span:nth-child(4) {
  margin-left: 48px;
}

.tile__split {
  display: grid;
  gap: 20px;
  align-items: center;
}

.progress-mini {
  padding: 16px 18px;
  border: 1px solid #e3eef3;
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
}

.progress-mini__count {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--ink);
}

.progress-mini ul {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.progress-mini li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  color: var(--ink);
}

.progress-mini li > span:last-child:not(.tick) {
  color: var(--ink-muted);
}

.progress-mini .tick {
  --size: 18px;
}

.progress-mini .todo {
  color: var(--ink-muted);
}

.progress-mini__note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #c9dbe3;
  color: var(--ink-muted);
  font-style: italic;
}

@media (hover: hover) and (pointer: fine) {
  .tile.in:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
}

@media (min-width: 720px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile--big,
  .tile--wide,
  .bento > :last-child {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: dense;
  }

  .tile--big {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile--wide {
    grid-column: span 2;
  }

  /* Fill the last two rows evenly: 1 1 2, then 2 2. */
  .bento > :nth-child(7),
  .bento > :nth-child(8),
  .bento > :nth-child(9) {
    grid-column: span 2;
  }

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

/* Shared reveal for tiles and the demo frame. */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.device.reveal {
  transition:
    opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
}

/* ---------- 6. see it ---------- */

.device {
  overflow: hidden;
  width: 100%;
  max-width: 360px;
  margin: 40px auto 0;
  border: 10px solid color-mix(in srgb, var(--text) 90%, transparent);
  border-radius: 40px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.device__bar {
  display: none;
}

.device__screen {
  display: block;
  width: 100%;
  height: 680px;
  border: 0;
  border-radius: 30px;
  background: var(--bg);
}

.see__full {
  display: flex;
  justify-content: center;
  margin: 16px auto 0;
}

/* Phones: no bezel, so the app gets the width it was built for (about 372 px at 390). */
@media (max-width: 720px) {
  .device {
    max-width: none;
    width: auto;
    margin-inline: calc(8px - var(--gutter));
    border: 1px solid var(--border);
    border-radius: 20px;
  }

  .device__screen {
    border-radius: 19px;
    height: 640px;
  }
}

@media (min-width: 721px) {
  .device {
    max-width: none;
    border: 1px solid var(--border);
    border-radius: 14px;
  }

  .device__bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-deep) 60%, var(--surface));
  }

  .device__dots {
    position: absolute;
    left: 14px;
    display: flex;
    gap: 6px;
  }

  .device__dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text-muted) 40%, transparent);
  }

  .device__address {
    min-width: 40%;
    padding: 3px 14px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-align: center;
  }

  .device__screen {
    height: 640px;
    border-radius: 0;
  }
}

/* ---------- 7. questions ---------- */

.faq__list {
  display: grid;
  max-width: 46rem;
  margin-top: 32px;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
  transition: transform 120ms var(--ease-out);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--primary);
}

.faq__icon {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  transition: transform 200ms var(--ease-out);
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--primary);
}

.faq__icon::after {
  transform: rotate(90deg);
}

.faq details[open] .faq__icon {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 4px 20px;
  color: var(--text-muted);
}

/* ---------- 8. close ---------- */

.close {
  position: relative;
  overflow: hidden;
  padding-bottom: var(--rhythm);
  background: var(--bg-deep);
  text-align: center;
}

.close__ropes {
  width: 100%;
  height: 120px;
}

.close__inner {
  display: grid;
  justify-items: center;
  margin-top: 16px;
}

.close__inner p {
  margin-inline: auto;
}

.close__dot {
  transform-box: fill-box;
  transform-origin: center;
}

.close.in .close__dot {
  animation: pulse 600ms ease-in-out 200ms 1;
}

@keyframes pulse {
  50% {
    transform: scale(1.15);
  }
}

.close__title {
  margin-top: 20px;
  font-size: clamp(2.25rem, 1.2rem + 4.5vw, 4.5rem);
  max-width: 14ch;
}

.close__line {
  margin-top: 20px;
  margin-bottom: 32px;
  font-size: 1.125rem;
}

/* ---------- 9. footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-block: 24px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer__brand svg {
  margin-top: 3px;
}

.site-footer__name {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.site-footer__credit {
  margin-left: auto;
}

/* ---------- reduced motion: everything in its final state ---------- */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .js .reveal,
  .js .how .step {
    opacity: 1;
    transform: none;
  }

  .js .how .lane__draw {
    stroke-dashoffset: 0;
  }

  .is-ready .cert {
    transform: none;
  }

  .tile.in:hover {
    transform: none;
  }
}
