@import "../styles/mixins";

.ctaWrapper {
  display: inline-flex;
  position: relative;
  margin-bottom: 0.8rem;

  @include breakpoint(tablet, min) {
    margin-bottom: 1.6rem;
  }
}

.ctaButton {
  align-items: center;
  background: var(--color-blue);
  border-radius: 0.8rem;
  box-shadow: var(--shadow-basic);
  color: var(--color-white);
  display: inline-flex;
  font-size: 2.2rem;
  font-weight: 600;
  justify-content: center;
  height: 6.4rem;
  padding: 1.4rem 3.2rem;
  text-decoration: none;
  transform: rotate(2deg);
  transition: opacity var(--animation-duration-fast)
      var(--animation-curve-basic),
    transform var(--animation-duration-fast) var(--animation-curve-basic);
}

.ctaButton:active {
  opacity: 0.8;
  transform: scale(0.98) rotate(2deg);
}

.rect,
.circle,
.plus,
.dot {
  animation-duration: 7s;
  animation-timing-function: cubic-bezier(0.785, 0.135, 0.15, 0.86);
  animation-iteration-count: infinite;
  pointer-events: none;
  position: absolute;
}

.rect {
  border: 0.2rem solid var(--color-green);
  border-radius: 0.1rem;
  height: 0.6rem;
  width: 0.6rem;
}

.circle {
  animation-name: circle;
  border: 0.2rem solid var(--color-red);
  border-radius: 0.4rem;
  height: 0.7rem;
  width: 0.7rem;
}

.plus {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.8rem;
  width: 0.8rem;
}

.dot {
  animation-name: dot;
  background: var(--color-blue);
  border-radius: 0.2rem;
  height: 0.4rem;
  width: 0.4rem;
}

.plus::before,
.plus::after {
  background: var(--color-yellow);
  border-radius: 0.1rem;
  content: "";
  display: block;
  position: absolute;
}

.plus::before {
  width: 100%;
  height: 0.2rem;
}

.plus::after {
  width: 0.2rem;
  height: 100%;
}

.rect1 {
  animation-name: rectV;
  right: -3.2rem;
  top: -0.8rem;
}

.rect2 {
  animation-name: rectH;
  animation-delay: 3s;
  right: 1.2rem;
  top: 6.4rem;
}

@keyframes rectV {
  10%,
  90% {
    transform: none;
  }
  40%,
  60% {
    transform: translateY(3.2rem);
  }
}

@keyframes rectH {
  10%,
  90% {
    transform: none;
  }
  40%,
  60% {
    transform: translateX(3.2rem);
  }
}

.circle1 {
  top: -0.3rem;
  left: 14rem;
  z-index: -1;
  animation-delay: 2s;
}
.circle2 {
  top: 4.6rem;
  left: -0.8rem;
  animation-delay: 7s;
}

@keyframes circle {
  10%,
  90% {
    transform: none;
    opacity: 1;
  }
  40%,
  60% {
    transform: scale(0);
    opacity: 0;
  }
}

.plus1 {
  animation-name: plusCW;
  left: 1.6rem;
  top: -1.6rem;
  animation-delay: 7s;
}

.plus2 {
  animation-name: plusCCW;
  left: 12rem;
  top: 5.1rem;
  animation-delay: 1s;
}

@keyframes plusCW {
  10%,
  90% {
    transform: none;
  }
  40%,
  60% {
    transform: rotate(360deg);
  }
}

@keyframes plusCCW {
  10%,
  90% {
    transform: none;
  }
  40%,
  60% {
    transform: rotate(-360deg);
  }
}

.dot1 {
  top: -2.4rem;
  left: -2.4rem;
  animation-delay: 8s;
}

.dot2 {
  top: -0.4rem;
  left: 8rem;
  animation-delay: 3s;
}

.dot3 {
  top: 6.4rem;
  left: 4rem;
  animation-delay: 5s;
}

.dot4 {
  top: 5.6rem;
  left: 15rem;
}

.dot5 {
  top: -3.2rem;
  left: 20rem;
  animation-delay: 1s;
}

.dot6 {
  top: 0.4rem;
  left: 23rem;
  animation-delay: 9s;
}

.dot7 {
  top: 4rem;
  left: 25rem;
  animation-delay: 2s;
}

@keyframes dot {
  10%,
  90% {
    opacity: 0;
  }
  40%,
  60% {
    opacity: 1;
  }
}
