:root {
  color-scheme: dark;
  --bg-1: #04040d;
  --bg-2: #0b1230;
  --fg: #f6f7fb;
  --muted: rgba(246, 247, 251, 0.72);
  --glass: rgba(10, 15, 30, 0.46);
  --glass-border: rgba(255, 255, 255, 0.14);
  --accent: #77f7ff;
  --accent-2: #b47cff;
  --accent-3: #8cffb7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(85, 133, 255, 0.22), transparent 36%),
    radial-gradient(circle at 20% 20%, rgba(180, 124, 255, 0.16), transparent 28%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  color: var(--fg);
  font-family: Inter, system-ui, sans-serif;
  overflow: hidden;
}

body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background: conic-gradient(from 180deg at 50% 50%, rgba(119, 247, 255, 0.08), rgba(180, 124, 255, 0.08), rgba(140, 255, 183, 0.06), rgba(119, 247, 255, 0.08));
  animation: slowSpin 30s linear infinite;
  opacity: 0.65;
  pointer-events: none;
}

#starfield,
#constellation,
.aurora,
.grid,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#starfield { opacity: 0.9; }
#constellation { opacity: 0.9; }

.aurora {
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: screen;
}

.aurora-a {
  background: radial-gradient(circle, rgba(119, 247, 255, 0.55), transparent 60%);
  width: 38rem;
  height: 38rem;
  top: -8rem;
  left: -8rem;
  animation: driftA 16s ease-in-out infinite alternate;
}

.aurora-b {
  background: radial-gradient(circle, rgba(180, 124, 255, 0.45), transparent 60%);
  width: 42rem;
  height: 42rem;
  bottom: -12rem;
  right: -8rem;
  animation: driftB 19s ease-in-out infinite alternate;
}

.grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.9) 30%, rgba(0,0,0,0.2) 100%);
  opacity: 0.18;
  transform: perspective(1200px) rotateX(74deg) translateY(40%);
  transform-origin: center;
  animation: gridDrift 18s ease-in-out infinite alternate;
}

.scanline {
  background: linear-gradient(to bottom, transparent 0%, rgba(119, 247, 255, 0.08) 48%, rgba(255,255,255,0.15) 50%, transparent 54%);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: scanSweep 7.5s linear infinite;
}

.signal-burst {
  position: fixed;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(119,247,255,0.9) 18%, rgba(119,247,255,0.32) 34%, rgba(180,124,255,0.18) 55%, transparent 72%);
  box-shadow: 0 0 40px rgba(119,247,255,0.4), 0 0 90px rgba(180,124,255,0.18);
  transform: scale(0.2);
}

.signal-burst.is-active {
  animation: burstPulse 900ms cubic-bezier(.16,.84,.27,1) forwards;
}

.shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(24px);
}

.hero {
  width: min(980px, 100%);
  border-radius: 30px;
  padding: 1.5rem;
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.18), transparent 28%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.hero:hover::after {
  opacity: 1;
}

.hero-topline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  margin-bottom: 2rem;
}

.pill {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.pulse-pill {
  animation: pillPulse 2.8s ease-in-out infinite;
}

.status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 16px var(--accent-3);
  animation: beacon 1.8s ease-in-out infinite;
}

.status-text,
.eyebrow,
.metric-label,
.message-title {
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.84rem;
  margin: 0 0 0.75rem;
}

h1 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  margin: 0;
  max-width: 11ch;
}

.lede {
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted);
  margin: 1.25rem 0 0;
  line-height: 1.7;
}

.message-card {
  margin-top: 2rem;
  padding: 1.25rem 1.35rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  max-width: 34rem;
  position: relative;
  overflow: hidden;
}

.message-card::before {
  content: "";
  position: absolute;
  inset: -120% auto auto -30%;
  width: 35%;
  height: 300%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: rotate(24deg);
  animation: shimmer 7s ease-in-out infinite;
}

.message-title {
  font-size: 0.76rem;
  color: var(--accent-2);
  margin-bottom: 0.8rem;
}

.message-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.metrics article {
  border-radius: 22px;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.metric-label {
  display: block;
  color: rgba(246,247,251,0.52);
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.metrics strong {
  font-size: 1rem;
}

.hero.bursting {
  animation: heroFlash 700ms ease-out;
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  animation: revealUp 900ms cubic-bezier(.2,.8,.2,1) forwards;
}

.reveal-1 { animation-delay: 120ms; }
.reveal-2 { animation-delay: 260ms; }
.reveal-3 { animation-delay: 420ms; }
.reveal-4 { animation-delay: 580ms; }
.reveal-5 { animation-delay: 760ms; }
.reveal-6 { animation-delay: 940ms; }

@keyframes driftA {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(6rem, 4rem, 0) scale(1.1); }
}

@keyframes driftB {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(-5rem, -4rem, 0) scale(1.08); }
}

@keyframes beacon {
  0%, 100% { transform: scale(1); box-shadow: 0 0 12px var(--accent-3); }
  50% { transform: scale(1.35); box-shadow: 0 0 24px var(--accent-3); }
}

@keyframes pillPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(119, 247, 255, 0.0); }
  50% { box-shadow: 0 0 22px rgba(119, 247, 255, 0.16); }
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
  0% { transform: translateX(-60%) rotate(24deg); opacity: 0; }
  12% { opacity: 1; }
  30%, 100% { transform: translateX(380%) rotate(24deg); opacity: 0; }
}

@keyframes scanSweep {
  from { transform: translateY(-120%); }
  to { transform: translateY(140%); }
}

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

@keyframes gridDrift {
  from { transform: perspective(1200px) rotateX(74deg) translateY(40%) translateX(-1%); }
  to { transform: perspective(1200px) rotateX(74deg) translateY(39%) translateX(1%); }
}

@keyframes burstPulse {
  0% { opacity: 0; transform: scale(0.2); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: scale(18); }
}

@keyframes heroFlash {
  0% { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.08); }
  35% { box-shadow: 0 24px 110px rgba(119,247,255,0.18), 0 0 90px rgba(180,124,255,0.16), inset 0 1px 0 rgba(255,255,255,0.18); }
  100% { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.08); }
}

@media (max-width: 720px) {
  body { overflow: auto; }
  .shell { padding: 1rem; }
  .hero { padding: 1.15rem; }
  .metrics { grid-template-columns: 1fr; }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
