/* ============================================================
   LeoTrace — marketing site 3.5
   Light-skin foundation: neutral ramp, luminance-step + hairline
   depth, colour only for status. Geist / Geist Mono, six roles.
   ============================================================ */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* neutral light ramp — page near-white, surfaces rise toward pure white */
  --canvas: #f8fafa;
  --surface-1: #fbfcfc;
  --surface-2: #ffffff;
  --hairline: #e4e4e4;
  --hairline-faint: #eeefef;

  --text-1: #0f0f10;
  --text-2: #575757;
  --text-3: #737373;
  --text-4: #989898;

  /* the three-tone dot system */
  --dot-dark: #141415;
  --dot-mid: #8c8d8d;
  --dot-faint: #dcdddd;

  /* status — bright accent on near-neutral surface, never a flooded fill */
  --red: #d92c20;

  /* interaction + chrome tokens (dark pages override these) */
  --nav-veil: rgba(248, 250, 250, 0.7);
  --btn-solid-hover: #2a2a2c;
  --scrim-hover: rgba(15, 15, 16, 0.04);
  --scrim-selected: rgba(15, 15, 16, 0.08);
  --chip: #eeefef;
  --focus: #989898;
  --text-ghost: #989898;   /* placeholder / disabled text */

  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  --container: 1120px;
  --gutter: clamp(20px, 4vw, 64px);
  --chrome-pad: 32px;               /* nav + footer horizontal padding */
  --nav-h: 63px;                    /* bar height: 20px padding ×2 + content row */
  --section-gap: clamp(96px, 14vh, 176px);

  --ease-out: cubic-bezier(0.22, 0.61, 0.2, 1);
  /* the entrance grammar: slow, soft, settles gracefully — no overshoot */
  --reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-dur: 800ms;
}

/* ---------- Reset-ish ---------- */

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-1);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
canvas { display: block; }
figure { margin: 0; }

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

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

.display {
  font-weight: 650;
  font-size: clamp(42px, 4.6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.022em;
}

.heading {
  font-weight: 650;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.018em;
}

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

.lead {
  font-size: 18px;
  line-height: 32px;
  color: var(--text-2);
}

.eyebrow {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.telemetry {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
}

.mono { font-family: var(--mono); font-weight: 400; }
.is-red { color: var(--red); }

/* ---------- Buttons (utility role: Geist 500) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  padding: 13px 20px;
  border-radius: 8px;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.btn__glyph { font-weight: 400; }

.btn--solid {
  background: var(--text-1);
  color: var(--surface-2);
}

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

.btn--ghost {
  background: transparent;
  color: var(--text-1);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-row--centred { justify-content: center; }

/* ---------- Wordmark + terminal cursor ---------- */

.wordmark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--text-1);
  display: inline-flex;
  align-items: center;
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 3px;
  background: var(--text-4); /* muted — clearly lighter than the wordmark */
}

/* nav and footer cursors blink identically — a slow, eased fade */
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.5s ease-in-out infinite; }
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 18px;
  padding: 20px var(--chrome-pad);
  background: var(--nav-veil);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* hide on scroll-down, return on scroll-up */
.nav.is-hidden { transform: translateY(-100%); }

@media (prefers-reduced-motion: no-preference) {
  .nav { transition: transform 220ms var(--ease-out); }
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  display: inline-flex;
  align-items: baseline;
  transition: color 140ms var(--ease-out);
}

.nav__link:hover { color: var(--text-1); }

.nav__num {
  color: var(--text-4);
  margin-right: 8px;
  transition: color 140ms var(--ease-out);
}

.nav__link:hover .nav__num { color: var(--text-2); }

.nav__arrow { margin-left: 8px; }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav__burger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--text-1);
  transition: transform 160ms var(--ease-out);
}

/* ---------- Section entrance grammar (shared, defined once) ----------
   Eyebrow → headline lines → supporting copy: each fades in while
   rising gently (~20px), slow and eased, staggered in reading order.
   One-shot: sections gain .is-in the first time they enter the
   viewport and never lose it. JS staggers via transition-delay. */

