:root {
  --purple: #6926d5;
  --blue: #1e8cff;
  --teal: #22d8a8;
  --navy: #0a1733;
  --navy-soft: #16264a;
  --ink: #0e1a36;
  --ink-2: #34425e;
  --muted: #6b7591;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-card: #ffffff;
  --line: #e6eaf2;
  --line-strong: #cfd6e4;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 54, 0.06), 0 2px 8px rgba(14, 26, 54, 0.04);
  --shadow-md: 0 10px 30px rgba(14, 26, 54, 0.08), 0 2px 6px rgba(14, 26, 54, 0.04);
  --grad: linear-gradient(90deg, var(--purple), var(--blue) 55%, var(--teal));
  --grad-soft: linear-gradient(135deg, #f3ecff 0%, #e6f1ff 50%, #e2faf2 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}
html {
  overflow-x: hidden;
}
body {
  overflow-x: clip;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: #f1f3f9;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  color: #2b3a5c;
}

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ============== HEADER ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}
@media (max-width: 480px) {
  .brand-logo { height: 28px; }
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 14px;
}
.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}
.nav-cta {
  background: var(--ink);
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
}
.nav-cta:hover {
  background: var(--navy);
}

/* ============== LAYOUT ============== */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}
.container.narrow {
  max-width: 880px;
}
.container.center {
  text-align: center;
}

.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.section.dark {
  background: var(--navy);
  color: #d6deef;
  border-top-color: transparent;
}
.section.dark h2,
.section.dark h3,
.section.dark h4 {
  color: #fff;
}
.section.grad-bg {
  background: var(--grad-soft);
  border-top-color: transparent;
}

/* ============== TYPOGRAPHY ============== */
h1,
h2,
h3,
h4 {
  font-family: inherit;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.15;
}
h1 {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 800;
}
h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  margin-bottom: 18px;
}
h3 {
  font-size: 19px;
  font-weight: 600;
}
h4 {
  font-size: 16px;
  font-weight: 600;
}

p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
.section.dark p {
  color: #c1cbe1;
}

