@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('static/fonts/geist-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: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('static/fonts/geist-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: #0c0c0f;
  --ink: #ececf1;
  --mute: #8d8d99;
  --line: #24242b;
  --accent: #9486ff;
  --ruby: #ef4444;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f6f8;
  --ink: #111116;
  --mute: #686874;
  --line: #dcdce3;
  --accent: #5645e8;
  --ruby: #d92d2d;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
code { font-family: var(--mono); font-size: .88em; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }
section[id] { scroll-margin-top: 72px; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.bar.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-color: var(--line);
}
.bar-inner {
  max-width: 1360px; height: 100%; margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; letter-spacing: -.01em; font-size: 16px; }
.bar-nav { display: flex; gap: 32px; font-size: 14px; }
.bar-nav a { text-decoration: none; color: var(--mute); transition: color .2s; }
.bar-nav a:hover, .bar-nav a.is-active { color: var(--ink); }
.bar-end { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.icon-btn, .menu-btn {
  appearance: none; background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit;
}
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; transition: background-color .2s; }
.icon-btn:hover { background: var(--line); }
.menu-btn { display: none; font-size: 14px; padding: 8px 4px 8px 12px; }

.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  padding: 96px var(--gutter) 40px; display: flex; align-items: flex-end;
}
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 4px; width: 100%; }
.menu a { font-size: clamp(40px, 12vw, 64px); letter-spacing: -.04em; line-height: 1.1; text-decoration: none; font-weight: 400; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: transform .25s var(--ease), opacity .2s;
}
.btn:hover { transform: translateY(-1px); opacity: .9; }
.link { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 6px; text-decoration-thickness: 1px; transition: text-decoration-color .2s; font-size: 15px; }
.link:hover { text-decoration-color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(120px, 20vh, 200px); }
.hero-title {
  font-weight: 400;
  font-size: clamp(34px, 9.2vw, 144px);
  line-height: .98;
  letter-spacing: -.055em;
}
.line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.line > span { display: block; animation: rise 1.1s var(--ease) both; }
.line:nth-child(2) > span { animation-delay: .1s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hero-foot {
  margin-top: clamp(36px, 6vh, 64px);
  display: grid; grid-template-columns: minmax(0, 560px) auto; justify-content: space-between; align-items: end; gap: 32px;
  animation: fade .9s .45s var(--ease) both;
}
.hero-sub { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--mute); }
.hero-actions { display: flex; align-items: center; gap: 28px; }
.hero-needs { margin-top: 28px; font-size: 14px; color: var(--mute); animation: fade .9s .55s var(--ease) both; }