.line { display: block; }
.line__inner { display: block; }

@media (prefers-reduced-motion: no-preference) {
  /* blocks: eyebrow + supporting copy */
  [data-section] [data-reveal]:not(.is-split),
  [data-section] .line__inner:not(.is-split) {
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity var(--reveal-dur) var(--reveal-ease),
      transform var(--reveal-dur) var(--reveal-ease);
  }

  [data-section].is-in [data-reveal]:not(.is-split),
  [data-section].is-in .line__inner:not(.is-split) {
    opacity: 1;
    transform: none;
  }

  /* headline words: each word rises on its own beat */
  [data-section] .w {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.55em);
    transition:
      opacity var(--reveal-dur) var(--reveal-ease),
      transform var(--reveal-dur) var(--reveal-ease);
  }

  [data-section].is-in .w {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   02 · Hero — a single hairline-framed instrument surface. A tight,
   quiet copy column sits at the left; the particle piece is large and
   dominant at the right, bleeding to the frame edges where the frame's
   overflow cleanly clips it. The nav stays full-width, above the frame.
   ============================================================ */

.hero {
  position: relative;
  background: var(--canvas);
  /* the framed surface is inset from the viewport, aligning to the nav's
     own edge (--chrome-pad); the nav sits above and outside it */
  padding: 0 var(--chrome-pad) var(--chrome-pad);
}

.hero__sticky {
  position: relative;
  height: calc(100svh - var(--nav-h) - var(--chrome-pad));
  display: flex;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-1); /* faint elevated fill */
  overflow: hidden;             /* clips the piece bleeding past the edges */
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* a tight, quiet copy column — its edge set 80px inside the frame. The
   piece carries the drama to its right, so the type stays restrained. */
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  /* ~80px inside the frame on wide screens; eases in on narrower desktops
     so the copy always clears the piece */
  padding-inline-start: clamp(32px, 5.5vw, 80px);
  padding-block: 40px;
}

/* pulled back from the earlier 78px so the piece — not the type — reads
   as the hero; still two lines per sentence (12ch is size-invariant) */
.hero .display {
  margin-top: 24px;
  font-size: clamp(44px, 4.6vw, 66px);
  line-height: 1.05;
  max-width: 12ch;
}

.hero__sub {
  margin-top: 28px;
  max-width: 40ch;
}

.hero .cta-row { margin-top: 36px; }

/* ============================================================
   03 · The issue — pinned scroll sequence
   ============================================================ */

.issue {
  /* tall body: the extra length is the scrub distance */
  height: 340vh;
}

.issue__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.issue__grid {
  position: relative; /* copy sits above the field + scrim */
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  flex: 1;
  min-height: 0;
  padding-top: 66px; /* clear the nav */
}

.heading + .points,
.issue .heading { margin-top: 24px; }

.points { margin-top: 40px; }

/* each point block carries its own short left rule — three separate
   segments, one per block, as in the reference frame */
.point {
  display: flex;
  gap: 20px;
  padding: 4px 0 4px 24px;
  border-left: 1px solid var(--hairline);
}

.point + .point { margin-top: 32px; }

.point__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-4);
  padding-top: 4px;
}

.point__title {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
}

.point__body {
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
  max-width: 40ch;
}

/* scrubbed accumulation — driven by .is-on from JS */
@media (prefers-reduced-motion: no-preference) {
  .point {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
  }

  .point.is-on {
    opacity: 1;
    transform: none;
  }
}

/* the spread field runs full-bleed behind the frame */
.issue__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* readability scrim — particles fall off softly behind the copy */
.issue__fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(248, 250, 250, 0.97) 0%,
    rgba(248, 250, 250, 0.92) 30%,
    rgba(248, 250, 250, 0.55) 50%,
    rgba(248, 250, 250, 0) 74%
  );
}

