/* GriGsi boot splash — ~1s branded load on navigate/reload only (see grigsi-boot-splash.js) */
html.grigsi-boot-splash-active,
html.grigsi-boot-splash-active body {
  overflow: hidden !important;
}

.grigsi-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 42%, #241a3a 0%, #100c1a 58%, #08060f 100%);
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  animation: grigsi-boot-fadeout 0.38s ease-out 0.92s forwards;
}

.grigsi-boot-splash--done {
  pointer-events: none;
}

.grigsi-boot-splash__stage {
  position: relative;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grigsi-boot-splash__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid rgba(129, 119, 240, 0.14);
  border-top-color: #a693ef;
  border-right-color: #8177f0;
  box-sizing: border-box;
  animation: grigsi-boot-spin 0.58s cubic-bezier(0.45, 0.05, 0.25, 1) forwards;
}

.grigsi-boot-splash__spinner::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: rgba(255, 198, 75, 0.55);
  border-left-color: rgba(255, 198, 75, 0.28);
  animation: grigsi-boot-spin-rev 0.42s cubic-bezier(0.45, 0.05, 0.25, 1) forwards;
}

.grigsi-boot-splash__logo {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  display: block;
  opacity: 0;
  transform: scale(0.52);
  filter: blur(3px);
  animation: grigsi-boot-logo-in 0.44s cubic-bezier(0.2, 0.9, 0.25, 1) 0.4s forwards;
}

.grigsi-boot-splash__logo .grigsi-boot-splash__crown {
  fill: #ffffff;
}

.grigsi-boot-splash__logo .grigsi-boot-splash__g {
  fill: #3d2860;
  font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  font-size: 368px;
  font-weight: 900;
}

@keyframes grigsi-boot-spin {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
  72% {
    transform: rotate(500deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: rotate(540deg) scale(0.35);
    opacity: 0;
  }
}

@keyframes grigsi-boot-spin-rev {
  0% {
    transform: rotate(0deg);
    opacity: 0.9;
  }
  100% {
    transform: rotate(-280deg);
    opacity: 0;
  }
}

@keyframes grigsi-boot-logo-in {
  0% {
    opacity: 0;
    transform: scale(0.52);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes grigsi-boot-fadeout {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grigsi-boot-splash,
  .grigsi-boot-splash__spinner,
  .grigsi-boot-splash__spinner::after,
  .grigsi-boot-splash__logo {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
