:root {
  --bg-top: #0a0a18;
  --bg-bottom: #1a0a2e;
  --bg-black: #000;
  --text: #e8e8f0;
  --muted: #9b9bb0;
  --helper: #6b6b80;
  --border: #2a2a40;
  --accent: #00ffff;
  --accent-2: #ff00d4;
  --surface: rgba(255, 255, 255, 0.02);
  --code-bg: #0e0e1a;
  --code-text: #c8c8e0;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --space-128: 128px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --container: 1200px;
  --body-size: 16px;
  --body-line: 1.55;
  --display-track: -0.02em;
  --code-track: -0.01em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Inter Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--body-size);
  line-height: var(--body-line);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

p,
ul {
  margin: 0;
}

code,
pre {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: var(--code-track);
}

.container {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 0 var(--space-24);
}

.narrow {
  max-width: 880px;
}

.section {
  padding: clamp(var(--space-96), 10vw, var(--space-128)) 0;
  border-top: 1px solid var(--border);
}

.section-copy {
  max-width: 64ch;
}

.section-copy h2,
.card h3,
.configure h3 {
  margin: 0 0 var(--space-24);
  font-weight: 700;
  letter-spacing: var(--display-track);
}

.section-copy h2 {
  font-size: 36px;
}

.card h3,
.configure h3 {
  font-size: 22px;
}

.section-copy p + p,
.card p + pre {
  margin-top: var(--space-24);
}

.section-copy p,
.card p,
.small,
.feature-list {
  color: var(--muted);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: clip;
  background: var(--bg-black);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(180deg, rgba(10, 10, 24, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}

.hero-media,
.hero-image,
.hero-canvas {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.hero-canvas {
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-grid,
.stat-strip,
.footer,
main {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: calc(100svh - 72px);
  padding-top: var(--space-128);
  padding-bottom: var(--space-96);
}

.hero-copy {
  grid-column: 1;
  justify-self: center;
  max-width: 760px;
  text-align: center;
}

.eyebrow {
  margin-bottom: var(--space-16);
  color: var(--accent);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(64px, 8vw, 80px);
  line-height: 0.96;
  letter-spacing: var(--display-track);
}

.hero-sub {
  margin-top: var(--space-24);
  margin-left: auto;
  margin-right: auto;
  max-width: 38rem;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-24);
  margin-top: var(--space-32);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: box-shadow 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary {
  color: var(--accent);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 0 24px rgba(0, 255, 255, 0.35);
}

.text-link {
  color: var(--text);
}

.text-link:hover,
.text-link:focus-visible,
.footer a:hover,
.footer a:focus-visible,
.configure a:hover,
.configure a:focus-visible {
  color: var(--accent);
}

.button:focus-visible,
.text-link:focus-visible,
.footer a:focus-visible,
.configure a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.stat-strip {
  border-top: 1px solid var(--border);
}

.stat-strip p {
  padding: var(--space-16) 0;
  color: var(--helper);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: var(--space-48);
  align-items: center;
}

.two-column-tight {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: var(--space-64);
  align-items: center;
}

.planet-figure {
  margin: 0;
  position: relative;
  isolation: isolate;
}

/* The source image is a PNG with an alpha channel (planet only, transparent
   background). drop-shadow on a transparent PNG follows the actual silhouette,
   so the cyan/magenta halo wraps the planet's true outline — no rectangular
   edges, no compositing tricks needed.
*/
.planet-figure img {
  width: 110%;
  max-width: none;
  margin-inline: -5%;
  display: block;
  filter:
    drop-shadow(0 0 28px rgba(0, 255, 255, 0.32))
    drop-shadow(0 0 80px rgba(0, 255, 255, 0.14))
    drop-shadow(0 0 160px rgba(255, 0, 212, 0.08));
}

/* Two faint orbital arcs behind the planet — adds astronomical depth */
.planet-figure::before {
  content: "";
  position: absolute;
  inset: 10% -2% 0% 2%;
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 50%;
  transform: rotate(-12deg);
  z-index: -1;
  pointer-events: none;
}

.planet-figure::after {
  content: "";
  position: absolute;
  inset: -2% 16% 10% -12%;
  border-top: 1px solid rgba(255, 0, 212, 0.08);
  border-radius: 50%;
  transform: rotate(18deg);
  z-index: -1;
  pointer-events: none;
}

.diffusion-figure {
  margin: 0;
  padding: var(--space-16);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.01);
}

.diffusion-figure img {
  border-radius: calc(var(--radius-lg) - 4px);
}

.watch,
.footer {
  background: var(--bg-black);
}

.terminal,
.install-block,
.configure pre,
.card pre {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--code-bg);
  color: var(--code-text);
}

.terminal {
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: var(--space-8);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.terminal pre,
.install-block,
.configure pre,
.card pre {
  padding: 20px 24px;
  line-height: 1.6;
  overflow-x: auto;
}

.caption {
  margin-top: var(--space-16);
  color: var(--helper);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-24);
}

.card {
  display: flex;
  flex-direction: column;
  padding: var(--space-24);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 160ms ease;
}

.card:hover {
  border-color: var(--accent);
}

.feature-list {
  padding-left: 1.25rem;
  max-width: 64ch;
}

.feature-list li + li {
  margin-top: var(--space-16);
}

.configure {
  margin-top: var(--space-32);
}

.small {
  margin-top: var(--space-16);
  font-size: 13px;
}

.footer {
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-24);
  align-items: center;
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
  color: var(--helper);
  font-size: 13px;
}

.footer-grid > :nth-child(2) {
  justify-self: center;
}

.footer-grid > :last-child {
  justify-self: end;
}

.footer-mark {
  color: var(--text);
  font-weight: 500;
}

.string {
  color: var(--accent);
}

.keyword {
  color: var(--accent-2);
}

.comment {
  color: var(--helper);
}

strong {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 960px) {
  .hero-grid,
  .two-column,
  .two-column-tight,
  .card-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    padding-top: var(--space-128);
  }

  .planet-figure {
    max-width: 280px;
    justify-self: center;
  }

  .footer-grid > * {
    justify-self: start !important;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-copy h2 {
    font-size: 32px;
  }

  h1 {
    font-size: clamp(52px, 16vw, 64px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .hero-canvas {
    display: none;
  }
}