/* full-width telemetry strip, aligned to the nav's chrome padding.
   A HUD of the pinned frame: fades in when the pin engages, resolves
   away (line retracting) before the pin releases — never a stray line
   drifting between sections. */
.issue__telemetry {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px var(--chrome-pad);
  opacity: 0;
}

.issue__telemetry.is-live { opacity: 1; }

.issue__telemetry.is-done .issue__bar { transform: scaleX(0); }

@media (prefers-reduced-motion: no-preference) {
  .issue__telemetry { transition: opacity 220ms var(--ease-out); }

  .issue__bar {
    transform-origin: left;
    transition: transform 260ms var(--ease-out);
  }
}

.issue__bar {
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.issue__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--text-1);
}

/* ============================================================
   04 · The solution — three cards, one system
   ============================================================ */

.solution {
  position: relative;
  /* own stacking context: the carry-over strip and its scrim live on
     negative z, so no engine can ever paint them over the content */
  isolation: isolate;
}

.solution__sticky {
  position: relative;
  z-index: 2; /* content always paints above the dot strip + gradient */
  padding-block: var(--section-gap);
}

/* pinned sequence: a light pin — enough scroll for the three cards to
   land one by one, without demanding a workout. The page releases once
   the third graphic completes. */
@media (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  .solution { height: 220vh; }

  .solution__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    display: flex;
    align-items: center; /* eyebrow + headline + cards centred as one block */
    overflow: hidden;
    padding-block: 0;
  }
}

/* the issue's matrix carries over the boundary, easing out on-grid */
.solution__carryover {
  position: absolute;
  z-index: -2; /* behind everything in the section */
  top: 0;
  left: 0;
  width: 100%;
  height: min(44vh, 400px);
  pointer-events: none;
}

/* the same readability scrim as section 2, carried through — above the
   matrix strip, below all content */
.solution::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: min(44vh, 400px);
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(248, 250, 250, 0.97) 0%,
    rgba(248, 250, 250, 0.92) 30%,
    rgba(248, 250, 250, 0.55) 50%,
    rgba(248, 250, 250, 0) 74%
  );
}


.solution .heading { margin-top: 24px; } /* same eyebrow→headline gap as the other sections */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 12px 28px;
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    opacity: 0;
    transform: translateY(44px);
    transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
  }

  .card.is-in {
    opacity: 1;
    transform: none;
  }
}

.card__graphic {
  background: var(--surface-1);
  border: 1px solid var(--hairline-faint);
  border-radius: 8px;
  overflow: hidden;
}

.card__graphic svg {
  display: block;
  width: 100%;
  height: auto;
}

.card__meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 24px;
  padding-inline: 8px;
}

.card__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-4);
}

.card__name {
  font-weight: 600;
  font-size: 16px;
}

.card__body {
  margin-top: 10px;
  padding-inline: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
}

/* ============================================================
   05 · The results — copy left, one encoded ring right
   ============================================================ */

/* pinned like the other set pieces: the sticky inner owns a full
   viewport while the section provides ~100vh of runway, so the frame
   holds perfectly still while the entrance plays (and the scroll gate
   in results.js clamps invisibly inside the pin) */
.results { height: 200vh; }

.results__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
}

.results__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(48px, 7vw, 96px);
}

/* measure tuned so each line breaks mid-thought, no widowed word:
   "Ship at the speed / AI gave you. / Without the risk it / brought." */
.results .heading { margin-top: 24px; max-width: 13ch; }

/* proof block: hairline rule + space, no index */
.results__proof {
  margin-top: 40px;
  border-left: 1px solid var(--hairline);
  padding-left: 20px;
  max-width: 36ch;
}

.results__body {
  font-size: 16px;
  line-height: 26px;
  color: var(--text-2);
}

.results__foot {
  display: block;
  margin-top: 16px;
}

.results__ring {
  position: relative;
  width: min(440px, 82vw);
  aspect-ratio: 1;
}

.results__ring canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* the copy stack in the ring centre */
.results__centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

