@import url("https://fonts.googleapis.com/css2?family=Funnel+Display:wght@400..800&family=Geist+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --panel: #121215;
  --panel-2: #1a1a1e;
  --ink: #f2f1ec;
  --muted: #a3a29d;
  --dim: #85847f;
  --line: rgba(242, 241, 236, 0.09);
  --orange: #ff5a1f;
  --orange-2: #ff7a47;
  --green: #3ddc84;
  --blue: #5b8cff;
  --yellow: #f5c542;
  --pink: #ff5fa2;
  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  overflow-x: hidden;
}

::selection {
  background: var(--orange);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  background: var(--orange);
  color: #fff;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

.scroll-progress {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--orange);
}

.cursor-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.agents-stage {
  position: fixed;
  z-index: 160;
  inset: 0;
  pointer-events: none;
}

.agent {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10px;
  color: #0b0b0d;
  white-space: nowrap;
  will-change: transform;
  transition: transform 0.14s linear;
}

.agent .ptr {
  position: absolute;
  left: -6px;
  top: -16px;
  width: 22px;
  height: 22px;
  fill: var(--cc);
  stroke: #0b0b0d;
  stroke-width: 1.2;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.agent.green {
  --cc: var(--green);
  background: var(--green);
}
.agent.blue {
  --cc: var(--blue);
  background: var(--blue);
  color: #fff;
}
.agent.yellow {
  --cc: var(--yellow);
  background: var(--yellow);
}

.agent .agent-action {
  position: absolute;
  top: 24px;
  right: 0;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--cc);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.agent .agent-action:not(:empty) {
  opacity: 1;
}

.agent-hover,
.agent-active {
  outline: 1px dashed var(--agent-color, var(--orange));
  outline-offset: 5px;
  transition:
    outline-color 0.2s ease,
    background-color 0.2s ease;
}

.agent-active {
  outline-style: solid;
  background: color-mix(
    in srgb,
    var(--agent-color, var(--orange)) 12%,
    transparent
  );
}

.topbar {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 13, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
}

.reg {
  font-size: 9px;
  vertical-align: super;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 28px;
  margin-inline: auto;
  font-size: 13px;
  color: var(--muted);
}

.nav a:hover {
  color: var(--ink);
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: 22px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition:
    transform 0.2s,
    background 0.2s,
    border-color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}

.btn-orange:hover {
  background: var(--orange-2);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--panel);
}

.btn-ghost:hover {
  border-color: var(--orange);
}

.arrow {
  font-family: var(--mono);
  font-size: 12px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--dim);
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #0b0b0d;
  transform: rotate(-4deg);
}

.tag-yellow {
  background: var(--yellow);
}
.tag-green {
  background: var(--green);
}
.tag-blue {
  background: var(--blue);
}
.tag-orange {
  background: var(--orange);
  color: #fff;
}
.tag-pink {
  background: var(--pink);
}

.display {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(56px, 9.4vw, 136px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  margin: 0;
}

.display .line {
  display: block;
}

.display em {
  font-style: normal;
  color: var(--orange);
}

.display.small {
  font-size: clamp(40px, 5.4vw, 78px);
  line-height: 0.96;
}

.hero {
  position: relative;
  padding: 180px clamp(20px, 5vw, 80px) 90px;
  background:
    radial-gradient(
      900px 520px at 70% 8%,
      rgba(255, 90, 31, 0.09),
      transparent 70%
    ),
    var(--bg);
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin: 44px 0 60px;
}

.lede {
  max-width: 520px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.canvas {
  position: relative;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
}

.canvas-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(242, 241, 236, 0.16) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
  opacity: 0.35;
}

.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wires path {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.5;
  stroke-dasharray: 8 8;
  stroke-dashoffset: 400;
  opacity: 0.7;
}

[data-build].built .wires path {
  animation: draw 1.4s ease forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.flow-card,
.stack-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  font-size: 13px;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

[data-build].built .flow-card,
[data-build].built .stack-card {
  opacity: 1;
  transform: none;
}

.flow-card b,
.stack-card b {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.flow-card small,
.stack-card small {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}

.flow-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--orange);
  font-size: 15px;
}

.flow-card.c1 {
  left: 5%;
  top: 26%;
}
.flow-card.c2 {
  left: 41%;
  top: 52%;
}
.flow-card.c3 {
  right: 5%;
  top: 26%;
}
[data-build].built .flow-card.c1 {
  transition-delay: 0.05s;
}
[data-build].built .flow-card.c2 {
  transition-delay: 0.25s;
}
[data-build].built .flow-card.c3 {
  transition-delay: 0.45s;
}

.statusbar {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--dim);
  background: rgba(11, 11, 13, 0.55);
}

