body {
  background: #E90000;
  padding-top: 20px;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

hr {
  opacity: 0;
}

.navbar {
  text-align: center;
  margin-top: 18px;
}

.link-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 16px;
}

/* Hidden fallback text */
.link-wrapper .fallback {
  font-size: 2.25em;
  letter-spacing: 4px;
  line-height: 0;
  opacity: 0;
  position: relative;
  top: 15px;
  left: 0;
}

/* Shape container */
.link-wrapper .shape-wrapper {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* Hover */
.link-wrapper:hover {
  z-index: 9999;
}

.link-wrapper:hover .shape-wrapper {
  transform: rotate(-6deg);
  display: block;
}

.link-wrapper:hover .shape-wrapper .shape.cyan-fill {
  transform: scale(3, 0.1);
}

.link-wrapper:hover .img-wrapper img {
  animation: tiltBounce 0.15s ease;
  animation-fill-mode: forwards;
  display: block;
}

.link-wrapper:hover .img-wrapper img.normal {
  mix-blend-mode: darken;
}

/* Alternate animation for every second link */
.link-wrapper:nth-child(even):hover .shape-wrapper {
  transform: rotate(11deg);
}

.link-wrapper:nth-child(even):hover .img-wrapper img {
  animation: tiltBounceAlt 0.15s ease;
  animation-fill-mode: forwards;
}

/* Images */
.img-wrapper img {
  width: auto;
  height: 40px;
  display: block;
  left: 0;
  right: 0;
  top: -5px;
  margin: 0 auto;
  position: absolute;
  z-index: 999;
}

.img-wrapper img.normal {
  display: block;
}

.img-wrapper img.active {
  display: none;
  z-index: -1;
}

/* Shapes */
.shape-wrapper {
  filter: sepia(50%) saturate(3);
}

.shape-wrapper .shape {
  transition: all 0.1s linear;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 35px;
  overflow: hidden;
}

.shape-wrapper .shape svg {
  position: absolute;
  left: 0;
  top: 0;
}

.shape-wrapper .shape.cyan-fill {
  mix-blend-mode: screen;
  animation-delay: 0.05s;
  animation-duration: 0.4s;
}

.shape-wrapper .shape.red-fill {
  animation-duration: 0.45s;
  animation-delay: 0.08s;
  opacity: 0.8;
}

/* Jelly animation */
.jelly {
  -webkit-animation-name: jelly;
  animation-name: jelly;
  -webkit-transform-origin: center;
  transform-origin: center;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
}

/* Tilt animation */
@keyframes tiltBounce {
  0% {
    transform: scale(1) rotate(-7deg);
  }

  50% {
    transform: scale(1.5) rotate(-7deg);
  }

  100% {
    transform: scale(1.15) rotate(-7deg);
  }
}

@keyframes tiltBounceAlt {
  0% {
    transform: scale(1) rotate(7deg);
  }

  50% {
    transform: scale(1.5) rotate(7deg);
  }

  100% {
    transform: scale(1.15) rotate(7deg);
  }
}

/* Jelly animation */
@keyframes jelly {
  0% {
    width: 100%;
    transform:
      scale(1.25, 1)
      skewX(20deg)
      translateY(3px)
      rotateX(40deg)
      rotateY(10deg)
      rotateZ(-10deg);
  }

  50% {
    width: 100%;
    transform:
      scale(1.25, 1.1)
      skewX(-15deg)
      translateY(-2px)
      translateZ(-30px);
  }

  100% {
    width: 100%;
    transform:
      scale(1.25, 1)
      skewX(20deg)
      translateY(3px)
      rotateX(-40deg)
      rotateY(-10deg)
      rotateZ(-15deg);
  }
}