.results__figure {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(44px, 4.5vw, 58px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.results__pct {
  font-size: 0.45em;
  vertical-align: super;
  letter-spacing: 0;
}

.results__label {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-1);
}

.results__sub {
  font-size: 13px;
  color: var(--text-3);
}

.results__sub .mono { font-size: 13px; }

/* ============================================================
   06 · The CTA — live counter over a rising field
   ============================================================ */

.cta {
  position: relative;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-block: var(--section-gap);
}

.cta__canvas {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 46%;
  pointer-events: none;
}

.cta__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* the section-header two-tone, inline: copy in the same muted grey as
   the other headlines' first lines, the two live counters in the dark
   tone — size and weight identical to every other .heading */
.cta__headline {
  margin-top: 24px;
  max-width: 22ch;
  color: var(--text-4);
}

/* tabular figures: every digit the same width, so the headline doesn't
   reflow on each tick of the live counters */
.cta__num { color: var(--text-1); font-variant-numeric: tabular-nums; }

.cta__sub {
  margin-top: 24px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
  max-width: 52ch;
}

.cta .cta-row { margin-top: 36px; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px var(--chrome-pad) 32px;
  background: var(--canvas);
}

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__row--legal {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline-faint);
}

.footer__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.footer__copyright {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
}

/* ============================================================
   Mobile — fluid down from 1120
   ============================================================ */

@media (max-width: 820px) {
  :root {
    --chrome-pad: 22px;
    --nav-h: 72px; /* burger row: 32px + 20px padding ×2 */
  }

  /* logo + left-aligned hamburger */
  .nav {
    justify-content: flex-start;
    gap: 16px;
  }

  .nav__burger { display: flex; }

  .nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface-2);
    border-bottom: 1px solid var(--hairline);
    padding: 8px var(--chrome-pad);
  }

  .nav.is-open .nav__menu { display: flex; }

  .nav__menu .nav__link {
    padding: 14px 0;
    width: 100%;
  }

  .nav.is-open .nav__burger span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav.is-open .nav__burger span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

  /* mobile: no two-column bleed. The piece STACKS in flow, in its own
     band BELOW the copy — never behind it. The hero drops its full-bleed
     pull and the canvas becomes an in-flow block after the text. */
  .hero {
    height: auto;
    margin-top: 0;
    padding: 0 14px 14px; /* tighter frame inset on mobile */
  }

  .hero__sticky {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: calc(100svh - var(--nav-h) - 14px);
  }

  /* reset the desktop 80px column inset; copy spans the framed card */
  .hero__content {
    order: 1;
    max-width: none;
    padding: 28px 20px 0;
  }

  .hero__canvas {
    position: relative;
    inset: auto;
    order: 2;
    width: 100%;
    height: clamp(220px, 32svh, 320px);
  }

  /* the desktop size is for the wide frame; on mobile the headline steps
     down so it stays a comfortable four lines in the narrower card */
  .hero .display { font-size: 38px; }

  .heading { font-size: 28px; }

  .issue { height: 300vh; }

  .issue__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    align-content: start;
    overflow: hidden;
    padding-top: 84px;
  }

  /* text spans the full width on mobile — protect from the top down */
  .issue__fade,
  .solution::after {
    background: linear-gradient(
      to bottom,
      rgba(248, 250, 250, 0.96) 0%,
      rgba(248, 250, 250, 0.9) 55%,
      rgba(248, 250, 250, 0.4) 78%,
      rgba(248, 250, 250, 0) 100%
    );
  }

  .points { margin-top: 16px; }
  .point + .point { margin-top: 20px; }
  .point__body { max-width: none; }

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

  /* stack: copy first, the ring beneath — taller than a viewport, so
     the pin comes off and the section flows normally (no gate either) */
  .results { height: auto; padding-block: var(--section-gap); }
  .results__sticky { position: static; height: auto; display: block; }
  .results__grid { grid-template-columns: 1fr; gap: 56px; }
  .results__ring { margin-inline: auto; }

  .cta__headline { max-width: none; }

  .footer__row,
  .footer__nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ============================================================
   About / team page — two sections between the shared chrome.
   Everything below is additive: new classes only, on the same
   tokens, type roles and rhythm as the homepage.
   ============================================================ */

