* {
  font-family: sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.square {
  position: absolute;
  top: 50%;
  left: calc(50% - 50px);
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: #ff0;
  border: 4px solid #262626;
  animation: animate 1s linear infinite;
}

@keyframes animate {
  0% {
    transform-origin: bottom right;
    transform: translate(calc(-50% + 25px), -50%) rotate(0deg);
  }
  50% {
    transform-origin: bottom right;
    transform: translate(-50%, -50%) rotate(90deg);
  }
  100% {
    transform-origin: bottom right;
    transform: translate(-50%, -50%) rotate(90deg) translateY(25px);
  }
}

.track {
  position: absolute;
  top: 50%;
  left: calc(50% + 40px);
  transform: translate(-50%, -50%);
  width: 180px;
  height: 50px;
  background: transparent;
  border-bottom: 2px solid #262626;
}

.track::before {
  content: "";
  position: absolute;
  top: -2px;
  right: 4px;
  width: 50px;
  height: 50px;
  background: transparent;
  border: 2px solid #262626;
}

.track span {
  position: absolute;
  top: -22px;
  right: 5px;
  width: 50px;
  background: #262626;
  color: #fff;
  text-transform: uppercase;
  padding: 4px 12px;
  font-size: 12px;
}
