/* Preloader: the brand mark drawn the way the logo is built, with the wordmark
   sitting inside the crescent's arc and each letter dropping in from above.
   Loaded on every page; pure CSS, so a failed script can never leave it stuck. */

.site-loader { display: none; }
.js .site-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #241d47;
  animation: loader-dismiss 1ms 2.25s forwards;
}
.site-loader::before,
.site-loader::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #303142;
  animation: loader-wipe 1s 1.4s cubic-bezier(.858,.01,.068,.99) forwards;
}
.site-loader::before { z-index: 1; }
.site-loader::after {
  background: #8884c0;
  animation-delay: 1.65s;
}
.site-loader-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 24px;
  text-align: center;
  animation: loader-content-out .3s 1.4s forwards;
}

/* The mark: crescent behind, wordmark nested in the opening, as in the logo. */
.loader-mark {
  position: relative;
  display: block;
  width: clamp(230px, 58vw, 330px);
  margin: 0 auto;
  animation: loader-mark-in .95s cubic-bezier(.22,1,.36,1) both;
}
.loader-moon {
  display: block;
  width: 100%;
  height: auto;
  color: #fff;
  animation: loader-moon-glow 2.4s ease-in-out .7s infinite;
}
.loader-name {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Pushes the words left, into the hollow of the crescent. */
  padding-right: 22%;
  padding-bottom: 3%;
  font: 800 clamp(15px, 4.1vw, 23px)/1.3 'Nunito Sans', sans-serif;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
}
.loader-word { display: block; white-space: nowrap; }
.loader-letter {
  display: inline-block;
  color: #fff;
  animation: loader-letter-fall .55s cubic-bezier(.19,1.32,.42,1) both;
  animation-delay: calc(.22s + var(--letter) * .024s);
}

@keyframes loader-mark-in {
  from { opacity: 0; transform: translateY(14px) scale(.86); }
  to   { opacity: 1; transform: none; }
}
@keyframes loader-moon-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(170,165,221,0)); }
  50%      { filter: drop-shadow(0 0 20px rgba(190,185,255,.7)); }
}
@keyframes loader-letter-fall {
  from { opacity: 0; transform: translateY(var(--fall, -34px)) rotate(-5deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes loader-content-out { to { opacity: 0; visibility: hidden; } }
@keyframes loader-wipe { to { transform: translateX(-105%); } }
@keyframes loader-dismiss { to { visibility: hidden; } }

@media (max-width: 767px) {
  .loader-letter { --fall: -24px; }
}

@media (prefers-reduced-motion: reduce) { .js .site-loader { display: none; } }
