:root {
  --bg: #0a0a0a;
  --bg-soft: #0f0f0f;
  --fg: #fafafa;
  --muted: #6b7280;
  --faint: #4b5563;
  --line: #2a2a2a;
  --green: #10b981;
  --amber: #f59e0b;
  --cyan: #06b6d4;
  --red: #ef4444;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: "IBM Plex Mono", monospace;
}

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

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
}

.container {
  width: min(1280px, calc(100% - 160px));
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(10, 10, 10, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
}

.logo-prompt {
  color: var(--green);
  font-size: 22px;
  font-weight: 700;
}

.logo-text {
  font-size: 20px;
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.main-nav > a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.main-nav > a:hover {
  color: var(--fg);
}

.main-nav > a.btn-primary,
.main-nav > a.btn-primary:hover {
  color: var(--bg);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  padding: 8px 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: var(--bg);
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 500;
}

.btn-secondary {
  border: 1px solid var(--faint);
  color: var(--fg);
  padding: 14px 28px;
  font-size: 14px;
}

.btn-install {
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.hero {
  background: radial-gradient(80% 65% at 50% 30%, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0) 60%), var(--bg);
  padding-top: 96px;
  padding-bottom: 80px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 6px 16px;
  color: var(--muted);
  font-size: 12px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: var(--fg);
}

.dot-red {
  background: var(--red);
}

.dot-amber {
  background: var(--amber);
}

.dot-green {
  background: var(--green);
}

.title-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.hero-title {
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.title-row {
  display: block;
  color: var(--green);
}

.title-row .solid {
  font-weight: 700;
}

.title-row .ghost {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.factory {
  display: block;
  color: var(--fg);
}

.hint {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--faint);
  font-size: 12px;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.terminal {
  width: min(800px, 100%);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.terminal-head {
  height: 40px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-path {
  color: var(--muted);
  font-size: 12px;
}

.terminal-body {
  padding: 20px;
  display: grid;
  gap: 6px;
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.line {
  color: var(--fg);
}

.line.prompt,
.cmd,
.cmd-list p,
.flow-row span:nth-child(2n) {
  color: var(--green);
}

.line.muted,
.muted,
.section-sub,
.feature-card p,
.agent-pill,
.footer-bottom p,
.phase-tag {
  color: var(--muted);
}

.line.success,
.success {
  color: var(--green);
}

.cursor-line {
  height: 15px;
}

.cursor {
  width: 9px;
  height: 14px;
  background: var(--fg);
  display: inline-block;
  animation: blink 0.9s steps(1, end) infinite;
}

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

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.tag {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.section-head h2 {
  font-size: 36px;
  line-height: 1.2;
}

.section-sub {
  font-size: 16px;
}

.workflow {
  border-top: 1px solid transparent;
}

.workflow-config,
.workflow-loop {
  margin-top: 64px;
}

.phase-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: "JetBrains Mono", monospace;
}

.phase-name {
  font-size: 14px;
  font-weight: 500;
}

.phase-label-amber .phase-name {
  color: var(--amber);
}

.phase-label-green .phase-name {
  color: var(--green);
}

.phase-tag {
  font-size: 12px;
}

.config-card {
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: var(--bg-soft);
  padding: 28px;
  display: grid;
  grid-template-columns: 200px auto 1fr;
  align-items: center;
  gap: 40px;
}

.config-left .cmd {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.config-left .muted {
  font-size: 13px;
  line-height: 1.5;
}

.config-right {
  display: grid;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.center-arrow {
  text-align: center;
  color: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
  font-weight: 700;
  margin-top: 24px;
}

.workflow-loop {
  display: grid;
}

.workflow-loop > .phase-label {
  margin-bottom: 20px;
}

.loop-grid {
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--bg-soft);
}

.loop-card {
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.loop-card:nth-child(2n) {
  border-right: none;
}

.loop-card:nth-last-child(-n + 2) {
  border-bottom: none;
}

.step-num {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
  font-weight: 700;
}

.loop-card h3 {
  font-size: 16px;
  font-weight: 500;
}

.cmd-list {
  display: grid;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.loop-card .muted {
  font-size: 12px;
  line-height: 1.5;
}

.cycle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
  color: var(--faint);
  font-size: 12px;
}

.cycle-row span {
  color: var(--green);
  font-size: 20px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.flow-row {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 500;
}

.flow-row .accent {
  color: var(--green);
}

.features {
  border-top: 1px solid var(--line);
}

.feature-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.feature-card .icon {
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  font-weight: 700;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 500;
}

.feature-card p {
  font-size: 13px;
  line-height: 1.5;
}

.feature-card .icon.accent {
  color: var(--green);
}

.feature-card .icon.amber {
  color: var(--amber);
}

.feature-card .icon.cyan {
  color: var(--cyan);
}

.agents {
  border-top: 1px solid var(--line);
}

.agent-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.agent-pill {
  border: 1px solid var(--line);
  padding: 12px 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--fg);
}

.agent-pill.active {
  border-color: var(--green);
  color: var(--green);
}

.agent-pill.active .dot {
  background: var(--green);
}

.agent-pill.muted-pill {
  border-color: var(--faint);
  color: var(--faint);
  font-family: "IBM Plex Mono", monospace;
}

.agent-pill .more {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.final-cta {
  border-top: 1px solid var(--line);
  padding-top: 120px;
  padding-bottom: 120px;
}

.final-wrap {
  display: grid;
  gap: 40px;
  justify-items: center;
  text-align: center;
}

.final-wrap h2 {
  font-size: 48px;
  line-height: 1.2;
  max-width: 800px;
}

.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stats-row div {
  display: grid;
  gap: 4px;
}

.stats-row strong {
  color: var(--green);
  font-size: 28px;
  font-family: "JetBrains Mono", monospace;
}

.stats-row span {
  color: var(--muted);
  font-size: 12px;
}

.stats-row i {
  color: var(--line);
  font-style: normal;
  font-size: 28px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.footer-top,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.footer-bottom {
  margin-top: 32px;
}

.footer-bottom p {
  color: var(--faint);
  font-size: 12px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .container {
    width: min(1280px, calc(100% - 64px));
  }

  .hero-title {
    font-size: 64px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .container {
    width: calc(100% - 40px);
  }

  .section,
  .final-cta {
    padding: 72px 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    width: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px;
  }

  .nav-open .main-nav {
    display: flex;
  }

  .btn-install {
    width: 100%;
  }

  .hero-title {
    font-size: 46px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .config-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .config-card .arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .loop-grid {
    grid-template-columns: 1fr;
  }

  .loop-card {
    border-right: none;
  }

  .loop-card:last-child {
    border-bottom: none;
  }

  .feature-grid,
  .agent-grid {
    grid-template-columns: 1fr;
  }

  .section-head h2 {
    font-size: 30px;
  }

  .final-wrap h2 {
    font-size: 36px;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    gap: 16px;
    flex-wrap: wrap;
  }
}

