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

:root {
  --bg: #0b0015;
  --bg-subtle: #100020;
  --bg-card: #160028;
  --bg-code: #0d001a;
  --border: #251040;
  --text: #e0d0f0;
  --text-dim: #6a5580;
  --text-muted: #b098cc;
  --neon-pink: #ff2d95;
  --neon-cyan: #00e0f0;
  --neon-purple: #a030e0;
  --neon-yellow: #ffd740;
  --neon-green: #30e060;
  --neon-red: #ff4040;
  --green: #30e060;
  --yellow: #ffd740;
  --red: #ff4040;
  --accent: #00e0f0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pixel: 'Press Start 2P', monospace;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--neon-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--neon-pink); }

/* ── Scanline overlay (subtle) ── */
body::after {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.015) 3px,
    rgba(0, 0, 0, 0.015) 6px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; position: relative; }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11, 0, 21, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: var(--pixel);
  font-size: 0.75rem; color: var(--neon-cyan);
  display: flex; align-items: center; gap: 10px;
}
.nav-logo img {
  height: 30px;
  width: auto;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: var(--text-muted); font-weight: 500;
  font-family: var(--pixel); font-size: 0.5rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--neon-pink); }
.nav-links .btn-sm {
  background: var(--neon-pink);
  color: #fff; padding: 7px 16px;
  border-radius: 4px; font-weight: 600; font-size: 0.5rem;
  font-family: var(--pixel);
  border: none;
}
.nav-links .btn-sm:hover { opacity: 0.85; }
.mobile-toggle { display: none; background: none; border: none; color: var(--neon-cyan); font-size: 1.5rem; cursor: pointer; }

/* ── Hero ── */
.hero {
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* (hero background image removed — spaceships are rendered on canvas) */

/* Retro grid floor */
.hero::before {
  content: '';
  position: absolute;
  bottom: 0; left: -50%; right: -50%;
  height: 45%;
  background:
    linear-gradient(to right, rgba(160, 48, 224, 0.3) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(to bottom, rgba(160, 48, 224, 0.3) 1px, transparent 1px) 0 0 / 80px 80px;
  transform: perspective(500px) rotateX(65deg);
  transform-origin: bottom center;
  opacity: 0.12;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(22, 0, 40, 0.8); border: 1px solid var(--border);
  padding: 6px 16px; border-radius: 4px;
  font-family: var(--pixel); font-size: 0.5rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.hero-badge span { color: var(--neon-cyan); font-weight: 600; }

.hero h1 {
  font-family: var(--pixel);
  font-size: clamp(1.4rem, 4.5vw, 2.4rem);
  font-weight: 800; line-height: 2;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem; color: var(--text-muted);
  max-width: 580px; margin: 0 auto 44px;
  line-height: 1.8;
}

/* ── Install box ── */
.install-box {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-code); border: 1px solid var(--border);
  padding: 14px 20px; border-radius: 6px;
  font-family: var(--mono); font-size: 0.9rem;
}
.install-box code { color: var(--text); }
.install-box .dollar { color: var(--neon-cyan); margin-right: 4px; }
.copy-btn {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  padding: 6px 12px; border-radius: 4px; cursor: pointer;
  font-size: 0.65rem; font-family: var(--pixel); transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--neon-pink); color: var(--neon-pink); }
.copy-btn.copied { border-color: var(--neon-green); color: var(--neon-green); }

/* ── Terminal mockup ── */
.terminal {
  max-width: 680px; margin: 48px auto 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  text-align: left; font-family: var(--mono); font-size: 0.85rem;
}
.terminal-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(16, 0, 32, 0.6); border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot.red { background: var(--neon-red); }
.terminal-dot.yellow { background: var(--neon-yellow); }
.terminal-dot.green { background: var(--neon-green); }
.terminal-body { padding: 20px; line-height: 1.8; overflow-x: auto; }
.terminal-body .dim { color: var(--text-dim); }
.terminal-body .cyan { color: var(--neon-cyan); }
.terminal-body .green { color: var(--neon-green); }
.terminal-body .yellow { color: var(--neon-yellow); }
.terminal-body .red { color: var(--neon-red); }
.terminal-body .bold { font-weight: 700; }

/* ── Section headers ── */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-family: var(--pixel);
  font-size: 0.95rem; font-weight: 800; letter-spacing: 0.04em; margin-bottom: 16px;
  color: var(--neon-cyan);
}
.section-header p { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* ── Features ── */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 28px; border-radius: 8px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover {
  border-color: rgba(255, 45, 149, 0.3);
  transform: translateY(-3px);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon { font-size: 1.5rem; margin-bottom: 12px; }
.feature-card h3 {
  font-family: var(--pixel);
  font-size: 0.6rem; font-weight: 700; margin-bottom: 12px;
  color: var(--neon-pink);
}
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ── How it works ── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.step {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 24px; border-radius: 8px;
  position: relative;
}
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--neon-pink);
  color: #fff; font-weight: 700; font-size: 0.7rem;
  font-family: var(--pixel);
  margin-bottom: 12px;
}
.step h3 {
  font-family: var(--pixel);
  font-size: 0.6rem; font-weight: 700; margin-bottom: 8px;
  color: var(--neon-cyan);
}
.step p { color: var(--text-muted); font-size: 0.85rem; }

