/* Roadworthy launch site. Extends the app's design system (docs/DESIGN.md). */

:root {
  color-scheme: light dark;

  /* ground and surfaces */
  --bg:            #f4f5f2;
  --bg-deep:       #e7eae3;   /* alternate band (how it works, closing CTA) */
  --surface:       #ffffff;
  --surface-sunken:#eceee9;
  --border:        #d8dbd4;
  --border-strong: #b5bab0;
  --ink:           #1b1f1d;
  --ink-muted:     #545b57;

  /* the one accent: road-sign teal */
  --accent:        #0b6e63;
  --accent-hover:  #095a51;
  --accent-soft:   #dcefeb;
  --on-accent:     #ffffff;
  --focus:         #0b6e63;

  /* road: the asphalt band behind the demo, and its lane paint */
  --road:          #24292a;
  --road-ink:      #f1f3ef;
  --road-ink-muted:#a9b0ac;
  --lane-paint:    #f2f2ec;

  /* learner plate (same in both themes, as a real plate is) */
  --plate-bg:      #ffffff;
  --plate-ink:     #d0262d;
  --plate-edge:    rgb(20 28 24 / 0.14);

  /* rating ramp: solid / badge background / badge text */
  --rating-0: #7a828c; --rating-0-bg: #eceef1; --rating-0-text: #3d4450;
  --rating-1: #d0533c; --rating-1-bg: #fde8e4; --rating-1-text: #962a17;
  --rating-2: #d99a1e; --rating-2-bg: #fcf0d2; --rating-2-text: #774700;
  --rating-3: #3478c6; --rating-3-bg: #e0ecfb; --rating-3-text: #1d4f91;
  --rating-4: #23935a; --rating-4-bg: #dcf3e6; --rating-4-text: #145a34;

  /* verdict tones */
  --tone-ready:     #23935a; --tone-ready-bg:     #dcf3e6; --tone-ready-text:     #145a34;
  --tone-nearly:    #d99a1e; --tone-nearly-bg:    #fcf0d2; --tone-nearly-text:    #774700;
  --tone-not-ready: #c0392b; --tone-not-ready-bg: #fbe4e1; --tone-not-ready-text: #8f2318;
  --tone-warning:   #e06d10; --tone-warning-bg:   #ffe9d6; --tone-warning-text:   #8a3b00;

  /* depth: tinted, layered, never flat black */
  --shadow-sm: 0 1px 2px rgb(27 40 34 / 0.06), 0 2px 6px rgb(27 40 34 / 0.06);
  --shadow-md: 0 2px 4px rgb(27 40 34 / 0.06), 0 10px 24px -6px rgb(27 40 34 / 0.14);
  --shadow-lg: 0 4px 8px rgb(27 40 34 / 0.06), 0 30px 60px -20px rgb(27 40 34 / 0.28);

  /* type */
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --size-hero: clamp(2.6rem, 1.6rem + 5vw, 5.75rem);
  --size-title: clamp(1.9rem, 1.3rem + 2.6vw, 3.25rem);
  --size-lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);

  /* layout */
  --gutter: 24px;
  --section-y: 120px;
  --header-h: 64px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0f1412;
    --bg-deep:       #141a17;
    --surface:       #1a1f1c;
    --surface-sunken:#151917;
    --border:        #2e3531;
    --border-strong: #48514c;
    --ink:           #eef1ee;
    --ink-muted:     #a7afaa;

    --accent:        #5fd3bf;
    --accent-hover:  #80e0cf;
    --accent-soft:   #163a34;
    --on-accent:     #04201c;
    --focus:         #5fd3bf;

    --road:          #07090a;
    --road-ink:      #eef1ee;
    --road-ink-muted:#9aa29e;
    --lane-paint:    #d9dbd3;

    --rating-0: #8e97a3; --rating-0-bg: #2a2f37; --rating-0-text: #cbd1d9;
    --rating-1: #f07a63; --rating-1-bg: #4a1f19; --rating-1-text: #ffb8aa;
    --rating-2: #eab547; --rating-2-bg: #45330f; --rating-2-text: #f9d47e;
    --rating-3: #5f9fe8; --rating-3-bg: #1a3352; --rating-3-text: #add0fa;
    --rating-4: #43c07f; --rating-4-bg: #173d29; --rating-4-text: #a2e2bb;

    --tone-ready:     #43c07f; --tone-ready-bg:     #173d29; --tone-ready-text:     #a2e2bb;
    --tone-nearly:    #eab547; --tone-nearly-bg:    #45330f; --tone-nearly-text:    #f9d47e;
    --tone-not-ready: #f0705f; --tone-not-ready-bg: #4a1d18; --tone-not-ready-text: #ffb4a8;
    --tone-warning:   #f5944a; --tone-warning-bg:   #4a2810; --tone-warning-text:   #ffc596;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4), 0 2px 6px rgb(0 0 0 / 0.3);
    --shadow-md: 0 2px 4px rgb(0 0 0 / 0.4), 0 10px 24px -6px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 4px 8px rgb(0 0 0 / 0.4), 0 30px 60px -20px rgb(0 0 0 / 0.7);
  }
}

