#preloader {
  position: fixed;
  z-index: 2000;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #F8F7F4;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

#preloader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0s linear, visibility 0s;
}

#preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

#loader {
  position: relative;
  width: 2.5em;
  height: 2.5em;
  transform: rotate(165deg);
}

#loader:before,
#loader:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 0.25em;
  transform: translate(-50%, -50%);
}

#loader:before,
#loader:after {
  animation: none;
}

#preloader.is-visible #loader:before {
  animation: before 1.5s 1 ease-in-out forwards;
}

#preloader.is-visible #loader:after {
  animation: after 1.5s 1 ease-in-out forwards;
}

@keyframes before {
  0% {
    opacity: 1;
    width: 0.5em;
    box-shadow: 1em -0.5em rgba(26, 26, 26, 0.75), -1em 0.5em rgba(26, 26, 26, 0.75);
  }
  35% {
    opacity: 1;
    width: 2.5em;
    box-shadow: 0 -0.5em rgba(26, 26, 26, 0.75), 0 0.5em rgba(26, 26, 26, 0.75);
  }
  85% {
    opacity: 1;
    width: 0.5em;
    box-shadow: -1em -0.5em rgba(26, 26, 26, 0.75), 1em 0.5em rgba(26, 26, 26, 0.75);
  }
  100% {
    opacity: 1;
    width: 0.5em;
    box-shadow: -1em -0.5em rgba(26, 26, 26, 0.75), 1em 0.5em rgba(26, 26, 26, 0.75);
  }
}

@keyframes after {
  0% {
    opacity: 1;
    height: 0.5em;
    box-shadow: 0.5em 1em rgba(26, 26, 26, 0.75), -0.5em -1em rgba(26, 26, 26, 0.75);
  }
  35% {
    opacity: 1;
    height: 2.5em;
    box-shadow: 0.5em 0 rgba(26, 26, 26, 0.75), -0.5em 0 rgba(26, 26, 26, 0.75);
  }
  85% {
    opacity: 1;
    height: 0.5em;
    box-shadow: 0.5em -1em rgba(26, 26, 26, 0.75), -0.5em 1em rgba(26, 26, 26, 0.75);
  }
  100% {
    opacity: 1;
    height: 0.5em;
    box-shadow: 0.5em -1em rgba(26, 26, 26, 0.75), -0.5em 1em rgba(26, 26, 26, 0.75);
  }
}

/**
 * Page Transitions & Preloader states
 */
html:not(.is-ready) body {
  overflow: hidden;
}

html.is-ready body {
  overflow: visible;
}
