#pre-bootstrap {
  background-color: var(--soul-theme-color-background-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
}

#splash-container {
  margin: auto;
  text-align: center;
  position: relative;
}

.loader {
  width: 300px;
}

/* Worker + OffscreenCanvas path: the canvas (drawn by the worker) fills the loader box,
   with the dot + wordmark as a static SVG overlay on top. aspect-ratio matches the logo
   viewBox so the canvas and the overlay map the same coordinate space and stay aligned. */
.worker-loader {
  position: relative;
  aspect-ratio: 900/297.04;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Promote the canvas and the overlay to their own GPU layers (translateZ + backface-
   visibility) so that when the parent slides up they are moved as textures rather than
   re-rasterised/re-snapped each frame, which otherwise makes the lifting logo vibrate. */
.worker-loader .c-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: translateZ(0);
  backface-visibility: hidden;
  /* Hidden until the worker commits its first (empty) frame, then revealed by the loader
     JS (canvas.style.opacity = '1'). Prevents a brief full-logo flash from a pre-commit
     canvas backing-store paint (seen in Firefox). The static dot + wordmark overlay stays
     visible throughout, so there is no blank gap. */
  opacity: 0;
}

.worker-loader .logo-layer.top {
  position: absolute;
  inset: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.worker-loader .logo-layer.top svg {
  width: 100%;
  height: 100%;
  display: block;
}

.fade-out-bootstrap {
  animation: fade-out-animation 0.5s 1.3s ease-out forwards;
  -moz-animation: fade-out-animation 0.5s 1.3s ease-out forwards;
  -webkit-animation: fade-out-animation 0.5s 1.3s ease-out forwards;
  -ms-animation: fade-out-animation 0.5s 1.3s ease-out forwards;
  -o-animation: fade-out-animation 0.5s 1.3s ease-out forwards;
}

.slide-up {
  /* Promote to its own compositor layer so the translate runs purely on the GPU with
     sub-pixel precision. Without this the layer position is re-snapped to integer device
     pixels each frame and the logo visibly vibrates up/down on fractional display scales. */
  will-change: transform;
  animation: slide-up-animation 0.8s ease-out forwards;
  -moz-animation: slide-up-animation 0.8s ease-out forwards;
  -webkit-animation: slide-up-animation 0.8s ease-out forwards;
  -ms-animation: slide-up-animation 0.8s ease-out forwards;
  -o-animation: slide-up-animation 0.8s ease-out forwards;
}

@keyframes slide-up-animation {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -20px, 0);
  }
}
@-webkit-keyframes slide-up-animation {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -20px, 0);
  }
}
@keyframes fade-out-animation {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@-webkit-keyframes fade-out-animation {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
