:root {
  --bg: #070b0a;
  --bg-elevated: #0f1614;
  --ink: #e7ece9;
  --muted: #9aaba4;
  --line: rgba(94, 234, 212, 0.18);
  --signal: #5eead4;
  --signal-dim: #2a9f8c;
  --bone: #d7d2c6;
  --danger-soft: #f0a070;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --max: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 70% 20%, rgba(42, 159, 140, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(15, 40, 34, 0.9), transparent 50%),
    var(--bg);
}

.atmosphere .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 30%, black 20%, transparent 70%);
  animation: drift 28s linear infinite;
}

.atmosphere .glow {
  position: absolute;
  width: 40vw;
  height: 40vw;
  right: -5%;
  top: 5%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.12), transparent 65%);
  filter: blur(8px);
  animation: pulse 9s ease-in-out infinite;
}

.atmosphere .rack {
  position: absolute;
  right: -2%;
  top: 8%;
  width: min(58vw, 720px);
  height: auto;
  opacity: 0.72;
}

.blade {
  fill: #121c19;
  stroke: #24352f;
  stroke-width: 1;
  animation: bladePulse 4.5s ease-in-out infinite;
}

.blade:nth-child(2) { animation-delay: 0.2s; }
.blade:nth-child(3) { animation-delay: 0.4s; }
.blade:nth-child(4) { animation-delay: 0.6s; }
.blade:nth-child(5) { animation-delay: 0.8s; }
.blade:nth-child(6) { animation-delay: 1s; }
.blade:nth-child(7) { animation-delay: 1.2s; }

.leds circle {
  fill: var(--signal);
  opacity: 0.35;
  animation: led 2.4s ease-in-out infinite;
}

.leds circle:nth-child(odd) { animation-delay: 0.4s; }

.wire {
  stroke-dasharray: 8 10;
  animation: flow 6s linear infinite;
}

.node {
  fill: var(--bg);
  stroke: var(--signal);
  stroke-width: 2;
  animation: nodePulse 3.2s ease-in-out infinite;
}

.top,
main,
footer {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: var(--bone);
}

nav {
  display: flex;
  gap: 1.4rem;
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--signal);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 7rem) 1.5rem 4rem;
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-mark {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--signal);
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.9s ease forwards 0.1s;
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--bone);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1s ease forwards 0.25s;
}

.lede {
  margin: 1.5rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1s ease forwards 0.4s;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1s ease forwards 0.55s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  background: var(--signal);
  color: #06201b;
}

.btn.primary:hover {
  background: #7ff3df;
}

.btn.ghost {
  border-color: var(--line);
  color: var(--bone);
  background: rgba(15, 22, 20, 0.45);
}

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

.panel,
.stack {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

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

.panel h2,
.stack h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--bone);
  max-width: 18ch;
}

.panel p,
.section-lede {
  margin: 0 0 1rem;
  max-width: 42rem;
  color: var(--muted);
}

.panel p strong {
  color: var(--bone);
  font-weight: 600;
}

.stack code,
.path code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: var(--signal);
}

.stack ul {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.stack li,
.path-steps li {
  padding: 1.25rem 1.2rem;
  background: rgba(15, 22, 20, 0.72);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.25s ease, transform 0.25s ease, opacity 0.55s ease;
}

.stack li:hover,
.path-steps li:hover {
  border-color: rgba(94, 234, 212, 0.45);
  transform: translateY(-2px);
}

.stack strong,
.path-steps strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--signal);
}

.stack span,
.path-steps span {
  color: var(--muted);
  font-size: 0.95rem;
}

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

.path-steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  counter-reset: path;
}

.path-steps li {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  max-width: 44rem;
}

.path-steps li::before {
  counter-increment: path;
  content: counter(path);
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--signal);
  font-size: 0.8rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  margin-top: 0.15rem;
}

.path-steps li > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

@keyframes bladePulse {
  0%, 100% { fill: #121c19; }
  50% { fill: #16221e; }
}

@keyframes led {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.95; }
}

@keyframes flow {
  to { stroke-dashoffset: -72; }
}

@keyframes nodePulse {
  0%, 100% { stroke-opacity: 0.5; }
  50% { stroke-opacity: 1; }
}

@media (max-width: 820px) {
  .atmosphere .rack {
    opacity: 0.28;
    right: -18%;
    top: 18%;
    width: 90vw;
  }

  .hero {
    min-height: auto;
    padding-top: 3.5rem;
    padding-bottom: 3rem;
  }

  nav {
    gap: 1rem;
  }
}