.statusbar b {
  color: var(--ink);
  font-weight: 500;
}
.statusbar i {
  margin-right: 6px;
}

.paper {
  position: relative;
  padding: 130px clamp(20px, 6vw, 96px) 120px;
  background: var(--ink);
  color: var(--bg);
}

.paper .eyebrow {
  color: #5a5954;
}
.paper .eyebrow span {
  color: #85847f;
}

.type {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(44px, 6.6vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 900px;
  margin: 0 0 70px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s ease;
}

.in .type {
  clip-path: inset(0 0 0 0);
}

.type.small {
  font-size: clamp(36px, 4.6vw, 66px);
}

.caret {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  margin-left: 6px;
  background: var(--orange);
  animation: blink 1s steps(1) infinite;
  vertical-align: -0.08em;
}

.in .caret {
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.three-up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  max-width: 1000px;
}

.role-card,
.step {
  position: relative;
}

.role-card {
  padding-bottom: 34px;
}

.role-card::after,
.step::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color, var(--orange));
  transition: width 0.8s ease 0.3s;
}

.built.role-card::after,
.built.step::after {
  width: 100%;
}

.accent-green {
  --accent-color: var(--green);
}
.accent-blue {
  --accent-color: var(--blue);
}
.accent-pink {
  --accent-color: var(--pink);
}
.accent-yellow {
  --accent-color: var(--yellow);
}
.accent-orange {
  --accent-color: var(--orange);
}

.agent-action {
  position: absolute;
  right: 4px;
  bottom: -28px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--accent-color, var(--orange));
  color: #0b0b0d;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.5s ease 0.7s,
    transform 0.5s ease 0.7s;
}

.accent-blue .agent-action,
.accent-pink .agent-action,
.accent-orange .agent-action {
  color: #fff;
}

.built .agent-action {
  opacity: 1;
  transform: none;
}

.role-card .cursor-mark,
.step .cursor-mark {
  left: auto;
  right: 6px;
  top: auto;
  bottom: -2px;
  margin: 0;
  animation: work 5s ease-in-out infinite alternate;
}

.role-card .cursor-mark.green,
.role-card .cursor-mark.blue,
.role-card .cursor-mark.pink {
  animation-delay: -1s;
}

.step .cursor-mark.yellow {
  animation-delay: -2s;
}

.step .cursor-mark.orange {
  animation-delay: -4s;
}

@keyframes work {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-10px, -6px);
  }
}

.three-up .mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin: 0 0 12px;
}

.three-up p:last-child {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  color: #3a3a38;
}

.dark {
  padding: 120px clamp(20px, 6vw, 96px);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.steps .display,
.canvas-section .display {
  max-width: 760px;
  margin-bottom: 80px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.step {
  padding: 30px 28px 50px 0;
  border-right: 1px solid var(--line);
  position: relative;
}

.step:last-child {
  border-right: 0;
}

.step .mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin: 0 0 22px;
}

.step h3 {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.step p:last-child {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 260px;
}

.role-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cursor-mark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-flex;
  align-items: center;
  margin: 12px 0 0 8px;
  padding: 4px 9px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10px;
  color: #0b0b0d;
  animation: drift 10s ease-in-out infinite alternate;
}

.cursor-mark .ptr {
  position: absolute;
  left: -6px;
  top: -16px;
  width: 22px;
  height: 22px;
  fill: var(--cc);
  stroke: #0b0b0d;
  stroke-width: 1.2;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.cursor-mark.green {
  --cc: var(--green);
  background: var(--green);
}
.cursor-mark.blue {
  --cc: var(--blue);
  background: var(--blue);
  color: #fff;
  animation-delay: -2s;
}
.cursor-mark.pink {
  --cc: var(--pink);
  background: var(--pink);
  color: #fff;
  animation-delay: -4s;
}
.cursor-mark.yellow {
  --cc: var(--yellow);
  background: var(--yellow);
  animation-delay: -1s;
}
.cursor-mark.orange {
  --cc: var(--orange);
  background: var(--orange);
  color: #fff;
  animation-delay: -3s;
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(40px, -26px);
  }
}

.stack-canvas {
  height: 360px;
  position: relative;
}

.stack-wires path {
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 6 6;
}

.stack-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 54px 48px 0;
}