@media (max-width: 759px) {
  :root {
    --gutter: 16px;
    --section-y: 72px;
  }
}

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

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

html {
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  text-wrap: balance;
}

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

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

figure {
  margin: 0;
}

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

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

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

main:focus {
  outline: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1200px);
  margin-inline: auto;
}

.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;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: 16px;
  top: 8px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.section-title {
  font-size: var(--size-title);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.eyebrow {
  margin-bottom: 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.small {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.band {
  background: var(--bg-deep);
}

/* ---------- shared components ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms var(--ease-out);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.97);
}

.btn--large {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1.125rem;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 4px;
}

.link-more:hover {
  text-decoration: underline;
}

.link-more svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms var(--ease-out);
}

.link-more:hover svg {
  transform: translateX(3px);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.tone--ready { background: var(--tone-ready-bg); color: var(--tone-ready-text); }
.tone--nearly { background: var(--tone-nearly-bg); color: var(--tone-nearly-text); }
.tone--not-ready { background: var(--tone-not-ready-bg); color: var(--tone-not-ready-text); }
.tone--warning { background: var(--tone-warning-bg); color: var(--tone-warning-text); }
.chip--neutral,
.countdown:not(.tone--warning) { background: var(--surface-sunken); color: var(--ink-muted); }

.rating--0 { background: var(--rating-0-bg); color: var(--rating-0-text); }
.rating--1 { background: var(--rating-1-bg); color: var(--rating-1-text); }
.rating--2 { background: var(--rating-2-bg); color: var(--rating-2-text); }
.rating--3 { background: var(--rating-3-bg); color: var(--rating-3-text); }
.rating--4 { background: var(--rating-4-bg); color: var(--rating-4-text); }

.dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot--0 { background: var(--rating-0); }
.dot--1 { background: var(--rating-1); }
.dot--2 { background: var(--rating-2); }
.dot--3 { background: var(--rating-3); }
.dot--4 { background: var(--rating-4); }

.glyph {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Score ring: r=42 in a 100 x 100 box, starting at 12 o'clock. */
.ring {
  --ring-tone: var(--tone-nearly);
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
}

.ring[data-tone="ready"] { --ring-tone: var(--tone-ready); }
.ring[data-tone="not-ready"] { --ring-tone: var(--tone-not-ready); }

.ring svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  fill: none;
  stroke-width: var(--ring-stroke, 8);
}

.ring__track {
  stroke: var(--surface-sunken);
}

.ring__value {
  stroke: var(--ring-tone);
  stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke 450ms ease;
}

.ring__num {
  grid-area: 1 / 1;
  font-family: var(--font-num);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* The logo mark, tilted like the app's plate. */
.mark {
  flex: none;
  overflow: visible;
  transform: rotate(-6deg);
}

.mark__tick {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---------- 0. header ---------- */

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}

.brand .wordmark {
  font-size: 1.25rem;
}

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

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  text-underline-offset: 4px;
}

.nav__link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.nav .btn {
  margin-left: 12px;
  min-height: 44px;
  padding: 0 18px;
}

.btn--compact {
  display: none;
}

@media (max-width: 759px) {
  .nav__link,
  .nav .btn--wide-only {
    display: none;
  }

  .nav .btn--compact {
    display: inline-flex;
    margin-left: 0;
  }
}

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

.hero {
  --mx: 0;
  --my: 0;
  --hero-p: 0;
  --hero-h: 0px;
  position: relative;
  padding-block: 56px var(--section-y);
}

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

.hero__grid {
  display: grid;
  gap: 56px;
}

.hero h1 {
  font-size: var(--size-hero);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.03em;
  overflow-wrap: normal;
  hyphens: manual;
}

.lead {
  margin-top: 24px;
  font-size: var(--size-lead);
  line-height: 1.5;
  color: var(--ink-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 32px;
}

.reassure {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.reassure svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.wide-only {
  display: none;
}

/* The still life: road, readiness card, learner plate. */
.hero__object {
  position: relative;
  display: grid;
  place-items: center;
  padding: 36px 0 28px;
}

.plane {
  grid-area: 1 / 1;
  will-change: transform;
}

.plane--road {
  align-self: stretch;
  justify-self: stretch;
  margin: 0 -8px 0 12%;
  transform: translate3d(
    calc(var(--mx) * 6px),
    calc(var(--my) * 6px + var(--hero-p) * var(--hero-h) * 0.04),
    0
  );
}

.plane--card {
  z-index: 1;
  transform: translate3d(
    calc(var(--mx) * 12px),
    calc(var(--my) * 12px + var(--hero-p) * var(--hero-h) * 0.1),
    0
  );
}

.plane--plate {
  z-index: 2;
  align-self: start;
  justify-self: start;
  margin: 0 0 0 4%;
  transform: translate3d(
    calc(var(--mx) * 20px),
    calc(var(--my) * 20px + var(--hero-p) * var(--hero-h) * 0.18),
    0
  );
}

.road {
  position: relative;
  height: 100%;
  border-radius: 28px;
  background: var(--road);
  overflow: hidden;
  transform: rotate(-4deg);
}

.road::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40px;
  background: repeating-linear-gradient(
    -45deg,
    color-mix(in srgb, var(--lane-paint) 20%, transparent) 0 10px,
    transparent 10px 20px
  );
}

.road__lane {
  position: absolute;
  left: 50%;
  top: 0;
  width: 10px;
  height: 100%;
  transform: translateX(-50%);
}

.road__lane line {
  stroke: var(--lane-paint);
  stroke-width: 6;
  stroke-dasharray: 26 18;
  vector-effect: non-scaling-stroke;
}

.mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(100%, 320px);
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
}

.mini-card__name {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ring--hero {
  --ring-stroke: 7.6;
  width: 132px;
  height: 132px;
}

.ring--hero .ring__num {
  font-size: 2.75rem;
}

.mini-card__next {
  align-self: stretch;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.next-row,
.blockers li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-weight: 700;
}

.next-row__name,
.blocker__name {
  flex: 1;
}

.plate {
  display: block;
  width: 112px;
  height: 112px;
  transform: rotate(-12deg);
  filter: drop-shadow(0 2px 4px rgb(27 40 34 / 0.08)) drop-shadow(0 10px 18px rgb(27 40 34 / 0.16));
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 7fr 5fr;
    align-items: center;
    min-height: min(860px, 92svh);
  }

  .hero h1 {
    font-size: clamp(3.5rem, 0.6rem + 5.2vw, 4.9rem);
  }

  .hero h1 .h1-line {
    display: block;
    white-space: nowrap;
  }

  .hero__object {
    min-height: 540px;
  }
}

@media (max-width: 959px) {
  .hero {
    padding-top: 40px;
  }

  .plane--road {
    margin: 12px 8px 0 24%;
  }

  .plate {
    width: 84px;
    height: 84px;
  }

  .plane--plate {
    margin: 0;
  }
}

@media (max-width: 479px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .link-more {
    justify-content: center;
  }
}

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

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

.problem__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.statement {
  --w: calc((var(--p, 0) - 0.3) / 0.25 * var(--n, 1));
  max-width: 22ch;
  font-size: var(--size-title);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.statement .hot {
  color: var(--tone-not-ready-text);
}

.statement.is-live .word {
  opacity: clamp(0.28, calc(0.28 + (var(--w) - var(--i)) * 0.72), 1);
}

.problem__body {
  max-width: 52ch;
  margin-top: 32px;
  color: var(--ink-muted);
}

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

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

.how .section-title {
  max-width: 18ch;
}

.steps {
  position: relative;
  margin-top: 56px;
}

.road-line {
  position: absolute;
  overflow: visible;
}

.road-dash {
  stroke: var(--border-strong);
  stroke-width: 6;
  stroke-dasharray: 20 14;
}

.road-mask {
  stroke: #fff;
  stroke-width: 10;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.road-line--h {
  left: 0;
  top: 25px;
  width: 100%;
  height: 6px;
}

.road-line--v {
  display: none;
}

.steps__list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.marker {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
  transition: background-color 300ms ease, color 300ms ease;
}

.how.is-live .step:not(.is-on) .marker {
  background: var(--surface);
  color: var(--ink);
}

.step__title {
  margin-top: 20px;
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.step p {
  margin-top: 10px;
  max-width: 34ch;
  color: var(--ink-muted);
}

.scale {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

@media (max-width: 959px) {
  .road-line--h {
    display: none;
  }

  .road-line--v {
    display: block;
    left: 25px;
    top: 0;
    width: 6px;
    height: 100%;
  }

  .steps__list {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .step {
    position: relative;
    align-items: flex-start;
    padding-left: 80px;
    text-align: left;
  }

  .marker {
    position: absolute;
    left: 0;
    top: 0;
  }

  .step__title {
    margin-top: 12px;
  }

  .scale {
    justify-content: flex-start;
  }
}

/* ---------- 4. the 97 ---------- */

.demo-band {
  position: relative;
  padding-block: var(--section-y);
  background: var(--road);
  color: var(--road-ink);
}

.demo-band::before,
.demo-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--lane-paint) 0 40px, transparent 40px 70px);
  opacity: 0.35;
}

.demo-band::before {
  top: 0;
}

.demo-band::after {
  bottom: 0;
}

.demo-band .eyebrow {
  color: var(--road-ink-muted);
}

.demo__intro {
  max-width: 56ch;
  margin-top: 20px;
  font-size: var(--size-lead);
  line-height: 1.5;
  color: var(--road-ink-muted);
}

.panel {
  display: grid;
  margin-top: 48px;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.readout {
  z-index: 5;
}

.readout__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.ring--demo {
  --ring-stroke: 7;
  width: 200px;
  height: 200px;
}

.ring--demo .ring__num {
  font-size: clamp(3.5rem, 2rem + 3vw, 4.5rem);
  letter-spacing: -0.02em;
}

.readout__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.verdict {
  font-size: 0.9375rem;
  padding: 6px 14px;
}

.verdict.pulse {
  animation: pulse 320ms ease;
}

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

.first-blocker {
  display: none;
}

.readout__more {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.blockers {
  align-self: stretch;
}

.demo-band.is-touched .blockers li {
  animation: slide-in 160ms ease both;
}

.blockers li.leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.no-blockers {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 700;
}

.no-blockers[hidden] {
  display: none;
}

.no-blockers svg {
  fill: none;
  stroke: var(--tone-ready);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.countdown {
  margin-top: 16px;
}

.skills {
  min-width: 0;
}

.skill-group + .skill-group {
  margin-top: 28px;
}

.group-label {
  padding-bottom: 6px;
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.skill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  min-width: 0;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.skill__name {
  flex: 1 1 9rem;
  font-weight: 700;
}

.skill--start {
  margin-inline: -10px;
  padding-inline: 10px;
  border-radius: 12px;
  outline: 2px solid var(--tone-nearly);
  outline-offset: -2px;
}

.start-here {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tone-nearly-bg);
  color: var(--tone-nearly-text);
  font-size: 0.75rem;
  vertical-align: 2px;
}

.demo-band.is-touched .skill--start {
  outline-color: transparent;
}

.demo-band.is-touched .start-here {
  display: none;
}

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-sunken);
}

.seg__opt {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.seg--0 { --rs: var(--rating-0); --rb: var(--rating-0-bg); --rt: var(--rating-0-text); }
.seg--1 { --rs: var(--rating-1); --rb: var(--rating-1-bg); --rt: var(--rating-1-text); }
.seg--2 { --rs: var(--rating-2); --rb: var(--rating-2-bg); --rt: var(--rating-2-text); }
.seg--3 { --rs: var(--rating-3); --rb: var(--rating-3-bg); --rt: var(--rating-3-text); }
.seg--4 { --rs: var(--rating-4); --rb: var(--rating-4-bg); --rt: var(--rating-4-text); }

.seg__opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rs);
}

.seg__abbr {
  display: none;
}

.seg__opt:hover {
  background: var(--surface);
}

.seg__opt:has(input:checked) {
  background: var(--rb);
  color: var(--rt);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rs) 45%, transparent);
}

.seg__opt:has(input:checked) .seg__dot {
  display: none;
}

.seg__opt:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.demo__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  max-width: none;
  margin-top: 28px;
  color: var(--road-ink-muted);
}

.reset {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--road-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.reset:focus-visible {
  outline-color: var(--road-ink);
}

@media (min-width: 960px) {
  .panel {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    padding: 40px;
  }

  .readout {
    position: sticky;
    top: 96px;
    align-self: start;
  }

  .readout__more {
    min-width: 280px;
  }
}

.seg__opt:not(:has(input:checked)) .seg__word {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 1200px) {
  .panel {
    grid-template-columns: 4fr 8fr;
  }

  .skills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 40px;
    align-items: start;
  }

  .skill-group + .skill-group {
    margin-top: 0;
  }

  .skill__name {
    flex-basis: 100%;
  }

  .seg {
    flex: 1 1 100%;
  }

  .seg__opt {
    flex: 1 1 0;
    padding: 0 6px;
  }

  .seg__opt:has(input:checked) {
    flex-grow: 2;
  }
}

@media (max-width: 959px) {
  .panel {
    grid-template-columns: minmax(0, 1fr);
    margin-inline: calc(var(--gutter) * -0.5);
  }

  .readout {
    position: sticky;
    top: var(--header-h);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 24px 24px 0 0;
  }

  .readout__inner {
    flex-direction: row;
    gap: 12px;
    height: 72px;
    padding: 0 16px;
  }

  .ring--demo {
    --ring-stroke: 11;
    width: 52px;
    height: 52px;
  }

  .ring--demo .ring__num {
    font-size: 1.125rem;
    letter-spacing: 0;
  }

  .readout__side {
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .verdict {
    flex: none;
    padding: 4px 10px;
    font-size: 0.8125rem;
  }

  .first-blocker {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ink-muted);
  }

  .readout__more {
    display: none;
  }

  .skills {
    padding: 20px 16px 24px;
  }

  .skill__name {
    flex-basis: 100%;
  }

  .seg {
    flex: 1 1 100%;
  }

  .seg__opt {
    flex: 1 1 0;
    padding: 0 4px;
    font-size: 0.875rem;
  }

  .seg__dot {
    display: none;
  }

  .seg__opt .seg__word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .seg__abbr {
    display: inline;
  }

  .skill--start {
    margin-inline: -8px;
    padding-inline: 8px;
  }
}

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

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

.feature-grid {
  display: grid;
  gap: 20px;
  margin-top: 48px;
}

.feature {
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease-out);
}

