/* Cover — Apple-style scroll theater (light operational briefing). */

/* ── Hero ───────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 0;
}

.hero__stage {
  position: relative;
  min-height: calc(100svh - var(--rail-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vh, 5.5rem) var(--gutter) var(--s-6);
  overflow: clip;
}

.hero__depth {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__depth--back {
  background:
    radial-gradient(ellipse 70% 50% at 78% 42%, color-mix(in oklab, var(--line) 8%, transparent), transparent 70%);
}
.hero__depth--mid {
  background:
    linear-gradient(180deg, transparent 0%, color-mix(in oklab, var(--field-deep) 55%, transparent) 100%);
  opacity: 0.7;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--maxw));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.hero__copy { min-width: 0; }
.hero__eyebrow { margin: 0; }

.hero__title {
  margin: var(--s-4) 0 0;
  display: grid;
  gap: var(--s-4);
}

.hero__name {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.036em;
  line-height: 0.96;
  color: var(--text);
  font-variation-settings: "wdth" 96, "wght" 650;
}

.hero__claim {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.5vw, 1.95rem);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.2;
  max-width: 24ch;
  text-wrap: balance;
  font-variation-settings: "wdth" 98, "wght" 500;
  color: var(--text-dim);
}

.hero__claim em {
  font-style: normal;
  color: var(--line);
  font-variation-settings: "wdth" 98, "wght" 600;
}

.hero__lede {
  margin-top: var(--s-5);
  max-width: 46ch;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-dim);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--s-5);
}

.hero__showcase { min-width: 0; perspective: 1200px; }

.hero__product {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-6deg) rotateX(4deg);
  transform-origin: center center;
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-top: var(--hair) solid var(--text);
  background: color-mix(in oklab, var(--field) 92%, var(--field-deep));
  will-change: transform, opacity;
}

.hero__product-glow {
  position: absolute;
  inset: -8% -6%;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in oklab, var(--line) 10%, transparent), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero__showcase-label,
.hero__product-frame,
.hero__legend { position: relative; z-index: 1; }

.hero__showcase-label { margin: 0 0 var(--s-4); }
.hero__product-frame .drawing { width: 100%; }

.hero__legend {
  display: grid;
  gap: var(--s-2);
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}
.hero__legend li {
  display: flex;
  gap: var(--s-3);
  align-items: baseline;
  font-size: var(--t-small);
  color: var(--text-dim);
}

/* ── scene tabs ───────────────────────────────────────────────────
   Three scenes, one drawing frame. Tabs are real ARIA tabs, not styled
   links, because they change what is rendered below rather than
   navigating anywhere. */

.hero__scene-tabs {
  display: flex;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.hero__sceneTab {
  position: relative;
  overflow: hidden;
  padding: var(--s-2) var(--s-3);
  background: none;
  border: var(--hair) solid var(--line-quiet);
  border-radius: var(--radius);
  font: 500 var(--t-label)/1 var(--mono);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-faint);
  cursor: pointer;
  transition: color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.hero__sceneTab:hover { color: var(--text); border-color: var(--text-faint); }
.hero__sceneTab.is-active { color: var(--line); border-color: var(--line); }

/* A thin progress bar that fills over the auto-rotate interval, restarted
   by JS on every scene change. Purely a timing cue: nothing breaks if it
   never fills, e.g. under reduced motion, where the global rule in
   tokens.css collapses the animation to 0.001ms. */
.hero__sceneTab__bar {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--line);
}
.hero__sceneTab.is-active .hero__sceneTab__bar { animation: heroSceneProgress 6s linear; }
@keyframes heroSceneProgress { from { width: 0; } to { width: 100%; } }

/* ── scene panels ─────────────────────────────────────────────────
   Native [hidden] swap rather than absolute-stacked crossfade: the three
   scenes have different legend lengths (3 vs 4 rows), and stacking them
   would need a fixed-height container tall enough for the largest one,
   leaving visible dead space under the smaller two. A hard swap plus a
   short entrance animation reads as a transition without that cost. */

