/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #09090b;
  --bg-raised: #131316;
  --bg-card: #18181b;
  --border: #27272a;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --accent: #a78bfa;
  --accent-dim: rgba(167, 139, 250, 0.12);
  --green: #34d399;
  --radius: 12px;
  --max-w: 1080px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family:
    "Geist",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(167, 139, 250, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(167, 139, 250, 0.04) 0%, transparent 50%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}
a:hover {
  opacity: 0.8;
}

code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 9, 11, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Hero actions ── */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.connect-mcp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: "Geist", sans-serif;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.connect-mcp-btn:hover {
  opacity: 0.85;
}

.docs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: "Geist", sans-serif;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.docs-btn:hover {
  color: var(--text);
  border-color: #3f3f46;
  opacity: 1;
}

/* ── MCP Modal ── */
.mcp-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.mcp-modal-overlay.open {
  display: flex;
}

.mcp-modal {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  padding: 28px;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mcp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mcp-modal-header h3 {
  font-family: "DM Serif Display", serif;
  font-size: 1.3rem;
  font-weight: 400;
}

.mcp-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}
.mcp-modal-close:hover {
  color: var(--text);
}

.mcp-modal-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.mcp-tab-bar {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.mcp-tab {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: "Geist", sans-serif;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}
.mcp-tab:last-child {
  border-right: none;
}
.mcp-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.mcp-tab.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.mcp-tab-content {
  display: none;
}
.mcp-tab-content.active {
  display: block;
}

.mcp-code-block {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.mcp-code-block pre {
  padding: 14px 48px 14px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
}

.mcp-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.mcp-copy-btn:hover {
  color: var(--text);
  border-color: #3f3f46;
}

.mcp-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.5;
}
.mcp-hint code {
  font-size: 0.75rem;
  background: rgba(167, 139, 250, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.nav-logo {
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ── Hero ── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 140px 24px 48px;
  text-align: center;
}

.hero h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Install block ── */
.install-block {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.install-cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  white-space: nowrap;
}

.install-prompt {
  color: var(--green);
  user-select: none;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  font-family: "Geist", sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
  height: 100%;
}
.copy-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hero-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Features ── */
.features {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px;
}

.features h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 48px;
}

.features-table {
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
  border-collapse: collapse;
}

.features-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.features-table th:first-child {
  width: 52px;
}

.features-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.features-table tr:last-child td {
  border-bottom: none;
}

.features-table tbody tr {
  transition: background 0.15s;
}
.features-table tbody tr:hover {
  background: var(--bg-raised);
}

.ft-logo {
  width: 52px;
  text-align: center;
}
.ft-logo a {
  display: inline-flex;
}
.ft-logo img,
.ft-logo svg {
  display: block;
}

.ft-what {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  width: 140px;
}

.ft-why {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.ft-why code {
  font-size: 0.8rem;
  background: rgba(167, 139, 250, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

/* ── Agents ── */
.agents {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}

.agents-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.agents-text h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.agents-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.agents-text strong {
  color: var(--text);
}

.agents-text em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

/* ── Code window ── */
.code-window {
  background: #0c0c0e;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-dots {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #27272a;
}
.code-dots span:first-child {
  background: #ef4444;
}
.code-dots span:nth-child(2) {
  background: #eab308;
}
.code-dots span:last-child {
  background: #22c55e;
}

.code-window pre {
  padding: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-comment {
  color: #525252;
}
.code-keyword {
  color: #c084fc;
}
.code-string {
  color: #34d399;
}
.code-fn {
  color: #60a5fa;
}
.code-num {
  color: #fb923c;
}
.code-tag {
  color: #f472b6;
}
.code-attr {
  color: #facc15;
}

/* ── CTA ── */
.cta {
  text-align: center;
  padding: 80px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}

.cta h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.scroll-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: "Geist", sans-serif;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.scroll-top-btn:hover {
  color: var(--text);
  border-color: #3f3f46;
  opacity: 1;
}

/* ── Footer ── */
.footer {
  padding: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-sep {
  color: var(--text-muted);
  opacity: 0.4;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .features-table {
    font-size: 0.85rem;
  }

  .features-table th:first-child,
  .ft-logo {
    display: none;
  }

  .agents-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
  }

  .install-cmd {
    font-size: 0.8rem;
    padding: 12px 14px;
  }
}
