* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #FFF;
}

#wrapper {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid #000;
  width: 300px;
  height: 600px;
  background: #f4f0df;
}

img {
  display: block;
  margin: 0 auto;
}

@keyframes pan {
  0% {
    top: 0;
  }
  75% {
    top: -854px;
  }
  85% {
    top: -854px;
  }
  100% {
    top: -1554px;
  }
}

#scrollLockup {
  position: relative;
  background: #f4f0df;
  transform: translateZ(0);
  backface-visibility: hidden;
  animation: pan 8s 2s ease-out forwards;
}

.textBlock, .imageBlock, .logoBlock, .lineBlock {
  position: relative;
  z-index: 1;
}

@keyframes slideIn {
  0% {
    left: 500%;
  }
  100% {
    left: 0;
  }
}

.textBlock:first-of-type .text, .textBlock[data-animated="true"] .text {
  animation: slideIn 1s ease-out forwards;
}

.textBlock[data-animated="true"] .text {
  animation-delay: 2s !important;
}

.textBlock {
  width: 100%;
  height: 348px;
  background: url(../img/backing.svg) 25% bottom no-repeat;
  background-size: 600px;
  display: flex;
  align-items: center;
}

.textBlock .textWrap {
  margin: -10% auto 0;
}

.textBlock .text {
  position: relative;
  left: 500%;
}

.textBlock .cta {
  background: #47b7a4;
  padding: 10px 20px;
  margin-top: 30px;
  border-radius: 30px;
}

.logoBlock {
  display: flex;
  align-items: center;
  height: 252px;
  margin-bottom: 50px;
  transition: height 0.75s ease-out;
}

.logoBlock img {
  width: 225px;
  transition: width 0.75s ease-out;
}

.logoBlock.small, .logoBlock[data-animated="true"] {
  height: 150px;
}

.logoBlock.small img, .logoBlock[data-animated="true"] img {
  width: 127px;
}

@keyframes strike {
  0% {
    opacity: 1;
    margin: 0;
  }
  30% {
    opacity: 1;
    margin: -10px;
  }
  80% {
    opacity: 0;
    margin: -20px;
  }
  81% {
    opacity: 0;
    margin: 0;
  }
  100% {
    opacity: 1;
    margin: 0;
  }
}

.imageBlock .imageWrap {
  display: table;
  margin: 0 auto;
  position: relative;
}

.imageBlock .bolt {
  position: absolute;
  width: 30%;
  height: 30%;
  background: url(../img/bolt.png) center no-repeat;
  background-size: contain;
  animation: strike 1s linear 10;
}

.imageBlock .bolt:first-of-type {
  top: 0;
  left: 16%;
  transform: rotate(0deg);
  animation-delay: 0.2s;
}

.imageBlock .bolt:nth-of-type(2) {
  top: 10%;
  left: 0;
  transform: rotate(-26deg);
}

.imageBlock .bolt:last-of-type {
  top: 31%;
  left: 2%;
  transform: rotate(-50deg);
}

@keyframes openSlot {
  0% {
    width: 0;
  }
  100% {
    width: 43px;
  }
}

@keyframes drawLine {
  0% {
    height: 0;
  }
  100% {
    height: 100%;
  }
}

.lineBlock {
  width: 100%;
  height: 300px;
  margin: 40px 0;
}

.lineBlock:before, .lineBlock:after {
  content: '';
  position: absolute;
  width: 0px;
  height: 3px;
  left: 50%;
  transform: translateX(-50%);
  background: #47b7a4;
}

.lineBlock:before {
  top: 0;
}

.lineBlock:after {
  bottom: 0;
  animation-delay: 2.75s !important;
}

.lineBlock span {
  position: absolute;
  top: 0;
  width: 2px;
  height: 0;
  left: 50%;
  transform: translateX(-50%);
  background: url(../img/line.png);
  background-position: right;
  background-size: 3px 12px;
  background-repeat: repeat-y;
}

.lineBlock[data-animated="true"]:before, .lineBlock[data-animated="true"]:after {
  animation: openSlot 0.33s ease-out forwards;
}

.lineBlock[data-animated="true"] span {
  animation: drawLine 3s 0.2s ease-out forwards;
}

.textCurve {
  width: 100%;
  height: 50px;
  background: #0272b1;
  border-top-left-radius: 90%;
}

@keyframes backgroundPan {
  0% {
    top: 600px;
  }
  100% {
    top: 1000px;
  }
}

#backing {
  position: absolute;
  top: 600px;
  left: 0;
  width: 100%;
  animation: backgroundPan 6s 2s ease-out forwards;
}
