/* ============================================================
   sections.css · hero + page sections
   ============================================================ */

/* ---------------- HERO ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--nav-h) + 40px) 80px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* warm glow bloom behind the headline */
.hero::before {
  content: "";
  position: absolute;
  top: 18%; left: 50%;
  width: min(900px, 90vw); height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow), transparent 70%);
  filter: blur(30px);
  z-index: 0;
  pointer-events: none;
}
/* soft scrim so body text stays readable over any flourish */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--paper) 55%, transparent) 78%, var(--paper) 100%);
}
.hero__inner { position: relative; z-index: 2; }
.hero__eyebrow { margin-bottom: var(--s-6); }
.hero__title { margin-bottom: var(--s-8); max-width: 16ch; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__title .line__inner { display: block; will-change: transform; }
.hero__title em { font-style: italic; }
/* hide the headline until the reveal runs, but only if JS is active */
.js .hero__title { visibility: hidden; }

/* ---- scene switcher · ships to visitors, fades out past the hero ---- */
.hero-switch {
  position: absolute;
  right: var(--gutter); bottom: 26px;
  z-index: 3;
  display: flex; align-items: center; gap: 4px;
  padding: 5px 6px 5px 4px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font-mono);
  box-shadow: 0 10px 30px -18px var(--shadow);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.hero-switch.is-hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }
.hero-switch__label { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0 8px; }
.hero-switch button {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 999px;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.hero-switch button:hover { color: var(--ink); }
.hero-switch button.is-active { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 600px) {
  .hero-switch { right: 12px; bottom: 12px; padding: 4px; }
  .hero-switch__label { display: none; }
  .hero-switch button { font-size: 0.6rem; padding: 6px 9px; }
}
.hero__sub {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem);
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: var(--s-8);
}
.hero__chips { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-8); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; align-items: center; gap: 8px;
}
.hero__scroll::after {
  content: ""; width: 1px; height: 26px;
  background: var(--muted);
  animation: scrollpulse 2s var(--ease) infinite;
}
@keyframes scrollpulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.3; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}
@media (max-width: 700px) {
  .hero { min-height: auto; padding-block: calc(var(--nav-h) + 30px) 60px; }
  .hero__scroll { display: none; }
}

/* ---------------- 01 · SHORT VERSION ---------------- */
.short__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 80px);
  margin-top: var(--s-8);
  align-items: start;
}
.short__lead {
  font-family: var(--font-display);
  font-size: var(--t-heading);
  line-height: 1.18;
  max-width: 18ch;
}
.short__body { color: var(--muted); max-width: 46ch; }
@media (max-width: 760px) { .short__grid { grid-template-columns: 1fr; } }

/* ---------------- 02 · THE ARC ---------------- */
.arc__title {
  font-size: var(--t-display-2);
  max-width: 18ch;
  margin-top: var(--s-6);
  line-height: 1.06;
}
.arc__map { margin: clamp(32px, 5vw, 64px) 0; position: relative; }
.arc__svg { width: 100%; height: auto; overflow: visible; }
.arc__path { opacity: 0.92; }
.arc__node-dot { fill: var(--hairline); transition: fill 0.4s var(--ease), r 0.4s var(--ease); }
.arc__node.is-on .arc__node-dot { fill: var(--accent); }
.arc__node-ring { fill: none; stroke: var(--accent); opacity: 0; transition: opacity 0.4s var(--ease); }
.arc__node.is-on .arc__node-ring { opacity: 0.5; }
.arc__node-label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: var(--muted);
  opacity: 0.35;
  transition: opacity 0.4s var(--ease), fill 0.4s var(--ease);
}
.arc__node.is-on .arc__node-label { opacity: 1; fill: var(--ink); }
.arc__body { color: var(--muted); max-width: 60ch; }

/* ---------------- 03 · WHAT I DO ---------------- */
.do__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  margin-top: var(--s-8);
}
.do__col {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-6);
}
.do__col h3 { font-size: var(--t-heading); margin-bottom: var(--s-4); }
.do__col p { color: var(--muted); font-size: 1.02rem; }
.do__stat { margin-top: var(--s-6); display: flex; flex-direction: column; gap: 4px; }
.do__stat > span:first-child, .do__stat-big {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--accent);
}
.do__stat-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; }
@media (max-width: 760px) { .do__grid { grid-template-columns: 1fr; } }

/* ---------------- PULL QUOTE ---------------- */
.section--quote { text-align: left; }
.section--quote .pullquote { max-width: 24ch; }

/* ---------------- 04 · WHAT I BUILT ---------------- */
.built__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 5vw, 64px);
  align-items: end;
  margin-bottom: var(--s-12);
}
.built__intro { color: var(--muted); max-width: 52ch; justify-self: end; }
@media (max-width: 760px) { .built__head { grid-template-columns: 1fr; } .built__intro { justify-self: start; } }