/* the page you're on reads in ink, like a hovered link at rest */
.nav__link[aria-current="page"] { color: var(--text-1); }
.nav__link[aria-current="page"] .nav__num { color: var(--text-2); }

.team,
.numbers {
  position: relative;
  padding-block: var(--section-gap);
  overflow: hidden; /* the dot patches bleed off the page edges */
}

/* the opening section sits tighter under the bar, so the headline and
   both cards land comfortably inside the first viewport */
.team { padding-block-start: 64px; }

.team .heading,
.numbers .heading { margin-top: 24px; }

/* soft halftone patches at the edges, drawn with the site's dot system */
.about-dots {
  position: absolute;
  aspect-ratio: 1;
  pointer-events: none;
}

.about-dots--a { top: 32px; right: -140px; width: min(520px, 55vw); }
.about-dots--b { bottom: -140px; left: -180px; width: min(520px, 55vw); }

/* ---------- Profile cards: one card, two states ---------- */

.profiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 48px;
}

/* outer shell is invisible at rest so the hover outline never shifts */
.profile {
  position: relative;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 6px;
  transition: border-color 140ms var(--ease-out);
}

.profile:hover,
.profile:focus-within { border-color: var(--hairline); }

.profile__card {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 6px;
}

.profile__media {
  border-radius: 8px;
  overflow: hidden;
  background: var(--hairline-faint);
  aspect-ratio: 463 / 400;
}

.profile__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.profile__meta { padding: 10px 8px 6px; }

.profile__id {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.profile__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-4);
}

.profile__name {
  font-weight: 600;
  font-size: 16px;
}

.profile__row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.profile__role,
.profile__link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.profile__link { transition: color 140ms var(--ease-out); }

/* the whole card is the link */
.profile__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.profile:hover .profile__link,
.profile:focus-within .profile__link {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--text-1);
}

.profile__arrow { margin-left: 6px; }

/* ---------- The stats block: dashed frame, live numbers ---------- */

.figures {
  position: relative;
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px dashed var(--hairline);
}

.figures__corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  color: var(--text-4);
  background: var(--canvas);
  padding: 2px 3px;
}

.figures__corner--tl { top: -8px; left: -7px; }
.figures__corner--tr { top: -8px; right: -7px; }
.figures__corner--bl { bottom: -8px; left: -7px; }
.figures__corner--br { bottom: -8px; right: -7px; }

.figure {
  grid-column: span 2;
  padding: 24px 24px 28px;
}

.figure--wide { grid-column: span 4; }
.figure--l { border-left: 1px dashed var(--hairline); }
.figure--t { border-top: 1px dashed var(--hairline); }

.figure__icon {
  display: block;
  color: var(--text-3);
}

.figure__label {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-3);
  max-width: 26ch;
}

/* the mono figure on the heading scale — smaller than the frame's PNG,
   at the heading weight so all five cells carry the same presence */
.figure__value {
  margin-top: 10px;
  font-family: var(--mono);
  font-weight: 650;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.018em;
}

/* the one non-numeric cell: two-tone sans, same scale */
.figure__value--trust {
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: -0.018em;
}

@media (max-width: 820px) {
  .profiles,
  .figures { margin-top: 40px; }

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

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

  .figure,
  .figure--wide { grid-column: auto; border-left: none; }

  .figure + .figure { border-top: 1px dashed var(--hairline); }

  .about-dots--b { display: none; }
}

/* ============================================================
   Privacy policy page — long-form legal copy on the type system,
   mono clause numbering, aligned dot-grid textures at the edges.
   Additive: new classes only.
   ============================================================ */

.privacy {
  position: relative;
  overflow: hidden; /* the grid textures bleed off the page edges */
}

