/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.mono { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: -0.02em; text-transform: uppercase; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { margin-bottom: 24px; opacity: .7; }

/* ===== Loader ===== */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--cream); color: var(--ink);
  display: flex; align-items: flex-end; justify-content: space-between; padding: 32px var(--gutter);
  transition: opacity .6s var(--ease-out), visibility .6s;
}
.loader.is-done { opacity: 0; visibility: hidden; }

/* ===== Pills (buttons) ===== */
.pill {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  font: 600 14px/1.3 var(--font-sans); letter-spacing: .025em;
  padding: 12px 18px; border-radius: var(--radius-pill);
  transition: transform .4s var(--ease-out), background-color .3s, color .3s;
}
.pill:hover { transform: translateY(-2px); }
.pill--solid { background: var(--ink); color: var(--white); }
.pill--tint { background: rgba(0,0,0,.06); color: var(--ink); font-weight: 400; }
[data-theme="dark"] .pill--solid, .section--black .pill--solid, .section--offblack .pill--solid { background: var(--white); color: var(--black); }

/* ===== Nav (fixed, blurred, flips light/dark per section) ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background-color .4s, color .4s, transform .5s var(--ease-out);
}
.nav[data-theme="light"] { background: rgba(255,255,255,.18); color: var(--ink); }
.nav[data-theme="dark"]  { background: rgba(0,0,0,.25); color: var(--white); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__logo { display: flex; align-items: baseline; gap: 10px; }
.nav__mark { font-weight: 600; font-size: 22px; letter-spacing: -0.04em; }
.nav__sub { opacity: .6; font-size: 12px; text-transform: none; }
.nav__links { display: flex; gap: 32px; font-size: 15px; }
.nav__links a { opacity: .75; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav[data-theme="dark"] .nav__cta { background: var(--white); color: var(--black); }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ===== Story (sections 1–3) ===== */
.story { position: relative; background: var(--cream); }
.story__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.story__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.beat { position: absolute; inset: 0; pointer-events: none; }
.beat a, .beat button { pointer-events: auto; }

/* Beat 1: hero */
.beat--hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(var(--nav-h) + 4vh) var(--gutter) 0; }
.hero__title { font-size: var(--fs-h1); line-height: 1; letter-spacing: var(--ls-h1); font-weight: 400; }
.hero__title em { color: var(--leaf); }
.hero__foot {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--gutter) 32px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; text-align: left;
}
.hero__sub { max-width: 380px; font-size: var(--fs-small); color: var(--muted); }
.hero__scroll { display: flex; align-items: center; gap: 10px; opacity: .6; }
.hero__scroll .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: translateY(6px); opacity: .3; } }
.hero__ctas { display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 860px) {
  .hero__foot { position: static; grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 16px; padding: 18px 0 0; }
  .hero__sub { max-width: 34ch; font-size: 15px; }
  .hero__scroll { display: none; }
}

/* Beat 2: statement */
.beat--why { padding: calc(var(--nav-h) + 6vh) var(--gutter) 0; max-width: 46vw; }
.statement { font-size: var(--fs-statement); line-height: 1.12; letter-spacing: var(--ls-statement); }
.statement--sm { font-size: clamp(20px, 1.9vw, 28px); line-height: 1.3; margin-top: 28px; max-width: 34ch; }
.statement .w { display: inline-block; will-change: opacity, filter; }
@media (max-width: 860px) {
  .beat--why { max-width: none; padding-top: calc(var(--nav-h) + 2vh); }
  .statement { font-size: clamp(24px, 7vw, 34px); }
  .statement--sm { font-size: 17px; margin-top: 16px; }
}

/* Beat 3 */
.beat--box { padding: calc(var(--nav-h) + 6vh) var(--gutter); }
.beat--box > * { max-width: min(40vw, 560px); }
.box__lead { margin-top: 0; }
.box__reveal { margin-top: clamp(28px, 6vh, 64px); }
.box__q { font-size: clamp(20px, 1.9vw, 28px); line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 16px; }
.box__q .mono { font-size: .55em; letter-spacing: 0; opacity: .6; vertical-align: .15em; }
@media (max-width: 860px) {
  .beat--box { padding-top: calc(var(--nav-h) + 2vh); }
  .beat--box > * { max-width: none; }
  .box__reveal { margin-top: 18px; }
  .box__q { font-size: 17px; margin-bottom: 8px; }
  .beat--box .h2 { font-size: clamp(34px, 10vw, 44px); }
}
.h2 { font-size: var(--fs-h2); line-height: .93; letter-spacing: var(--ls-h2); font-weight: 400; }
.story .h2 em { color: var(--leaf); }

