:root {
  --bg: #07080c;
  --fg: #f4f5f8;
  --muted: #6f7482;
  --accent-1: #7c5cff;
  --accent-2: #22d3ee;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background: faint grid + slow-moving color glow */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 25%, transparent 75%);
}

.glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(95vw, 900px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 38% 42%, rgba(124, 92, 255, 0.32), transparent 55%),
    radial-gradient(circle at 64% 60%, rgba(34, 211, 238, 0.2), transparent 55%);
  filter: blur(70px);
  animation: drift 16s ease-in-out infinite alternate;
}

/* Content */
main {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 32px;
  padding: 24px;
  text-align: center;
}

.wordmark {
  font-size: clamp(2.75rem, 11vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  background: linear-gradient(180deg, #ffffff 0%, #d4d6e6 55%, #8d90a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.dash {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rule {
  width: 72px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  animation: grow 1.2s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

footer {
  padding: 28px 24px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* 404 page */
.lead {
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.lead a:hover {
  border-bottom-color: var(--accent-2);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes grow {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes drift {
  from {
    transform: translate(-54%, -48%) rotate(0deg);
  }
  to {
    transform: translate(-46%, -52%) rotate(25deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow,
  .wordmark,
  .rule {
    animation: none;
  }
}
