:root {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #0f0f12;
  --raised: #16161a;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;
  --green: #3ecf8e;
  --red: #f26d6d;
  --amber: #f5a524;
  --gray: #a1a1aa;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60% 42% at 50% -6%, rgba(139, 132, 255, .16), transparent 70%),
    radial-gradient(40% 30% at 85% 8%, rgba(62, 207, 142, .06), transparent 70%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 820px;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center -1px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: .55;
  pointer-events: none;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 16px 0;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  background: rgba(9, 9, 11, .6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: -1;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; text-decoration: none; }
.mark { width: 24px; height: 24px; }
nav { display: flex; align-items: center; gap: 4px; }
nav a { padding: 7px 12px; border-radius: 2px; color: var(--muted); font-size: 14px; text-decoration: none; transition: color .15s, background .15s, border-color .15s; }
nav a:hover { color: var(--text); }
nav .nav-cta {
  display: inline-flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .02);
}
nav .nav-cta-label { padding: 7px 12px 7px 14px; }
nav .nav-cta .arrow {
  display: grid;
  place-items: center;
  width: 32px;
  border-left: 1px solid var(--border-strong);
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}
nav .nav-cta:hover { border-color: rgba(255, 255, 255, .45); }
nav .nav-cta:hover .arrow { background: var(--text); color: #09090b; border-color: var(--text); }

/* The Turnstile mark */
.face { fill: #fafafa; stroke: #e6e6ef; }
.shade { fill: #8e8e9c; }
.shade-light { fill: #c3c3cf; }

/* Hero */
main { position: relative; width: min(100% - 32px, 1120px); margin: auto; padding: clamp(56px, 11vh, 120px) 0 120px; text-align: center; }
.hero { max-width: 900px; margin: 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 28px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(62, 207, 142, .5); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(62, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); } }

h1 {
  margin: 0;
  font-size: clamp(40px, 7.4vw, 82px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.04;
}
.line { display: block; }
.line-1 {
  background: linear-gradient(180deg, #fff 30%, #b4b4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}
.agents { display: flex; align-items: center; justify-content: center; white-space: nowrap; margin-top: .06em; }
.roller { display: inline-block; flex: none; width: .86em; height: .86em; }
.spinner { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 .12em .2em rgba(0, 0, 0, .5)); }
.spin { transform-box: fill-box; transform-origin: center; }
.agents-text {
  margin-left: .26em;
  padding-bottom: .08em;
  background: linear-gradient(90deg, #c9c4ff, #8b84ff 45%, #3ecf8e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle { max-width: 600px; margin: 26px auto 34px; color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); line-height: 1.6; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.actions { gap: 20px; }

/* "Build your software factory" stats */
.factory { margin: 56px auto 0; max-width: 460px; }
.factory-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  color: var(--faint);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.factory-label::before,
.factory-label::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--border); background: rgba(255, 255, 255, .015); }
.stat { padding: 16px 20px 18px; text-align: left; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat dt { margin-bottom: 6px; color: var(--faint); font-size: 12.5px; }
.stat dd { margin: 0; color: var(--muted); font-size: 15px; }
.stat-num { margin-right: 4px; color: var(--text); font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -.005em;
  text-decoration: none;
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), transform .2s var(--ease-out);
}
.button:active { transform: translateY(1px); }
.button:focus-visible { border-radius: 2px; }
.button .arrow { display: inline-block; transition: transform .25s var(--ease-out); }
.button:hover .arrow { transform: translateX(4px); }

/* Primary: a solid slab with a hard offset shadow that lifts on hover. */
.primary {
  background: var(--text);
  color: #09090b;
  box-shadow: 4px 4px 0 0 rgba(139, 132, 255, .55);
}
.primary .arrow { padding-left: 14px; border-left: 1px solid rgba(9, 9, 11, .18); }
.primary:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 0 rgba(139, 132, 255, .75); }
.primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 rgba(139, 132, 255, .75); }

/* Secondary: a hairline outline with corner ticks that close in on hover. */
.ghost { border-color: var(--border-strong); color: var(--text); background: rgba(9, 9, 11, .4); }
.ghost::before,
.ghost::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 0 solid var(--text);
  transition: inset .25s var(--ease-out), opacity .25s;
  opacity: .7;
}
.ghost::before { top: -4px; left: -4px; border-top-width: 1px; border-left-width: 1px; }
.ghost::after { right: -4px; bottom: -4px; border-right-width: 1px; border-bottom-width: 1px; }
.ghost:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .04); }
.ghost:hover::before { top: -1px; left: -1px; opacity: 1; }
.ghost:hover::after { right: -1px; bottom: -1px; opacity: 1; }

/* Hero entrance: the headline rises, then the turnstile rolls in from the
   right and uncovers "with agents" as it goes, then ticks a quarter turn now and then. */
.js .hero:not(.go) .eyebrow,
.js .hero:not(.go) .line-1,
.js .hero:not(.go) .agents,
.js .hero:not(.go) .subtitle,
.js .hero:not(.go) .actions,
.js .hero:not(.go) .factory { opacity: 0; }
/* If demo.js never runs, show the hero anyway after a moment. */
.js .hero:not(.go) :is(.eyebrow, .line-1, .agents, .subtitle, .actions, .factory) { animation: reveal .4s 2s forwards; }
@keyframes reveal { to { opacity: 1; } }
.go .eyebrow, .go .line-1, .go .subtitle, .go .actions, .go .factory { animation: rise .9s var(--ease-out) both; }
.go .line-1 { animation-delay: .08s; }
.go .subtitle { animation-delay: 1.5s; }
.go .actions { animation-delay: 1.62s; }
.go .factory { animation-delay: 1.76s; }
.go .roller { animation: roll-in 1.35s var(--ease-out) .55s both; }
.go .spin { animation: roll-turn 1.35s var(--ease-out) .55s both, tick 4.2s cubic-bezier(.65, 0, .25, 1.35) 2.6s infinite; }
.go .agents-text { animation: uncover 1.35s var(--ease-out) .55s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes roll-in { from { opacity: 0; transform: translateX(var(--travel, 5em)); } 12% { opacity: 1; } }
@keyframes roll-turn { from { rotate: var(--roll, 540deg); } to { rotate: 0deg; } }
@keyframes uncover { from { clip-path: inset(0 0 0 100%); filter: blur(4px); } to { clip-path: inset(0 0 0 0); filter: blur(0); } }
@keyframes tick { 0%, 82% { transform: rotate(0deg); } 100% { transform: rotate(-90deg); } }

@media (prefers-reduced-motion: reduce) {
  .js .hero:not(.go) * { opacity: 1 !important; }
  .go *, .pulse { animation: none !important; }
}

/* Demo */
.demo {
  margin: clamp(48px, 8vw, 88px) auto 0;
  max-width: 920px;
  padding: 0;
  --surface: var(--bg);
}
.graph { display: block; width: 100%; overflow: visible; }
.stop-edge { stop-color: var(--bg); }
.stop-mid { stop-color: #2c2c32; }
.grid-line { fill: none; stroke: #1d1d22; stroke-dasharray: 2 8; }
.rail, .route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rail { stroke: #26262c; stroke-width: 2; }
.spine { stroke: url(#fade-rail); }
.route { stroke: var(--tone); stroke-width: 2.7; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tone) 45%, transparent)); }
.green { --tone: var(--green); }
.red { --tone: var(--red); }
.amber { --tone: var(--amber); }
.charcoal { --tone: var(--gray); }
.green, .red, .amber, .charcoal { --tint: color-mix(in srgb, var(--tone) 16%, var(--surface)); }
.source > circle { fill: var(--raised); stroke: #2e2e35; }
.source .symbol { color: #d4d4d8; stroke-width: 1.4; }
.stamp { color: var(--tone); }
.stamp > circle:not(.wave):not(.eye) { fill: var(--tint); stroke: var(--tone); stroke-width: 1.2; }
.stamp .eye { fill: var(--tone); }
.symbol { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dot { fill: var(--tone); stroke: var(--surface); stroke-width: 1.8; }
.wave, .scan-ring, .scan-beam { fill: none; stroke: var(--tone); }
.wave { stroke-width: 1.5; opacity: 0; }
.scan-ring { stroke-width: 1.6; stroke-dasharray: 1 5; }
.scan-beam { stroke-width: 1.8; stroke-linecap: round; }
.route { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pr .rail { stroke: #222228; stroke-width: 1.5; }
.pr .route { stroke-width: 2; filter: none; }
.source > circle { stroke-width: 1.2; }
.badge > circle:not(.wave) { stroke-width: 1; }
.dot.head { stroke-width: 2.4; filter: drop-shadow(0 0 6px var(--tone)); }
.label { fill: var(--faint); font: 500 11px "JetBrains Mono", ui-monospace, monospace; letter-spacing: .02em; }
.amber-text { fill: var(--amber); }
#turnstile { opacity: 0; }
#turnstile use { transform-box: fill-box; transform-origin: center; }
.graph * { pointer-events: none; }
.controls { display: flex; justify-content: center; align-items: center; gap: 2px; margin-top: 8px; }
.controls button { display: grid; place-items: center; width: 36px; height: 38px; border: 0; background: none; color: var(--text); cursor: pointer; border-radius: 8px; }
.controls button:hover { background: rgba(255, 255, 255, .06); }
.play { margin-right: 4px; }
.play path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.play [data-icon="play"] { fill: currentColor; }

/* Setup */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.setup {
  max-width: 720px;
  margin: 120px auto 0;
  padding-top: 72px;
  border-top: 1px solid var(--border);
  text-align: left;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  scroll-margin-top: 40px;
}
.setup a:not(.button) { color: var(--text); text-underline-offset: 3px; }
.setup-head { margin-bottom: 36px; text-align: center; }
.kicker, .phase, .prereqs-title {
  margin: 0;
  color: var(--faint);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.setup h2 { margin: 12px 0 14px; color: var(--text); font-size: clamp(28px, 4.4vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.setup-intro { max-width: 560px; margin: 0 auto; font-size: 16px; text-wrap: pretty; }

.prereqs { margin-bottom: 48px; padding: 18px 22px; border: 1px solid var(--border); border-left: 2px solid var(--green); background: rgba(255, 255, 255, .015); }
.prereqs-title { margin-bottom: 8px; color: var(--green); }
.prereqs ul { margin: 0; padding-left: 18px; }
.prereqs li + li { margin-top: 4px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 0 0 44px 64px; counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
}
.step::after { content: ""; position: absolute; top: 46px; bottom: 8px; left: 19px; width: 1px; background: linear-gradient(var(--border-strong), var(--border)); }
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.phase { line-height: 1; padding-top: 2px; }
.phase span { letter-spacing: .06em; text-transform: none; }
.step h3 { margin: 8px 0 10px; color: var(--text); font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.step p { margin: 0 0 12px; }
.step strong { color: var(--text); font-weight: 500; }
.step ul { margin: 0 0 14px; padding-left: 18px; list-style: square; }
.step li + li { margin-top: 4px; }
.step > :last-child { margin-bottom: 0; }
.note { color: var(--faint); font-size: 14px; }

.step .checklist { padding-left: 0; list-style: none; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ""; position: absolute; top: .28em; left: 0; width: 14px; height: 14px; border: 1px solid var(--border-strong); border-radius: 2px; }
.checklist li::after { content: ""; position: absolute; top: calc(.28em + 3px); left: 5px; width: 4px; height: 7px; border: solid var(--green); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

.button.small { height: 38px; padding: 0 16px; gap: 12px; font-size: 14px; box-shadow: 3px 3px 0 0 rgba(139, 132, 255, .55); }
.button.small .arrow { padding-left: 12px; }

.cmd { position: relative; margin: 0 0 14px; border: 1px solid var(--border-strong); border-radius: 2px; background: #050507; }
.cmd pre { margin: 0; padding: 14px 84px 14px 16px; overflow-x: auto; }
.cmd code { padding: 0; border: 0; background: none; color: #e4e4e7; font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.cmd:not(.yaml) code::before { content: "$ "; color: var(--faint); user-select: none; }
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--raised);
  color: var(--muted);
  font: 500 12px/1 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.js .copy { display: block; }
.copy:hover { color: var(--text); border-color: rgba(255, 255, 255, .35); }

.setup-foot { margin: 48px 0 0; padding: 18px 22px; border: 1px dashed var(--border-strong); border-radius: 2px; font-size: 14px; }
.setup-foot strong { color: var(--text); font-weight: 500; }

code {
  overflow-wrap: anywhere;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--raised);
  color: #e4e4e7;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
}

@media (max-width: 600px) {
  nav a:not(.nav-cta) { display: none; }
  .controls button { width: 42px; height: 42px; }
  .step { padding-left: 52px; }
  .setup { margin-top: 88px; padding-top: 56px; }
}
