/* Critical first-paint splash — mirrors LogoLoadingAnimation (site.css). */

html,
body {
  margin: 0;
  min-height: 100%;
  background: oklch(0.145 0 0);
  color: oklch(0.985 0 0);
}

#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.145 0 0);
}

#boot-splash .boot-splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

#boot-splash .boot-splash-square {
  fill: oklch(0.985 0 0);
  transform-origin: center;
  transform-box: fill-box;
  animation: boot-logo-flip 1.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

#boot-splash .boot-splash-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

#boot-splash .boot-splash-label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

#boot-splash .boot-splash-dot {
  animation: boot-logo-dot 1.4s ease-in-out infinite;
}

#boot-splash .boot-splash-sublabel {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: oklch(0.55 0 0);
}

#boot-splash .boot-splash-rail-wrap {
  width: 12rem;
  height: 3px;
  border-radius: 9999px;
  background-color: oklch(0.22 0 0);
  overflow: hidden;
}

#boot-splash .boot-splash-rail {
  height: 100%;
  width: 33.33%;
  background: linear-gradient(to right, transparent, oklch(0.623 0.214 259.815), transparent);
  animation: boot-logo-rail 1.6s ease-in-out infinite;
}

@keyframes boot-logo-flip {
  0%,
  15% {
    transform: rotateY(0deg);
    opacity: 0.35;
  }
  40% {
    transform: rotateY(180deg);
    opacity: 1;
  }
  70% {
    transform: rotateY(360deg);
    opacity: 1;
  }
  100% {
    transform: rotateY(360deg);
    opacity: 0.35;
  }
}

@keyframes boot-logo-dot {
  0%,
  20% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
  80%,
  100% {
    opacity: 0.2;
  }
}

@keyframes boot-logo-rail {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(400%);
  }
}

@media (prefers-reduced-motion: reduce) {
  #boot-splash .boot-splash-square,
  #boot-splash .boot-splash-dot,
  #boot-splash .boot-splash-rail {
    animation: none !important;
    opacity: 1 !important;
  }
}
