@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400');

#dropping-animation {
  margin: 0;
  text-align: center;
  padding: 80px 0; /* spacing so it doesn’t stick to the top */
  color: #fff;
  /*font-family: 'Roboto', sans-serif; */
  font-size: 40px;
  font-weight: 240;
  overflow: hidden;
  animation: bg 5s linear infinite;
}

/* Container for dropping words */
.dropping-texts {
  display: inline-block;
  width: 180px;
  text-align: left;
  height: 36px;
  vertical-align: -2px;
  position: relative; /* so child absolute works */
}

.dropping-texts > div {
  font-size: 0px;
  opacity: 0;
  margin-left: -30px;
  position: absolute;
  font-weight: 400;
  /* box-shadow: 0px 60px 25px -20px rgba(0,0,0,0.5); */
}

/* Animation delays for each text */
.dropping-texts > div:nth-child(1) {
  animation: roll 5s linear infinite 0s;
}
.dropping-texts > div:nth-child(2) {
  animation: roll 5s linear infinite 1s;
}
.dropping-texts > div:nth-child(3) {
  animation: roll 5s linear infinite 2s;
}
.dropping-texts > div:nth-child(4) {
  animation: roll2 5s linear infinite 3s;
}

/* Animations */
@keyframes roll {
  0% {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    margin-top: 0px;
    transform: rotate(-25deg);
  }
  3% {
    opacity: 1;
    transform: rotate(0deg);
  }
  5% {
    font-size: inherit;
    opacity: 1;
    margin-left: 0px;
    margin-top: 0px;
  }
  20% {
    font-size: inherit;
    opacity: 1;
    margin-left: 0px;
    margin-top: 0px;
    transform: rotate(0deg);
  }
  27% {
    font-size: 0px;
    opacity: 0.5;
    margin-left: 20px;
    margin-top: 100px;
  }
  100% {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    margin-top: 0px;
    transform: rotate(15deg);
  }
}

@keyframes roll2 {
  0% {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    margin-top: 0px;
    transform: rotate(-25deg);
  }
  3% {
    opacity: 1;
    transform: rotate(0deg);
  }
  5% {
    font-size: inherit;
    opacity: 1;
    margin-left: 0px;
    margin-top: 0px;
  }
  30% {
    font-size: inherit;
    opacity: 1;
    margin-left: 0px;
    margin-top: 0px;
    transform: rotate(0deg);
  }
  37% {
    font-size: 1500px;
    opacity: 0;
    margin-left: -1000px;
    margin-top: -800px;
  }
  100% {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    margin-top: 0px;
    transform: rotate(15deg);
  }
}

/* Background color transitions */
@keyframes bg {
  0% {background: #2775e1;}
  3% {background: #d52505;}
  20% {background: #d52505;}
  23% {background: #008e38;}
  40% {background: #008e38;}
  43% {background: #edc304;}
  60% {background: #edc304;}
  63% {background: #2775e1;}
  80% {background: #2775e1;}
  83% {background: #2775e1;}
  100% {background: #2775e1;}
}
