:root {
  --chassis: #080b08;
  --glass: #0e1410;
  --phosphor: #6fdc5c;
  --phosphor-dim: #2f6b2a;
  --phosphor-bright: #a8ff8a;
  --steel: #8b978c;
  --filament: #c9a46a;
  --ink: #d7e6d4;
  --heading: #d7e6d4;
  --link: #6fdc5c;
  --bg: #080b08;
  --panel: #101610;
  --line: color-mix(in oklab, var(--phosphor) 18%, transparent);
  --muted: #8b978c;
  --code-bg: #080b08;
  --font-sans: "Instrument Sans", system-ui, sans-serif;
  --font-display: Syne, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(8, 11, 8, 0.78), rgba(8, 11, 8, 0.88)),
    url("milky-way.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
}

::selection {
  background: color-mix(in oklab, var(--phosphor) 35%, transparent);
  color: var(--phosphor-bright);
}

a { color: var(--link); }

a:visited { color: var(--link); }

a:hover,
a:focus-visible {
  color: var(--phosphor-bright);
}

:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  letter-spacing: -0.02em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: color-mix(in oklab, var(--chassis) 88%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--phosphor) 10%, transparent);
  backdrop-filter: blur(10px);
}

.is-home .topbar {
  position: absolute;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  padding-top: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--steel);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--phosphor);
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.nav a {
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  color: var(--phosphor);
}

main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.is-home main {
  max-width: none;
  margin: 0;
  padding: 0;
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  overflow: hidden;
}

.hero-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bezel {
  --lock-x: 68%;
  --lock-y: 50%;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sky {
  position: absolute;
  inset: 0;
  background: url("milky-way.jpg") center / cover no-repeat;
}

.sky-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(8, 11, 8, 0.82) 0%, rgba(8, 11, 8, 0.38) 42%, rgba(8, 11, 8, 0.18) 100%);
}

.survey-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  animation: grid-pulse 5.5s ease-in-out infinite;
}

.scan-x,
.scan-y {
  position: absolute;
  background: var(--phosphor-bright);
  box-shadow: 0 0 14px var(--phosphor);
}

.scan-x {
  top: 6%;
  bottom: 6%;
  left: 8%;
  width: 1px;
  animation: scan-x 16s ease-in-out infinite;
}

.scan-y {
  left: 6%;
  right: 6%;
  top: 8%;
  height: 1px;
  opacity: 0;
  animation: scan-y 16s ease-in-out infinite;
}

.lock-glow {
  position: absolute;
  left: var(--lock-x);
  top: var(--lock-y);
  width: 11rem;
  height: 11rem;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(111, 220, 92, 0.32), transparent 68%);
  opacity: 0;
  animation: target-lock 16s ease-in-out infinite;
}

.reticle {
  position: absolute;
  left: var(--lock-x);
  top: var(--lock-y);
  width: 5.75rem;
  height: 5.75rem;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: target-lock 16s ease-in-out infinite;
}

.reticle-bracket {
  position: absolute;
  width: 0.85rem;
  height: 0.85rem;
  border: 1.5px solid var(--phosphor-bright);
}

.reticle-nw { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reticle-ne { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reticle-sw { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reticle-se { right: 0; bottom: 0; border-left: 0; border-top: 0; }

.reticle-ring {
  position: absolute;
  inset: 22%;
  border: 1px solid color-mix(in oklab, var(--phosphor) 80%, transparent);
  border-radius: 50%;
}

.reticle-h,
.reticle-v {
  position: absolute;
  background: color-mix(in oklab, var(--phosphor-bright) 85%, transparent);
}

.reticle-h {
  top: 50%;
  left: 8%;
  right: 8%;
  height: 1px;
}

.reticle-v {
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 1px;
}

.reticle-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--phosphor-bright);
  box-shadow: 0 0 10px var(--phosphor);
  transform: translate(-50%, -50%);
}

.reticle-label {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 50%;
  color: var(--phosphor-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}

.hero-scanlines {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 3px
  );
}

.hero-bloom {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 42% 40%, rgba(111, 220, 92, 0.12), transparent 52%);
  animation: bloom 4.2s ease-in-out infinite;
}

.hero-filament {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 70%, rgba(201, 164, 106, 0.08), transparent 45%);
}

.hero-sweep {
  position: absolute;
  left: 0;
  right: 0;
  height: 6rem;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in oklab, var(--phosphor) 18%, transparent),
    transparent
  );
  animation: sweep 8s linear infinite;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 7rem 1.25rem 4rem;
}

.hero h1 {
  max-width: 9em;
  margin: 0;
  color: var(--phosphor);
  font-size: clamp(3.2rem, 11vw, 6.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.88;
  text-shadow:
    0 0 12px color-mix(in oklab, var(--phosphor) 45%, transparent),
    0 0 32px color-mix(in oklab, var(--phosphor) 18%, transparent);
}

.hero p {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 1.75rem;
}

.kicker {
  margin: 0;
  color: var(--filament);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  background: var(--phosphor);
  color: #071008;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.btn:hover,
.btn:focus-visible,
.btn:visited {
  background: var(--phosphor-bright);
  color: #071008;
}

.btn-outline {
  border-color: color-mix(in oklab, var(--phosphor) 25%, transparent);
  background: transparent;
  color: var(--phosphor);
}

.btn-outline:hover,
.btn-outline:focus-visible,
.btn-outline:visited {
  background: color-mix(in oklab, var(--phosphor) 10%, transparent);
  color: var(--phosphor-bright);
}

.band {
  border-top: 1px solid color-mix(in oklab, var(--phosphor) 10%, transparent);
  padding: 5rem 1.25rem;
}

.band-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.band-intro {
  max-width: 40rem;
}

.band-intro h2,
.band-intro h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 600;
}

.band-intro p {
  margin: 1rem 0 0;
  color: var(--steel);
  font-size: 1.05rem;
}

.band-intro .btn {
  margin-top: 1.5rem;
}

.steps {
  margin: 3.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid color-mix(in oklab, var(--phosphor) 12%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--phosphor) 12%, transparent);
}