.feature > .glyph {
  color: var(--accent);
}

.feature h3 {
  margin-top: 16px;
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.feature p {
  margin-top: 10px;
  color: var(--ink-muted);
}

.feature.will-rise {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 420ms var(--ease-out) var(--d, 0ms),
    transform 420ms var(--ease-out) var(--d, 0ms);
}

.feature.will-rise.is-in {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .feature:hover,
  .feature.will-rise.is-in:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    transition-delay: 0ms;
  }
}

.student-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.student {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  grid-template-areas:
    "ring name meta"
    "ring chips chips";
  align-items: center;
  gap: 6px 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.student__name {
  grid-area: name;
  font-weight: 700;
}

.student__meta {
  grid-area: meta;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.ring--mini {
  --ring-stroke: 9;
  grid-area: ring;
  width: 44px;
  height: 44px;
}

.ring--mini .ring__num {
  font-size: 0.875rem;
}

.student__chips {
  grid-area: chips;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: 1.25fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
  }

  .feature--large {
    grid-row: 1 / span 2;
    padding: 36px;
  }
}

@media (min-width: 640px) and (max-width: 959px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature--large {
    grid-column: 1 / -1;
  }
}

@media (max-width: 759px) {
  .feature {
    padding: 20px;
  }
}

/* ---------- 6. the real app ---------- */

.real {
  --p: 1;
  padding-block: var(--section-y);
  overflow-x: clip;
}

.real__grid {
  display: grid;
  gap: 48px;
}

.real__copy p {
  margin-top: 20px;
  color: var(--ink-muted);
}

.real__copy .btn {
  margin-top: 28px;
}

.frames {
  position: relative;
}

.browser {
  position: absolute;
  top: 0;
  left: 0;
  width: 80%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translate3d(0, calc(var(--p) * -24px), 0);
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}

.browser__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.phone {
  position: absolute;
  overflow: hidden;
  border: 10px solid var(--ink);
  border-radius: 44px;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
}

.phone img {
  border-radius: 34px;
}

.phone--front {
  z-index: 2;
  right: 2%;
  bottom: 0;
  width: 34%;
  transform: translate3d(0, calc(var(--p) * -56px), 0);
}

.phone--back {
  z-index: 1;
  right: -4%;
  bottom: 10%;
  width: 30.6%;
  transform: translate3d(0, calc(var(--p) * -80px), 0) rotate(4deg);
}

@media (min-width: 960px) {
  .real__grid {
    grid-template-columns: 8fr 4fr;
    grid-template-areas: "frames copy";
    align-items: center;
    gap: 64px;
  }

  .frames {
    grid-area: frames;
    aspect-ratio: 16 / 11;
  }

  .browser {
    width: 88%;
  }

  .phone--front {
    right: 6%;
    bottom: -4%;
    width: 27%;
  }

  .phone--back {
    right: -2%;
    bottom: 8%;
    width: 24%;
  }

  .real__copy {
    grid-area: copy;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
  }
}

@media (max-width: 959px) {
  .browser {
    display: none;
  }

  .frames {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    padding-top: 24px;
  }

  .phone {
    position: relative;
    inset: auto;
    border-width: 7px;
    border-radius: 30px;
  }

  .phone img {
    border-radius: 23px;
  }

  .phone--front {
    order: 1;
    width: min(54%, 260px);
  }

  .phone--back {
    order: 2;
    width: min(42%, 210px);
    margin-top: 32px;
    transform: translate3d(0, calc(var(--p) * -80px), 0);
  }
}

/* ---------- 7. close ---------- */

.close {
  padding-block: 140px;
}

.close__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mark--close {
  width: 96px;
  height: 96px;
}

.mark.will-draw .mark__tick {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 600ms var(--ease-out) 150ms;
}

.mark.will-draw.is-in .mark__tick {
  stroke-dashoffset: 0;
}

.close__title {
  margin-top: 32px;
  font-size: calc(var(--size-hero) * 0.8);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.close__inner > p:not(.small) {
  max-width: 46ch;
  margin-top: 20px;
  font-size: var(--size-lead);
  line-height: 1.5;
  color: var(--ink-muted);
}

.close .btn {
  margin-top: 32px;
}

.close .small {
  margin-top: 16px;
}

@media (max-width: 759px) {
  .close {
    padding-block: 88px;
  }
}

/* ---------- 8. footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding-block: 32px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 48px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__brand .wordmark {
  font-size: 1.125rem;
}

.footer__about {
  display: grid;
  gap: 4px;
  max-width: 52ch;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.footer__about a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

@media (min-width: 760px) {
  .footer__about {
    text-align: right;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
  }

  .plane {
    transform: none !important;
  }
}
