/* Mindset Mastery — shared styles */

:root {
  --bg: #0b0b0d;
  --bg-raised: #141418;
  --line: #26262d;
  --text: #f4f1ea;
  --text-muted: #a19d94;
  --text-dim: #6f6b63;
  --accent: #f2b544;
  --accent-ink: #1a1405;
  --error: #ff8a7a;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 5vw, 48px);
  --maxw: 1080px;
  --radius: 14px;
  --header-h: 68px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header (fixed, always-on CTA) ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  background: rgba(11, 11, 13, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px rgba(242, 181, 68, 0.6);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  border-color: var(--text-muted);
  box-shadow: none;
}

.btn--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.arrow {
  transition: transform 0.15s ease;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Type ---------- */

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow a {
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 181, 68, 0.5);
}

.eyebrow a:hover {
  border-bottom-color: var(--accent);
}

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 9vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
}

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

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

/* ---------- Sections ---------- */

.section {
  padding: clamp(88px, 12vw, 150px) 0;
  border-top: 1px solid var(--line);
}

.section-sub {
  margin: 20px 0 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: clamp(17px, 2vw, 20px);
}

/* 1. Hero */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 90%;
  background: radial-gradient(
    ellipse at 50% 100%,
    rgba(242, 181, 68, 0.22),
    rgba(242, 181, 68, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero .display {
  max-width: 12ch;
}

.hero .sub {
  margin: 32px 0 0;
  max-width: 30ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.hero-cta {
  margin-top: 48px;
}

/* 2. Why */

.why .wrap {
  max-width: 880px;
}

.why-line {
  margin: 0;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
}

.why-big {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

/* 3. The seven, as pairs */

.pairs {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.pairs li {
  display: grid;
  grid-template-columns: 3.5em 1fr;
  align-items: baseline;
  padding: clamp(18px, 2.4vw, 28px) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4.8vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  transition: padding-left 0.25s ease;
}

.pairs li:hover {
  padding-left: 8px;
}

.pairs .num {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.pairs .no {
  color: var(--text-dim);
  font-weight: 400;
  transition: color 0.25s ease;
}

.pairs li:hover .no {
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .pairs li {
    grid-template-columns: 2.6em 1fr;
  }
}

/* 4. How you train it */

.loop {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.loop li {
  padding-top: 22px;
  border-top: 1px solid var(--accent);
  counter-increment: step;
}

.loop li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.loop h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 34px);
}

.loop p {
  margin: 0;
  color: var(--text-muted);
}

/* The program: the free Introduction, then seven modules */

.path {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px;
}

.path-step {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.path-step--now {
  border-color: var(--accent);
}

.path-tag {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.path-step--now .path-tag {
  color: var(--accent);
}

.path-step h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.8vw, 32px);
}

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

.path-modules {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.path-modules li {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}

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

@media (max-width: 720px) {
  .loop {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* 5. Peter */

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.about-lede {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.5;
}

.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 852;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.facts {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--text-muted);
}

.facts li {
  padding-left: 20px;
  position: relative;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.facts strong {
  color: var(--text);
  font-weight: 500;
}

.facts a {
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.facts a:hover {
  text-decoration-color: var(--accent);
}

.pull {
  margin: 36px 0 0;
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--accent);
  max-width: 34ch;
}

.pull p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 26px);
  line-height: 1.3;
}

.pull footer {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 15px;
}

.pull footer::before {
  content: "— ";
}

@media (max-width: 760px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about-photo {
    max-width: 360px;
  }
}

/* Phones: keep Peter's name close to his photo. */
@media (max-width: 560px) {
  .about {
    gap: 24px;
  }
  .about-photo {
    max-width: 52%;
  }
}

/* 6. Join + questions */

.final .h2 span {
  display: block;
}

.final .btn {
  margin-top: 40px;
}

.final .cta-note {
  margin-top: 14px;
}

.faq {
  margin-top: clamp(72px, 10vw, 120px);
  max-width: 820px;
  border-top: 1px solid var(--line);
}

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

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 24px);
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 24px;
  line-height: 1;
  transition: transform 0.2s ease;
}

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

.faq details p {
  margin: 0 0 24px;
  max-width: 62ch;
  color: var(--text-muted);
}

.faq details p a {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.faq details p a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Footer */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

/* ---------- Waitlist / Thanks (single-column pages) ---------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.page .site-header {
  position: absolute;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 0;
}

.page main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.page main::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, rgba(242, 181, 68, 0.14), transparent 70%);
  pointer-events: none;
}

.narrow {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow .display {
  font-size: clamp(44px, 9vw, 72px);
}

.narrow .lede {
  margin-top: 20px;
}

.back-link {
  color: var(--text-muted);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

.lede-link {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.lede-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lede-sub {
  margin: 12px 0 0;
  color: var(--text-muted);
}

/* Article page (Why these seven) */

.page--article main {
  display: block;
  padding-top: 140px;
}

.narrow.article {
  max-width: 680px;
}

.article p {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.7;
}

.article .lede {
  margin: 24px 0 32px;
}

.article h2 {
  margin: 48px 0 16px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.article strong {
  color: var(--accent);
  font-weight: 600;
}

.article .article-sign {
  margin-top: 32px;
  color: var(--text-muted);
  font-family: var(--serif);
  font-style: italic;
}

.article-cta {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.article .cta-note {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

/* Form */

.form {
  display: grid;
  gap: 22px;
  margin-top: 40px;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  color: var(--text);
  font: 400 17px/1 var(--sans);
  transition: border-color 0.15s ease;
}

.field input::placeholder {
  color: #5e5b55;
}

.field input:hover {
  border-color: #3a3a43;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.error {
  min-height: 0;
  margin: 6px 0 0;
  color: var(--error);
  font-size: 14px;
}

.error:empty {
  display: none;
}

.optional {
  color: var(--text-muted);
  font-weight: 400;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.5;
}

.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-raised);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check:hover .check-box {
  border-color: var(--text-muted);
}

.check input:focus-visible + .check-box {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.check input:checked + .check-box {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%231a1405' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M5 10.5l3.2 3.2L15 7'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Mindset chips */

.chips {
  margin: 0;
  padding: 0;
  border: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.chip label:hover {
  border-color: var(--text-muted);
}

.chip input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.chip input:checked + label {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Alpha application (expands under the checkbox) */

.alpha-fields {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(242, 181, 68, 0.45);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(242, 181, 68, 0.1), rgba(242, 181, 68, 0.03));
}

.alpha-intro {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.radios {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
}

.radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-dot {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-raised);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.radio:hover .radio-dot {
  border-color: var(--text-muted);
}

.radio input:focus-visible + .radio-dot {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.radio input:checked + .radio-dot {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 5px var(--accent);
}

.form .btn {
  width: 100%;
  margin-top: 4px;
}

.form-note {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.form-status {
  margin: 0;
  color: var(--error);
  font-size: 14px;
  text-align: center;
}

.form-status:empty {
  display: none;
}

/* Thanks */

.block {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.share-row p {
  margin: 0;
}

.saved {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.saved:empty {
  display: none;
}

.hidden {
  display: none !important;
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .arrow,
  .pairs li,
  .pairs .no {
    transition: none;
  }
}

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

/* ---------- Visual system: the line that bends ---------- */

/* Hero: a straight line that bends into an exponential curve on load. */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

.hero-art {
  width: 100%;
  max-width: 460px;
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-art .grid path {
  stroke: var(--text);
  stroke-width: 1;
  opacity: 0.12;
}

.hero-art .grid path:last-child {
  opacity: 0.32;
}

/* The two lines share one straight start; at the split the linear one carries on in
   gray and the exponential one lifts off in gold. */
.hero-art .linear {
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.hero-art .curve {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 14px rgba(242, 181, 68, 0.45));
}

.hero-art .tip {
  fill: var(--accent);
}

.hero-art .halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.5;
  transform-box: fill-box;
  transform-origin: center;
}

.hero-art .lbl {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.06em;
  fill: var(--text-muted);
}

.hero-art .lbl-exp {
  fill: var(--accent);
}

.hero-art.is-pending .lbl,
.hero-art.is-pending .halo {
  opacity: 0;
}

.hero-art .lbl-linear.is-on {
  opacity: 1;
}

.hero-art .lbl,
.hero-art .halo {
  transition: opacity 0.6s ease;
}

.hero-art.is-lit .halo {
  animation: halo 2.6s ease-out infinite;
}

@keyframes halo {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

@media (min-width: 960px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 24px;
  }
  .hero .display {
    font-size: clamp(64px, 6.6vw, 96px);
  }
  .hero-art {
    max-width: none;
    margin-top: 40px;
  }
}

@media (max-width: 959px) {
  .hero {
    align-items: flex-start;
  }
  .hero-art {
    margin-top: 8px;
  }
}

/* The seven: each row starts on the default and flips to the upgrade as it scrolls in
   (or on hover). Without JS, or with reduced motion, the upgraded text simply shows. */

.pairs-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.pairs-count {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s ease;
}

.pairs-count.is-done {
  color: var(--accent);
}

.pair {
  display: grid;
}

.pair > .def,
.pair > .up {
  grid-area: 1 / 1;
}

.pair > .def {
  display: none;
}

.flip-ready .pair > .def {
  display: block;
  justify-self: start;
  /* Keep the box one line tall even when the upgraded text wraps to two lines on
     phones; otherwise the strike line (placed by %) drops below the word. */
  align-self: start;
  color: var(--text-dim);
  font-weight: 400;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 55% / 0% 2px;
  transition: background-size 0.47s ease, opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.flip-ready .pair > .up {
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.67s ease 0.6s, transform 0.67s ease 0.6s;
}

.flip-ready li.is-up .pair > .def {
  background-size: 100% 2px;
  opacity: 0;
  transform: translateY(-0.5em);
}

.flip-ready li.is-up .pair > .up {
  opacity: 1;
  transform: none;
}

.flip-ready .num {
  transition: color 0.53s ease 0.4s;
}

.flip-ready li.is-up .num {
  color: var(--accent);
}

/* How it works: the three steps beside the tracker. */

.how-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.how-grid .loop {
  margin: 0;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Step number sits beside the step name, so the three steps stay short. */
.how-grid .loop li {
  display: grid;
  grid-template-columns: 2.6em 1fr;
  column-gap: 8px;
  align-items: baseline;
  padding-top: 18px;
}

.how-grid .loop li::before {
  margin: 0;
}

.how-grid .loop h3,
.how-grid .loop p {
  grid-column: 2;
}

.how-grid .loop h3 {
  margin-bottom: 6px;
}

/* The tracker stays in view while the steps scroll past it. */
.how-grid .chart {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.chart {
  margin: 0;
}

.chart figcaption {
  margin-top: 18px;
  max-width: 40ch;
  color: var(--text-muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
}

.chart table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.chart th,
.chart td {
  padding: 0;
  height: 22px;
  line-height: 1;
  text-align: center;
  font-weight: 500;
}

.chart thead th {
  height: 26px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.chart tr > th:first-child {
  width: 30%;
}

.chart tbody th {
  text-align: left;
  padding-right: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.board {
  padding: 22px 22px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.board-title {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.board-sub {
  margin: 6px 0 14px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--text-muted);
}

.board table {
  border-collapse: separate;
  border-spacing: 4px;
}

.board thead th {
  color: var(--text-dim);
}

.board tbody th {
  color: var(--text-dim);
  font-weight: 500;
}

.board td {
  border: 1px solid var(--line);
  border-radius: 5px;
}

.board .focus th {
  color: var(--accent);
}

.board .focus td {
  border-color: rgba(242, 181, 68, 0.35);
}

.board .tick,
.board .today {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.board .tick {
  background: var(--accent);
  position: relative;
}

.board .tick::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 5px;
  height: 9px;
  border: solid var(--accent-ink);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.board .today {
  box-shadow: inset 0 0 0 1.5px var(--accent);
  animation: today 1.6s ease-in-out infinite;
}

@keyframes today {
  50% { box-shadow: inset 0 0 0 1.5px rgba(242, 181, 68, 0.25); }
}

.chart.reveal .tick {
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.25s ease;
  transition-delay: calc(0.6s + var(--i) * 0.16s);
}

.chart.is-visible .tick {
  transform: none;
  opacity: 1;
}

/* The free-start nudge under the program cards. */

.cta-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.path-cta {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.path-cta p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 24px);
}

@media (max-width: 760px) {
  .how-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .how-grid .chart {
    position: static;
  }
  .board {
    padding: 16px 14px 14px;
  }
  .board-sub {
    font-size: 19px;
  }
  .chart th,
  .chart td {
    height: 19px;
  }
  .chart tbody th {
    font-size: 11px;
  }
}

/* The thread: one line down the left margin (wide screens only), drawn as you scroll.
   It stays straight the whole way, then bends up into the final call to action. */

main {
  position: relative;
}

.thread {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.thread .base {
  stroke: var(--line);
  stroke-width: 1;
}

.thread .draw {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(242, 181, 68, 0.5));
}

.thread .node {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.5;
  transition: stroke 0.3s ease, fill 0.3s ease;
}

.thread .node.is-on {
  stroke: var(--accent);
  fill: var(--accent);
}

.thread .tip {
  fill: var(--accent);
}

.thread.is-done .tip {
  animation: halo-dot 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes halo-dot {
  50% { transform: scale(1.8); }
}

main > section {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-art.is-lit .halo,
  .board .today,
  .thread.is-done .tip {
    animation: none;
  }
  .chart.reveal .tick {
    transform: none;
    opacity: 1;
    transition: none;
  }
}

/* Phones: tighten the hero so the chart shows on the first screen. */
@media (max-width: 600px) {
  .hero {
    min-height: 0;
    padding: calc(var(--header-h) + 32px) 0 40px;
  }
  .hero .sub {
    margin-top: 20px;
  }
  .hero-cta {
    margin-top: 28px;
  }
  .hero-art {
    max-width: 300px;
    margin-top: 0;
  }
}
