:root {
  --stide-loader-bg: transparent;
  --stide-loader-accent: #b2976f;
  --stide-loader-progress: 0%;
  --stide-loader-size: 320px;
  --stide-loader-entry: 580ms;
  --stide-loader-pulse: 1050ms;
  --stide-loader-exit: 420ms;
}

#stide-loading-animation[hidden] {
  display: none !important;
}

html.stide-loading-active #stide-loading-animation {
  display: grid !important;
}

#stide-loading-animation {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  overflow: hidden;
  background: var(--stide-loader-bg);
  color: #fff;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  isolation: isolate;
  transition:
    opacity var(--stide-loader-exit) cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 0s;
}

#stide-loading-animation.stide-loading--transparent::before,
#stide-loading-animation.stide-loading--transparent::after,
#stide-loading-animation.stide-loading--transparent .stide-loading__ambient {
  display: none !important;
}

#stide-loading-animation.stide-loading--solid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .095), transparent 34%),
    radial-gradient(circle at 50% 110%, rgba(178, 151, 111, .13), transparent 36%);
}

#stide-loading-animation.stide-loading--solid::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -2;
  height: 30%;
  background: linear-gradient(to top, rgba(40, 7, 20, .22), transparent);
}

.stide-loading__ambient {
  position: absolute;
  z-index: -1;
  width: min(42vw, 620px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  opacity: .8;
  animation: stide-ambient-drift 8s ease-in-out infinite alternate;
}

.stide-loading__ambient--one {
  top: -25%;
  left: -15%;
}

.stide-loading__ambient--two {
  right: -18%;
  bottom: -33%;
  width: min(50vw, 760px);
  animation-delay: -3.2s;
}

.stide-loading__content {
  width: min(var(--stide-loader-size), calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(7px) scale(.985);
  animation: stide-content-enter var(--stide-loader-entry) 40ms cubic-bezier(.22, 1, .36, 1) forwards;
}

.stide-loading__wordmark {
  margin: 0 0 10px .34em;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(.68rem, 2.8vw, .88rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .34em;
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, .9),
    0 3px 10px rgba(0, 0, 0, .55);
}

.stide-loading__stage {
  position: relative;
  width: 100%;
  overflow: visible;
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, .8))
    drop-shadow(0 5px 10px rgba(0, 0, 0, .48));
}

.stide-loading__picture,
.stide-loading__picture img {
  display: block;
  width: 100%;
}

.stide-loading__picture img {
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.stide-loading__picture--base {
  opacity: .18;
  filter: saturate(.65) brightness(1.05);
}

.stide-loading__picture--reveal {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--stide-loader-progress)) 0 0);
  will-change: clip-path;
}

.stide-loading__tracer {
  position: absolute;
  top: 2%;
  bottom: 1%;
  left: var(--stide-loader-progress);
  width: 1px;
  transform: translateX(-.5px);
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .9) 28%, var(--stide-loader-accent) 66%, transparent);
  box-shadow:
    0 0 6px rgba(255, 255, 255, .76),
    0 0 14px rgba(178, 151, 111, .7);
  opacity: .9;
  will-change: left;
}

.stide-loading__tracer::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: 28px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
}

.stide-loading__waterline {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 1%;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, .2);
}

.stide-loading__waterline::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .92), transparent);
  transform: translateX(-130%);
  animation: stide-waterline var(--stide-loader-pulse) ease-in-out infinite;
}

.stide-loading__progress {
  width: 68%;
  height: 1px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .34);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .42);
}

.stide-loading__progress-fill {
  display: block;
  width: var(--stide-loader-progress);
  height: 100%;
  background: var(--stide-loader-accent);
  box-shadow: 0 0 9px rgba(178, 151, 111, .76);
  will-change: width;
}

.stide-loading__meta {
  min-height: 24px;
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stide-loading__status,
.stide-loading__tagline {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.35;
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, .95),
    0 3px 8px rgba(0, 0, 0, .55);
}

.stide-loading__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: rgba(255, 255, 255, .96);
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .16em;
}

.stide-loading__dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.stide-loading__dots i {
  display: block;
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: var(--stide-loader-accent);
  box-shadow: 0 0 3px rgba(0, 0, 0, .8);
  opacity: .25;
  animation: stide-dot 1s ease-in-out infinite;
}

.stide-loading__dots i:nth-child(2) {
  animation-delay: 130ms;
}

.stide-loading__dots i:nth-child(3) {
  animation-delay: 260ms;
}

.stide-loading__tagline {
  margin-left: .15em;
  color: rgba(255, 255, 255, .82);
  font-size: .5rem;
  font-weight: 500;
  letter-spacing: .15em;
}

#stide-loading-animation.is-complete .stide-loading__tracer {
  opacity: 0;
  transition: opacity 180ms ease;
}

#stide-loading-animation.is-complete .stide-loading__picture--base {
  opacity: 0;
  transition: opacity 220ms ease;
}

#stide-loading-animation.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition-delay: 0s, var(--stide-loader-exit);
}

@keyframes stide-content-enter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes stide-ambient-drift {
  to {
    transform: translate3d(4%, 3%, 0) scale(1.05);
  }
}

@keyframes stide-waterline {
  0% {
    transform: translateX(-130%);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    transform: translateX(430%);
    opacity: 0;
  }
}

@keyframes stide-dot {
  0%, 70%, 100% {
    opacity: .25;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-1.5px);
  }
}

@media (max-width: 420px) {
  #stide-loading-animation {
    padding-inline: 12px;
  }

  .stide-loading__content {
    width: min(var(--stide-loader-size), calc(100vw - 24px));
  }

  .stide-loading__wordmark {
    font-size: .68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stide-loading__ambient,
  .stide-loading__waterline::after,
  .stide-loading__dots i {
    animation: none !important;
  }

  .stide-loading__content {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .stide-loading__picture--base,
  .stide-loading__tracer {
    display: none;
  }

  .stide-loading__picture--reveal {
    clip-path: none;
  }

  .stide-loading__progress-fill {
    width: 100%;
  }
}