/* ── Store cards ── */
.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }
.store-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  transition: border-color 0.3s;
}
.store-card:hover { border-color: rgba(160, 48, 224, 0.3); }
.store-card-header {
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  background: rgba(22, 0, 40, 0.4);
}
.store-card-header h3 {
  font-family: var(--pixel);
  font-size: 0.55rem; font-weight: 700;
  color: var(--neon-pink);
}
.store-card-body { padding: 20px 24px; }
.store-card-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }
.store-card-body ul { list-style: none; }
.store-card-body li {
  padding: 5px 0; color: var(--text-muted); font-size: 0.9rem;
  display: flex; gap: 10px;
}
.store-card-body li::before {
  content: '>';
  color: var(--neon-cyan);
  font-family: var(--pixel);
  font-size: 0.5rem;
  margin-top: 5px;
  flex-shrink: 0;
}

/* ── Code blocks ── */
.code-block {
  background: var(--bg-code); border: 1px solid var(--border);
  padding: 20px; border-radius: 6px;
  font-family: var(--mono); font-size: 0.85rem;
  overflow-x: auto; line-height: 1.8;
  margin: 16px 0;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0; text-align: center;
  color: var(--text-dim); font-size: 0.85rem;
  background: linear-gradient(180deg, var(--bg) 0%, #060010 100%);
}
footer .footer-logo {
  width: 100px;
  margin-bottom: 20px;
  opacity: 0.7;
}
footer .links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
footer .links a {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--text-dim);
}
footer .links a:hover { color: var(--neon-pink); }
footer p {
  font-family: var(--pixel);
  font-size: 0.4rem;
  line-height: 2;
  color: var(--text-dim);
}

/* ── Stars ── */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ── Neon divider ── */
.neon-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 48, 224, 0.4), rgba(0, 224, 240, 0.3), rgba(160, 48, 224, 0.4), transparent);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 20px; gap: 16px;
  }
  .mobile-toggle { display: block; }
  section { padding: 60px 0; }
  .hero { padding: 100px 0 40px; min-height: auto; }
  .hero h1 { font-size: 1rem; }
  .hero-subtitle { font-size: 1rem; }
  .store-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}

/* ── Docs page ── */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding-top: 100px; }
.docs-sidebar { position: sticky; top: 80px; height: fit-content; }
.docs-sidebar a {
  display: block; padding: 6px 12px; color: var(--text-muted);
  font-size: 0.85rem; border-left: 2px solid var(--border);
  transition: all 0.2s;
}
.docs-sidebar a:hover, .docs-sidebar a.active {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}
.docs-sidebar h4 {
  font-family: var(--pixel);
  font-size: 0.45rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--neon-pink); padding: 6px 12px; margin-top: 16px;
}
.docs-content h2 {
  font-family: var(--pixel);
  font-size: 0.8rem; font-weight: 800; margin: 48px 0 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--neon-cyan);
}
.docs-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.docs-content h3 {
  font-family: var(--pixel);
  font-size: 0.6rem; font-weight: 700; margin: 32px 0 12px;
  color: var(--neon-pink);
}
.docs-content h4 {
  font-family: var(--pixel);
  font-size: 0.5rem; margin: 24px 0 10px;
  color: var(--neon-purple);
}
.docs-content p { color: var(--text-muted); margin-bottom: 16px; }
.docs-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.9rem; }
.docs-content th {
  text-align: left; padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--neon-cyan); font-weight: 600;
  font-size: 0.85rem;
}
.docs-content td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.docs-content code {
  background: var(--bg-code); padding: 2px 6px; border-radius: 3px;
  font-family: var(--mono); font-size: 0.85em;
  color: var(--neon-cyan);
}
.docs-content blockquote {
  border-left: 3px solid var(--neon-pink);
  padding: 12px 16px; color: var(--text-muted); margin: 16px 0;
  background: rgba(255, 45, 149, 0.03);
  border-radius: 0 6px 6px 0;
}
.docs-content ol, .docs-content ul {
  color: var(--text-muted);
  padding-left: 20px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
}
