
:root {
  --app-init-loader-duration: 1.5s;
  --app-init-loader-container-size: 250px;
  --app-init-loader-box-size: 33px;
  --app-init-loader-box-border-radius: 15%;
}

.app__init {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  width: 80%;
  max-width: 320px;
}

.app__init-logo-text {
  position: absolute;
  margin: 0 auto;
  width: 100%;
}

.app__init-logo-text {
  position: absolute;
  margin: 0 auto;
  width: 100%;
}
.app__init-logo {
  /* magic number, height of logo picture */
  height: 60px;
}

.app__init-loader {
  margin: 50px auto 0;
  width: var(--app-init-loader-container-size);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.app__init-loader-item {
  width: var(--app-init-loader-box-size);
  height: var(--app-init-loader-box-size);
  position: relative;
  display: block;
  transform-origin: -50% center;
  border-radius: var(--app-init-loader-box-border-radius);
}

.app__init-loader-item:after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  background: lightblue;
  border-radius: var(--app-init-loader-box-border-radius);
  box-shadow: 0px 0px 10px 0px rgba(28, 159, 255, 0.4);
}

.app__init-loader-item:nth-child(1) {
  animation: slide var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(2) {
  animation: flip-1 var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(2):after {
  animation: squidge-1 var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(3) {
  animation: flip-2 var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(3):after {
  animation: squidge-2 var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(4) {
  animation: flip-3 var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(4):after {
  animation: squidge-3 var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(5) {
  animation: flip-4 var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(5):after {
  animation: squidge-4 var(--app-init-loader-duration) ease-in-out infinite alternate;
}

.app__init-loader-item:nth-child(1):after {
  background: linear-gradient(90.06deg, #962DFF -7.67%, #3E2DFF 107.68%);
}

.app__init-loader-item:nth-child(2):after,
.app__init-loader-item:nth-child(3):after,
.app__init-loader-item:nth-child(4):after,
.app__init-loader-item:nth-child(5):after {
  background: #000;
}


@keyframes slide {
  0% {
    transform: translatex(0vw);
  }
  100% {
    transform: translatex(calc(var(--app-init-loader-container-size) - (var(--app-init-loader-box-size) * 1.25)));
  }
}

@keyframes flip-1 {
  0%, 15% {
    transform: rotate(0);
  }

  35%, 100% {
    transform: rotate(-180deg);
  }
}

@keyframes squidge-1 {
  5% {
    transform-origin: center bottom;
    transform: scalex(1) scaley(1);
  }
  15% {
    transform-origin: center bottom;
    transform: scalex(1.3) scaley(0.7);
  }
  25%, 20% {
    transform-origin: center bottom;
    transform: scalex(0.8) scaley(1.4);
  }
  55%, 100% {
    transform-origin: center top;
    transform: scalex(1) scaley(1);
  }
  40% {
    transform-origin: center top;
    transform: scalex(1.3) scaley(0.7);
  }
}

@keyframes flip-2 {
  0%, 30% {
    transform: rotate(0);
  }
  50%, 100% {
    transform: rotate(-180deg);
  }
}

@keyframes squidge-2 {
  20% {
    transform-origin: center bottom;
    transform: scalex(1) scaley(1);
  }
  30% {
    transform-origin: center bottom;
    transform: scalex(1.3) scaley(0.7);
  }
  40%, 35% {
    transform-origin: center bottom;
    transform: scalex(0.8) scaley(1.4);
  }
  70%, 100% {
    transform-origin: center top;
    transform: scalex(1) scaley(1);
  }
  55% {
    transform-origin: center top;
    transform: scalex(1.3) scaley(0.7);
  }
}

@keyframes flip-3 {
  0%, 45% {
    transform: rotate(0);
  }
  65%, 100% {
    transform: rotate(-180deg);
  }
}

@keyframes squidge-3 {
  35% {
    transform-origin: center bottom;
    transform: scalex(1) scaley(1);
  }
  45% {
    transform-origin: center bottom;
    transform: scalex(1.3) scaley(0.7);
  }
  55%, 50% {
    transform-origin: center bottom;
    transform: scalex(0.8) scaley(1.4);
  }
  85%, 100% {
    transform-origin: center top;
    transform: scalex(1) scaley(1);
  }
  70% {
    transform-origin: center top;
    transform: scalex(1.3) scaley(0.7);
  }
}

@keyframes flip-4 {
  0%, 60% {
    transform: rotate(0);
  }
  80%, 100% {
    transform: rotate(-180deg);
  }
}

@keyframes squidge-4 {
  50% {
    transform-origin: center bottom;
    transform: scalex(1) scaley(1);
  }
  60% {
    transform-origin: center bottom;
    transform: scalex(1.3) scaley(0.7);
  }
  70%, 65% {
    transform-origin: center bottom;
    transform: scalex(0.8) scaley(1.4);
  }
  100%, 100% {
    transform-origin: center top;
    transform: scalex(1) scaley(1);
  }
  85% {
    transform-origin: center top;
    transform: scalex(1.3) scaley(0.7);
  }
}
