:root {
  --bg: #060607;
  --bg-alt: #0d0d0f;
  --surface: #101012;
  --border: #232326;
  --text: #f2f2f3;
  --text-dim: #85858c;
  --accent: #3b82f6;
  --accent-dim: #112040;
  --radius: 10px;
  --max-width: 1080px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafafa;
    --bg-alt: #f1f1f2;
    --surface: #ffffff;
    --border: #e2e2e4;
    --text: #131315;
    --text-dim: #68686e;
    --accent: #2563eb;
    --accent-dim: #dce8ff;
  }
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-alt: #f1f1f2;
  --surface: #ffffff;
  --border: #e2e2e4;
  --text: #131315;
  --text-dim: #68686e;
  --accent: #2563eb;
  --accent-dim: #dce8ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover { color: var(--text); }

/* Hero */

.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 18ch;
}

.lede {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 32px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 32px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

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

.btn-primary:hover { opacity: 0.92; }

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover { border-color: var(--text-dim); }

.btn-block {
  width: 100%;
  margin-top: 4px;
}

/* Sections */

.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

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

.section h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.section-lede {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 60ch;
  margin: 0 0 44px;
}

/* Philosophy cards */

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card-num {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

/* Features */

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

.feature h4 {
  margin: 0 0 8px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

.feature-highlight {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-dim);
  background: var(--surface);
}

.badge-exclusive {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Build variant tags */

.variant-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.variant {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.variant-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.variant-disabled {
  color: var(--text-dim);
  background: transparent;
  opacity: 0.55;
  cursor: not-allowed;
}

.variant-note {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 65ch;
  margin: 0 0 36px;
}

/* Downloads */

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

.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.download-os {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.download-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.download-card p {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 14.5px;
  flex-grow: 1;
}

.download-card code {
  background: var(--bg-alt);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.download-note {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.checksums {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.checksums > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 11.5px;
  line-height: 1.6;
}

.checksums dt {
  flex: none;
  width: 48px;
  color: var(--text-dim);
  font-weight: 600;
}

.checksums dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-dim);
  word-break: break-all;
  user-select: all;
}

/* Changelog */

.changelog-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.changelog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.changelog-table th,
.changelog-table td {
  text-align: left;
  padding: 14px 16px;
  vertical-align: top;
}

.changelog-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.changelog-table tbody tr + tr td {
  border-top: 1px solid var(--border);
}

.changelog-table td:first-child {
  white-space: nowrap;
  font-weight: 600;
}

.changelog-table td:nth-child(2) {
  white-space: nowrap;
  color: var(--text-dim);
}

.changelog-table td:last-child {
  color: var(--text-dim);
}

.changelog-table code {
  background: var(--bg-alt);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.95em;
  color: var(--text);
}

/* Footer */

.footer {
  padding: 32px 0;
}

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

.footer p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 14px;
  text-decoration: none;
}

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

/* Responsive */

@media (max-width: 860px) {
  .cards,
  .features,
  .downloads {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
}
