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

:root {
  --bg:         #0D0E14;
  --surface:    #161821;
  --surface-2:  #1E2030;
  --border:     #2A2D3E;
  --accent:     #4C8EF7;
  --accent-dim: rgba(76, 142, 247, 0.12);
  --accent-hover: #6AA3FF;
  --green:      #34D399;
  --yellow:     #FBBF24;
  --text:       #E8E8F0;
  --text-muted: #6B7280;
  --text-dim:   #4B5563;
  --radius:     8px;
  --radius-lg:  12px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent);
}

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

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon { width: 28px; height: 28px; }

.nav-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-github {
  color: var(--text-muted);
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.nav-github:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  padding: 96px 24px 80px;
  text-align: center;
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(76, 142, 247, 0.25);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

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

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

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s, opacity 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

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

.btn-ghost {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: #3D4258; }

.btn-disabled {
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: not-allowed;
  border: 1px solid var(--border);
}
.btn-disabled:active { transform: none; }

.btn-full { width: 100%; justify-content: center; flex-wrap: wrap; }

.btn-meta {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 400;
}

.lock-icon { width: 14px; height: 14px; }

/* ── Sections ─────────────────────────────────────── */
.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  text-align: center;
}

.section-sub {
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
  margin-bottom: 48px;
}

/* ── Download Grid ────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.download-card:not(.card-soon):hover {
  border-color: rgba(76, 142, 247, 0.4);
  box-shadow: 0 0 0 1px rgba(76, 142, 247, 0.1), 0 4px 24px rgba(76, 142, 247, 0.06);
}

.card-soon {
  opacity: 0.55;
}

/* highlighted card from OS detection */
.download-card.os-match {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76,142,247,0.2), 0 4px 32px rgba(76,142,247,0.08);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.platform-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.platform-name {
  font-weight: 600;
  font-size: 15px;
}

.platform-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 100px;
}

.platform-badge.active {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.platform-badge.soon {
  background: rgba(251, 191, 36, 0.1);
  color: var(--yellow);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.card-version {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
  text-align: center;
}

/* macOS Gatekeeper help — trigger button + modal popup */
.macos-help-btn {
  margin-top: 12px;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  padding: 10px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}
.macos-help-btn:hover { color: var(--accent-hover); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modal h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--text);
}
.modal p { margin: 10px 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.modal ol { margin: 10px 0 10px 20px; padding: 0; }
.modal li { margin: 7px 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.modal strong { color: var(--text); font-weight: 600; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.modal-close:hover { color: var(--text); }

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

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.15s;
}
.feature-card:hover { border-color: #3D4258; }

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Steps ────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 860px;
  margin: 0 auto;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 24px;
}

.step-divider {
  width: 1px;
  height: 80px;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 16px;
}

.step-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(76,142,247,0.2);
  padding: 3px 10px;
  border-radius: 100px;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-version {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 100px;
}

.footer-right {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-link:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 64px 20px 56px; }
  .section { padding: 56px 20px; }

  .steps {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .step { padding: 0; }
  .step-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

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

@media (max-width: 480px) {
  .download-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
