@mixin commodityexchange {
  polygon {
    animation-duration: 1s;
    animation-iteration-count: 1;
    animation-delay: 2s;
    animation-timing-function: cubic-bezier(0.84, 1.84, 0.59, 0.72);
    animation-fill-mode: forwards;
  }

  polygon:nth-child(1) {
    animation-name: commodityexchangeAnimation1;
    translate: -1450px 8520px;
  }

  polygon:nth-child(2) {
    animation-name: commodityexchangeAnimation2;
    translate: 1240px -7970px;
  }

  polygon:nth-child(3) {
    animation-name: commodityexchangeAnimation3;
    translate: 1240px -7780px;
  }

  #container {
    animation-name: rotateAnimation;
    animation-duration: 2s;
    animation-iteration-count: 1;
    animation-delay: 2s;
    animation-timing-function: cubic-bezier(0.84, 1.84, 0.59, 0.72);
    transform-origin: center;
    rotate: 180deg;
    animation-fill-mode: forwards;
  }
}

@mixin commodityexchangeAnimations {
  @keyframes commodityexchangeAnimation1 {
    0% {
      translate: 1450px 8520px;
    }
    100% {
      translate: 0 0;
    }
  }

  @keyframes commodityexchangeAnimation2 {
    0% {
      translate: 1240px -7780px;
    }
    100% {
      translate: 0 0;
    }
  }

  @keyframes commodityexchangeAnimation3 {
    0% {
      translate: -5720px 0px;
    }
    100% {
      translate: 0 0;
    }
  }

  @keyframes rotateAnimation {
    0% {
      rotate: 180deg;
    }
    50% {
      rotate: 90deg;
    }
    100% {
      rotate: 0deg;
    }
  }
}
