:root {
  --bg-primary: #0b0d12;
  --bg-secondary: #11131a;
  --bg-card: #161923;
  --text-primary: #f0f2f7;
  --text-secondary: #9aa3b2;
  --text-muted: #6b7280;
  --brand: #6366f1;
  --brand-light: #818cf8;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 72px;
  padding: 0 24px;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-menu {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s;
}

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

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-large {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 12px;
}

/* Hero */
.hero {
  padding: 100px 0 120px;
  background: radial-gradient(ellipse at 70% 30%, rgba(99, 102, 241, 0.18), transparent 50%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 22px;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-cube {
  width: 320px;
  height: 320px;
  color: var(--brand);
  opacity: 0.9;
}

.hero-cube svg {
  width: 100%;
  height: 100%;
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-header {
  margin-bottom: 60px;
}

.section-header.center {
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0;
}

.section-header.center .section-desc {
  margin: 0 auto;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.feature-card h3 {
  font-size: 18px;
  margin: 0 0 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* API docs */
.api-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.api-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.api-group-header h3 {
  margin: 0;
  font-size: 16px;
}

.api-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.api-group-body {
  padding: 8px 24px 16px;
}

.api-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.api-item:last-child {
  border-bottom: none;
}

.api-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.api-method {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.api-method.get {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.api-method.post {
  background: rgba(99, 102, 241, 0.15);
  color: var(--brand-light);
}

.api-path {
  font-family: "SF Mono", monospace;
  font-size: 14px;
  color: var(--text-primary);
}

.api-item p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.api-item code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* CTA */
.cta-section {
  text-align: center;
}

.cta-title {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 12px;
}

.cta-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 28px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 16px 0 0;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* Legal pages */
.legal-section {
  padding: 80px 0;
}

.legal-container {
  max-width: 780px;
}

.legal-container h1 {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 8px;
}

.legal-date {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 32px;
}

.legal-container h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 12px;
}

.legal-container p,
.legal-container li {
  font-size: 15px;
  color: var(--text-secondary);
}

.legal-container a {
  color: var(--brand-light);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-cube {
    width: 220px;
    height: 220px;
  }

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

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

  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }

  .nav-menu.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-right .btn {
    display: none;
  }
}