/* Beat 4: layer callouts + leader lines + detail panel */
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.leaders line { stroke: var(--ink); stroke-width: 1; }
.leaders circle { fill: var(--ink); }
.callouts { list-style: none; margin: 0; padding: 0; }
.callout { position: absolute; display: flex; flex-direction: column; gap: 4px; transform: translateY(-50%); }
.callout strong { white-space: nowrap; font-weight: 400; font-size: clamp(18px, 1.5vw, 26px); letter-spacing: -0.03em; line-height: 1; }
.callout .mono { opacity: .6; font-size: 12px; }
.details { position: absolute; left: var(--gutter); bottom: 6vh; width: min(380px, 28vw); }
.detail { position: absolute; left: 0; bottom: 0; width: 100%; background: rgba(255,255,255,.55); backdrop-filter: blur(12px);
  border-radius: 24px; padding: 24px 26px; }
.detail h3 { font-size: var(--fs-h3); font-weight: 400; letter-spacing: -0.03em; margin: 6px 0 4px; }
.detail .lead { color: var(--muted); font-size: 16px; margin-bottom: 12px; }
.detail ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.detail li + li { margin-top: 6px; }
.detail b { font-weight: 600; }
@media (max-width: 860px) {
  /* Phones: no room for leader lines beside the box, so the panel names the layer */
  .leaders, .callouts { display: none; }
  .details { left: 16px; right: 16px; width: auto; top: calc(var(--nav-h) + 8px); bottom: auto; }
  .detail { top: 0; bottom: auto; padding: 18px 20px; }
  .detail h3 { font-size: 26px; }
  .detail .lead { font-size: 15px; margin-bottom: 8px; }
  .detail ul { font-size: 13px; }
  .detail li + li { margin-top: 3px; }
}

.story__progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 14px; height: 2px; background: rgba(0,0,0,.08); }
.story__progress span { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }

