/* Design tokens */
:root {
  --void-navy:   #070B14;
  --surface:     #0F1624;
  --surface-2:   #162030;
  --border:      #24324A;
  --aurora-blue: #6EA8FF;
  --glow-violet: #8B8DFF;
  --text:        #E8EEF8;
  --text-muted:  #7A90B0;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --glow-blue:   0 0 32px rgba(110, 168, 255, 0.18);
  --glow-blue-sm: 0 0 16px rgba(110, 168, 255, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--void-navy);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  color: var(--aurora-blue);
  background: rgba(110, 168, 255, 0.08);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}
a { color: var(--aurora-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
}
.btn-primary {
  background: var(--aurora-blue);
  color: var(--void-navy);
  font-weight: 600;
  box-shadow: var(--glow-blue-sm);
}
.btn-primary:hover {
  background: #8fc0ff;
  box-shadow: var(--glow-blue);
  text-decoration: none;
}
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--aurora-blue);
  color: var(--aurora-blue);
  text-decoration: none;
}
.btn-ghost {
  color: var(--text-muted);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--text);
  text-decoration: none;
}
.btn-lg {
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(36, 50, 74, 0.6);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-icon {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 8px;
}

/* Nav toggle (mobile hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  z-index: 120;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}
.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: brightness(0.35) saturate(0.8);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 20, 0.2) 0%,
    rgba(7, 11, 20, 0.55) 60%,
    rgba(7, 11, 20, 1) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.hero-logo {
  height: 500px;
  width: auto;
  filter: drop-shadow(0 0 32px rgba(110, 168, 255, 0.45));
}
.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Features */
.features {
  padding: 96px 0;
  background: var(--void-navy);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 56px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: rgba(110, 168, 255, 0.35);
  box-shadow: var(--glow-blue-sm);
}
.feature-icon {
  font-size: 1.4rem;
  color: var(--aurora-blue);
  margin-bottom: 14px;
  opacity: 0.8;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Screenshots */
.screenshots {
  padding: 96px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.screenshot-featured {
  display: block;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: zoom-in;
}
.screenshot-featured:hover {
  border-color: rgba(110, 168, 255, 0.35);
  box-shadow: var(--glow-blue);
  text-decoration: none;
}
.screenshot-featured img {
  width: 100%;
  height: auto;
  display: block;
}
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.screenshot-item {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: zoom-in;
}
.screenshot-item:hover {
  border-color: rgba(110, 168, 255, 0.35);
  box-shadow: var(--glow-blue-sm);
  text-decoration: none;
}
.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}
.screenshot-caption {
  display: block;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

/* Stack table */
.stack {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stack .section-title {
  margin-bottom: 40px;
}
.stack-table-wrap {
  overflow-x: auto;
}
.stack-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.stack-table thead tr {
  border-bottom: 1px solid var(--border);
}
.stack-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stack-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(36, 50, 74, 0.5);
  color: var(--text);
}
.stack-table td:first-child {
  color: var(--text-muted);
  width: 220px;
}
.stack-table tbody tr:last-child td {
  border-bottom: none;
}
.stack-table tbody tr:hover td {
  background: rgba(110, 168, 255, 0.04);
}

/* Download */
.download {
  padding: 96px 0;
  background: var(--void-navy);
}
.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 0 64px rgba(110, 168, 255, 0.06);
}
.download-card h2 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.download-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}
.checksum-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px auto 0;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-width: 100%;
  overflow: hidden;
}
.checksum-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.checksum-value {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--aurora-blue);
  background: none;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
}
.checksum-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.checksum-copy:hover { color: var(--aurora-blue); }
.checksum-copy.copied { color: #5fcf80; }
.checksum-download {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  border-left: 1px solid var(--border);
  padding-left: 8px;
}
.checksum-download:hover { color: var(--aurora-blue); text-decoration: none; }
.download-hint {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.download-hint a {
  color: var(--aurora-blue);
}
.download-unavailable {
  padding: 14px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--void-navy);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-logo {
  height: 22px;
  width: auto;
  opacity: 0.6;
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-gitlab {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-gitlab:hover {
  color: var(--aurora-blue);
  text-decoration: none;
}

/* Docs */
.docs {
  padding: 96px 0;
  background: var(--void-navy);
  border-top: 1px solid var(--border);
}
.docs-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 52px;
}
.docs-loading,
.docs-error {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 40px 0;
}
.docs-prose h1 { display: none; }
.docs-prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.docs-prose h2:first-child { margin-top: 0; }
.docs-prose h3 {
  font-size: 1.0rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
}
.docs-prose p {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}
.docs-prose ul,
.docs-prose ol {
  margin: 10px 0 14px 20px;
}
.docs-prose li {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 4px;
}
.docs-prose a { color: var(--aurora-blue); }
.docs-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0 0;
}
.docs-prose blockquote {
  border-left: 3px solid var(--aurora-blue);
  padding: 8px 16px;
  margin: 16px 0;
  background: rgba(110, 168, 255, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.docs-prose blockquote p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.docs-prose pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 14px 0;
}
.docs-prose pre code {
  background: none;
  padding: 0;
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.65;
}
.docs-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 16px 0 20px;
}
.docs-prose th {
  text-align: left;
  padding: 9px 14px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.docs-prose td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(36, 50, 74, 0.5);
  color: var(--text);
  font-size: 0.9rem;
}
.docs-prose td:first-child { color: var(--text-muted); }
.docs-prose tbody tr:last-child td { border-bottom: none; }
.docs-prose tbody tr:hover td { background: rgba(110, 168, 255, 0.04); }

/* FAQ */
.faq {
  padding: 96px 0;
  background: var(--void-navy);
  border-top: 1px solid var(--border);
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.faq-item:hover {
  border-color: rgba(110, 168, 255, 0.35);
}
.faq-item[open] {
  box-shadow: var(--glow-blue-sm);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 24px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--aurora-blue);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-answer {
  padding: 0 24px 20px;
}
.faq-answer p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-answer p + ul {
  margin-top: 10px;
}
.faq-answer ul {
  margin: 0 0 0 20px;
}
.faq-answer li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 4px;
}
.faq-answer a { color: var(--aurora-blue); }

/* Responsive */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: min(78vw, 300px);
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 88px 28px 28px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.4);
    transition: right 0.3s ease;
    z-index: 110;
  }
  .nav-links.open { right: 0; }
  .nav-links .nav-link { font-size: 1.05rem; }
  .nav-links .btn-outline { margin-top: 8px; width: 100%; justify-content: center; }
}

@media (max-width: 600px) {
  .nav { padding: 14px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .download-card { padding: 40px 24px; }
  .stack-table td:first-child { width: 140px; }
  .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-body { padding: 32px 20px; }
  .hero-logo { height: auto; width: 72vw; max-width: 320px; }
}
