:root {
  --darkBlue: #19313e;
  --cream: #ffe4c4;
  --emerald: #40755e;
  --gold: #956d3c;
  --bronze: #634625;
}
body {
  margin: 0;
  padding:0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--darkBlue)
}
.container {
  width: 50px;
  height: 50px;
  /* background-color: aqua; */
  position: relative;
  animation: animateBoxes 1s linear 20;
  transform: rotate(-45deg);
}
.container span {
  position: absolute;
  width: 25px;
  height: 25px;
  animation: rotate 1s linear 20;
}
.container span:nth-child(1) {
  top: 0;
  left: 0;
  background-color: var(--cream);
}
.container span:nth-child(2) {
  top: 0;
  right: 0;
  background-color: var(--gold)
}
.container span:nth-child(3) {
  bottom: 0;
  left: 0;
  background-color: var(--bronze)
}
.container span:nth-child(4) {
  bottom: 0;
  right: 0;
  background-color: var(--emerald)
}
@keyframes rotate {
  
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(90deg);
  }
  90% {
    transform: rotate(90deg);
  }
  100% {
    transform: rotate(90deg);
  }
  
}
@keyframes animateBoxes {
  0% {
    width: 50px;
    height: 50px;
  }
  10% {
    width: 50px;
    height: 50px;
  }
  50% {
    width: 70px;
    height: 70px;
  }
  90% {
    width: 50px;
    height: 50px;
  }
  100% {
    width: 50px;
    height: 50px;
  }
  
}