body {
  background-color: var(--color-primary, #ffffff);
  transition: all 300ms ease;
}

body.loading {
  background-color: transparent;
}

body.landing {
  background: var(--color-primary, #ffffff);
}

.global-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 9990;
  inset: 0;
  transition: all 200ms cubic-bezier(1, 0.5, 0.8, 1);
  overflow: hidden;
}

.global-loader__bg {
  content: '';
  position: absolute;
  background-color: transparent;
  backdrop-filter: blur(10px);
  inset: 0;
  z-index: -1;

  body.landing & {
    background: var(--color-primary, #ffffff);
  }
}

.global-loader__content {
  display: flex;
  flex-direction: column;
  row-gap: 12px;
  width: 160px;
  transition: all 300ms cubic-bezier(1, 0.5, 0.8, 1);
}

.global-loader__logo {
  width: 100%;
  height: 24px;
}

.global-loader__progress,
.global-loader__progress:before {
  height: 4px;
  border-radius: 4px;
}

.global-loader__progress {
  position: relative;
  background-color: var(--color-brand-30);
  box-shadow:
    0 0 0 0 rgba(0, 0, 0, 0.2),
    0 0 0 0 rgba(0, 0, 0, 0.14),
    0 0 0 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.global-loader__progress:before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--color-brand);
  transform: translateX(-100%);
  animation: 300ms load ease-in forwards;
  transition: transform 100ms ease-out;
}

.global-loader--complete {
  opacity: 0;
  transition-delay: 300ms;
  pointer-events: none;
}

.global-loader--complete .global-loader__progress:before {
  animation: 300ms full-load ease-in forwards;
}

.global-loader--complete .global-loader__content {
  transition-delay: 200ms;
  transform: translateY(-10px);
  opacity: 0;
}

@keyframes load {
  to {
    transform: translateX(-20%);
  }
}

@keyframes full-load {
  from {
    transform: translateX(-20%);
  }
  to {
    transform: translateX(0%);
  }
}
