:root {
  --bg: #121212;
  --bg-elevated: #1a1a1a;
  --fg: #f2f2f2;
  --muted: #9a9a9a;
  --border: #2e2e2e;
  --surface: #1e1e1e;
  --accent: #4a90d9;
  --radius: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --shell: min(1080px, calc(100% - 2.5rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-optical-sizing: auto;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s ease;
}

.site-header:has(+ main) {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a:not(.btn) {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:not(.btn):hover {
  color: var(--fg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.65rem 1.25rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn-sm:hover {
  background: color-mix(in srgb, var(--fg) 90%, white);
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--fg) 90%, white);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: color-mix(in srgb, var(--border) 50%, white);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: color-mix(in srgb, var(--border) 30%, white);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: color-mix(in srgb, var(--border) 60%, white);
}

.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 5rem 0 4.5rem;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(74, 144, 217, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 50% at 85% 15%, rgba(61, 155, 143, 0.16), transparent 50%),
    radial-gradient(ellipse 60% 45% at 70% 85%, rgba(217, 119, 87, 0.12), transparent 55%),
    linear-gradient(180deg, #161616 0%, var(--bg) 70%);
  animation: atmosphere-drift 14s ease-in-out infinite alternate;
}

@keyframes atmosphere-drift {
  from {
    filter: hue-rotate(0deg) saturate(1);
    transform: scale(1);
  }
  to {
    filter: hue-rotate(8deg) saturate(1.05);
    transform: scale(1.03);
  }
}

.hero-inner {
  max-width: 40rem;
  animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-logo {
  width: clamp(5.5rem, 14vw, 7rem);
  height: auto;
  margin: 0 0 1.25rem;
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-brand {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-size: clamp(3.75rem, 12vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.version-label {
  margin: 0;
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}

/* Features */
.features {
  padding: 5rem 0 4rem;
  border-top: 1px solid var(--border);
}

.features h2,
.download h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 2.5rem;
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.05rem;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0.25rem;
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.feature:nth-child(1) {
  animation-delay: 0.05s;
}
.feature:nth-child(2) {
  animation-delay: 0.1s;
}
.feature:nth-child(3) {
  animation-delay: 0.15s;
}
.feature:nth-child(4) {
  animation-delay: 0.2s;
}
.feature:nth-child(5) {
  animation-delay: 0.25s;
}
.feature:nth-child(6) {
  animation-delay: 0.3s;
}

.feature-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--accent-color, var(--accent));
  background: color-mix(in srgb, var(--accent-color, var(--accent)) 16%, transparent);
}

.feature-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.feature[data-accent="#4A90D9"] {
  --accent-color: #4a90d9;
}
.feature[data-accent="#5BA85A"] {
  --accent-color: #5ba85a;
}
.feature[data-accent="#C9A227"] {
  --accent-color: #c9a227;
}
.feature[data-accent="#9B6B9E"] {
  --accent-color: #9b6b9e;
}
.feature[data-accent="#D97757"] {
  --accent-color: #d97757;
}
.feature[data-accent="#3D9B8F"] {
  --accent-color: #3d9b8f;
}

.feature h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Download */
.download {
  padding: 4.5rem 0 5.5rem;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 50% 60% at 50% 0%, rgba(74, 144, 217, 0.1), transparent 70%),
    var(--bg-elevated);
}

.download-inner {
  max-width: 36rem;
  text-align: center;
}

.download .section-lead {
  margin-inline: auto;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.25rem 0 0.75rem;
}

.download .version-label {
  margin-bottom: 2rem;
}

.install-steps {
  text-align: left;
  margin: 0 auto 1.5rem;
  padding-left: 1.25rem;
  color: var(--muted);
  max-width: 32rem;
}

.install-steps li + li {
  margin-top: 0.65rem;
}

.install-steps strong {
  color: var(--fg);
  font-weight: 600;
}

.note {
  margin: 0 auto;
  max-width: 32rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: left;
}

.note strong {
  color: var(--fg);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-inner a:hover {
  color: var(--fg);
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 720px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 4rem;
  }

  .nav a:not(.btn) {
    display: none;
  }

  .download-inner {
    text-align: left;
  }

  .download .section-lead {
    margin-inline: 0;
  }

  .download-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-atmosphere,
  .hero-inner,
  .feature {
    animation: none;
  }

  .btn:hover {
    transform: none;
  }
}