/* sticky-stacking cards */
.builds { position: relative; }
.build-card {
  position: sticky;
  top: calc(var(--nav-h) + 28px + var(--i) * 14px);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 56px);
  margin-bottom: var(--s-6);
  box-shadow: 0 30px 60px -40px var(--shadow);
  transition: border-color var(--dur) var(--ease);
}
.build-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); }
.build-card__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-8); }
.build-card__no { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.build-card__name { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: var(--s-4); }
.build-card__desc { color: var(--muted); font-size: 1.1rem; max-width: 56ch; margin-bottom: var(--s-6); }
.build-card__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  transition: gap var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.build-card__link:hover { color: var(--accent); gap: 12px; }
.build-card__link svg { width: 15px; height: 15px; }

/* ---------------- 05 · OFF THE CLOCK / MARQUEE ---------------- */
.section--clock { padding-bottom: clamp(48px, 6vw, 80px); }
.marquee {
  margin: clamp(28px, 4vw, 48px) 0;
  overflow: hidden;
  border-block: 1px solid var(--hairline);
  padding-block: clamp(18px, 3vw, 30px);
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  will-change: transform;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
}
.marquee__track span { color: var(--ink); }
.marquee__dot { color: var(--accent); }
.clock__body { color: var(--muted); max-width: 64ch; }

/* ---------------- 06 · THE HONEST BIT ---------------- */
.honest__body {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.4rem);
  line-height: 1.22;
  margin-top: var(--s-6);
  max-width: 24ch;
}

/* ---------------- 07 · SAY HI ---------------- */
.hi__title { font-size: var(--t-display-2); margin-top: var(--s-6); max-width: 16ch; }
.hi__body { color: var(--muted); margin-top: var(--s-4); max-width: 46ch; }
.hi__links { margin-top: var(--s-12); border-top: 1px solid var(--hairline); }
.hi__link {
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(18px, 2.6vw, 28px) 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  transition: padding-left var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hi__link:hover { padding-left: 18px; color: var(--accent); }
.hi__arrow { font-family: var(--font-body); font-size: 0.7em; color: var(--muted); transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.hi__link:hover .hi__arrow { color: var(--accent); transform: translate(4px, -4px); }

/* ================= THE OBJECTION LIBRARY ================= */
.section--ol { padding-top: clamp(48px, 6vw, 80px); }
.ol__head {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: end;
  margin-bottom: var(--s-8);
}
.ol__title { font-size: var(--t-display-2); margin-top: var(--s-4); max-width: 16ch; line-height: 1.04; }
.ol__note { color: var(--muted); max-width: 44ch; font-size: 1rem; }
@media (max-width: 820px) { .ol__head { grid-template-columns: 1fr; } }

.ol {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.ol__bar {
  display: flex; gap: var(--s-4); align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.ol__search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; color: var(--muted); }
.ol__search svg { width: 18px; height: 18px; flex-shrink: 0; }
.ol__search input {
  flex: 1; background: none; border: none; color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; padding: 8px 0;
}
.ol__search input::placeholder { color: var(--muted); }
.ol__modes { display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.ol__mode {
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted);
  padding: 8px 16px; border-radius: 999px;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.ol__mode.is-active { background: var(--ink); color: var(--paper); }

.ol__cats { display: flex; flex-wrap: wrap; gap: 8px; padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--hairline); }
.ol__cat {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--hairline);
  transition: all var(--dur-fast) var(--ease);
}
.ol__cat:hover { color: var(--ink); border-color: var(--ink); }
.ol__cat.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.ol__panel { padding: var(--s-6); }
.ol__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
@media (max-width: 760px) { .ol__list { grid-template-columns: 1fr; } }

.ol-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--s-6);
  background: var(--paper);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ol-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline)); }
.ol-card__obj { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.18; margin: var(--s-3) 0 var(--s-6); }
.ol-card__answers { display: grid; gap: var(--s-4); }
.ol-card__ans .label { display: block; margin-bottom: 6px; }
.ol-card__ans p { font-size: 0.96rem; }
.ol-card__ans--weak p { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.ol-card__ans--strong { border-left: 2px solid var(--accent); padding-left: var(--s-4); }
.ol-card__ans--strong p { color: var(--ink); }
.ol__empty { color: var(--muted); font-family: var(--font-mono); font-size: 0.9rem; padding: var(--s-8); text-align: center; }

/* practice */
.ol__stage { max-width: 720px; margin: 0 auto; }
.ol__prompt { text-align: center; margin-bottom: var(--s-8); }
.ol__prompt .tag { display: inline-block; margin-bottom: var(--s-4); }
.ol__prompt-text { font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.6rem); line-height: 1.1; max-width: 18ch; margin: 0 auto; }
.ol__answer-label { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: var(--s-3); }
.ol__answer {
  width: 100%; resize: vertical; min-height: 110px;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: var(--s-4); color: var(--ink); font-family: var(--font-body); font-size: 1.05rem; line-height: 1.5;
  transition: border-color var(--dur-fast) var(--ease);
}
.ol__answer:focus { outline: none; border-color: var(--accent); }
.ol__prac-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }

