:root {
  --bg: #07080b;
  --surface: #0d1016;
  --surface-hi: #151920;
  --border: rgba(255, 255, 255, 0.06);
  --border-hi: rgba(255, 255, 255, 0.1);
  --text: #e4e2dd;
  --text-2: #8a8e99;
  --text-3: #565a66;
  --accent: #bae637;
  --accent-dim: rgba(186, 230, 55, 0.1);
  --accent-border: rgba(186, 230, 55, 0.22);
  --amber: #f0a930;
  --rose: #ef6461;
  --green: #4ade80;
  --sky: #7dd3fc;
  --radius: 14px;
  --radius-lg: 22px;
  --mono: "JetBrains Mono", monospace;
  --display: "Bricolage Grotesque", sans-serif;
  --body: "Outfit", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Background atmosphere ─────────────────────────────────── */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 10%, transparent 65%);
}

.glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
}

.glow-1 {
  width: 650px;
  height: 420px;
  top: -120px;
  left: 4%;
  background: rgba(186, 230, 55, 0.07);
}

.glow-2 {
  width: 500px;
  height: 360px;
  top: 40px;
  right: 4%;
  background: rgba(240, 169, 48, 0.04);
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: min(1200px, 100% - 2rem);
  margin: 0 auto;
}

/* ── Nav ───────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 11, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent);
  color: #111;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
}

.logo-text {
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.2s;
}

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

/* ── Typography ────────────────────────────────────────────── */
h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

code {
  font-family: var(--mono);
}

/* ── Shared section styles ─────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
  padding-bottom: 3rem;
}

.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 620px;
  margin-bottom: 2.2rem;
}

.section-head p {
  color: var(--text-2);
  font-size: 1.05rem;
  margin: 0.65rem 0 0;
  line-height: 1.65;
}

.label-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  margin-bottom: 0.9rem;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 3.5rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  margin-bottom: 1.2rem;
}

.hero-desc {
  color: var(--text-2);
  font-size: 1.12rem;
  max-width: 54ch;
  margin: 1rem 0 0;
  line-height: 1.7;
}

.hero-desc code {
  color: var(--text);
  font-size: 0.9em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.6rem 0 1.5rem;
}

.hero-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.hero-facts li {
  color: var(--text-2);
  font-size: 0.9rem;
  padding-left: 1.2rem;
  position: relative;
}

.hero-facts li::before {
  content: "\25C6";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.55rem;
  top: 0.4em;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  padding: 0 1.2rem;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accent {
  background: var(--accent);
  color: #111;
}

.btn-accent:hover {
  background: #cef04e;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(186, 230, 55, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hi);
}

.btn-outline:hover {
  border-color: var(--text-3);
  background: rgba(255, 255, 255, 0.03);
}

/* ── Terminal chrome ───────────────────────────────────────── */
.term {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-terminal .term {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border);
}

.term-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-1 {
  background: #ef6461;
}
.dot-2 {
  background: #f0a930;
}
.dot-3 {
  background: #4ade80;
}

.term-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-3);
  margin-left: 0.5rem;
}

.term-body {
  padding: 0.9rem 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.65;
}

.term-body p {
  margin: 0;
}

.term-body-fade {
  position: relative;
  max-height: 420px;
  overflow: hidden;
}

.term-body-fade::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}

/* Terminal semantic colors */
.t-prompt {
  color: var(--sky);
}
.t-key {
  color: var(--sky);
}
.t-dim {
  color: var(--text-3);
}
.t-err {
  color: var(--rose);
}
.t-warn {
  color: var(--amber);
}
.t-ok {
  color: var(--green);
}
.t-indent {
  padding-left: 1.2rem;
}

/* ── Comparison ────────────────────────────────────────────── */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.term-before {
  border-color: rgba(239, 100, 97, 0.15);
}

.term-after {
  border-color: rgba(186, 230, 55, 0.18);
}