/* Reduced motion / no JS: the story becomes four normal panels on still frames */
.story-static { display: none; }
.reduced .loader, .no-js .loader { display: none; }
.reduced .story__stage, .no-js .story__stage { height: auto; overflow: visible; }
.reduced .story__canvas, .no-js .story__canvas,
.reduced .leaders, .no-js .leaders, .reduced .callouts, .no-js .callouts,
.reduced .story__progress, .no-js .story__progress { display: none; }
.reduced .beat, .no-js .beat {
  position: relative; inset: auto; min-height: 100vh; max-width: none;
  background-size: cover; background-position: center; pointer-events: auto;
}
.reduced .beat--hero, .no-js .beat--hero { background-image: url(../img/key_1.webp); }
.reduced .beat--why, .no-js .beat--why { background-image: url(../img/key_2.webp); }
.reduced .beat--box, .no-js .beat--box { background-image: url(../img/key_3.webp); }
.reduced .beat--layers, .no-js .beat--layers { background-image: url(../img/key_4.webp); padding: 60vh var(--gutter) 48px; }
.reduced .beat--why > *, .no-js .beat--why > * { max-width: 46vw; }
.reduced .details, .no-js .details { position: relative; inset: auto; width: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.reduced .detail, .no-js .detail { position: relative; inset: auto; }
@media (max-width: 860px) { .reduced .details, .no-js .details { grid-template-columns: 1fr; } .reduced .detail ul, .no-js .detail ul { display: block; } }

/* ===== Generic sections ===== */
.section { padding: var(--section-y) 0; position: relative; }
.section--white { background: var(--white); color: var(--ink); }
.section--white .h2 em { color: var(--leaf); }
.section--black { background: var(--black); color: var(--white); }
.section--offblack { background: var(--offblack); color: var(--white); }
.section--black .h2 em, .section--offblack .h2 em { color: var(--lime); }
.section--accent { background: var(--lime); color: var(--black); }

/* 4 · cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 72px; }
.card { border-radius: var(--radius-card); padding: 40px 36px 44px; min-height: 360px; display: flex; flex-direction: column;
  transition: transform .5s var(--ease-out); }
.card:hover { transform: translateY(-6px); }
.card--rice { background: var(--tint-rice); }
.card--chicken { background: var(--tint-chicken); }
.card--scallion { background: var(--tint-scallion); }
.tag { align-self: flex-start; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(0,0,0,.06); }
.card h3 { margin-top: auto; font-size: var(--fs-h3); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; }
.card p { margin-top: 12px; color: var(--muted); font-size: 17px; }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; } .card { min-height: 260px; } }

/* 5 · steps (horizontal) */
.steps { padding: 0; }
.steps__pin { height: 100vh; height: 100svh; box-sizing: border-box; padding: calc(var(--nav-h) + 4vh) 0 5vh;
  display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.steps__head { flex: none; }
/* Cards fill whatever height is left between heading and progress bar, so the whole set
   (heading, cards, bar) always fits the screen while it's pinned. */
.steps__track { flex: 1 1 auto; min-height: 0; display: flex; align-items: stretch; gap: 16px;
  padding: clamp(20px, 4vh, 56px) var(--gutter) clamp(16px, 3vh, 32px); width: max-content;
  padding-left: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); /* line up with the heading */
  max-height: calc(520px + clamp(20px, 4vh, 56px) + clamp(16px, 3vh, 32px)); }
.step { width: min(520px, 80vw); height: 100%; min-height: 0; box-sizing: border-box;
  background: var(--card-dark); border-radius: var(--radius-card); padding: clamp(24px, 3.6vh, 40px);
  display: flex; flex-direction: column; overflow: hidden; }
.step__num { font-size: 15px; color: var(--lime); }
.step h3 { margin-top: auto; font-size: clamp(40px, min(5vw, 8.5vh), 80px); line-height: 1; font-weight: 400; }
.step h3 em { letter-spacing: -0.03em; }
.step p { margin-top: clamp(8px, 1.6vh, 16px); color: var(--muted-dark); font-size: clamp(15px, 2.1vh, 18px); max-width: 34ch; }
.steps__bar-wrap { flex: none; }
.steps__bar { height: 2px; background: rgba(255,255,255,.12); }
.steps__bar span { display: block; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(0); }
@media (max-width: 860px) {
  .steps__pin { height: auto; padding: var(--section-y) 0; }
  .steps__track { flex-direction: column; width: auto; }
  .step { width: auto; height: auto; max-height: none; min-height: 280px; }
  .steps__bar { display: none; }
}

/* 6 · proof */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 32px; margin-top: 96px; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-size: var(--fs-stat); line-height: .93; letter-spacing: -0.06em; }
.stat__num em { font-size: 1.48em; color: var(--lime); letter-spacing: -0.04em; line-height: .8; }
.stat__label { font-size: 20px; color: var(--muted-dark); margin-top: 12px; }
.note { margin-top: 40px; opacity: .4; font-size: 12px; }
.marquee { overflow: hidden; margin: 120px 0; border-block: 1px solid rgba(255,255,255,.12); }
.marquee__row { display: flex; gap: 72px; padding: 32px 0; width: max-content; animation: marquee 40s linear infinite; }
.marquee__row span { font-family: var(--font-mono); text-transform: uppercase; font-size: 18px; color: var(--muted-dark); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
.quote { margin: 0; max-width: 1100px; }
.quote footer { margin-top: 32px; opacity: .6; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }

/* 7 · CTA */
.cta__title { font-size: clamp(64px, 12vw, 180px); line-height: 1; letter-spacing: -0.06em; font-weight: 400; }
.cta__body { margin-top: 40px; font-size: clamp(20px, 2vw, 28px); max-width: 30ch; letter-spacing: -0.02em; line-height: 1.25; }
.cta__ctas { display: flex; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.copy.is-copied::after { content: " · copied"; }

/* Footer */
.footer { background: var(--black); color: var(--white); padding: 72px 0 0; overflow: hidden; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; font-size: 16px; }
.footer__cols p + p { margin-top: 6px; color: var(--muted-dark); }
.footer__cols a:hover { color: var(--white); }
.footer__label { margin-bottom: 16px; opacity: .5; }
.footer__word { font-size: 17.5vw; line-height: .78; letter-spacing: -0.07em; white-space: nowrap; margin: 96px 0 0 -0.04em; padding-bottom: 2vw; }
.footer__word .ch { display: inline-block; }
@media (max-width: 700px) { .footer__cols { grid-template-columns: 1fr; } }

/* Split-text helpers */
.split-lines .line { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
/* No pinning without motion: let the steps wrap into a grid */
.reduced .steps__pin, .no-js .steps__pin { height: auto; padding: var(--section-y) 0; }
.reduced .steps__track, .no-js .steps__track { width: auto; flex-wrap: wrap; }
.reduced .step, .no-js .step { height: auto; min-height: 320px; flex: 1 1 280px; }
/* SplitText line masks clip overflow to the line box, which cuts descenders (g, y),
   italic overhangs and tall ascenders at tight line-heights. Clip with an inset that
   reaches past the box instead, so the reveal still masks but the glyphs are whole. */
.line-mask { overflow: visible !important; clip-path: inset(-0.25em -0.3em -0.45em -0.3em); }
