body {
  margin: 0;
}

html {
  overflow-x: hidden;
  overflow-y: scroll;
}

#loading-bg {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--initial-loader-bg, #fff);
  block-size: 100%;
  inline-size: 100%;
}

/* Nexus logo: the left then the right stroke light up and move forward, the whole mark breathes */
.loading-logo {
  animation: loading-breathe 1.8s ease-in-out infinite;
}

.loading-logo svg {
  display: block;
  overflow: visible;
}

.loading-stroke {
  animation: loading-stroke 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  fill: var(--initial-loader-color, #001861);
  opacity: 0.18;
}

.loading-stroke-right {
  animation-delay: 0.18s;
}

@keyframes loading-stroke {
  0% {
    opacity: 0.18;
    transform: translateX(-6px);
  }

  35%,
  65% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0.18;
    transform: translateX(0);
  }
}

@keyframes loading-breathe {
  0%,
  100% {
    transform: scale(0.96);
  }

  50% {
    transform: scale(1);
  }
}

/* Users who asked for less motion get a soft fade only */
@media (prefers-reduced-motion: reduce) {
  .loading-logo {
    animation: none;
  }

  .loading-stroke {
    animation: loading-fade 2s ease-in-out infinite;
    animation-delay: 0s;
  }

  @keyframes loading-fade {
    0%,
    100% {
      opacity: 0.35;
    }

    50% {
      opacity: 1;
    }
  }
}
