:root {
  --bg: #0a0e17;
  --surface: #151d2b;
  --border: #293548;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #f08c5a;
  --accent-2: #5fb7b0;
  --accent-warm: #ffb347;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ── Nav ─────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.brand {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 120ms;
}

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

/* ── Hero ────────────────────────────────────── */

.hero {
  min-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
  gap: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.tagline {
  color: var(--muted);
  font-size: 1rem;
  max-width: 48ch;
}

/* ── Terminal block ──────────────────────────── */

.terminal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  text-align: left;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

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

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal pre {
  padding: 0.85rem;
  font-size: 0.8rem;
  line-height: 1.8;
  overflow-x: auto;
}

.terminal code {
  color: var(--text);
}

.prompt {
  color: var(--accent-2);
  user-select: none;
  margin-right: 0.5em;
}

.comment {
  color: var(--muted);
}

/* ── CTA ─────────────────────────────────────── */

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: inherit;
  transition: transform 120ms ease, filter 120ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: #1a0f05;
}

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

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

/* ── Color swatch ────────────────────────────── */

.swatch {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.swatch span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: hsl(var(--hue) 65% 55%);
  transition: transform 200ms ease;
}

.swatch span:hover {
  transform: scale(1.3);
}

/* ── Targets inline ──────────────────────────── */

.targets-inline {
  color: var(--muted);
  font-size: 0.75rem;
  max-width: 600px;
  line-height: 1.8;
}

/* ── Showcase ────────────────────────────────── */

.showcase {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.screenshot-placeholder {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--border);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  background: var(--surface);
}

/* ── Scroll hint ─────────────────────────────── */

.scroll-hint {
  color: var(--muted);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── Docs zone ───────────────────────────────── */

.docs {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}

.docs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.docs-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 120ms;
}

.docs-nav a:hover {
  color: var(--accent);
}

.docs section {
  margin-bottom: 3rem;
}

.docs h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

.docs h2::before {
  content: "# ";
  color: var(--muted);
}

.docs p {
  color: var(--muted);
  margin-bottom: 0.75rem;
  max-width: 72ch;
}

.docs ol {
  color: var(--muted);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.docs ol li {
  margin-bottom: 0.4rem;
}

/* ── Code blocks in docs ─────────────────────── */

.docs pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1rem;
}

.docs .diagram {
  font-size: 0.72rem;
  line-height: 1.4;
}

/* ── Tables ──────────────────────────────────── */

.docs table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.docs th {
  text-align: left;
  color: var(--text);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.docs td {
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid rgba(41, 53, 72, 0.5);
  vertical-align: top;
}

.docs tr:hover td {
  color: var(--text);
}

.table-scroll {
  overflow-x: auto;
}

/* ── Footer ──────────────────────────────────── */

.footer {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
}

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

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

/* ── Responsive ──────────────────────────────── */

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .terminal {
    max-width: 100%;
  }

  .screenshot-placeholder {
    max-width: 100%;
  }

  .docs pre.diagram {
    font-size: 0.62rem;
  }
}
