:root {
  color-scheme: dark;
  --bg: #020202;
  --bg-soft: #0b0b0b;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.68);
  --soft: rgba(255, 255, 255, 0.44);
  --shadow: 0 24px 80px rgba(255, 255, 255, 0.05);
  --section-pad: clamp(72px, 10vw, 128px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 84% 30%, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(180deg, #080808 0%, #020202 52%, #050505 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(circle at center, black 26%, transparent 82%);
  pointer-events: none;
  animation: driftGrid 18s linear infinite;
}

.noise,
.grid,
.cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.72) 0.5px, transparent 0.6px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.72) 0.4px, transparent 0.7px);
  background-size: 18px 18px, 24px 24px;
  mix-blend-mode: screen;
  animation: noiseShift 0.25s steps(2) infinite;
}

.grid {
  background:
    linear-gradient(90deg, transparent 0, transparent 49.6%, rgba(255, 255, 255, 0.05) 50%, transparent 50.4%, transparent 100%),
    linear-gradient(transparent 0, transparent 49.6%, rgba(255, 255, 255, 0.05) 50%, transparent 50.4%, transparent 100%);
  opacity: 0.14;
  background-size: 120px 120px;
}

.cursor-glow {
  opacity: 0.45;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.14), transparent 220px);
  transition: background 120ms linear;
}

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

.topbar,
.hero,
.section-shell,
.footer {
  padding-inline: clamp(20px, 4vw, 48px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

.brand,
.status,
.eyebrow,
.section-kicker,
.card-label,
.index,
.footer {
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.95);
  animation: pulse 1.4s infinite ease-in-out;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 40px;
  align-items: center;
  min-height: calc(100vh - 88px);
  padding-top: 4vw;
  padding-bottom: 4vw;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.73rem;
}

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

h1 {
  font-size: clamp(3.4rem, 9vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  font-weight: 800;
}

h1 span {
  display: block;
  color: rgba(255, 255, 255, 0.48);
  transform: translateX(0.18em);
  animation: textShift 4s ease-in-out infinite;
}

.lede,
.section-head p,
.story-card p,
.pipeline-step p,
.metric-card p,
.status-card p {
  line-height: 1.78;
  color: var(--muted);
}

.lede {
  max-width: 700px;
  margin-top: 28px;
  font-size: clamp(1rem, 1.65vw, 1.18rem);
}

.signal-cluster {
  position: relative;
  height: min(62vw, 720px);
  min-height: 420px;
  isolation: isolate;
  transform: translateY(calc(var(--scroll-shift, 0px) * -0.18));
}

.orb,
.rings,
.scanner,
.float-card {
  position: absolute;
}

.orb {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.06) 45%, transparent 72%);
  filter: blur(3px);
  mix-blend-mode: screen;
}

.orb-a {
  inset: 14% 14% auto auto;
  width: 280px;
  height: 280px;
  animation: floatA 7s ease-in-out infinite;
}

.orb-b {
  inset: auto auto 9% 10%;
  width: 220px;
  height: 220px;
  animation: floatB 10s ease-in-out infinite;
}

.orb-c {
  inset: 42% 24% auto auto;
  width: 120px;
  height: 120px;
  animation: floatC 6s ease-in-out infinite;
}

.rings {
  inset: 15% 10%;
  display: grid;
  place-items: center;
}

.rings span {
  grid-area: 1 / 1;
  display: block;
  width: min(48vw, 480px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.rings span:nth-child(2) {
  width: min(38vw, 380px);
  animation-direction: reverse;
  animation-duration: 12s;
}

.rings span:nth-child(3) {
  width: min(28vw, 280px);
  animation-duration: 8s;
}

.scanner {
  inset: 8% 8%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 50%);
  backdrop-filter: blur(18px);
  overflow: hidden;
  clip-path: polygon(12% 0, 100% 0, 100% 86%, 88% 100%, 0 100%, 0 14%);
}

.scanner-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateY(-100%);
  animation: scan 4.8s linear infinite;
}

.float-card {
  min-width: 190px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.card-main {
  left: 4%;
  bottom: 10%;
  animation: cardDrift 8s ease-in-out infinite;
}

.card-side {
  right: 2%;
  top: 18%;
  animation: cardDrift 6.5s ease-in-out infinite reverse;
}

.card-label {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.card-value {
  font-size: 1.2rem;
  font-weight: 700;
}

.section-shell {
  padding-top: var(--section-pad);
  padding-bottom: 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 32px;
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.section-head p {
  max-width: 620px;
}

.story-grid,
.metric-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.story-card,
.metric-card,
.status-card,
.pipeline-step {
  position: relative;
  min-height: 240px;
  padding: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(calc(var(--scroll-shift, 0px) * -0.08));
}

.story-card::after,
.metric-card::after,
.status-card::after,
.pipeline-step::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  animation: pulseBlur 5s ease-in-out infinite;
}

.index {
  display: inline-block;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.65rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.step-badge,
.metric-value {
  font-family: "Space Grotesk", sans-serif;
}

.step-badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
}

.metric-card {
  min-height: 200px;
}

.metric-value {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.04em;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 72px;
  padding-bottom: 28px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.68rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 800ms ease,
    transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--delay, 0) * 90ms);
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes driftGrid {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(35px, 35px, 0);
  }
}

@keyframes noiseShift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(2px, -2px, 0);
  }
}

@keyframes textShift {
  0%,
  100% {
    transform: translateX(0.18em);
  }
  50% {
    transform: translateX(0.08em);
  }
}

@keyframes floatA {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-22px, 32px, 0) scale(1.08);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(26px, -20px, 0) scale(0.94);
  }
}

@keyframes floatC {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-12px, -18px, 0);
  }
}

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

@keyframes scan {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

@keyframes cardDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -16px, 0);
  }
}

@keyframes pulseBlur {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

@media (max-width: 1120px) {
  .pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero,
  .section-head,
  .story-grid,
  .metric-grid,
  .status-grid,
  .pipeline-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 30px;
  }

  .signal-cluster {
    order: -1;
    height: 82vw;
    min-height: 360px;
  }

  .footer,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(2.8rem, 18vw, 4.5rem);
  }

  .signal-cluster {
    height: 96vw;
  }

  .float-card {
    min-width: 0;
    width: 170px;
    padding: 14px 16px;
  }

  .story-card,
  .metric-card,
  .status-card,
  .pipeline-step {
    min-height: 0;
  }

  .footer {
    padding-top: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .signal-cluster,
  .story-card,
  .metric-card,
  .status-card,
  .pipeline-step {
    transform: none !important;
  }
}