.shot { margin-top: clamp(56px, 9vh, 96px); perspective: 1600px; animation: fade 1.2s .7s var(--ease) both; }
.shot-frame {
  --p: 0;
  transform-origin: 50% 0;
  transform: scale(calc(.9 + .1 * var(--p))) rotateX(calc((1 - var(--p)) * 7deg));
  border: 1px solid var(--line); border-radius: calc(20px - 10px * var(--p)); overflow: hidden;
  background: #09090b; will-change: transform;
}
.shot-chrome { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #1d1d22; background: #0c0c0f; }
.shot-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #2a2a31; }
.shot-frame img { width: 100%; }

/* ---------- overview ---------- */
.overview { padding-block: clamp(120px, 22vh, 240px) clamp(80px, 14vh, 160px); }
.statement {
  max-width: 21em; font-size: clamp(28px, 4.4vw, 62px); line-height: 1.12; letter-spacing: -.04em; font-weight: 400;
}
.statement .w { opacity: var(--o, 1); transition: opacity .15s linear; }

.rows { margin-top: clamp(80px, 14vh, 150px); border-top: 1px solid var(--line); }
.rows li {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px;
  padding-block: 30px; border-bottom: 1px solid var(--line);
}
.rows h3 { font-size: 19px; font-weight: 500; letter-spacing: -.02em; line-height: 1.4; }
.rows p { color: var(--mute); max-width: 52ch; }

/* ---------- pipeline (pinned) ---------- */
.pipeline { border-top: 1px solid var(--line); }
.pin { padding-block: clamp(80px, 14vh, 140px); }
.pin-title { font-size: clamp(30px, 4.6vw, 64px); font-weight: 400; letter-spacing: -.045em; line-height: 1.04; }
.stages { margin-top: 56px; display: grid; gap: 44px; }
.stage h3 { font-size: clamp(44px, 10.5vw, 150px); font-weight: 400; letter-spacing: -.06em; line-height: 1; }
.stage p { margin-top: 20px; max-width: 44ch; color: var(--mute); font-size: clamp(16px, 1.4vw, 19px); }
.stage p code { color: var(--ink); }
.track { display: none; }

/* enabled by script (and not reduced motion) */
.pipeline.is-pinned { border-top: 0; height: 430vh; }
.pipeline.is-pinned .pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: 88px 44px; }
.pipeline.is-pinned .pin-inner { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.pipeline.is-pinned .stages { margin: 0; display: grid; align-content: center; gap: 0; }
.pipeline.is-pinned .stage {
  grid-area: 1 / 1; align-self: center;
  opacity: 0; transform: translateY(28px); pointer-events: none;
  transition: opacity .55s var(--ease), transform .7s var(--ease);
}
.pipeline.is-pinned .stage.is-past { transform: translateY(-28px); }
.pipeline.is-pinned .stage.is-active { opacity: 1; transform: none; pointer-events: auto; }

.pipeline.is-pinned .track { display: block; position: relative; height: 64px; margin-inline: 6px; --p: 0; }
.track-line { position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--line); }
.track-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p)); height: 1px; }
.track-dot {
  position: absolute; left: calc(var(--i) * 33.3333%); top: 1px; width: 11px; height: 11px; margin-left: -5.5px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--mute); transition: background-color .3s, border-color .3s;
}
.track-dot b { position: absolute; top: 24px; left: 5.5px; transform: translateX(-50%); font-weight: 400; font-size: 14px; color: var(--mute); white-space: nowrap; transition: color .3s; }
.track-dot.is-on { background: var(--accent); border-color: var(--accent); }
.track-dot.is-on b { color: var(--ink); }
.track-packet {
  position: absolute; top: 6.5px; left: calc(var(--p) * 100%); width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ---------- rubityle ---------- */
.rubityle {
  padding-block: clamp(100px, 18vh, 200px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start;
  border-top: 1px solid var(--line);
  max-width: 1360px;
}
.gem {
  position: sticky; top: 18vh; perspective: 1200px;
  width: calc(min(100%, 420px, 46vh) + var(--gutter));
  margin-left: calc(-1 * var(--gutter));
  overflow: hidden;
}
.gem canvas {
  width: 200%; max-width: none; height: auto; margin-left: -100%;
  transform: rotateY(var(--ry, 0deg)); will-change: transform;
  filter: drop-shadow(0 30px 40px color-mix(in srgb, var(--ruby) 28%, transparent));
}
.rub-body h2 { font-size: clamp(48px, 8vw, 120px); font-weight: 400; letter-spacing: -.06em; line-height: 1; }
.lede { margin-top: 18px; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.025em; line-height: 1.3; }
.rub-body > p:not(.lede):not(.required):not(.note) { margin-top: 28px; color: var(--mute); max-width: 56ch; }
.required { margin-top: 28px; padding-left: 16px; border-left: 2px solid var(--ruby); max-width: 56ch; }
.plain { margin-top: 48px; border-top: 1px solid var(--line); }
.plain li { padding-block: 16px; border-bottom: 1px solid var(--line); color: var(--mute); }
.spec { margin-top: 72px; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--mute); }
.note { margin-top: 20px; color: var(--mute); font-size: 15px; max-width: 56ch; }
.note strong { color: var(--ink); font-weight: 500; }

/* ---------- install ---------- */
.install { padding-block: clamp(100px, 18vh, 200px); border-top: 1px solid var(--line); max-width: 1360px; }
.big { font-size: clamp(36px, 8vw, 124px); font-weight: 400; letter-spacing: -.055em; line-height: 1; }
.install-lede { margin-top: 28px; color: var(--mute); max-width: 44ch; font-size: clamp(17px, 1.5vw, 20px); }
.cmd {
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px;
}
.install-lede + .cmd { margin-top: clamp(64px, 10vh, 110px); }
.cmd-head h3 { font-size: 19px; font-weight: 500; letter-spacing: -.02em; }
.cmd-head p { margin-top: 6px; color: var(--mute); }
.code {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 18px;
  transition: border-color .2s;
}
.code:hover { border-color: var(--mute); }
.code pre { margin: 0; overflow-x: auto; padding-block: 10px; font-family: var(--mono); font-size: 15px; scrollbar-width: none; }
.code pre::before { content: '$ '; color: var(--mute); user-select: none; }
.code pre::-webkit-scrollbar { display: none; }
.copy {
  appearance: none; flex: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500;
  background: var(--ink); color: var(--bg); border: 0; border-radius: 7px; height: 38px; padding: 0 16px; min-width: 76px;
  transition: opacity .2s;
}
.copy:hover { opacity: .88; }
.steps { margin-top: clamp(72px, 12vh, 120px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 1px solid var(--line); padding-top: 20px; color: var(--mute); max-width: 32ch; }
.steps li::before { content: counter(s); display: block; margin-bottom: 40px; font-family: var(--mono); font-size: 14px; color: var(--ink); }
.steps strong { color: var(--ink); font-weight: 500; }

/* ---------- footer ---------- */
.foot {
  max-width: 1360px; padding-block: 36px 48px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; color: var(--mute); font-size: 14px;
}
.foot .brand { color: var(--ink); font-size: 15px; }
.foot-credit { margin-left: auto; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .bar-nav { display: none; }
  .bar-inner { grid-template-columns: 1fr auto; }
  .menu-btn { display: block; }
  .hero-foot { grid-template-columns: 1fr; align-items: start; }
  .rows li, .cmd { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rubityle { grid-template-columns: 1fr; }
  .gem { position: static; max-width: 280px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps li::before { margin-bottom: 12px; }
  .spec > div { grid-template-columns: 1fr; gap: 2px; }
  .track-dot b { font-size: 13px; }
  .foot-credit { margin-left: 0; }
}
@media (max-width: 480px) {
  .code { flex-direction: column; align-items: stretch; padding: 12px; }
  .code pre { padding-block: 4px 8px; }
  .copy { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .line > span, .hero-foot, .hero-needs, .shot { animation: none; }
  .shot-frame { transform: none; border-radius: 10px; }
}
.cmd-main, .cmd-head { min-width: 0; }
