@font-face {
  font-family: "Google Sans Flex";
  src: url("assets/google-sans-flex-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #f5f3ee;
  --ink: #1b1d1a;
  --ink-2: #55574f;
  --tone: #9a958a;
  --line: rgba(27, 29, 26, 0.12);
  --dark: #12110f;
  --dark-ink: #f3f1ec;
  --dark-tone: #8d8a83;
  --accent: #a4562f;
  --radius: 28px;
  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 19px/1.5 "Google Sans Flex", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--bg); padding: 8px 12px; }
.wrap { width: min(100% - 64px, 1240px); margin-inline: auto; }
.narrow { max-width: 980px; }

/* Type: one family. Contrast comes from size, weight and tone only. */
.eyebrow { margin: 0 0 14px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
h1, .display, .statement { margin: 0; font-weight: 600; letter-spacing: -0.035em; }
h1 { font-size: clamp(52px, 7vw, 112px); line-height: 0.98; }
.display { font-size: clamp(48px, 6.4vw, 104px); line-height: 1; }
.statement { font-size: clamp(36px, 4.6vw, 72px); line-height: 1.04; }
.tone { color: var(--tone); }
.lede { margin: 22px 0 0; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; color: var(--ink-2); max-width: 36ch; letter-spacing: -0.01em; }
.muted { color: var(--tone); font-size: 16px; }

.actions { display: flex; align-items: center; justify-content: flex-start; gap: 26px; margin-top: 32px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; padding: 13px 24px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 17px; font-weight: 500; transition: transform 0.25s var(--ease), background 0.25s; }
.button:hover { transform: translateY(-1px); background: #000; }
.link { font-size: 17px; color: var(--accent); }
.link:hover { text-decoration: underline; }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 40; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; transition: background 0.35s, color 0.35s, border-color 0.35s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(245, 243, 238, 0.78); backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px); border-color: var(--line); }
.nav.on-dark:not(.is-scrolled) { color: var(--dark-ink); }
.nav.on-dark:not(.is-scrolled) .pill { background: var(--dark-ink); color: var(--dark); }
.wordmark { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.nav nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav nav a:not(.pill) { opacity: 0.72; transition: opacity 0.2s; }
.nav nav a:not(.pill):hover { opacity: 1; }
.pill { padding: 7px 15px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 500; }

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 680px; overflow: hidden; }
.hero-media { position: absolute; inset: 0; display: none; }
html[data-hero="line"] .hero-media--line,
html[data-hero="dusk"] .hero-media--dusk,
html[data-hero="float"] .hero-media--float { display: block; }
.hero-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; }
.hero-sub { margin: 18px 0 0; font-size: clamp(19px, 1.7vw, 25px); line-height: 1.35; color: var(--ink-2); max-width: 30ch; letter-spacing: -0.012em; }

/* A · Line */
html[data-hero="line"] .hero-copy { align-items: center; text-align: center; justify-content: flex-start; padding-top: clamp(96px, 13vh, 150px); }
html[data-hero="line"] .hero-copy .actions { justify-content: center; }
.hero-video { position: absolute; left: 50%; bottom: -2vh; width: max(118vw, 178vh); height: auto; translate: -50% 0; }
html[data-hero="line"] .hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 42%; background: linear-gradient(var(--bg) 45%, rgba(245, 243, 238, 0)); z-index: 1; pointer-events: none; }

