:root {
  --black: #000;
  --white: #fff;
  --grey: #8a8a8a;
  --line-dark: rgba(255, 255, 255, 0.14);
  --line-light: rgba(0, 0, 0, 0.12);
  --pad: clamp(20px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--white); color: var(--black); }
.light ::selection { background: var(--black); color: var(--white); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.light { background: var(--white); color: var(--black); }
.dark { background: var(--black); color: var(--white); }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad);
  color: var(--white);
  mix-blend-mode: difference;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.045em;
}

.nav-links { display: flex; gap: 36px; font-size: 14px; }
.nav-links a { position: relative; }
.nav-links a::after,
.nav-cta::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
  position: relative;
  font-size: 14px;
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--white); color: var(--black); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--black);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero.is-ready #hero-canvas { opacity: 1; }

.hero-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(80px, 21vw, 360px);
  letter-spacing: -0.06em;
  line-height: 1;
  transition: opacity 0.6s;
}
.hero.is-ready .hero-fallback {
  opacity: 0;
  /* stays in the DOM for screen readers and SEO */
}

.hero-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 96px var(--pad) 32px;
}
.hero-ui a { pointer-events: auto; }

.hero-tile {
  position: absolute;
  top: 96px;
  left: var(--pad);
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}
.hero-tile svg { width: 36px; height: 36px; }

.hero-meta {
  position: absolute;
  top: 100px;
  right: var(--pad);
  color: var(--grey);
}

.hero-bottom {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-caps {
  display: flex;
  gap: 22px;
  color: var(--grey);
}

.scroll-cue {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--grey);
}
.scroll-cue i {
  position: relative;
  width: 1px;
  height: 44px;
  background: var(--line-dark);
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--white);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* hero entrance */
.hero-ui > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.hero.is-ready .hero-ui > *,
.hero.no-webgl .hero-ui > * { opacity: 1; transform: none; }
.hero.is-ready .hero-ui > :nth-child(2) { transition-delay: 0.1s; }
.hero.is-ready .hero-ui > :nth-child(3) { transition-delay: 0.25s; }

/* ---------- SHARED SECTION BITS ---------- */
section { position: relative; }

.eyebrow {
  display: inline-block;
  color: var(--grey);
  margin-bottom: 40px;
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8.4vw, 136px);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.lede {
  max-width: 440px;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.45;
  color: var(--grey);
}
.light .lede { color: #555; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: clamp(56px, 8vw, 120px);
}
.section-head .display { margin-bottom: 32px; }

/* line mask reveal */
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease);
}
.reveal.in .line > span { transform: none; }
.reveal.in .line:nth-child(2) > span { transition-delay: 0.08s; }

.reveal:not(:has(.line)) {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in:not(:has(.line)) { opacity: 1; transform: none; }

/* ---------- MANIFESTO ---------- */
.manifesto { padding: clamp(120px, 16vw, 240px) 0; }

.manifesto-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 1200px;
}
.manifesto-text .w {
  opacity: 0.12;
  transition: opacity 0.25s linear;
}
.manifesto-text .w.on { opacity: 1; }

/* ---------- CAPABILITIES ---------- */
.caps { padding: 0 0 clamp(100px, 12vw, 180px); }

.cap-list { border-top: 1px solid var(--line-light); }

.cap {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line-light);
  isolation: isolate;
  cursor: default;
  transition: color 0.5s var(--ease), padding 0.6s var(--ease);
}
.cap::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--pad) * -1);
  background: var(--black);
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
}
.cap:hover { color: var(--white); padding-left: 16px; }
.cap:hover::before { transform: scaleY(1); }

.cap-num { color: var(--grey); }

.cap-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 6.6vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.cap-desc { max-width: 380px; font-size: 16px; color: #555; transition: color 0.5s; }
.cap:hover .cap-desc { color: #bbb; }

.cap-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cap-tags li {
  padding: 6px 10px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  font-size: 11px;
  transition: border-color 0.5s;
}
.cap:hover .cap-tags li { border-color: var(--line-dark); }

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 28px 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: marquee 38s linear infinite;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
}
.marquee-track i { font-style: normal; font-weight: 400; color: var(--grey); }
.marquee-track .outline { color: transparent; -webkit-text-stroke: 1.5px var(--white); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- COMBINATIONS ---------- */
.combine { padding: clamp(120px, 14vw, 200px) 0; }

.combo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.combo {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 340px;
  padding: clamp(28px, 3.4vw, 48px);
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  overflow: hidden;
  isolation: isolate;
}
.combo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--white);
  z-index: -1;
  clip-path: circle(0% at var(--mx, 50%) var(--my, 50%));
  transition: clip-path 0.7s var(--ease);
}
.combo:hover { color: var(--black); }
.combo:hover::before { clip-path: circle(150% at var(--mx, 50%) var(--my, 50%)); }
.combo-wide { grid-column: 1 / -1; min-height: 280px; }

.combo-formula {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: auto;
}
.combo-formula span {
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
}
.combo-formula b { font-weight: 400; color: var(--grey); }

.combo h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1;
  letter-spacing: -0.045em;
  max-width: 560px;
}
.combo p { max-width: 420px; color: var(--grey); transition: color 0.5s; }
.combo:hover p { color: #444; }

/* ---------- APPROACH ---------- */
.approach { padding: clamp(120px, 14vw, 200px) 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--black);
}
.step-num { display: block; color: var(--grey); margin-bottom: 72px; }
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3vw, 44px);
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 16px;
}
.step p { color: #555; max-width: 300px; }
.steps .step:nth-child(2) { transition-delay: 0.08s; }
.steps .step:nth-child(3) { transition-delay: 0.16s; }
.steps .step:nth-child(4) { transition-delay: 0.24s; }

/* ---------- CTA ---------- */
.cta { padding: clamp(120px, 16vw, 240px) 0 clamp(80px, 10vw, 140px); }

.cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 11.5vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line-dark);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 22px 30px;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 1.8vw, 24px);
  letter-spacing: -0.03em;
  transition: transform 0.5s var(--ease), background 0.3s;
}
.btn svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 2;
  transition: transform 0.5s var(--ease);
}
.btn:hover { transform: scale(1.03); }
.btn:hover svg { transform: rotate(45deg); }

/* ---------- FOOTER ---------- */
.footer { overflow: hidden; border-top: 1px solid var(--line-dark); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
}
.footer-caps { display: flex; flex-wrap: wrap; gap: 24px; color: var(--grey); }
.footer-copy { color: var(--grey); }

.footer-giant {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 25.5vw;
  line-height: 0.74;
  letter-spacing: -0.07em;
  text-align: center;
  white-space: nowrap;
  color: #111;
  user-select: none;
  transform: translateY(6%);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .cap { grid-template-columns: 56px 1fr; gap: 16px 24px; }
  .cap-desc, .cap-tags { grid-column: 2; }
  .cap-tags { justify-content: flex-start; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; }
  .hero-caps { display: none; }
  .hero-bottom { grid-template-columns: 1fr auto; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { padding-top: 18px; padding-bottom: 18px; }
  .hero-tile { top: 84px; width: 60px; height: 60px; border-radius: 16px; }
  .hero-tile svg { width: 30px; height: 30px; }
  .hero-meta { top: 88px; }
  .combo-grid { grid-template-columns: 1fr; }
  .combo { min-height: 260px; }
  .steps { grid-template-columns: 1fr; }
  .step-num { margin-bottom: 32px; }
  .cap:hover { padding-left: 0; }
  .btn { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .manifesto-text .w { opacity: 1; }
}
