.butterfly {
  width: 135px;
  height: 150px;
  background-image: url("big-butterfly-transparent.png");
  background-repeat: no-repeat;
  animation: fly 1s steps(8) infinite alternate-reverse,
    float 10s linear forwards infinite;
  background-position: 0 0;
  position: absolute;
  top: -130px;
  z-index: -1;
}

.butterfly-source {
  background-image: url(big-butterfly-transparent.png);
  background-repeat: no-repeat;
  background-size: cover;
  height: 100px;
  width: 530px;
}

.fly-container {
  width: 100%;
  height: 200px;
  position: relative;
  margin: 0 auto;
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-top: 100px;
}

.d3-card {
  height: 300px;
  width: 200px;
  perspective: 1000px;
  perspective-origin: 50% 100%;
  transform: rotateX(-300deg);
  position: absolute;
  bottom: 65px;
  z-index: -2;
  background: url(flower-3.jpeg);
  background-size: cover;
  box-shadow: #508400 -1px 19px 19px 1px;
  border-radius: 5px;
}

@keyframes fly {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -1072px 0; /* 200px * 9 frames */
  }
}

@keyframes float {
  0% {
    transform: translate(-200px, 0px);
  }
  20% {
    transform: translate(-50px, -20px);
  }
  30% {
    transform: translate(0px, 0px);
  }
  60% {
    transform: translate(0px, 0px);
  }
  80% {
    transform: translate(150px, -20px);
  }
  100% {
    transform: translate(200px, 0px);
  }
}