/* B · Dusk */
html[data-hero="dusk"] .hero { background: var(--dark); color: var(--dark-ink); }
.hero-media--dusk img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; animation: drift 24s var(--ease) infinite alternate; }
.hero-media--dusk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 9, 8, 0.9) 0%, rgba(10, 9, 8, 0.6) 34%, rgba(10, 9, 8, 0) 62%), linear-gradient(to right, rgba(10, 9, 8, 0.7), rgba(10, 9, 8, 0) 55%); }
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.1) translate(-1%, -1%); } }
html[data-hero="dusk"] .hero h1 { font-size: clamp(48px, 6vw, 96px); max-width: 11ch; }
html[data-hero="dusk"] .hero-copy { align-items: flex-start; }
html[data-hero="dusk"] .hero-copy { justify-content: flex-end; padding: 0 0 clamp(56px, 9vh, 96px); width: min(100% - 64px, 1240px); margin-inline: auto; }
html[data-hero="dusk"] .eyebrow { color: var(--dark-ink); }
html[data-hero="dusk"] .tone { color: var(--dark-tone); }
html[data-hero="dusk"] .hero-sub { color: rgba(243, 241, 236, 0.78); }
html[data-hero="dusk"] .hero .button { background: var(--dark-ink); color: var(--dark); }
html[data-hero="dusk"] .hero .link { color: #e3a27b; }

/* C · Float */
html[data-hero="float"] .hero-copy { align-items: center; justify-content: center; text-align: center; }
html[data-hero="float"] .hero-copy .actions { justify-content: center; }
html[data-hero="float"] h1 { font-size: clamp(60px, 9vw, 150px); }
.floater { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: auto; rotate: var(--r); translate: calc(var(--px, 0) * var(--d) * 26px) calc(var(--py, 0) * var(--d) * 26px + var(--sy, 0) * var(--d) * -1px); animation: bob 7s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -3s); filter: drop-shadow(0 24px 28px rgba(60, 40, 20, 0.1)); }
@keyframes bob { from { transform: translateY(-10px) rotate(-1.5deg); } to { transform: translateY(10px) rotate(1.5deg); } }

/* Intro break */
.intro { padding: 30vh 0 18vh; text-align: center; }
.intro .narrow { display: flex; flex-direction: column; align-items: center; }
.intro .lede { max-width: none; }

/* The Line */
.line { position: relative; height: var(--length, 700vh); }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.line-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.line-captions { position: absolute; inset: 0; pointer-events: none; }
.station { position: absolute; top: clamp(92px, 14vh, 140px); left: 0; max-width: 430px; opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.7s var(--ease); }
.station.is-active { opacity: 1; transform: none; }
.station-step { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--accent); }
.station h3 { margin: 0; font-size: clamp(30px, 3.2vw, 48px); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.station p:last-child { margin: 12px 0 0; font-size: clamp(18px, 1.45vw, 21px); color: var(--ink-2); line-height: 1.4; }
.rail { position: absolute; left: 0; right: 0; bottom: 30px; display: flex; justify-content: space-between; list-style: none; padding: 16px 0 0; margin: 0 auto; font-size: 14px; color: var(--tone); border-top: 1px solid var(--line); }
.rail::before { content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--accent); }
.rail li { transition: color 0.3s; }
.rail li.is-active { color: var(--ink); font-weight: 600; }
.line.is-static { height: auto; }
.line.is-static .sticky { position: static; height: auto; overflow: visible; }
.static-stations { display: grid; gap: 64px; padding: 40px 0 80px; }
.static-stations figure { margin: 0; }
.static-stations img { width: 100%; border-radius: var(--radius); }
.static-stations figcaption { margin-top: 18px; }

/* Where we help: Clay-style tinted panels */
.where { padding: 22vh 0 16vh; }
.section-head { margin-bottom: 56px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--tint); border-radius: var(--radius); padding: 0 30px 32px; overflow: hidden; transition: transform 0.5s var(--ease); }
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: auto; aspect-ratio: 1 / 0.82; object-fit: cover; object-position: 50% 58%; margin: 0 auto 4px; transition: transform 0.8s var(--ease); }
.card:hover img { transform: translateY(-6px) rotate(-1.5deg) scale(1.03); }
.card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.card p { margin: 0; font-size: 21px; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink-2); }
.card p b { color: var(--ink); font-weight: 600; }