/* ── Fact strip ────────────────────────────────────────────── */
.strip {
  position: relative;
  z-index: 1;
  margin-top: 1.8rem;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.strip-item {
  padding: 0.85rem 1.1rem;
  background: var(--surface);
}

.strip-val {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--accent);
  font-size: 0.95rem;
}

.strip-lbl {
  color: var(--text-2);
  font-size: 0.82rem;
}

/* ── Steps ─────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.25s;
}

.step-card:hover {
  border-color: var(--border-hi);
}

.step-card p {
  color: var(--text-2);
  margin: 0;
  font-size: 0.92rem;
}

.step-card code {
  font-size: 0.85em;
  color: var(--text);
}

.step-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

/* ── Feature cards ─────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.25s;
}

.feature-card:hover {
  border-color: var(--border-hi);
}

.feature-card p {
  color: var(--text-2);
  margin: 0;
  font-size: 0.92rem;
}

/* ── Install ───────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.tab {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.is-active {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
  font-weight: 500;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.code-block {
  position: relative;
  background: #060810;
  border: 1px solid rgba(125, 211, 252, 0.08);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.code-block pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.copy-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  font: inherit;
  font-size: 0.68rem;
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.install-note {
  color: var(--text-3);
  font-size: 0.82rem;
  margin: 0.6rem 0 0;
}

.install-note code {
  font-size: 0.9em;
}

/* ── Command grid ──────────────────────────────────────────── */
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cmd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.cmd-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 0.6rem;
}

.cmd-card pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* ── Agent integration ─────────────────────────────────────── */
.agent-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.agent-mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.agent-mode-card p {
  color: var(--text-2);
  margin: 0.4rem 0;
  font-size: 0.92rem;
}

.agent-mode-card pre {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  margin: 0.7rem 0 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
}

.tools-list {
  display: grid;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
  background: var(--surface);
  gap: 1rem;
}

.tool-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.tool-path {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
}

/* ── Scope ─────────────────────────────────────────────────── */
.scope-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.scope-split > div > p {
  color: var(--text-2);
  margin: 0.6rem 0 1.2rem;
  font-size: 0.95rem;
}

.scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.scope-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
}

.gains-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
}

.gains-box p {
  color: var(--text-2);
  font-size: 0.92rem;
  margin: 0.4rem 0;
}

.gains-box code {
  font-size: 0.88em;
  color: var(--text);
}

.gains-box pre {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  margin: 0.7rem 0 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-list {
  display: grid;
  gap: 0.6rem;
  max-width: 800px;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.2rem;
  transition: border-color 0.2s;
}

.faq-list details[open] {
  border-color: var(--border-hi);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--text-3);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-list details[open] summary::after {
  content: "\2212";
}

.faq-list p {
  color: var(--text-2);
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.faq-list code {
  font-size: 0.88em;
  color: var(--text);
}

.faq-list a {
  color: var(--accent);
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.3rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer p {
  margin: 0;
  color: var(--text-3);
  font-size: 0.82rem;
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.1rem;
  font-size: 0.82rem;
}

/* ── Scroll animations ─────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].in-view {
  opacity: 1;
  transform: none;
}

[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

[data-stagger].in-view > *:nth-child(1) { transition-delay: 0s; }
[data-stagger].in-view > *:nth-child(2) { transition-delay: 0.06s; }
[data-stagger].in-view > *:nth-child(3) { transition-delay: 0.1s; }
[data-stagger].in-view > *:nth-child(4) { transition-delay: 0.14s; }
[data-stagger].in-view > *:nth-child(5) { transition-delay: 0.18s; }
[data-stagger].in-view > *:nth-child(6) { transition-delay: 0.22s; }
[data-stagger].in-view > *:nth-child(7) { transition-delay: 0.26s; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid,
  .comparison,
  .steps,
  .features,
  .agent-modes,
  .scope-split {
    grid-template-columns: 1fr;
  }

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

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

  .section {
    padding: 3rem 0;
  }

  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 1rem);
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }

  .hero {
    padding: 2rem 0 1rem;
  }

  .section {
    padding: 2rem 0;
  }

  .cmd-grid,
  .strip-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}