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

:root {
  --bg:           #070d1a;
  --surface:      #0e1628;
  --surface-2:    #131f35;
  --border:       #1c2a40;
  --border-2:     #243448;
  --text:         #e2e8f0;
  --text-muted:   #64748b;
  --text-dim:     #3d5068;
  --accent:       #3b82f6;
  --accent-2:     #6366f1;
  --accent-glow:  rgba(59, 130, 246, 0.15);
  --green:        #22c55e;
  --red:          #ef4444;
  --radius:       12px;
  --radius-sm:    8px;
}

html { scroll-behavior: smooth; }

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

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

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

.version-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
}
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 12px 24px;
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-2); background: var(--surface); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.4);
  padding: 7px 16px;
  font-size: 14px;
}
.btn-outline:hover { background: var(--accent-glow); }

.btn-sm { font-size: 13px; padding: 6px 14px; }
.btn-lg { font-size: 16px; padding: 14px 28px; }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(59,130,246,0.25);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

/* Terminal block */
.hero-terminal {
  max-width: 580px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.terminal-bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28c940; }

.terminal-title {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  margin-left: 8px;
}

.terminal-body {
  padding: 20px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
}

.term-dim   { color: var(--text-dim); }
.term-cmd   { color: #e2e8f0; }
.term-out   { color: #22c55e; }
.term-flag  { color: #fbbf24; }
.term-ver   { color: #4A9EFF; }

/* ── Features ───────────────────────────────────────────────────────────────── */
.features {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text);
}

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

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.feature-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Download section ───────────────────────────────────────────────────────── */
.download {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.dl-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 15px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.release-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.release-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.release-date {
  font-size: 14px;
  color: var(--text-muted);
}

.release-checksums {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: underline;
  margin-left: auto;
}
.release-checksums:hover { color: var(--text-muted); }

/* OS tabs */
.os-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.os-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
  margin-bottom: -1px;
}
.os-tab:hover { color: var(--text); }
.os-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.os-icon { font-size: 16px; }

/* Download cards */
.dl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease;
}
.dl-card:hover { border-color: rgba(59,130,246,0.4); }

.dl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dl-arch {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.dl-size {
  font-size: 12px;
  color: var(--text-dim);
}

.dl-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.dl-checksum {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 8px 10px;
}

.dl-checksum-label {
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.dl-checksum-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.btn-copy-hash {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 2px;
  display: flex;
  transition: color 0.15s;
  flex-shrink: 0;
}
.btn-copy-hash:hover { color: var(--accent); }

.dl-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  font-family: inherit;
}
.dl-download-btn:hover { background: #2563eb; transform: translateY(-1px); }

/* Checksums block */
.btn-toggle-checksums {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}
.btn-toggle-checksums:hover { color: var(--text); border-color: var(--border-2); }

.checksums-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.checksums-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.btn-copy-all {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}
.btn-copy-all:hover { color: var(--text); }

.checksums-list {
  padding: 12px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 2;
  padding: 16px;
  white-space: pre;
  overflow-x: auto;
}

/* ── Install hint ───────────────────────────────────────────────────────────── */
.install-hint {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.install-hint h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

.btn-copy {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.btn-copy:hover { color: var(--text); }

.code-block pre {
  padding: 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.code-block .c { color: var(--text-dim); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 60px 0 48px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .os-tabs { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; text-align: center; }
}
