:root {
  --ink: #10140f;
  --muted: #5f665c;
  --paper: #f4f1e6;
  --paper-strong: #fffdf3;
  --acid: #b7ff2a;
  --cyan: #20d6c5;
  --line: rgba(16, 20, 15, 0.15);
  --dark: #111812;
  --mono: "JetBrains Mono", monospace;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  overflow-x: hidden;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 4px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
}

.cursor-beacon {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 19;
  width: 190px;
  height: 190px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183, 255, 42, 0.2), rgba(32, 214, 197, 0.08) 42%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 180ms ease;
}

body.has-pointer .cursor-beacon {
  opacity: 1;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(18px, 4vw, 56px);
  color: var(--paper-strong);
  mix-blend-mode: difference;
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
}

nav a {
  opacity: 0.78;
  transition: opacity 180ms ease, transform 180ms ease;
}

nav a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  align-items: end;
  overflow: hidden;
  padding: 118px clamp(18px, 5vw, 72px) 46px;
  background:
    radial-gradient(circle at 76% 16%, rgba(183, 255, 42, 0.45), transparent 24rem),
    linear-gradient(145deg, #10140f 0%, #1d271b 48%, #eef0d6 100%);
  color: var(--paper-strong);
}

#infra-canvas,
.hero-overlay,
.scan-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(16, 20, 15, 0.9), rgba(16, 20, 15, 0.38) 52%, rgba(16, 20, 15, 0.08)),
    linear-gradient(0deg, rgba(16, 20, 15, 0.35), transparent 42%);
}

.scan-layer {
  z-index: 1;
  background:
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 253, 243, 0.035) 19px),
    linear-gradient(110deg, transparent 0%, rgba(183, 255, 42, 0.16) 48%, transparent 56%);
  background-size: 100% 100%, 260% 100%;
  mix-blend-mode: soft-light;
  opacity: 0.72;
  animation: scan 6.5s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 920px;
  transform: translateY(24px);
  animation: rise 800ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(20px);
  animation: cascade 760ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-copy .eyebrow { animation-delay: 120ms; }
.hero-copy h1 { animation-delay: 220ms; }
.hero-copy .hero-line { animation-delay: 360ms; }
.hero-copy .hero-actions { animation-delay: 480ms; }

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(76px, 14vw, 190px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-line {
  max-width: 660px;
  margin-top: 28px;
  color: rgba(255, 253, 243, 0.84);
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.08;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 900;
  position: relative;
  overflow: hidden;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button::after {
  position: absolute;
  inset: -80% auto auto -35%;
  width: 38%;
  height: 260%;
  content: "";
  background: rgba(255, 255, 255, 0.34);
  transform: rotate(18deg) translateX(-160%);
  transition: transform 520ms ease;
}

.button:hover::after {
  transform: rotate(18deg) translateX(430%);
}

.button.primary {
  border-color: var(--acid);
  background: var(--acid);
  color: var(--dark);
}

.button.ghost {
  background: transparent;
  color: inherit;
}

.hero-console {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 52px;
  z-index: 3;
  width: min(430px, 38vw);
  border: 1px solid rgba(255, 253, 243, 0.22);
  background: rgba(17, 24, 18, 0.68);
  color: var(--paper-strong);
  backdrop-filter: blur(18px);
  transform: translateY(18px);
  animation: rise 900ms 180ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
}

.console-top {
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 253, 243, 0.16);
  padding: 12px 14px;
}

.console-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acid);
  animation: blink 1.4s ease-in-out infinite;
}

.console-top span:nth-child(2) {
  animation-delay: 160ms;
}

.console-top span:nth-child(3) {
  animation-delay: 320ms;
}

.console-top strong {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
}

pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  font: 700 13px/1.9 var(--mono);
}

.proof,
.projects,
.contact {
  padding: clamp(72px, 12vw, 150px) clamp(18px, 5vw, 72px);
}

.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(24px, 6vw, 84px);
  align-items: end;
}

h2 {
  max-width: 980px;
  font-size: clamp(42px, 7vw, 112px);
  font-weight: 900;
  line-height: 0.92;
}

.proof-grid p,
.project-row p,
.runbook p,
.contact .eyebrow {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.35;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(42px, 7vw, 90px);
  background: var(--line);
}