/* a centred reading column — legal copy doesn't use the full container */
.privacy .container { width: min(640px, 100% - 2 * var(--gutter)); }

/* aligned dot grids — quieter, more regular than the halftone patches */
.privacy-grid {
  position: absolute;
  aspect-ratio: 1;
  pointer-events: none;
}

.privacy-grid--a { top: 40px; right: -150px; width: min(480px, 50vw); }
.privacy-grid--b { top: 34%; left: -170px; width: min(480px, 50vw); }
.privacy-grid--c { top: 72%; right: -150px; width: min(480px, 50vw); }

.privacy-header { padding-block: 64px 0; }

.privacy-header .heading { margin-top: 24px; }

.privacy-updated {
  display: block;
  margin-top: 16px;
}

.privacy-lead {
  margin-top: 24px;
  font-size: 16px;
  line-height: 26px;
  color: var(--text-2);
}

.privacy-clauses { padding-block: 24px var(--section-gap); }

/* clause: mono index in the gutter, content in a readable measure */
.clause {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.clause__num {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 24px; /* sits on the title's first line */
  letter-spacing: 0.08em;
  color: var(--text-4);
}

.clause__text { min-width: 0; }

.clause__title {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
}

.clause__subtitle {
  margin-top: 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-1);
}

.clause__text p,
.clause__text ul {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-3);
}

.clause__text ul {
  list-style: none;
  padding: 0;
}

.clause__text li {
  position: relative;
  padding-left: 16px;
}

.clause__text li + li { margin-top: 8px; }

/* the site's dot as a list marker */
.clause__text li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-4);
}

.clause__text strong {
  font-weight: 600;
  color: var(--text-2);
}

.clause__text a {
  color: var(--text-1);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline);
  transition: text-decoration-color 140ms var(--ease-out);
}

.clause__text a:hover { text-decoration-color: var(--text-1); }

@media (max-width: 820px) {
  .clause {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 44px;
  }

  .privacy-grid--b { display: none; }
}

/* ============================================================
   Dark theme — scoped token flip (colours only; the foundation,
   spacing, type and motion are identical). Applied per-page via
   <html data-theme="dark">. Values are the LeoTrace dark ramp:
   canvas grey/900, panels container/base, inputs container/raised,
   hairlines one step lighter than the surface they sit on.
   ============================================================ */

[data-theme="dark"] {
  --canvas: #0f0f10;            /* background/canvas */
  --surface-1: #181818;         /* container/base — cards, panels */
  --surface-2: #1e1f1f;         /* container/raised — inputs, nested */
  --hairline: #2a2a2a;          /* outline/default */
  --hairline-faint: #1e1f1f;    /* outline/subtle */

  --text-1: #ffffff;            /* foreground/primary */
  --text-2: #e4e4e4;            /* foreground/secondary */
  --text-3: #989898;            /* foreground/tertiary */
  --text-4: #737373;            /* foreground/quaternary */
  --text-ghost: #575757;        /* foreground/disabled */

  /* the dot system inverts: the "dark" (prominent) dot reads bright */
  --dot-dark: #989898;
  --dot-mid: #575757;
  --dot-faint: #2a2a2a;

  --red: #ea5557;               /* status/error accent */

  --nav-veil: rgba(15, 15, 16, 0.7);
  --btn-solid-hover: #e4e4e4;
  --scrim-hover: rgba(255, 255, 255, 0.04);    /* container/hover */
  --scrim-selected: rgba(255, 255, 255, 0.08); /* container/selected */
  --chip: #393939;              /* container/chip */
}

/* ============================================================
   Schedule a demo page — centred single column on the dark
   canvas, one form panel, dot fields flanking as depth.
   ============================================================ */

.demo {
  position: relative;
  overflow: hidden;
}

/* coded-environment dot fields, flanking left and right */
.demo-dots {
  position: absolute;
  inset-block: 0;
  width: min(30vw, 560px);
  pointer-events: none;
}

.demo-dots--left { left: 0; }
.demo-dots--right { right: 0; }