/* What we build */
.build { padding: 18vh 0; border-top: 1px solid var(--line); }
.split-head { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.build-list { list-style: none; margin: 0; padding: 0; }
.build-list li { padding: 20px 0; border-bottom: 1px solid var(--line); font-size: clamp(21px, 1.9vw, 28px); line-height: 1.25; letter-spacing: -0.02em; color: var(--tone); }
.build-list li:first-child { padding-top: 6px; }
.build-list b { color: var(--ink); font-weight: 600; }

/* Approach: Every-style objects */
.approach { padding: 18vh 0 20vh; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.steps li { background: #ece8df; border-radius: 24px; padding: 0 22px 26px; }
.steps img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; margin: -4px 0 0; transition: transform 1s var(--ease); }
.steps li:hover img { transform: rotate(-4deg) scale(1.04); }
.steps span { font-size: 14px; font-weight: 600; color: var(--accent); }
.steps h3 { margin: 6px 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.steps p { margin: 0; font-size: 16px; line-height: 1.4; color: var(--ink-2); }

/* Proof: dark break */
.proof { background: var(--dark); color: var(--dark-ink); padding: 22vh 0; }
.proof .eyebrow { color: var(--dark-ink); }
.proof .tone { color: var(--dark-tone); }
.proof .statement { max-width: 20ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin: 0; }
.stats div { border-top: 1px solid rgba(243, 241, 236, 0.16); padding-top: 22px; }
.stats dt { font-size: clamp(48px, 5.4vw, 84px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.stats dd { margin: 14px 0 0; color: var(--dark-tone); font-size: 17px; max-width: 28ch; }

/* Close */
.close { padding: 24vh 0 0; text-align: center; overflow: hidden; background: var(--bg); }
.close-copy { display: flex; flex-direction: column; align-items: center; }
.close-copy .display { max-width: 13ch; }
.close-copy .actions { justify-content: center; }
.close-art { width: min(1500px, 120%); margin: 4vh auto 0; translate: 0 calc((1 - var(--cp, 1)) * 80px); scale: calc(0.92 + var(--cp, 1) * 0.08); }

.footer { display: flex; justify-content: space-between; gap: 24px; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--tone); }
.footer .wordmark { color: var(--ink); font-size: 14px; }

/* Reveal on scroll: plain fade up, staggered. */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* Review chrome */
.review { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(250, 249, 246, 0.86); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 13px; color: var(--ink-2); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); }
.seg { display: flex; background: rgba(27, 29, 26, 0.06); border-radius: 999px; padding: 2px; }
.review button { border: 0; background: transparent; padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.review button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.notes { position: fixed; top: 72px; right: 16px; z-index: 60; width: 360px; max-height: calc(100vh - 160px); overflow: auto; padding: 18px 20px; border-radius: 20px; background: rgba(250, 249, 246, 0.94); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.notes-kind { margin: 0; font-size: 12px; font-weight: 600; color: var(--accent); }
.notes-title { margin: 4px 0 10px; font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -0.015em; }
.notes-body h4 { margin: 14px 0 4px; font-size: 12px; font-weight: 600; color: var(--ink); }
.notes-body p, .notes-body ol { margin: 0; }
.notes-body ol { padding-left: 18px; }

/* Small screens */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .split-head { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 40px); }
  .nav { padding: 0 20px; }
  .nav nav a:not(.pill) { display: none; }
  .hero { min-height: 600px; }
  .hero-video { width: 250vw; bottom: 4vh; translate: -50% 0; }
  html[data-hero="line"] .hero-copy { padding-top: 92px; }
  html[data-hero="line"] .hero::after { height: 52%; }
  .floater { width: calc(var(--s) * 2.1); }
  .cards, .steps, .stats { grid-template-columns: 1fr; }
  .station { top: 84px; max-width: none; right: 0; }
  .rail { font-size: 11px; bottom: 18px; }
  .rail li:not(.is-active) { color: transparent; width: 6px; overflow: hidden; }
  .intro, .where, .build, .approach, .proof { padding-top: 14vh; padding-bottom: 12vh; }
  .footer { flex-direction: column; }
  .review { left: 50%; right: auto; translate: -50% 0; bottom: 10px; }
  .notes { left: 12px; right: 12px; width: auto; top: auto; bottom: 64px; max-height: 44vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Keep Line captions legible over the model. */
.line-captions::before { content: ""; position: absolute; top: 0; left: calc((100vw - 100%) / -2); width: min(62vw, 760px); height: 52vh; background: radial-gradient(ellipse at 0 0, var(--bg) 30%, rgba(245, 243, 238, 0.75) 52%, rgba(245, 243, 238, 0) 74%); }
.line-captions > * { z-index: 1; }
.line { background: var(--bg); }