.hero__scene.is-entering { animation: heroSceneIn var(--d-slow) var(--ease); }
@keyframes heroSceneIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.hero__scroll {
  position: relative;
  z-index: 1;
  width: min(100%, var(--maxw));
  margin-inline: auto;
  margin-top: var(--s-6);
  color: var(--text-faint);
  transition: opacity var(--d-base) var(--ease);
}
.hero__scroll.is-gone { opacity: 0; }

/* ── Proof strip (brief, not KPI ticker) ────────────────────────── */

.brief {
  position: relative;
  border-block: var(--hair) solid var(--line-quiet);
  background: var(--field-deep);
}
.brief__inner {
  width: min(100%, var(--maxw));
  margin-inline: auto;
  padding: 1.35rem var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  align-items: baseline;
}
.brief__item {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  padding-left: var(--s-4);
  border-left: var(--hair) solid var(--line-quiet);
}
.brief__item:first-child {
  border-left: 0;
  padding-left: 0;
}
.brief__k { margin: 0; color: var(--text-faint); }
.brief__v {
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variation-settings: "wdth" 100, "wght" 650;
  max-width: none;
}
.brief__u {
  color: var(--text-faint);
  font-size: 0.62em;
  font-weight: 500;
  margin-left: 0.15em;
}
.brief__rule {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: var(--hair);
  background: var(--line);
  transform-origin: left center;
  transform: scaleX(0);
  max-width: var(--maxw);
  margin-inline: auto;
}

/* ── Sticky stack (practice) ────────────────────────────────────── */

.stack-section__head {
  margin-bottom: var(--s-5);
}

.stack {
  width: min(100%, var(--maxw));
  margin-inline: auto;
}

.stack__pin {
  position: relative;
}

.stack__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-5);
}

.stack__card {
  display: grid;
  gap: var(--s-4);
  padding: clamp(2rem, 4vw, 3.25rem);
  min-height: clamp(22rem, 58vh, 34rem);
  border: var(--hair) solid var(--line-quiet);
  border-radius: var(--radius);
  background: var(--field);
  box-shadow: 0 1px 0 color-mix(in oklab, var(--text) 4%, transparent);
}

.stack__num { margin: 0; }
.stack__title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-variation-settings: "wdth" 96, "wght" 550;
}
.stack__body {
  margin: 0;
  max-width: 58ch;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-dim);
}
.stack__meta {
  margin: auto 0 0;
  padding-top: var(--s-4);
  border-top: var(--hair) solid var(--line-quiet);
  color: var(--line);
}

@media (min-width: 900px) {
  .stack {
    height: 300vh;
  }
  .stack__pin {
    position: sticky;
    top: calc(var(--rail-h) + 1.25rem);
    height: calc(100svh - var(--rail-h) - 2.5rem);
    display: grid;
    align-items: center;
  }
  .stack__list {
    position: relative;
    height: min(70vh, 38rem);
    display: block;
  }
  .stack__card {
    position: absolute;
    inset: 0;
    min-height: 0;
    will-change: transform, opacity;
  }
  .stack__card:nth-child(1) { z-index: 1; }
  .stack__card:nth-child(2) { z-index: 2; }
  .stack__card:nth-child(3) { z-index: 3; }
}

/* ── Case pins (sequential feature scrub) ───────────────────────── */

.case-pins {
  list-style: none;
  margin-top: var(--s-7);
  margin-inline: auto;
  padding: 0;
  width: min(100%, var(--maxw));
  display: grid;
  gap: var(--s-7);
}

.case-pin__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(2rem, 4vh, 3.5rem);
  border-top: var(--hair) solid var(--line-quiet);
}