.demo-section {
  position: relative;
  padding-block: clamp(96px, 16vh, 208px) clamp(96px, 18vh, 240px);
  text-align: center;
}

.demo-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-section .display { margin-top: 24px; }

/* ---------- The form panel ---------- */

.demo-form {
  width: min(704px, 100%);
  margin-top: 56px;
  text-align: left;
}

.demo-panel {
  background: var(--surface-1);
  border: 1px solid var(--hairline-faint);
  border-radius: 14px;
  overflow: hidden;
}

.demo-field + .demo-field { border-top: 1px solid var(--hairline-faint); }

.demo-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  transition: background-color 140ms var(--ease-out);
}

.demo-row:hover { background: var(--scrim-hover); }

/* focus lifts the row and brightens the label */
.demo-row:focus-within { background: var(--scrim-selected); }

.demo-row__label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 20px 0 20px 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 140ms var(--ease-out);
}

.demo-row:focus-within .demo-row__label { color: var(--text-2); }

.demo-row__num { color: var(--text-4); }

.demo-row__input {
  width: 100%;
  padding: 20px 24px 20px 0;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-1);
  caret-color: var(--text-1);
}

.demo-row__input::placeholder { color: var(--text-ghost); }

/* an inline edit: no ring, no box — the focused state is the row's
   lifted scrim, the brightened label and the caret, exactly like the
   reference. (Text inputs always match :focus-visible in Chrome, so a
   ring here would show on every click, not just keyboard.) */
.demo-row__input:focus { outline: none; }

/* error: an accent, never a flood */
.demo-field.is-error .demo-row__label { color: var(--red); }
.demo-field.is-error .demo-row__num { color: var(--red); }

.demo-row__error {
  margin: 0;
  padding: 0 24px 14px 24px;
  font-size: 13px;
  color: var(--red);
}

/* ---------- Role chips (single-select, optional) ---------- */

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 24px 14px 0;
}

.demo-chip {
  border: 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--chip);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  cursor: pointer;
  position: relative;
  transition: color 140ms var(--ease-out);
}

/* hover/selected are scrims layered over the fill, not swapped greys */
.demo-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  transition: background-color 140ms var(--ease-out);
}

.demo-chip:hover::after { background: var(--scrim-hover); }

.demo-chip[aria-checked="true"] {
  color: var(--text-1);
}

.demo-chip[aria-checked="true"]::after { background: var(--scrim-selected); }

.demo-chip:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Submit ---------- */

.demo-submit {
  width: 100%;
  justify-content: center;
  margin-top: 20px;
  padding: 18px 20px;
  font-size: 15px;
}

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

.demo-submit:active { background: var(--btn-solid-hover); }

.demo-submit[disabled] {
  opacity: 0.6;
  cursor: default;
}

.demo-note {
  margin-top: 16px;
  font-size: 13px;
  text-align: center;
  color: var(--text-3);
}

/* form-level failure line */
.demo-fail {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  color: var(--red);
}

/* fieldset is a transparent wrapper; while submitting it locks the form */
.demo-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.demo-fieldset[disabled] { opacity: 0.6; }

/* ---------- Success state ---------- */

.demo-success {
  width: min(704px, 100%);
  margin-top: 56px;
  padding: 56px 32px;
  background: var(--surface-1);
  border: 1px solid var(--hairline-faint);
  border-radius: 14px;
}

.demo-success__title {
  font-weight: 600;
  font-size: 18px;
  color: var(--text-1);
}

.demo-success__sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-3);
}

/* the honeypot: visually gone, off the tab order (see js/demo.js) */
.demo-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .demo-row { grid-template-columns: 1fr; }

  .demo-row__label { padding: 16px 24px 0; }

  .demo-row__input { padding: 10px 24px 16px; }

  .demo-chips { padding: 4px 24px 16px; }

  .demo-dots { width: 22vw; }
}

/* ============================================================
   Team page v2 — intro + memo, the pivot line + stats board
   (Figma 134-274). Assembled from existing roles and tokens.
   ============================================================ */