.stack-canvas .stack-card {
  position: static;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 66px;
}

.stack-relay {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
}

.wire-label {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 70%;
  transform: translateX(-50%) rotate(-3deg);
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--green);
  color: #0b0b0d;
  font-family: var(--mono);
  font-size: 10px;
}

.wire-footnote {
  position: absolute;
  right: 36px;
  bottom: 22px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
}

.specimen .spec-table {
  border-top: 1px solid rgba(11, 11, 13, 0.14);
}

.spec-table > div {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(11, 11, 13, 0.14);
  align-items: baseline;
}

.spec-table code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--orange);
}

.spec-table span {
  font-size: 15px;
  color: #3a3a38;
}

.cta {
  padding: 130px clamp(20px, 6vw, 96px);
  text-align: center;
  background:
    radial-gradient(
      700px 400px at 50% 0%,
      rgba(255, 90, 31, 0.12),
      transparent 70%
    ),
    var(--bg);
}

.cta .eyebrow {
  justify-content: center;
}
.cta .display {
  margin-bottom: 40px;
}
.cta .cta-row {
  justify-content: center;
}

.footer {
  padding: 30px clamp(20px, 5vw, 80px) 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.footer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-pile {
  position: relative;
  height: 420px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(
      700px 300px at 50% 120%,
      rgba(255, 90, 31, 0.08),
      transparent 70%
    ),
    var(--bg);
}

.pile-hint {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.pile-item {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  will-change: transform;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.pile-item:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.pile-1 {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.pile-2 {
  background: var(--green);
  color: #0b0b0d;
  border-color: var(--green);
}
.pile-3 {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.footer-pile.static-pile {
  height: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
}

.static-pile .pile-hint {
  position: static;
  transform: none;
  width: 100%;
}

.static-pile .pile-item {
  position: static;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 13px;
  color: var(--muted);
}

.footer .mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

[data-reveal] > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

[data-reveal].in > * {
  opacity: 1;
  transform: none;
}

[data-reveal].in > *:nth-child(2) {
  transition-delay: 0.06s;
}
[data-reveal].in > *:nth-child(3) {
  transition-delay: 0.12s;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    gap: 10px 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .live {
    display: none;
  }
  .nav {
    order: 3;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .nav a {
    white-space: nowrap;
  }
  .hero {
    padding-top: 160px;
  }
  .hero-foot,
  .step-grid,
  .three-up {
    flex-direction: column;
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  .step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 22px 0 32px;
  }
  .flow-card.c1,
  .flow-card.c2,
  .flow-card.c3 {
    position: static;
    margin: 8px;
  }
  .canvas {
    padding: 16px;
    min-height: auto;
  }
  .stack-canvas {
    height: auto;
  }
  .stack-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 0;
  }
  .stack-relay {
    position: static;
    transform: none;
    margin-top: 12px;
  }
  .canvas-grid,
  .wires,
  .statusbar,
  .wire-label,
  .wire-footnote {
    display: none;
  }
  .spec-table > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .agents-stage {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] > *,
  [data-build] .flow-card,
  [data-build] .stack-card,
  .type {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .wires path {
    stroke-dashoffset: 0;
  }
  body,
  a,
  button {
    cursor: auto;
  }
}
