@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* ── Reset & Base ──────────────────────────────────────────────── */

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

:root {
  --bg: #1e1f22;
  --bg-deep: #111214;
  --surface: #2b2d31;
  --surface-raised: #313338;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --text: #f2f3f5;
  --text-secondary: #b5bac1;
  --text-muted: #80848e;
  --border: #3f4147;

  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;

  --max-width: 1060px;
  --gutter: 2rem;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

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

.nav {
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.nav-wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-link {
  font-size: 1rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

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

/* ── Container ─────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  flex: 1;
}

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

.hero {
  padding: 2.5rem 0 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero h1 .arrow {
  color: var(--accent);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 36rem;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

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

.btn-primary svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cta-docs {
  font-size: 1rem;
  color: var(--text-muted);
}

.cta-docs:hover {
  color: var(--text-secondary);
}

/* ── Feed Motif ────────────────────────────────────────────────── */

.feed-motif {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  overflow: hidden;
  position: relative;
}

.feed-motif pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-muted);
  white-space: pre;
  overflow: hidden;
}

.feed-motif .tag {
  color: var(--accent);
  opacity: 0.7;
}

.feed-motif .attr {
  color: #c9a0dc;
  opacity: 0.7;
}

.feed-motif .value {
  color: #a8c97a;
  opacity: 0.8;
}

.feed-motif .text-content {
  color: var(--text-secondary);
  opacity: 0.8;
}

/* ── Features ──────────────────────────────────────────────────── */

.features {
  padding: 2.5rem 0 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

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

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

footer {
  padding: 2rem var(--gutter);
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

footer a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

/* ── Docs Page ─────────────────────────────────────────────────── */

.docs-header {
  padding: 1.5rem 0 2rem;
}

.docs-header h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.docs-header p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 1.0625rem;
}

.cmd-group {
  margin-bottom: 2.5rem;
}

.cmd-group-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.cmd-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cmd-item {
  padding: 1.125rem 1.5rem;
  background: var(--surface);
}

.cmd-item + .cmd-item {
  border-top: 1px solid var(--border);
}

.cmd-name {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.cmd-param {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--accent);
  opacity: 0.8;
}

.cmd-param-opt {
  color: var(--text-muted);
}

.cmd-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 0.375rem;
  line-height: 1.6;
}

.cmd-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.125rem 0.5rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

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

/* Desktop */
@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }

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

/* Tablet */
@media (min-width: 480px) and (max-width: 767px) {
  .hero {
    gap: 2rem;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 479px) {
  :root {
    --gutter: 1.25rem;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .feed-motif pre {
    font-size: 0.75rem;
  }

  .nav-wordmark {
    font-size: 1.25rem;
  }
}

/* ── Reduced Motion ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