.metrics div {
  position: relative;
  min-height: 210px;
  padding: 28px;
  background: var(--paper);
  overflow: hidden;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.metrics div::before {
  position: absolute;
  inset: auto 20px 20px auto;
  width: 46px;
  height: 46px;
  content: "";
  border: 1px solid rgba(16, 20, 15, 0.2);
  border-radius: 50%;
  transform: scale(0.72);
  opacity: 0;
  transition: transform 260ms ease, opacity 260ms ease;
}

.metrics div:hover {
  background: var(--dark);
  color: var(--paper-strong);
  transform: translateY(-8px);
}

.metrics div:hover::before {
  opacity: 1;
  transform: scale(1);
}

.metrics strong {
  display: block;
  margin-bottom: 46px;
  font-size: clamp(28px, 4vw, 58px);
  font-weight: 900;
}

.metrics em {
  position: absolute;
  right: 28px;
  top: 28px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.metrics span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  transition: color 220ms ease;
}

.metrics div:hover span,
.metrics div:hover em {
  color: rgba(255, 253, 243, 0.72);
}

.systems {
  display: grid;
  min-height: 760px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(30px, 6vw, 86px);
  padding: clamp(62px, 10vw, 132px) clamp(18px, 5vw, 72px);
  background: #111812;
  color: var(--paper-strong);
}

.systems-visual {
  position: sticky;
  top: 96px;
  display: grid;
  min-height: min(640px, 70svh);
  place-items: center;
}

.orbit,
.system-core,
.node {
  position: absolute;
}

.orbit {
  border: 1px solid rgba(255, 253, 243, 0.18);
  border-radius: 50%;
  animation: spin 16s linear infinite;
}

.orbit::before {
  position: absolute;
  top: 12%;
  left: 50%;
  width: 12px;
  height: 12px;
  content: "";
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 30px rgba(183, 255, 42, 0.7);
}

.orbit-one {
  width: min(74vw, 520px);
  height: min(74vw, 520px);
}

.orbit-two {
  width: min(54vw, 380px);
  height: min(54vw, 380px);
  animation-duration: 11s;
  animation-direction: reverse;
}

.system-core {
  display: grid;
  width: 145px;
  height: 145px;
  place-items: center;
  border-radius: 50%;
  background: var(--acid);
  color: var(--dark);
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 0 0 0 rgba(183, 255, 42, 0.38);
  animation: corePulse 2.4s ease-in-out infinite;
}

.node {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(255, 253, 243, 0.2);
  border-radius: 50%;
  background: rgba(255, 253, 243, 0.06);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(8px);
  animation: floatNode 4.8s ease-in-out infinite;
}

.node-a { transform: translate(-210px, -170px); }
.node-b { transform: translate(220px, -120px); animation-delay: 900ms; }
.node-c { transform: translate(-160px, 205px); animation-delay: 1400ms; }
.node-d { transform: translate(190px, 170px); animation-delay: 2100ms; }

.systems-copy h2 {
  max-width: 680px;
}

.runbook {
  display: grid;
  gap: 0;
  margin: 52px 0 0;
  padding: 0;
  list-style: none;
}

.runbook li,
.project-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  border-top: 1px solid rgba(255, 253, 243, 0.15);
  padding: 26px 0;
}

.runbook span {
  color: var(--acid);
  font-family: var(--mono);
  font-weight: 900;
}

.projects {
  background: var(--paper-strong);
}

.projects .section-kicker {
  margin-bottom: 22px;
}

.project-row {
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  border-color: var(--line);
  transition: padding-left 220ms ease, background 220ms ease;
}

.project-row:hover {
  padding-left: 18px;
  background: rgba(183, 255, 42, 0.18);
}

.project-row h3 {
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 900;
  line-height: 1;
}

.contact {
  min-height: 78svh;
  background: var(--acid);
  color: var(--dark);
}

.contact h2 {
  max-width: 1100px;
}

.contact .button.primary {
  border-color: var(--dark);
  background: var(--dark);
  color: var(--paper-strong);
}

.section-observe {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.section-observe :is(h2, h3, p, .section-kicker, .metrics, .runbook, .project-row) {
  transition: opacity 620ms ease, transform 620ms ease;
}

.section-observe:not(.is-visible) :is(h2, h3, p, .section-kicker, .metrics, .runbook, .project-row) {
  opacity: 0;
  transform: translateY(24px);
}

.section-observe.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero.section-observe {
  opacity: 1;
  transform: none;
}

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

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

@keyframes scan {
  0%, 100% {
    background-position: 0 0, 130% 0;
  }
  50% {
    background-position: 0 0, -30% 0;
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes corePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(183, 255, 42, 0.28);
  }
  50% {
    box-shadow: 0 0 0 28px rgba(183, 255, 42, 0);
  }
}

@keyframes floatNode {
  0%, 100% {
    margin-top: 0;
  }
  50% {
    margin-top: -16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 900px) {
  .site-header {
    padding: 16px 18px;
  }

  nav {
    gap: 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    min-height: 100svh;
    align-items: start;
    padding-top: 118px;
  }

  .hero-console {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 38px;
  }

  .proof-grid,
  .systems,
  .metrics,
  .project-row,
  .runbook li {
    grid-template-columns: 1fr;
  }

  .metrics div {
    min-height: 175px;
  }

  .systems {
    min-height: auto;
  }

  .systems-visual {
    position: relative;
    top: auto;
    min-height: 430px;
    order: 2;
  }

  .node-a { transform: translate(-130px, -130px); }
  .node-b { transform: translate(135px, -90px); }
  .node-c { transform: translate(-110px, 135px); }
  .node-d { transform: translate(118px, 126px); }
}

@media (max-width: 560px) {
  .site-header {
    overflow: hidden;
  }

  .hero-copy,
  .hero-console {
    max-width: min(342px, calc(100vw - 48px));
  }

  .hero-line {
    max-width: 310px;
  }

  .hero-actions .button,
  .contact-actions .button {
    flex: 0 0 min(342px, calc(100vw - 48px));
    max-width: min(342px, calc(100vw - 48px));
  }

  h1 {
    max-width: 6.5ch;
    font-size: clamp(54px, 16.5vw, 66px);
  }

  h2 {
    font-size: clamp(38px, 15vw, 64px);
  }

  nav {
    display: none;
  }

  .hero-line {
    font-size: 19px;
  }

  .button {
    width: 100%;
  }

  .hero-actions,
  .contact-actions {
    width: 100%;
  }

  pre {
    font-size: 11px;
  }
}