.step-row {
  display: grid;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid color-mix(in oklab, var(--phosphor) 12%, transparent);
}

.step-row:first-child {
  border-top: 0;
}

.step-num {
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  color: color-mix(in oklab, var(--phosphor) 60%, transparent);
  background: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.step-body h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
}

.step-body p {
  max-width: 40rem;
  margin: 0.75rem 0 0;
  color: var(--steel);
  font-size: 0.95rem;
}

.step-action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.step-action .btn {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-align: center;
}

.resources-grid {
  display: grid;
  gap: 1.5rem;
}

.resources h2 {
  margin: 0;
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 600;
}

.resources ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.resources li + li {
  margin-top: 0.7rem;
}

.resources a {
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.resources a:hover,
.resources a:focus-visible {
  color: var(--phosphor);
}

.pill {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--filament);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.card {
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--panel);
}

.card h1 {
  margin-top: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card h2 {
  font-size: 1.35rem;
}

.video {
  margin: 1.25rem 0 0;
}

.video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #000;
}

ul, ol {
  margin: 0.8rem 0 0 1.1rem;
  padding: 0;
}

code, pre {
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--code-bg);
  font-family: var(--font-mono);
}

code {
  padding: 0.15rem 0.35rem;
  font-size: 0.95em;
}

pre {
  overflow-x: auto;
  margin: 1rem 0;
  padding: 1rem;
}

pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 0.92rem;
}

.code-block {
  position: relative;
  margin: 1rem 0;
}

.code-block pre {
  margin: 0;
  padding-right: 3.4rem;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--panel);
  color: var(--phosphor);
  cursor: pointer;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  border-color: var(--phosphor);
  color: var(--phosphor-bright);
}

.copy-btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.copy-btn.is-copied {
  width: auto;
  padding: 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.pager a {
  display: inline-flex;
  padding: 0.7rem 1rem;
  border: 1px solid color-mix(in oklab, var(--phosphor) 25%, transparent);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--phosphor);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.pager a:hover,
.pager a:focus-visible {
  background: color-mix(in oklab, var(--phosphor) 10%, transparent);
  color: var(--phosphor-bright);
}

.pager .next {
  margin-left: auto;
}

.note {
  margin: 0 0 1.5rem;
  padding: 0 0 0 1.25rem;
  border: 0;
  border-left: 1px solid color-mix(in oklab, var(--phosphor) 20%, transparent);
  border-radius: 0;
  background: none;
  color: var(--steel);
  font-size: 0.95rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

footer {
  border-top: 1px solid color-mix(in oklab, var(--phosphor) 10%, transparent);
  padding: 2.5rem 1.25rem;
  color: var(--steel);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 72rem;
  margin: 0 auto;
}

.footer-name {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.footer-meta {
  margin: 0.35rem 0 0;
}

.footer-credit {
  margin: 0.45rem 0 0;
  color: var(--steel);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--phosphor);
}

@keyframes sweep {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  12% { opacity: 0.4; }
  88% { opacity: 0.22; }
  100% {
    transform: translateY(120vh);
    opacity: 0;
  }
}

@keyframes grid-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

@keyframes scan-x {
  0% { left: 8%; opacity: 0; }
  4% { opacity: 0.95; }
  30% { left: var(--lock-x); opacity: 0.95; }
  38%, 90% { left: var(--lock-x); opacity: 0.4; }
  100% { left: var(--lock-x); opacity: 0; }
}

@keyframes scan-y {
  0%, 28% { top: 8%; opacity: 0; }
  34% { top: 8%; opacity: 0.95; }
  58% { top: var(--lock-y); opacity: 0.95; }
  66%, 90% { top: var(--lock-y); opacity: 0.4; }
  100% { top: var(--lock-y); opacity: 0; }
}

@keyframes target-lock {
  0%, 54% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.65);
  }
  66%, 90% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@media (min-width: 640px) {
  .is-home .topbar {
    padding: 2rem 2rem 0;
  }

  .hero {
    align-items: center;
  }

  .hero-bezel {
    inset: 5%;
    border: 1px solid color-mix(in oklab, var(--phosphor) 15%, transparent);
    border-radius: 2.75rem;
    box-shadow:
      inset 0 0 80px rgba(0, 0, 0, 0.45),
      inset 0 0 40px rgba(111, 220, 92, 0.06);
  }

  .hero-copy {
    padding: 6rem 2rem;
  }

  .band {
    padding: 7rem 2rem;
  }

  .step-row {
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    align-items: start;
    gap: 2rem;
  }

  .resources-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

@media (max-width: 600px) {
  html { background-attachment: scroll; }
}

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

  .hero-sweep,
  .survey-grid,
  .scan-x,
  .scan-y,
  .lock-glow,
  .reticle {
    animation: none;
  }

  .scan-x {
    left: var(--lock-x);
    opacity: 0.45;
  }

  .scan-y {
    top: var(--lock-y);
    opacity: 0.45;
  }

  .lock-glow,
  .reticle {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
