/* AUTUMN */

.leaves-wrapper {
    position: relative;
    width: 100vh;
    margin: 0 auto;
}
#leaves {position: absolute; width:100vh; top: -50px; text-align: right;  z-index:1; display: flex; justify-content: space-evenly; }

#leaves i {
    display: inline-block;
    font-size: 24px;
    z-index: 1;
    -webkit-animation: falling 5s 0s infinite;
}

#leaves i:nth-of-type(2n) { -webkit-animation: falling2 5s 0s infinite; }
#leaves i:nth-of-type(3n) { -webkit-animation: falling3 5s 0s infinite; }

#leaves i:nth-of-type(n)   { -webkit-animation-delay: 1.9s;}
#leaves i:nth-of-type(2n)  { -webkit-animation-delay: 3.9s;}
#leaves i:nth-of-type(3n)  { -webkit-animation-delay: 2.3s;}
#leaves i:nth-of-type(4n)  { -webkit-animation-delay: 4.4s;}
#leaves i:nth-of-type(5n)  { -webkit-animation-delay: 5s;  }
#leaves i:nth-of-type(6n)  { -webkit-animation-delay: 3.5s;}
#leaves i:nth-of-type(7n)  { -webkit-animation-delay: 2.8s;}
#leaves i:nth-of-type(8n)  { -webkit-animation-delay: 1.5s;}
#leaves i:nth-of-type(9n)  { -webkit-animation-delay: 3.3s;}
#leaves i:nth-of-type(10n) { -webkit-animation-delay: 2.5s;}
#leaves i:nth-of-type(11n) { -webkit-animation-delay: 1.2s;}
#leaves i:nth-of-type(12n) { -webkit-animation-delay: 4.1s;}
#leaves i:nth-of-type(13n) { -webkit-animation-delay: 1s;  }
#leaves i:nth-of-type(14n) { -webkit-animation-delay: 4.7s;}
#leaves i:nth-of-type(15n) { -webkit-animation-delay: 3s;  }

#leaves i:nth-of-type(n)    {transform: rotate(180deg);}
#leaves i:nth-of-type(n) { -webkit-animation-timing-function:ease-in-out;}

@-webkit-keyframes falling {

    0% {
        -webkit-transform:
            translate3d(300,0,0)
            rotate(0deg);
    }

    100% {
        -webkit-transform:
            translate3d(-350px,700px,0)
            rotate(90deg);
        opacity: 0;
    }
}

@-webkit-keyframes falling3 {
     0% {
        -webkit-transform:
            translate3d(0,0,0)
            rotate(-20deg);
    }

    100% {
        -webkit-transform:
            translate3d(-230px,640px,0)
            rotate(-70deg);
        opacity: 0;
    }
}

@-webkit-keyframes falling2 {
     0% {
        -webkit-transform:
            translate3d(0,0,0)
            rotate(90deg);
    }

    100% {
        -webkit-transform:
            translate3d(-400px,680px,0)
            rotate(0deg);
        opacity: 0;
    }
}

.spider-autumn {
  font-size: 160px;
  position: absolute;
  top: -250px;
  transform: translateX(-50%) rotate(180deg);
  animation: spiderCrawl 15s infinite;
  animation-play-state: paused;
  filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
  z-index: 250;
}

.spider-autumn.active {
  animation-play-state: running;
}

@keyframes spiderCrawl {
  0% {
    top: -250px;
    left: 10%;
  }
  10% {
    top: 10%;
    left: 20%;
  }
  20% {
    top: 20%;
    left: 55%;
  }
  30% {
    top: 30%;
    left: 65%;
  }
  40% {
    top: 40%;
    left: 80%;
  }
  50% {
    top: 50%;
    left: 50%;
  }
  60% {
    top: 60%;
    left: 30%;
  }
  70% {
    top: 70%;
    left: 20%;
  }
  80% {
    top: 80%;
    left: 45%;
  }
  90% {
    top: 90%;
    left: 50%;
  }
  95% {
    top: calc(100% + 50px);
    left: 50%;
  }
  100% {
    top: -250px;
  }
}

/* AUTUMN */