.lede {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 760px;
}
.section.dark .lede {
  color: #d6deef;
}

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(105, 38, 213, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.kicker.light {
  color: #b8c6e8;
  background: rgba(255, 255, 255, 0.08);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============== HERO ============== */
.hero {
  padding: 88px 0 64px;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(34, 216, 168, 0.12), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(105, 38, 213, 0.1), transparent 60%),
    #fff;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}
.hero-grid > * { min-width: 0; }
.hero-actions {
  display: flex;
  gap: 12px;
  margin: 28px 0 32px;
}
.hero-stats {
  list-style: none;
  display: flex;
  gap: 36px;
  padding: 24px 0 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.hero-stats li {
  display: flex;
  flex-direction: column;
}
.hero-stats strong {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hero-stats span {
  font-size: 13px;
  color: var(--muted);
}

/* hero card */
.hero-visual {
  display: flex;
  justify-content: flex-end;
}
.pipeline-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #fafbff;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.card-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.card-header .red { background: #ff5f57; }
.card-header .amber { background: #febc2e; }
.card-header .green { background: #28c840; }
.card-title { margin-left: 10px; }

.card-phases {
  list-style: none;
  padding: 14px 0;
  margin: 0;
}
.card-phases li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}
.card-phases li:last-child {
  border-bottom: none;
}
.card-phases .ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef2fb;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.card-phases em {
  margin-left: auto;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.card-phases .done .ph {
  background: rgba(34, 216, 168, 0.15);
  color: #0fa379;
}
.card-phases .done {
  color: var(--ink);
}
.card-phases .active .ph {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(30, 140, 255, 0.15);
}
.card-phases .active {
  background: linear-gradient(90deg, rgba(105, 38, 213, 0.04), rgba(34, 216, 168, 0.04));
  font-weight: 600;
  color: var(--ink);
}
.card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fafbff;
}
.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2fb;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill.green {
  background: rgba(34, 216, 168, 0.16);
  color: #0fa379;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn.primary:hover {
  background: #1b2a4d;
  box-shadow: var(--shadow-md);
}
.btn.ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn.ghost:hover {
  border-color: var(--ink-2);
}
.btn.big {
  padding: 14px 26px;
  font-size: 16px;
}

/* ============== PROBLEM CARDS ============== */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.cards > * { min-width: 0; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}
.card p {
  margin: 0;
  font-size: 15px;
}

/* ============== PROPOSAL PROPS ============== */
.props {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.props > * { min-width: 0; }
.prop {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 22px;
}
.prop h4 {
  margin: 0 0 8px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 15px;
  letter-spacing: 0;
}
.prop p {
  font-size: 14px;
  margin: 0;
  color: #c1cbe1;
}

/* ============== PHASES TIMELINE ============== */
.phases {
  list-style: none;
  padding: 0;
  margin: 36px 0 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: phase;
}
.phase {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  overflow: hidden;
}
.phase::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad);
  opacity: 0.85;
}
.phase h3 {
  margin: 4px 0 6px;
}
.phase p {
  font-size: 14px;
  margin: 0;
}
.phase-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  background: rgba(105, 38, 213, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
}
.caption {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

/* ============== UNLOCKS ============== */
.unlocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}
.unlocks > * { min-width: 0; }
.unlocks article {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(8px);
}
.unlocks h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.unlocks p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

/* ============== WHY ============== */
.why {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}
.why > div {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.why h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.why p {
  margin: 0;
}

/* ============== METRICS ============== */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
}
.metric {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 22px;
}
.metric h4 {
  margin: 0 0 8px;
}
.metric p {
  margin: 0;
  font-size: 14px;
  color: #c1cbe1;
}

/* ============== STATUS ============== */
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.status-grid > * { min-width: 0; }
.status-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.status-block h3 {
  margin-top: 0;
}
.status-block ul {
  margin: 0;
  padding-left: 20px;
}
.status-block li {
  margin: 6px 0;
  color: var(--ink-2);
}
.status-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.status-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.install-block {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.install-block h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.install-block pre {
  background: #0e1a36;
  color: #d6deef;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.install-block pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 12.5px;
}
@media (max-width: 640px) {
  .install-block {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
.install-cmd { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.install-aside {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  padding-left: 4px;
}
.install-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.install-note a {
  color: var(--blue);
  font-weight: 500;
  margin-left: 6px;
  white-space: nowrap;
}
.status-block pre {
  background: #0e1a36;
  color: #d6deef;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12px;
  overflow-x: auto;
  margin: 6px 0 12px;
  max-width: 100%;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.status-block pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 12px;
}
.status-block p strong {
  font-size: 13px;
  color: var(--ink);
}
.agent-list {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.agent-list code {
  background: #eef2fb;
  font-size: 11px;
  padding: 2px 6px;
}

.hero-stats {
  list-style: none;
  display: flex;
  gap: 32px;
  padding: 22px 0 0;
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stats strong {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-stats span {
  font-size: 12px;
  color: var(--muted);
}

/* ============== TERMINAL / DEMO ============== */
.demo-section {
  background: #fafbff;
}
.term-card {
  background: #0e1a36;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid #1c2a4a;
  width: 100%;
  max-width: 460px;
}
.term-card.big {
  max-width: none;
}
.term-card .card-header {
  background: #16264a;
  border-bottom: 1px solid #1c2a4a;
  color: #aab6d6;
}
.term-body {
  margin: 0;
  padding: 18px 20px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #c1cbe1;
  white-space: pre-wrap;
  word-break: break-word;
}
#live-log,
#live-tree {
  height: 440px;
  overflow: hidden;
  position: relative;
}
.term-body .cc-prompt {
  display: block;
  color: #fff;
  font-weight: 500;
}
.term-body .cc-bullet {
  display: block;
  color: #c5a3ff;
}
.term-body .cc-sub {
  display: block;
  color: #aab6d6;
}
.term-body .cc-sub.done { color: #aab6d6; }
.term-body .cc-sub.running { color: #fff; }
.term-body .cc-sub.bash { color: #ffe6a1; }
.term-body .cc-sub.verdict { color: #22d8a8; }
.term-body .cc-done {
  display: block;
  color: #22d8a8;
}
.term-body .cc-spacer { display: block; line-height: 0.8; height: 6px; }
.term-body .cc-summary {
  display: block;
  margin-top: 8px;
  color: #22d8a8;
  font-weight: 500;
}
.term-body .tree.committed { color: #c1cbe1; }
.term-body .tree.committed::before {
  content: '✓ ';
  color: #22d8a8;
  margin-left: -14px;
}
.term-body .tree.muted { color: #4f5b7a; }
.term-body .tree.muted::before {
  content: '· ';
  color: #4f5b7a;
  margin-left: -14px;
}
.run-speed {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7591;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 999px;
}
.term-body .cmd,
.term-body .cmd2 {
  display: block;
  color: #22d8a8;
}
.term-body .cmd2 {
  margin-top: 14px;
}
.term-body .file {
  display: block;
  padding-left: 14px;
  position: relative;
}
.term-body .file::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #6b7591;
}
.term-body .file.done {
  color: #c1cbe1;
}
.term-body .file.done::before { color: #22d8a8; content: "✓"; }
.term-body .file.active {
  color: #fff;
  font-weight: 500;
}
.term-body .file.active::before {
  content: "▶";
  color: #1e8cff;
}
.term-body .log {
  display: block;
  color: #c1cbe1;
}
.term-body .log.done { color: #c1cbe1; }
.term-body .log.dim { color: #6b7591; }
.term-body .log.active {
  color: #fff;
  font-weight: 500;
}
.term-body .tree {
  display: block;
  color: #c1cbe1;
}
.term-body .tree.pending { color: #fff; }
.term-body .tree.muted { color: #6b7591; }
.caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #1e8cff;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.run-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin: 36px 0 18px;
}
.run-grid > * { min-width: 0; }
@media (max-width: 720px) {
  .run-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none !important; opacity: 1; }
}

.caption.center { text-align: center; }
.caption-link {
  display: inline-block;
  margin-left: 6px;
  color: var(--blue);
  font-weight: 500;
}

/* ============== CTA ============== */
.cta {
  padding: 88px 0;
  background:
    radial-gradient(800px 400px at 20% 100%, rgba(105, 38, 213, 0.1), transparent 60%),
    radial-gradient(800px 400px at 80% 0%, rgba(34, 216, 168, 0.1), transparent 60%),
    #fff;
  border-top: 1px solid var(--line);
}
.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ============== FOOTER ============== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  background: #fafbff;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.foot a {
  color: var(--ink-2);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .hero-visual {
    justify-content: flex-start;
  }
  .cards,
  .unlocks,
  .status-grid,
  .status-grid.two,
  .status-grid.three {
    grid-template-columns: 1fr;
  }
  .props,
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .phases {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .site-nav {
    gap: 14px;
  }
  .site-nav a:not(.nav-cta) {
    display: none;
  }
  .section {
    padding: 64px 0;
  }
  .hero {
    padding: 56px 0 32px;
  }
  .props,
  .metrics,
  .phases {
    grid-template-columns: 1fr;
  }
  .foot {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  h1 {
    font-size: clamp(30px, 9vw, 44px);
    overflow-wrap: anywhere;
  }
  h2 {
    font-size: clamp(24px, 6.5vw, 32px);
    overflow-wrap: anywhere;
  }
  .container {
    padding: 0 22px;
  }
  .hero-grid {
    padding: 0 22px;
    gap: 28px;
  }
  .pipeline-card .card-title {
    font-size: 11px;
  }
  .card-phases li {
    padding: 10px 14px;
    font-size: 13px;
    gap: 10px;
  }
  .card-phases em {
    font-size: 11px;
  }
  code {
    overflow-wrap: anywhere;
  }
}