.team .display {
  margin-top: 24px;
  max-width: 12.4em; /* breaks the grey clause before "how", per the frame */
}

/* the intro owns the first viewport, content centred under the bar */
.team {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  padding-block: 48px;
}

/* the memo: paragraph 1 left, paragraph 2 right */
.memo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px);
  margin-top: 48px;
}

/* the pivot statement: the grey clause hands over to the black payoff */
.pivot__line { max-width: 21em; }

.pivot__muted { color: var(--text-3); }

.pivot .figures { margin-top: 40px; }

/* stats cell: two-tone stacked figure + mono-caps sub-label */
.figure__duo {
  display: flex;
  flex-direction: column;
}

.figure__caps {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  max-width: 32ch;
}

@media (max-width: 820px) {
  .memo {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }
}

/* ============================================================
   Team page — founder quotes: a pinned sequence. The card grows
   in, the quote resolves, then a fast flick swaps Florian for
   Patrick on one horizontal track. (Figma 134-274, frames
   Florian/Patrick Example.)
   ============================================================ */

.quotes {
  position: relative;
  height: 260vh; /* the pin runway: hold → swap → hold */
}

.quotes__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.quotes__dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.quotes__viewport {
  position: relative;
  width: 100%;
  overflow: hidden; /* the waiting card never peeks; the flick is masked */
  border-radius: 14px;
  will-change: transform;
}

/* one static stage: the card never moves — the content slides through */
.quote-card {
  min-height: 520px;
  overflow: hidden;
  padding: 40px clamp(32px, 8.6vw, 124px);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  display: flex;
  align-items: stretch;
}

.quote-flow {
  display: flex;
  gap: 200px;
  width: 100%;
  will-change: transform;
}

.quote-item {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
}

.quote-card blockquote { margin: 0; }

/* only the mark is grey — the quote stays ink */
.quote-card__mark {
  font-weight: 650;
  font-size: 56px;
  line-height: 0.55;
  color: var(--text-4);
}

.quote-card__text {
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  color: var(--text-1);
  max-width: 872px;
}

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

.quote-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--hairline-faint);
}

.quote-card__id {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.quote-card__name {
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
}

.quote-card__role {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 24px;
  text-transform: uppercase;
  color: var(--text-2);
}

.quote-card__count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 32px;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

/* the quote resolves once its card is live — fade-and-rise, staggered
   in reading order; one-shot (is-live is never removed) */
@media (prefers-reduced-motion: no-preference) {
  /* the first quote resolves as the card lands; after that the content
     rides the scrubbed flow, nothing fades */
  .quote-item .quote-card__mark,
  .quote-item .quote-card__text,
  .quote-item .quote-card__row {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity var(--reveal-dur) var(--reveal-ease),
      transform var(--reveal-dur) var(--reveal-ease);
  }

  .quote-item .quote-card__text { transition-delay: 120ms; }
  .quote-item .quote-card__row { transition-delay: 260ms; }

  .quote-item.is-live .quote-card__mark,
  .quote-item.is-live .quote-card__text,
  .quote-item.is-live .quote-card__row {
    opacity: 1;
    transform: none;
  }
}

/* reduced motion: no pin, no grow, no flick — both quotes stacked,
   fully resolved */
@media (prefers-reduced-motion: reduce) {
  .quotes { height: auto; padding-block: var(--section-gap); }

  .quotes__sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  .quote-card { min-height: 0; }

  .quote-flow {
    display: block;
    transform: none !important;
  }

  .quote-item + .quote-item { margin-top: 56px; }
}

@media (max-width: 820px) {
  .quotes { height: 300vh; }

  .quote-card {
    min-height: 0;
    padding: 32px 24px;
    gap: 28px;
  }

  .quote-card__text {
    font-size: 19px;
    line-height: 28px;
  }

  .quote-card__avatar { width: 56px; height: 56px; }

  .quote-card__count { font-size: 14px; }
}
