/**
 * DigitSpire — Keyframes & motion utilities
 */

@keyframes caret-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

@keyframes logo-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes float-slow {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(8px, -10px) rotate(2deg);
  }
  66% {
    transform: translate(-6px, 6px) rotate(-2deg);
  }
}

@keyframes glitch-shift {
  0% {
    transform: translate(0);
    text-shadow: 2px 0 #00c6ff, -2px 0 #0072ff;
  }
  20% {
    transform: translate(-2px, 1px);
    text-shadow: -2px 0 #00c6ff, 2px 0 #0072ff;
  }
  40% {
    transform: translate(2px, -1px);
    text-shadow: 2px 0 #0072ff, -2px 0 #00c6ff;
  }
  60% {
    transform: translate(-1px, -1px);
  }
  80% {
    transform: translate(1px, 2px);
  }
  100% {
    transform: translate(0);
    text-shadow: 2px 0 #00c6ff, -2px 0 #0072ff;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.hero-gradient-bg {
  position: absolute;
  inset: -20%;
  z-index: 1;
  background: radial-gradient(ellipse 50% 40% at 50% 20%, rgba(0, 114, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 40% 35% at 80% 60%, rgba(0, 198, 255, 0.12), transparent 50%);
  animation: pulse-glow 8s ease-in-out infinite;
  pointer-events: none;
}

/* 404 */
.error-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.error-404__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.error-404__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: float-slow 12s ease-in-out infinite;
}

.error-404__orb--1 {
  width: 280px;
  height: 280px;
  background: #0072ff;
  top: 10%;
  left: 15%;
}

.error-404__orb--2 {
  width: 200px;
  height: 200px;
  background: #00c6ff;
  bottom: 20%;
  right: 10%;
  animation-delay: -4s;
}

.error-404__float {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: rgba(0, 198, 255, 0.5);
  animation: float-y 5s ease-in-out infinite;
}

.error-404__code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 800;
  line-height: 1;
  margin: 0;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: glitch-shift 2.5s steps(2, end) infinite;
  position: relative;
  z-index: 2;
}

.error-404__search {
  max-width: 420px;
  width: 100%;
  margin-top: 2rem;
  display: flex;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
}

.error-404__search input {
  flex: 1;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-family: inherit;
}

.error-404__content {
  position: relative;
  z-index: 2;
  max-width: 520px;
}
