:root {
  --bg: #070b10;
  --bg-elevated: #0d1219;
  --bg-card: #111820;
  --border: #1e2a38;
  --border-bright: #2a3d52;
  --text: #c8d4e0;
  --text-muted: #7a8fa3;
  --cyan: #3dd9ff;
  --cyan-dim: #1a8fb3;
  --green: #4ade80;
  --green-dim: #22c55e;
  --magenta: #e879f9;
  --amber: #fbbf24;
  --red: #f87171;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", ui-monospace, monospace;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --glow-cyan: 0 0 40px rgba(61, 217, 255, 0.15);
  --glow-green: 0 0 40px rgba(74, 222, 128, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 217, 255, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(74, 222, 128, 0.04), transparent),
    linear-gradient(180deg, var(--bg) 0%, #050810 100%);
  min-height: 100vh;
}

::selection {
  background: rgba(61, 217, 255, 0.25);
  color: #fff;
}

a {
  color: var(--cyan);
  text-decoration-color: rgba(61, 217, 255, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
  color: #fff;
  text-decoration-color: var(--cyan);
}

code,
pre,
.kbd {
  font-family: var(--font-mono);
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 16, 0.82);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--cyan);
  text-decoration: none;
}

.logo span {
  color: var(--green);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* ── Hero ── */

.hero {
  padding: 4.5rem 0 3.5rem;
}

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

.hero-copy h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.hero-copy h1 .highlight {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 34ch;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.badge-cyan {
  border-color: rgba(61, 217, 255, 0.35);
  color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.badge-green {
  border-color: rgba(74, 222, 128, 0.35);
  color: var(--green);
  box-shadow: var(--glow-green);
}

.badge-amber {
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--amber);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  cursor: pointer;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-dim), var(--green-dim));
  color: #041018;
  box-shadow: 0 8px 32px rgba(61, 217, 255, 0.25);
}

.btn-primary:hover {
  color: #041018;
  box-shadow: 0 12px 40px rgba(61, 217, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-bright);
  color: var(--text);
}

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

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Hero media ── */

.hero-media {
  margin: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Sections ── */

section {
  padding: 4rem 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.section-intro {
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 2.5rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Dual mode cards ── */

.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mode-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mode-card:hover {
  border-color: var(--border-bright);
}

.mode-card-tui {
  box-shadow: var(--glow-cyan);
}

.mode-card-mcp {
  box-shadow: var(--glow-green);
}

.mode-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.mode-card h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.mode-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.mode-card ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.mode-card li + li {
  margin-top: 0.35rem;
}

/* ── Agent chat mockup ── */

.agent-panel {
  margin-top: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}

.agent-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.agent-messages {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.msg {
  max-width: 85%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.msg-user {
  align-self: flex-end;
  background: rgba(61, 217, 255, 0.1);
  border: 1px solid rgba(61, 217, 255, 0.2);
}

.msg-agent {
  align-self: flex-start;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.18);
}

.msg-agent code {
  font-size: 0.82rem;
  color: var(--green);
}

.msg-footnote {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* ── Demo screencast ── */

.demo-figure {
  margin: 0 auto;
  max-width: 920px;
}

.demo-figure video {
  display: block;
  width: 100%;
  height: auto;
}

.demo-figure figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.demo-figure figcaption strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Features ── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.feature-card h4 {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
  color: var(--cyan);
}

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

/* ── Install ── */

.install-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.install-tab {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.install-tab.active,
.install-tab:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(61, 217, 255, 0.06);
}

.cli-block {
  max-width: 720px;
}

.code-panel {
  display: none;
}

.code-panel.active {
  display: block;
}

.cli-window {
  border-radius: var(--radius);
  border: 1px solid var(--border-bright);
  background: #03060c;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.cli-titlebar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid var(--border);
}

.cli-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cli-dot-red { background: #ff5f57; }
.cli-dot-yellow { background: #febc2e; }
.cli-dot-green { background: #28c840; }

.cli-title {
  margin-left: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  flex: 1;
}

.cli-copy-all {
  margin-left: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.cli-copy-all:hover,
.cli-copy-all.copied {
  color: var(--cyan);
  border-color: rgba(61, 217, 255, 0.4);
  background: rgba(61, 217, 255, 0.08);
}

.cli-body {
  padding: 0.85rem 1rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}

.cli-comment {
  margin: 0 0 0.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.cli-line {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.cli-line:last-child {
  margin-bottom: 0;
}

.cli-prompt {
  flex-shrink: 0;
  color: var(--cyan);
  user-select: none;
}

.cli-cmd {
  flex: 1;
  min-width: 0;
  color: var(--green);
  word-break: break-word;
}

.cli-copy {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
}

.cli-line:hover .cli-copy,
.cli-copy:focus-visible {
  opacity: 1;
}

.cli-copy:hover,
.cli-copy.copied {
  color: var(--cyan);
  border-color: rgba(61, 217, 255, 0.35);
  background: rgba(61, 217, 255, 0.06);
  opacity: 1;
}

@media (hover: none) {
  .cli-copy {
    opacity: 1;
  }
}

.cli-body-json .cli-json {
  margin: 0;
  padding: 0;
  overflow-x: auto;
}

.cli-body-json .cli-json code {
  color: var(--green);
  white-space: pre;
}

.install-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── MCP tools ── */

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-chip {
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  color: var(--green);
}

/* ── Disclaimer ── */

.disclaimer {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.05);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.disclaimer strong {
  color: var(--amber);
}

/* ── Footer ── */

.site-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-copy {
  width: 100%;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .hero-grid,
  .dual-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-copy h1 {
    font-size: 1.85rem;
  }

  .nav-links {
    display: none;
  }

}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .container {
    width: calc(100% - 1.5rem);
  }
}
