* {
  box-sizing: border-box;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  line-height: 1.5;
  font-family: "Lato";
  -webkit-font-smoothing: antialiased;
  color: white;
  background: tomato;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.stats {
  position: relative;
  padding: 0 25px;
}
@media (max-width: 690px) {
  .stats {
    width: 100%;
  }
}
.stats__header {
  display: flex;
  align-items: center;
  transform: translate3d(0, -150px, 0);
  opacity: 0;
  transform-origin: left center;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.stats__header.active {
  transform: none;
  opacity: 1;
}
.stats__header-num {
  margin-right: 25px;
}
.stats__header-num p {
  font-size: 80px;
  margin: 0;
  font-weight: 700;
}
.stats__header-name p {
  color: #f8d0d8;
  margin: 0;
  font-size: 18px;
}
.stats__header-name span {
  display: block;
  color: white;
  font-weight: 700;
  font-size: 36px;
  line-height: 0.8;
}
.stats__item {
  height: 400px;
  display: flex;
  flex-direction: column-reverse;
  float: left;
  position: relative;
  text-align: center;
  margin-right: 37.5px;
  perspective: 1000px;
  transition: all 0.3s ease-in-out;
}
.stats__item:nth-of-type(1) .stats__item-bar {
  height: 260px;
  transition-delay: 0.1s;
}
.stats__item:nth-of-type(2) .stats__item-bar {
  height: 224px;
  transition-delay: 0.2s;
}
.stats__item:nth-of-type(3) .stats__item-bar {
  height: 200px;
  transition-delay: 0.3s;
}
.stats__item:nth-of-type(4) .stats__item-bar {
  height: 128px;
  transition-delay: 0.4s;
}
.stats__item:nth-of-type(5) .stats__item-bar {
  height: 152px;
  transition-delay: 0.5s;
}
.stats__item:nth-of-type(6) .stats__item-bar {
  height: 128.4px;
  transition-delay: 0.6s;
}
.stats__item:nth-of-type(7) .stats__item-bar {
  height: 204px;
  transition-delay: 0.7s;
}
.stats__item:nth-of-type(8) .stats__item-bar {
  height: 200.4px;
  transition-delay: 0.8s;
}
.stats__item:last-child {
  margin-right: 0;
}
@media (max-width: 690px) {
  .stats__item {
    float: none;
    height: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
  }
  .stats__item:nth-of-type(1) .stats__item-bar {
    width: 65%;
    height: 30px;
    transition-delay: 0.1s;
  }
  .stats__item:nth-of-type(2) .stats__item-bar {
    width: 56%;
    height: 30px;
    transition-delay: 0.2s;
  }
  .stats__item:nth-of-type(3) .stats__item-bar {
    width: 50%;
    height: 30px;
    transition-delay: 0.3s;
  }
  .stats__item:nth-of-type(4) .stats__item-bar {
    width: 32%;
    height: 30px;
    transition-delay: 0.4s;
  }
  .stats__item:nth-of-type(5) .stats__item-bar {
    width: 38%;
    height: 30px;
    transition-delay: 0.5s;
  }
  .stats__item:nth-of-type(6) .stats__item-bar {
    width: 32.1%;
    height: 30px;
    transition-delay: 0.6s;
  }
  .stats__item:nth-of-type(7) .stats__item-bar {
    width: 51%;
    height: 30px;
    transition-delay: 0.7s;
  }
  .stats__item:nth-of-type(8) .stats__item-bar {
    width: 50.1%;
    height: 30px;
    transition-delay: 0.8s;
  }
  .stats__item .stats__item-num {
    margin-right: 25px;
  }
}
.stats__item:hover {
  opacity: 0.7;
}
.stats__item-bar {
  order: 0;
  width: 40px;
  background: white;
  transform: scaleY(0) translate3d(0, 0, 0);
  cursor: pointer;
  transform-origin: center bottom;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 10px 15px rgba(0, 0, 0, 0.2);
}
.stats__item-bar.active {
  transform: none;
}
.stats__item-num {
  margin-top: 25px;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.stats__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 25px;
  transform: scale(1.5);
  visibility: hidden;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.stats__overlay.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}
@media (max-width: 690px) {
  .stats__overlay {
    padding: 12.5px;
  }
}
.stats__overlay-avg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: #4c2e34;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
}
.stats__overlay-avg > p {
  margin: 0;
}
.stats__overlay-avg .avg {
  font-size: 100px;
  font-weight: 700;
}
@media (max-width: 690px) {
  .stats__overlay-avg {
    width: 240px;
    height: 240px;
  }
  .stats__overlay-avg .avg {
    font-size: 65px;
  }
}
.stats__overlay-info {
  position: absolute;
  bottom: 25px;
  left: 50px;
  display: flex;
}
@media (max-width: 690px) {
  .stats__overlay-info {
    left: 25px;
  }
}
.stats__overlay-info-half {
  margin-right: 25px;
}
.stats__overlay-info-half p {
  margin: 0;
  line-height: 1.2;
}
.stats__overlay-info-half p:first-child {
  font-size: 50px;
  font-weight: 700;
}
@media (max-width: 690px) {
  .stats__overlay-info-half p:first-child {
    font-size: 24px;
  }
}
.stats__overlay-back {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.stats__overlay-back > svg {
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.stats__overlay-back:hover > svg {
  transform: translateX(-5px);
}
.stats__overlay-back p {
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 0 12.5px;
}
@media (max-width: 690px) {
  .stats__overlay-back p {
    font-size: 18px;
  }
}