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

:root {
  --bg:         #0d0d0f;
  --bg-alt:     #111114;
  --bg-card:    #16161a;
  --bg-code:    #1a1a1f;
  --border:     #222228;
  --border-lit: #2e2e38;
  --text:       #e2e2e8;
  --text-muted: #6b6b7a;
  --text-dim:   #444450;
  --accent:     #7c6af7;
  --accent-2:   #4fd1c5;
  --green:      #4ade80;
  --blue:       #60a5fa;
  --red:        #f87171;
  --yellow:     #fbbf24;
  --radius:     10px;
  --radius-lg:  16px;
  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent-2);
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 0.875rem;
}

.nav-links a { color: var(--text-muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

.nav-github {
  color: var(--text) !important;
  font-weight: 500;
  border: 1px solid var(--border-lit);
  padding: 5px 14px;
  border-radius: 6px;
  transition: border-color 0.15s !important;
}
.nav-github:hover { border-color: var(--accent) !important; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 24px 100px;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124,106,247,0.12) 0%, transparent 70%);
}

.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(124,106,247,0.1);
  border: 1px solid rgba(124,106,247,0.25);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 24px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.install-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-lit);
  border-radius: 8px;
  padding: 10px 16px;
}

.install-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.install-cmd {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  background: none;
  border: none;
  padding: 0;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color 0.15s;
}
.copy-btn:hover { color: var(--text); }

.btn-outline {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-lit);
  padding: 10px 20px;
  border-radius: 8px;
  transition: color 0.15s, border-color 0.15s;
}
.btn-outline:hover { color: var(--text); border-color: var(--border-lit); }

/* ── Terminal ─────────────────────────────────────────────────────────────── */
.hero-terminal {
  background: var(--bg-card);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--bg-code);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.terminal-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.terminal-body {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
  padding: 24px;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
}

.t-dim   { color: var(--text-muted); }
.t-green { color: var(--green); }
.t-blue  { color: var(--blue); }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section       { padding: 80px 24px; }
.section-alt   { background: var(--bg-alt); }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 560px;
}

/* ── Features grid ────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border-lit); }

.feature-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 14px;
  color: var(--accent);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Quickstart steps ─────────────────────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.step:last-child { border-bottom: none; }

.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(124,106,247,0.15);
  border: 1px solid rgba(124,106,247,0.35);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.code-block {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}

.code-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-bottom: 8px;
}

.services-table h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

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

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

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

/* ── Examples ─────────────────────────────────────────────────────────────── */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.example-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s;
}
.example-card:hover { border-color: var(--border-lit); }

.example-header {
  margin-bottom: 12px;
}

.example-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.example-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.example-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.example-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.example-stack span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
}

/* ── MCP section ──────────────────────────────────────────────────────────── */
.mcp-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.mcp-text .section-title { margin-bottom: 16px; }

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

.mcp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mcp-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mcp-list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.mcp-example {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 90%;
}

.chat-bubble.user {
  background: rgba(124,106,247,0.12);
  border: 1px solid rgba(124,106,247,0.2);
  color: var(--text);
  align-self: flex-end;
}

.chat-bubble.assistant {
  background: var(--bg-code);
  border: 1px solid var(--border);
  color: var(--text-muted);
  align-self: flex-start;
}

/* ── Stack grid ───────────────────────────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
}

.stack-group h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.stack-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack-group li {
  font-size: 0.875rem;
  color: var(--text);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }

.footer-license {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links a:not(.nav-github) { display: none; }

  .hero { padding: 60px 20px 72px; }

  .mcp-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .install-block { justify-content: space-between; }

  .terminal-body { font-size: 0.75rem; }

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

  .footer-license { margin-left: 0; width: 100%; }
}
