@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/InterTight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/InterTight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("assets/fonts/SpaceGrotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("assets/fonts/SpaceGrotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #07070b;
  --bg-elev: #0e0d14;
  --bg-panel: #12111a;
  --text: #f4f4f6;
  --muted: rgba(244, 244, 246, 0.62);
  --quiet: rgba(244, 244, 246, 0.42);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --teal: #00e0c6;
  --teal-deep: #00b8a3;
  --teal-ink: #041210;
  --violet: #7c6bff;
  --violet-deep: #1c1433;
  --violet-glow: rgba(92, 64, 200, 0.42);
  --signal: #00e0c6;
  --radius: 18px;
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mark: "Space Grotesk", "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
  --max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
  scroll-padding-top: var(--header-h);
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, a { font: inherit; }
button { background: none; border: 0; color: inherit; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--teal);
  color: var(--teal-ink);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: transparent;
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 7, 11, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}
.wordmark img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.wordmark span {
  font-family: var(--font-mark);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn-sm {
  height: 2.25rem;
  padding: 0 0.95rem;
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.btn-primary {
  height: 3.15rem;
  padding: 0 1.35rem;
  font-size: 1rem;
  background: var(--teal);
  color: var(--teal-ink);
  box-shadow: 0 0 0 0 rgba(0, 224, 198, 0);
}
.btn-primary:hover {
  background: #2aebd0;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -16px rgba(0, 224, 198, 0.8);
}
.btn-primary:active { transform: translateY(0); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding-bottom: 0;
  transition: color 0.2s var(--ease);
}
.text-link-label {
  border-bottom: 1px solid rgba(244, 244, 246, 0.28);
  padding-bottom: 0.12rem;
  transition: border-color 0.2s var(--ease);
}
.text-link::after {
  content: "→";
  font-size: 0.95em;
  transition: transform 0.2s var(--ease);
}
.text-link:hover { color: #fff; }
.text-link:hover .text-link-label { border-bottom-color: var(--teal); }
.text-link:hover::after { transform: translateX(3px); }

/* Hero + scroll-pinned piece */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.hero-pin {
  height: auto;
}
.hero-sticky {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 0.75rem 0 2.5rem;
}
.hero-copy { max-width: 38rem; }
.hero h1 {
  font-weight: 500;
  font-size: clamp(2.35rem, 7.4vw, 5.15rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
  max-width: 10.4em;
  text-wrap: balance;
}
.subhead {
  margin-top: 1.35rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.45;
  color: var(--muted);
  max-width: 28rem;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem 1.5rem;
}

/* Stage + CSS 3D fallback */
.stage-pin { position: relative; height: auto; }
.stage {
  position: relative;
  min-height: 22rem;
  height: min(52vh, 28rem);
  width: 100%;
}
.stage-glow {
  position: absolute;
  inset: 10% 8% 18%;
  background:
    radial-gradient(ellipse at 38% 40%, var(--violet-glow), transparent 62%),
    radial-gradient(ellipse at 70% 70%, rgba(0, 224, 198, 0.12), transparent 55%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
.piece-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.piece-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.piece-scene.is-webgl .piece-canvas { opacity: 1; }
.piece-scene.is-webgl .piece-css { opacity: 0; }

.piece-css {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 1400px;
  perspective-origin: 50% 46%;
}
.rig {
  position: relative;
  width: 280px;
  height: 220px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-28deg);
  transform-origin: 50% 50%;
}
.chassis, .insert, .contact-shadow, .pocket {
  transform-style: preserve-3d;
  position: absolute;
}
.chassis {
  width: 280px;
  height: 200px;
  left: 0;
  top: 18px;
}
.chassis-plate {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background:
    linear-gradient(135deg, #2a2438 0%, #14131c 42%, #0c0b12 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.06);
}
.chassis-side {
  position: absolute;
  background: linear-gradient(180deg, #3a3646, #16141e);
}
.chassis-side-front {
  left: 0; right: 0; top: 100%;
  height: 16px;
  transform: rotateX(-90deg);
  transform-origin: top;
  border-radius: 0 0 8px 8px;
}
.chassis-side-right {
  top: 0; bottom: 0; left: 100%;
  width: 16px;
  transform: rotateY(90deg);
  transform-origin: left;
  background: linear-gradient(180deg, #2c2838, #121018);
}
.pocket {
  width: 168px;
  height: 108px;
  left: 56px;
  top: 46px;
}
.pocket-floor {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: #05040a;
  box-shadow: inset 0 8px 16px rgba(0,0,0,0.55);
  transform: translateZ(-10px);
}
.pocket-rim {
  position: absolute;
  inset: -2px;
  border-radius: 15px;
  border: 1.25px solid rgba(0, 224, 198, 0.55);
  box-shadow: none;
  transform: translateZ(1px);
  pointer-events: none;
}
.insert {
  width: 164px;
  height: 104px;
  left: 58px;
  top: 30px;
  transform: translate3d(0, -36px, 78px);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.piece-scene[data-state="seated"] .insert,
.piece-scene.is-seated .insert {
  transform: translate3d(0, 18px, 12px);
}
.insert-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(140, 124, 255, 0.22), transparent 42%),
    linear-gradient(180deg, #1b1728 0%, #0d0c14 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 1px rgba(0, 224, 198, 0.55);
}
.insert-sheen {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(255,255,255,0.16), transparent 36%, transparent 62%, rgba(0,224,198,0.05));
  pointer-events: none;
}
.insert-edge {
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  box-shadow: 0 0 0 1px rgba(0, 224, 198, 0.7);
  pointer-events: none;
}
.insert-side {
  position: absolute;
  background: linear-gradient(90deg, #5a5668, #2a2732 40%, #9a96a8 70%, #24212c);
}
.insert-front {
  left: 0; right: 0; top: 100%; height: 18px;
  transform: rotateX(-90deg);
  transform-origin: top;
  background: linear-gradient(90deg, #3c3948, #8a8796 50%, #2a2733);
  border-radius: 0 0 6px 6px;
}
.insert-back {
  left: 0; right: 0; bottom: 100%; height: 18px;
  transform: rotateX(90deg);
  transform-origin: bottom;
  background: #1a1822;
}
.insert-left {
  top: 0; bottom: 0; right: 100%; width: 18px;
  transform: rotateY(-90deg);
  transform-origin: right;
  background: linear-gradient(#4a4656, #1c1a24);
}
.insert-right {
  top: 0; bottom: 0; left: 100%; width: 18px;
  transform: rotateY(90deg);
  transform-origin: left;
  background: linear-gradient(#6a6678, #2a2733);
}
.contact-shadow {
  width: 168px;
  height: 108px;
  left: 56px;
  top: 48px;
  border-radius: 14px;
  background: rgba(0,0,0,0.62);
  filter: blur(10px);
  transform: translateZ(-8px) scale(1.04);
  opacity: 0.45;
}
.piece-scene[data-state="seated"] .contact-shadow,
.piece-scene.is-seated .contact-shadow {
  opacity: 0.18;
  filter: blur(4px);
  transform: translateZ(-8px) scale(1);
}

/* Pulse after click — CSS fallback */
.piece-scene.is-pulsing .pocket-rim,
.piece-scene.is-pulsing .insert-edge {
  animation: seam-pulse 1.15s var(--ease);
}
@keyframes seam-pulse {
  0% { box-shadow: 0 0 0 1.25px #00e0c6, 0 0 8px rgba(0, 224, 198, 0.2); }
  35% { box-shadow: 0 0 0 1.5px #8affec, 0 0 28px rgba(0, 224, 198, 0.7); }
  100% { box-shadow: 0 0 0 1.25px #00e0c6, 0 0 14px rgba(0, 224, 198, 0.3); }
}

/* Demo */
.demo-section, .build, .process, .book {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6.5rem 1.5rem;
}
.section-intro { max-width: 36rem; margin-bottom: 2.75rem; }
.eyebrow {
  font-family: var(--font-mark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.demo-section h2, .build h2, .process h2, .book h2 {
  font-weight: 500;
  font-size: clamp(1.85rem, 4.2vw, 3.15rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-wrap: balance;
  max-width: 16ch;
}
.demo-section h2 { max-width: 18ch; }

.machine {
  position: relative;
}
.machine-bezel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 28%),
    var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(0, 224, 198, 0.18),
    0 30px 80px -40px rgba(92, 64, 200, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
}
.machine-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
.demo-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-ink);
  background: var(--teal);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
}
.tabs {
  display: flex;
  gap: 0.15rem;
}
.tab {
  appearance: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] {
  color: var(--teal-ink);
  background: var(--teal);
}
.panels { padding: 1.5rem 1.25rem 1.7rem; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.panel-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.panel-head h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}
.signal {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--teal);
  background: rgba(0, 224, 198, 0.08);
  border: 1px solid rgba(0, 224, 198, 0.28);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  white-space: nowrap;
}
.flow {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}
@media (min-width: 800px) {
  .flow { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.flow li {
  padding: 0;
  min-width: 0;
}
.flow-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.45rem;
}
.flow p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

/* What we build */
.build h2, .process h2 { max-width: 16ch; }
.build-list {
  list-style: none;
  padding: 0;
  margin: 3.25rem 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.build-list li {
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line);
}
.build-list h3 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}
.build-list p {
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.05rem;
}

/* Process */
.steps {
  list-style: none;
  padding: 0;
  margin: 3.25rem 0 0;
  display: grid;
  gap: 2rem 1.75rem;
  counter-reset: none;
}
.step-num {
  display: block;
  font-family: var(--font-mark);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 0.85rem;
}
.steps h3 {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}
.steps p {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 22rem;
}

/* Book */
.book {
  text-align: left;
  padding-bottom: 5rem;
}
.book h2 { max-width: 12ch; }
.book p {
  margin: 1.15rem 0 2rem;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 24rem;
}
.book-email {
  margin-top: 1.15rem !important;
  font-size: 0.98rem !important;
}
.book-email a {
  color: var(--quiet);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.book-email a:hover { color: var(--text); border-bottom-color: var(--line-strong); }

/* Footer */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
}
.footer .wordmark span { font-size: 0.95rem; }
.footer-meta, .copyright {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
  color: var(--quiet);
  font-size: 0.9rem;
}
.footer-meta a {
  color: var(--quiet);
  text-decoration: none;
}
.footer-meta a:hover { color: var(--text); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (min-width: 960px) {
  .nav, .footer { padding-left: 2.25rem; padding-right: 2.25rem; }
  .hero, .demo-section, .build, .process, .book {
    padding-left: 2.25rem;
    padding-right: 2.25rem;
  }
  .hero-pin {
    height: 165vh;
  }
  .hero-sticky {
    position: sticky;
    top: var(--header-h);
    height: auto;
    min-height: calc(100svh - var(--header-h));
    grid-template-columns: minmax(18rem, 1.02fr) minmax(20rem, 1fr);
    gap: 1.25rem 2.5rem;
    padding: 1.5rem 0 1.75rem;
    align-items: center;
  }
  .stage {
    height: min(30rem, calc(100svh - var(--header-h) - 3.25rem));
    min-height: 24rem;
  }
  .rig { transform: rotateX(58deg) rotateZ(-28deg) scale(1.14); }
  .build-list {
    grid-template-columns: 1fr;
  }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .footer {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
  .footer-meta { justify-content: center; }
}

@media (max-width: 959px) {
  .nav .btn-sm { font-size: 0.78rem; padding: 0 0.8rem; }
  .hero-sticky { padding-top: 0.35rem; }
  .stage-pin {
    height: 140vh;
    margin: 0 -1.5rem;
  }
  .stage {
    position: sticky;
    top: calc(var(--header-h) + 0.5rem);
    height: 52vh;
    min-height: 17rem;
  }
  .rig { transform: rotateX(58deg) rotateZ(-28deg) scale(0.86); }
}

@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;
  }
  .reveal { opacity: 1; transform: none; }
  .insert {
    transform: translate3d(0, 18px, 12px);
  }
  .contact-shadow {
    opacity: 0.18;
    filter: blur(4px);
    transform: translateZ(-8px) scale(1);
  }
}