.case-pin__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--s-3);
  border-bottom: var(--hair) solid var(--line-quiet);
  margin-bottom: var(--s-4);
}
.case-pin__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  font-weight: 550;
  letter-spacing: -0.028em;
  line-height: 1.08;
  max-width: 14ch;
  font-variation-settings: "wdth" 96, "wght" 550;
}
.case-pin__summary {
  margin: var(--s-4) 0 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 42ch;
}
.case-pin__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  margin: var(--s-5) 0 0;
}
.case-pin__meta dt { margin: 0; }
.case-pin__meta dd { margin: var(--s-2) 0 0; font-size: var(--t-small); }
.case-pin__cta {
  display: inline-flex;
  margin-top: var(--s-5);
  align-items: center;
  gap: var(--s-2);
}
.case-pin__cta::after {
  content: "\2192";
  transition: transform var(--d-fast) var(--ease);
}
.case-pin__link:hover .case-pin__cta { color: var(--line-hi); }
.case-pin__link:hover .case-pin__cta::after { transform: translateX(4px); }

.case-pin__drawing {
  border: var(--hair) solid var(--line-quiet);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.75rem);
  background: var(--field-deep);
  will-change: transform, opacity;
}
.case-pin__drawing .drawing { width: 100%; }

.case-pin--cta {
  display: grid;
  align-items: center;
  padding-block: clamp(2rem, 4vh, 3.5rem);
  border-top: var(--hair) solid var(--line-quiet);
}
.case-pin__cta-panel {
  max-width: 36rem;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-top: var(--hair) solid var(--text);
}
.case-pin__cta-panel .case-pin__title { max-width: 16ch; }
.case-pin__cta-panel .button { margin-top: var(--s-5); }

/* ── Results + close ────────────────────────────────────────────── */
/* The static .snap stat blocks were replaced by the shared partials/plot.php
   readout (same animated component the Results page uses), so this rule set
   has no markup left to style. Removed rather than left dead. */

.close { padding-block: clamp(4.5rem, 10vw, 7rem); }
.close__inner {
  width: min(100%, var(--maxw));
  margin-inline: auto;
  max-width: 42rem;
}
.close__title {
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 2.85rem);
  font-weight: 550;
  letter-spacing: -0.03em;
  font-variation-settings: "wdth" 96, "wght" 550;
}
.close__lede { margin-top: var(--s-4); font-size: 1.125rem; }
.close__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--s-5);
}

/* ── Mobile / reduced motion ────────────────────────────────────── */

@media (max-width: 960px) {
  .hero__stage {
    min-height: auto;
    padding-block: var(--s-6);
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
  }
  .hero__product {
    transform: none;
  }
  .hero__actions .button,
  .close__actions .button {
    flex: 1 1 100%;
    justify-content: center;
  }

  .brief__inner { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .brief__item {
    border-left: 0;
    padding-left: 0;
    padding-top: var(--s-3);
    border-top: var(--hair) solid var(--line-quiet);
  }
  .brief__item:first-child { border-top: 0; padding-top: 0; }

  .case-pin__link {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: var(--s-5);
  }
  .case-pin__drawing { order: -1; }
  .case-pin--cta { min-height: 0; }
}

html.no-motion .hero__product { transform: none; }
html.no-motion .stack__card { position: relative; inset: auto; }
html.no-motion .stack { height: auto; }
html.no-motion .stack__pin { position: relative; top: auto; height: auto; }
html.no-motion .stack__list { height: auto; display: grid; gap: var(--s-5); }


/* ══════════════════════════════════════════════════════════════════
   Density pass.

   Measured before this block: 8,159px of scroll for 524 words on a
   1440px viewport, with the right half of the screen empty below the
   hero. The fixes are structural, not cosmetic — the closing CTA and
   the case rows now use the full measure instead of hugging the left
   column.
   ══════════════════════════════════════════════════════════════════ */

/* The hero was 1,642px tall for 98 words. Capping it at the viewport
   means the brief strip and its proof numbers are reachable in one
   scroll rather than two. */
.hero { min-height: min(100svh, 46rem); }

/* Closing CTA: was a 426px left-hugging column on a 1440px screen.
   Now a two-column band, so the action sits beside the claim instead
   of a screen-width of nothing sitting beside it. */
@media (min-width: 900px) {
  /* Three children, not two: title, lede, actions. Auto-placement put the
     title and lede in adjacent columns and wrapped the actions to a second
     row, which is how a "denser" rule made this section 137px taller.
     Explicit placement puts the copy in column one and the actions beside it. */
  .close__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--s-7);
    align-items: end;
  }
  .close__title  { grid-column: 1; grid-row: 1; margin: 0; }
  .close__lede   { grid-column: 1; grid-row: 2; margin-top: var(--s-4); }
  .close__actions{ grid-column: 2; grid-row: 1 / 3; align-self: end; margin: 0; }
}