.ol__result {
  display: flex; gap: var(--s-8); align-items: center;
  margin-top: var(--s-8); padding-top: var(--s-8); border-top: 1px solid var(--hairline);
}
.ol__meter { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.ol__dial { width: 100%; height: 100%; transform: rotate(-90deg); }
.ol__dial-track { fill: none; stroke: var(--hairline); stroke-width: 8; }
.ol__dial-fill { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; }
.ol__meter-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 2.2rem; }
.ol__meter-num small { font-size: 0.9rem; color: var(--muted); }
.ol__feedback { flex: 1; }
.ol__verdict { font-size: 1.15rem; margin-bottom: var(--s-3); }
.ol__improve { display: flex; flex-direction: column; gap: 4px; color: var(--muted); margin-bottom: var(--s-3); }
.ol__source { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
@media (max-width: 600px) { .ol__result { flex-direction: column; align-items: flex-start; } }

.ol__revealed { margin-top: var(--s-6); padding: var(--s-6); border-radius: var(--radius); background: var(--surface-2); }
.ol__revealed .label { display: block; margin-bottom: var(--s-3); }
.ol__revealed p { font-size: 1.1rem; }

/* ---------------- 02 · THE LAP (F1 circuit) ---------------- */
.circuit { margin: clamp(28px, 4vw, 56px) 0 clamp(20px, 3vw, 36px); position: relative; }
.circuit__svg { width: 100%; height: auto; overflow: visible; }
.circuit__ghost { fill: none; stroke: var(--hairline); stroke-width: 2; opacity: 0.7; }
.circuit__line { will-change: stroke-dashoffset; }

.circuit__corner .circuit__dot { fill: var(--hairline); transition: fill 0.4s var(--ease), r 0.4s var(--ease); }
.circuit__corner.is-on .circuit__dot { fill: var(--accent); }
.circuit__corner .circuit__ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; transition: opacity 0.4s var(--ease); }
.circuit__corner.is-on .circuit__ring { opacity: 0.45; }
.circuit__label {
  font-family: var(--font-mono); font-size: 14px; fill: var(--muted);
  opacity: 0.28; transition: opacity 0.4s var(--ease), fill 0.4s var(--ease);
}
.circuit__corner.is-on .circuit__label { opacity: 1; fill: var(--ink); }
.circuit__corner--fav .circuit__label { font-weight: 700; }
.circuit__star { fill: var(--accent); opacity: 0; transition: opacity 0.4s var(--ease); }
.circuit__corner.is-on .circuit__star { opacity: 1; }
.circuit__fav-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; fill: var(--accent); opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.circuit__corner.is-on .circuit__fav-label { opacity: 0.9; }
@media (max-width: 560px) { .circuit__fav-label { font-size: 12px; } }

.circuit__marks > * { opacity: 0; transition: opacity 0.5s var(--ease); }
.circuit__marks > *.is-on { opacity: 1; }
.circuit__sector line { stroke: var(--muted); stroke-width: 1.4; }
.circuit__drs line { stroke: var(--accent); stroke-width: 1.6; }
.circuit__turn circle { fill: var(--paper); stroke: var(--hairline); stroke-width: 1.2; }
.circuit__turn text { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }
.circuit__mark-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; fill: var(--muted); text-transform: uppercase; }

.circuit__caption {
  font-family: "Newsreader", var(--font-display); font-style: italic;
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.6rem); line-height: 1.3;
  color: var(--ink); max-width: 42ch; margin-bottom: var(--s-6);
}
@media (max-width: 560px) { .circuit__label { font-size: 16px; } .circuit__mark-label { font-size: 13px; } }


/* ---- interactive circuit additions ---- */
.section--circuit { padding-block: clamp(48px, 6vw, 80px); }
.circuit-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-6); flex-wrap: wrap; }
.circuit-head .arc__title { margin-top: var(--s-3); }
.circuit { position: relative; margin: clamp(20px, 3vw, 36px) 0 var(--s-6); }
.circuit__svg { max-height: 62vh; }

.circuit-play {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 0.82rem;
  padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  will-change: transform;
}
.circuit-play svg { width: 14px; height: 14px; }
.circuit-play:hover { box-shadow: 0 10px 30px -10px var(--accent); }

.circuit__car { fill: var(--accent); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 60%, transparent)); }
.circuit__hit { fill: transparent; cursor: pointer; }
.circuit__corner { cursor: pointer; }
.circuit__corner.is-hover .circuit__ring { opacity: 0.8; }
.circuit__corner.is-hover .circuit__dot { r: 7.5; }

.circuit__tip {
  position: absolute; transform: translate(-50%, -130%);
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.4;
  padding: 9px 13px; border-radius: 10px; max-width: 230px;
  pointer-events: none; z-index: 5;
  box-shadow: 0 12px 30px -12px var(--shadow);
}
.circuit__tip::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px; background: var(--ink);
}

/* ---- lap narration ---- */
.circuit__caption { min-height: 2.6em; transition: opacity 0.3s var(--ease); }
.circuit__chapters {
  list-style: none; counter-reset: lap; margin-top: var(--s-6);
  max-width: 64ch; display: grid; gap: var(--s-3);
}
.circuit__chapters li {
  counter-increment: lap; position: relative; padding-left: 30px;
  color: var(--muted); font-size: 1rem;
}
.circuit__chapters li::before {
  content: counter(lap); position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent);
}
