:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2333;
  --border: #30363d;
  --accent: #2f81f7;
  --accent-hover: #58a6ff;
  --accent-dim: #1f4e8c;
  --green: #3fb950;
  --yellow: #d29922;
  --purple: #bc8cff;
  --red: #f85149;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-subtle: #6e7681;
  --radius: 10px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

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

/* ─── Nav ─────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-brand span { color: var(--accent-hover); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

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

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

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem !important;
  transition: background 0.15s !important;
}

.nav-cta:hover { background: var(--accent-hover) !important; color: #fff !important; }

/* ─── Hero ────────────────────────────────────────── */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 6px var(--green);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

h1 .hl { color: var(--accent-hover); }

.hero-demo {
  margin: 2rem auto;
  max-width: 860px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.hero-demo img {
  width: 100%;
  display: block;
}

.hero-tagline {
  font-size: 1.5rem;
  max-width: 560px;
  margin: 1rem auto 2rem;
  line-height: 1.6;
}

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

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  background: var(--surface2);
  border-color: var(--accent);
  text-decoration: none;
}

/* ─── Screenshot ──────────────────────────────────── */
.screenshot-wrap {
  max-width: 1000px;
  margin: 0 auto 6rem;
  padding: 0 2rem;
}

.screenshot-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.screenshot-bar {
  background: var(--surface);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.dot-r { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.dot-y { width: 12px; height: 12px; border-radius: 50%; background: #ffbd2e; }
.dot-g { width: 12px; height: 12px; border-radius: 50%; background: #28c840; }

.url-bar {
  flex: 1;
  background: var(--bg);
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.screenshot-frame img {
  width: 100%;
  display: block;
}

/* ─── Workflow ────────────────────────────────────── */
.section {
  max-width: 1050px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

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

/* Workflow steps */
.workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.workflow-step {
  background: var(--surface);
  padding: 2rem 1.5rem;
  position: relative;
}

.step-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-dim);
  line-height: 1;
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.step-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Features Grid ───────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

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

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

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.feature-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Screenshot Grid ─────────────────────────────── */
.ss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.ss-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
  cursor: zoom-in;
}

.ss-card:hover { border-color: var(--accent); }

.ss-card img {
  width: 100%;
  display: block;
}

.ss-card-caption {
  background: var(--surface);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ─── Lightbox ────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(1200px, 95vw);
  max-height: 90vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 32px 100px rgba(0,0,0,0.8);
  object-fit: contain;
  animation: lb-in 0.18s ease;
}

@keyframes lb-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-caption {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover { color: var(--text); border-color: var(--accent); }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.lightbox-nav:hover { color: var(--text); border-color: var(--accent); background: var(--surface2); }
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-nav:disabled { opacity: 0.2; cursor: default; pointer-events: none; }

/* ─── Install Section ─────────────────────────────── */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}

.install-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.install-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.install-card-header .badge {
  font-size: 0.7rem;
  background: var(--green);
  color: #000;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

.install-card-header .badge-plain {
  font-size: 0.7rem;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}

.install-steps {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.install-step {
  display: flex;
  gap: 12px;
}

.install-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.install-step-content {
  flex: 1;
}

.install-step-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.install-step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

pre, code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Menlo', monospace;
}

code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
  color: var(--text);
}

pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
  line-height: 1.6;
  margin-top: 6px;
}

pre .c { color: var(--text-subtle); } /* comment */
pre .k { color: var(--purple); }      /* keyword */
pre .s { color: var(--green); }       /* string */
pre .p { color: var(--text-muted); }  /* punctuation */

/* ─── Config Section ──────────────────────────────── */
.config-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.config-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.config-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

.config-table tr:hover td { background: var(--surface2); }

.config-table .key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-hover);
  white-space: nowrap;
}

.config-table .desc { color: var(--text-muted); line-height: 1.5; }

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

@media (max-width: 600px) { .llm-grid { grid-template-columns: 1fr; } }

.llm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.llm-card-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.llm-card-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.llm-card-model {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--accent-hover);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  display: inline-block;
}

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

/* ─── Footer ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.82rem;
}

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

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 680px) {
  .nav-links { display: none; }
  .hero { padding: 4rem 1.25rem 3rem; }
  .section { padding: 3rem 1.25rem; }
  .install-grid { grid-template-columns: 1fr; }
}

/* ─── Callout ─────────────────────────────────────── */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 1.5rem;
}

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

@keyframes shimmer {
  0% { opacity: 0.85; }
  50% { opacity: 1; }
  100% { opacity: 0.85; }
}