/* ══ hero proof ═══════════════════════════════════════════════════
   Evidence on the first screen. Previously the opening view carried a
   claim and the proof for it sat below the fold. */

.hero__proof {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  margin: var(--s-5) 0 0;
  padding: var(--s-4) 0 0;
  border-top: var(--hair) solid var(--line-quiet);
}
.hero__proofVal {
  display: block;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--line);
  letter-spacing: -0.02em;
}
.hero__proofKey {
  display: block;
  margin-top: var(--s-2);
  font: 500 var(--t-label)/1 var(--mono);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ══ hero tier explorer ═══════════════════════════════════════════ */

.hero__legend { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--hair); }

.hero__legendBtn {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-3);
  background: none;
  border: var(--hair) solid transparent;
  border-radius: var(--radius);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.hero__legendBtn:hover,
.hero__legendBtn.is-active { background: var(--field); border-color: var(--line-quiet); }

.hero__legendText { font-size: var(--t-small); color: var(--text); }
.hero__legendNote {
  grid-column: 2;
  font-size: var(--t-label);
  line-height: 1.5;
  color: var(--text-faint);
  /* Held out of the flow until wanted, so the resting state stays quiet
     and the reveal is the reward for pointing at something. */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--d-base) var(--ease), opacity var(--d-fast) var(--ease);
}
.hero__legendBtn:hover .hero__legendNote,
.hero__legendBtn:focus-visible .hero__legendNote,
.hero__legendBtn.is-active .hero__legendNote { max-height: 3rem; opacity: 1; margin-top: var(--s-2); }

/* Dim the diagram, then bring the pointed-at tier back. Opacity only, so
   nothing here can trigger layout. */
.hero__product svg .tier { transition: opacity var(--d-base) var(--ease); }
.hero__product svg.is-focused .tier { opacity: 0.22; }
.hero__product svg.is-focused .tier.is-active { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero__legendNote { transition: none; }
  .hero__product svg .tier { transition: none; }
}

/* ══ thinking teaser ══════════════════════════════════════════════
   Three notes as equal columns. The writing is the newest principal
   signal on the site and was previously only reachable from the nav,
   which meant a reader who scrolled the homepage never learned it
   existed. */

.teasers {
  list-style: none;
  margin-top: var(--s-6);
  margin-inline: auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--hair);
  background: var(--line-quiet);
  border: var(--hair) solid var(--line-quiet);
  max-width: var(--maxw);
}
.teaser { background: var(--field); }
.teaser__link {
  display: grid;
  gap: var(--s-3);
  height: 100%;
  padding: var(--s-5) var(--s-4);
  align-content: start;
  transition: background-color var(--d-fast) var(--ease);
}
.teaser__link:hover { background: var(--field-deep); }
.teaser__title {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.014em;
  line-height: 1.28;
}
.teaser__link:hover .teaser__title { color: var(--line); }
.teaser__dek { font-size: var(--t-small); line-height: 1.6; color: var(--text-dim); }
.teaser__read { color: var(--text-faint); align-self: end; padding-top: var(--s-2); }

/* ══ delivered for ════════════════════════════════════════════════ */

.delivered {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: var(--hair) solid var(--line-quiet);
}
.delivered__logos {
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-6);
}
.delivered__logos img {
  height: 30px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter var(--d-base) var(--ease), opacity var(--d-base) var(--ease);
}
.delivered__logos li:hover img { filter: grayscale(0); opacity: 1; }

@media (max-width: 900px) {
  .teasers { grid-template-columns: minmax(0, 1fr); }
}
