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

:root {
  --bg: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --text: #e5e5e5;
  --text-muted: #888888;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #222222;
  --max-width: 1100px;
  --nav-height: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", Menlo, monospace;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  text-decoration: underline;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

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

nav .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav .logo svg {
  flex-shrink: 0;
}

nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

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

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

nav .nav-cta {
  background: var(--text);
  color: var(--bg) !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

nav .nav-cta:hover {
  opacity: 0.85;
  color: var(--bg) !important;
  text-decoration: none;
}

/* Hero wrapper & wave canvas */
.hero-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

#wave-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 1;
  pointer-events: none;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 100px 24px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  opacity: 0.85;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
  display: inline-block;
}

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

/* Hero image */
.hero-image {
  margin: 60px auto 0;
  max-width: 900px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  display: block;
}

/* Sections */
section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

section.alt-bg {
  background: var(--bg-secondary);
  max-width: 100%;
}

section.alt-bg .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  text-align: center;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
}

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

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

/* FAQ */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 80px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: var(--text-muted);
}

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

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Docs Layout */
.docs-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  min-height: calc(100vh - var(--nav-height));
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 40px);
  align-self: start;
}

.docs-sidebar h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 24px;
}

.docs-sidebar h4:first-child {
  margin-top: 0;
}

.docs-sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-sidebar a {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
  display: block;
  transition: color 0.2s;
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
  color: var(--text);
  text-decoration: none;
}

.docs-content {
  min-width: 0;
}

.docs-content h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.docs-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.docs-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.docs-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.8;
}

.docs-content code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid var(--border);
}

.docs-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.docs-content pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Changelog */
.changelog {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 24px;
}

.changelog h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.changelog-entry {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.changelog-entry:last-child {
  border-bottom: none;
}

.changelog-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.changelog-entry h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.changelog-entry p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.changelog-entry ul {
  color: var(--text-muted);
  margin-top: 12px;
  padding-left: 20px;
  line-height: 1.8;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .docs-sidebar {
    position: static;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
  }

  nav .nav-links {
    gap: 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  nav .nav-links {
    gap: 14px;
  }

  nav .nav-cta {
    display: none;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}
