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

:root {
  --bg: #f5f3ee;
  --ink: #1b1d1a;
  --ink-2: #55574f;
  --tone: #777368;
  --line: rgba(27, 29, 26, 0.12);
  --dark: #12110f;
  --dark-ink: #f3f1ec;
  --dark-tone: #a4a198;
  --accent: #9b502b;
  --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(--ink-2);
  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;
}

/* Full-screen Line hero. The artwork begins directly below the actions. */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-copy {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(96px, 13vh, 150px) 24px 0;
}
.hero-copy .actions {
  justify-content: center;
}
.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;
}
.scene-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-stage {
  flex: 1 1 auto;
  min-height: 260px;
  margin-top: 12px;
}
.stage-poster,
.scene-canvas,
.scene-freeze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.stage-poster {
  object-fit: cover;
  object-position: 50% 100%;
}
.scene-stage.has-renderer > .stage-poster,
.scene-stage.has-freeze > .stage-poster {
  visibility: hidden;
}
.scene-canvas,
.scene-freeze {
  display: block;
}
.hero-motion-toggle {
  display: none;
  position: absolute;
  right: 32px;
  bottom: 24px;
  z-index: 3;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
}
.motion-ready .hero-motion-toggle:not([hidden]) {
  display: inline-flex;
}

/* 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 static reading view is complete before the live scene is available. */
.line {
  position: relative;
  background: var(--bg);
}
.sticky {
  position: relative;
}
.line-stage,
.line-captions,
.rail {
  display: none;
}
.line-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
}
.workflow-label {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.motion-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.motion-actions a,
.motion-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
}
.motion-actions button {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.motion-actions [hidden],
#motion-toggle {
  display: none;
}
.motion-ready #motion-toggle:not([hidden]) {
  display: inline-flex;
}
.skip-animation {
  color: var(--accent);
  gap: 8px;
}
.skip-animation:hover {
  text-decoration: underline;
}
.static-stations {
  display: grid;
  gap: 64px;
  padding: 16px 0 80px;
}
.static-stations figure {
  margin: 0;
}
.static-stations img {
  width: 100%;
  border-radius: var(--radius);
}
.static-stations figcaption {
  margin-top: 18px;
  max-width: 640px;
}
.station-step {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.station h3,
.station-copy 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,
.station-copy p:last-child {
  margin: 12px 0 0;
  font-size: clamp(18px, 1.45vw, 21px);
  color: var(--ink-2);
  line-height: 1.4;
}
.motion-status {
  color: var(--ink-2);
  font-size: 14px;
}
.motion-status:empty {
  display: none;
}
.motion-ready .line {
  height: 640vh;
}
.motion-ready .sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.motion-ready .line-stage {
  display: block;
  position: absolute;
  inset: 0;
}
.motion-ready .line-meta {
  position: absolute;
  inset: 66px 0 auto;
  padding: 0;
  z-index: 3;
}
.motion-ready .line-captions {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.motion-ready .station {
  position: absolute;
  top: clamp(128px, 18vh, 170px);
  left: 0;
  max-width: 430px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition:
    opacity 0.24s var(--ease),
    transform 0.4s var(--ease),
    visibility 0s;
}
.motion-ready .station.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.motion-ready .rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 10px 0 0;
  margin: 0 auto;
  font-size: 14px;
  color: var(--ink-2);
  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 button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 999px;
}
.rail button[aria-current="step"] {
  color: var(--ink);
  font-weight: 600;
  background: rgba(27, 29, 26, 0.06);
}
.rail-number {
  display: none;
}
.motion-ready .static-stations {
  display: none;
}
.motion-ready .motion-status {
  position: absolute;
  bottom: 0;
}

/* 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(--ink-2);
}
.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-stage {
  width: 100%;
  height: clamp(320px, 48vw, 680px);
  margin: 4vh auto 0;
}

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

/* 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-copy {
    padding-top: 92px;
    padding-inline: 20px;
  }
  .hero-stage {
    min-height: 280px;
  }
  .hero-motion-toggle {
    right: 20px;
    bottom: 18px;
  }
  .hero-stage .stage-poster {
    width: 900px;
    max-width: none;
    height: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    translate: -50% 0;
  }
  .cards,
  .steps,
  .stats {
    grid-template-columns: 1fr;
  }
  .motion-ready .line {
    height: 480vh;
  }
  .motion-ready .station {
    top: 142px;
    max-width: none;
    right: 0;
  }
  .line-meta {
    align-items: flex-start;
    gap: 12px;
  }
  .workflow-label {
    max-width: 16ch;
  }
  .motion-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0 12px;
  }
  .motion-ready .line-meta {
    top: 68px;
  }
  .motion-ready .rail {
    bottom: 18px;
  }
  .rail button {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    font-size: 11px;
  }
  .rail-number {
    display: inline;
  }
  .rail button > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .static-stations {
    gap: 48px;
  }
  .close-stage {
    height: 320px;
  }
  .intro,
  .where,
  .build,
  .approach,
  .proof {
    padding-top: 14vh;
    padding-bottom: 12vh;
  }
  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .motion-ready .hero-motion-toggle:not([hidden]) {
    display: none;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .motion-ready .line {
    height: auto;
  }
  .motion-ready .sticky {
    position: relative;
    height: auto;
    overflow: visible;
  }
  .motion-ready .line-stage,
  .motion-ready .line-captions,
  .motion-ready .rail {
    display: none;
  }
  .motion-ready .line-meta {
    position: static;
    padding-block: 24px;
  }
  .motion-ready .static-stations {
    display: grid;
  }
}

/* Keep every caption legible without covering the selected station. */
.motion-ready .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;
}
a.button,
a.link,
.nav a,
.footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav nav a:not(.pill) {
  opacity: 1;
  color: var(--ink-2);
}
.pill {
  min-width: 44px;
}
[id] {
  scroll-margin-top: 72px;
}
@media (max-width: 640px) {
  .motion-ready .line-captions::before {
    width: 100vw;
    height: 46vh;
    background: linear-gradient(var(--bg) 65%, rgba(245, 243, 238, 0));
  }
}

/* Keep the approved two-line mobile headline while the artwork owns its own space. */
@media (max-width: 640px) {
  .hero-copy {
    padding-inline: 0;
  }
  .hero-copy > :not(h1) {
    max-width: calc(100% - 24px);
  }
}

/* A frozen handoff is visible only while the shared live canvas is elsewhere. */
.scene-freeze {
  display: none;
}
.motion-ready .has-freeze > .scene-freeze {
  display: block;
}
.has-renderer > .scene-freeze,
html:not(.motion-ready) .scene-canvas,
html:not(.motion-ready) .scene-freeze {
  display: none;
}
