*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, #1a4a5e 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(46, 159, 87, 0.08) 0%, transparent 70%),
    #0d2430;
}

.stage {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2rem;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
}

.brand {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  user-select: none;
}

.stage--404 {
  gap: 0.75rem;
}

.muted {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
}

.infinity {
  width: min(72vw, 520px);
  height: auto;
  overflow: visible;
  animation: breathe 6s ease-in-out infinite;
}

.infinity-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.infinity-aura {
  fill: none;
  stroke: #2e9f57;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.18;
  filter: url(#soft-glow);
  stroke-dasharray: 18 82;
  animation: orbit 4.8s linear infinite;
}

.infinity-tail {
  fill: none;
  stroke: url(#beam);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
  filter: url(#glow);
  stroke-dasharray: 10 90;
  animation: orbit 4.8s linear infinite;
  animation-delay: -0.35s;
}

.infinity-beam {
  fill: none;
  stroke: #d4ffe6;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#glow);
  stroke-dasharray: 5.5 94.5;
  animation: orbit 4.8s linear infinite;
}

.infinity-spark {
  fill: none;
  stroke: #ffffff;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#soft-glow);
  stroke-dasharray: 1.2 98.8;
  animation: orbit 4.8s linear infinite;
  animation-delay: -0.08s;
}

@keyframes orbit {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -100;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 18px rgba(46, 159, 87, 0.12));
  }
  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 28px rgba(46, 159, 87, 0.22));
  }
}

@media (prefers-reduced-motion: reduce) {
  .infinity,
  .infinity-aura,
  .infinity-tail,
  .infinity-beam,
  .infinity-spark {
    animation: none;
  }

  .infinity-beam {
    stroke-dasharray: none;
    opacity: 0.7;
  }

  .infinity-tail,
  .infinity-spark,
  .infinity-aura {
    display: none;
  }
}
