html {
  font-size: 100%;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

body {
  font-family: "Red Hat Text", sans-serif;
  background-image: url(../images/bg-stars.svg), url(../images/pattern-hills.svg);
  background-color: #231d2b;
  background-repeat: no-repeat;
  background-position: top center, bottom left;
  background-size: 100% 75%, 190% 25%;
  min-height: 100vh;
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}

.title {
  line-height: 1.4;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.375rem;
  color: hsl(0deg, 0%, 100%);
  text-align: center;
  text-transform: uppercase;
  max-width: 16.25rem;
  margin: 0 auto 3.75rem;
}

.component {
  max-width: 23.75rem;
  margin-inline: auto;
  padding: 8.75rem 1rem 1.5rem;
}

.counter {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
  width: 100%;
  gap: 0.875rem;
}

.counter-item {
  min-width: 4rem;
  width: 21%;
}
.counter-item .number {
  margin-bottom: 1rem;
  border-radius: 5px;
  line-height: 1;
  font-size: 35px;
  font-weight: 700;
  letter-spacing: normal;
  color: hsl(345deg, 95%, 68%);
  text-align: center;
  text-transform: normal;
  position: relative;
  overflow: hidden;
  height: 66px;
  background-color: hsl(236deg, 21%, 26%);
  -webkit-box-shadow: 0 7px 0 0px hsl(234deg, 17%, 12%);
          box-shadow: 0 7px 0 0px hsl(234deg, 17%, 12%);
}
.counter-item .number .top-number,
.counter-item .number .top-flip {
  position: absolute;
  padding-top: 15px;
  top: 0;
  left: 0;
  width: 100%;
  height: 33px;
  border-radius: 5px;
  overflow: hidden;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-filter: brightness(80%);
          filter: brightness(80%);
  background-color: hsl(236deg, 21%, 26%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.counter-item .number .top-flip {
  -webkit-transform-origin: bottom;
          transform-origin: bottom;
  -webkit-animation: top-flip 0.25s ease-in;
          animation: top-flip 0.25s ease-in;
}
@-webkit-keyframes top-flip {
  100% {
    -webkit-transform: rotateX(90deg);
            transform: rotateX(90deg);
  }
}
@keyframes top-flip {
  100% {
    -webkit-transform: rotateX(90deg);
            transform: rotateX(90deg);
  }
}
.counter-item .number .bottom-number,
.counter-item .number .bottom-flip {
  position: absolute;
  padding-bottom: 1rem;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 33px;
  overflow: hidden;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  background-color: hsl(236deg, 21%, 26%);
}
.counter-item .number .bottom-flip {
  -webkit-transform-origin: top;
          transform-origin: top;
  -webkit-transform: rotateX(90deg);
          transform: rotateX(90deg);
  -webkit-animation: bottom-flip 0.25s ease-out 0.25s;
          animation: bottom-flip 0.25s ease-out 0.25s;
}
@-webkit-keyframes bottom-flip {
  100% {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
  }
}
@keyframes bottom-flip {
  100% {
    -webkit-transform: rotateX(0);
            transform: rotateX(0);
  }
}
.counter-item .number::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background-color: hsl(234deg, 17%, 12%);
  border-radius: 50%;
  left: 0;
  z-index: 4;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}
.counter-item .number::after {
  right: 0;
  -webkit-transform: translate(50%, -50%);
          transform: translate(50%, -50%);
  z-index: 4;
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background-color: hsl(234deg, 17%, 12%);
  border-radius: 50%;
}
.counter-item .words {
  line-height: 1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: hsl(237deg, 18%, 59%);
  text-align: center;
  text-transform: uppercase;
  display: block;
}

footer {
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: normal;
  color: hsl(0deg, 0%, 100%);
  text-align: center;
  text-transform: normal;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  margin-bottom: 30px;
}
footer .social-links {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
  gap: 30px;
  margin-bottom: 1rem;
  max-width: 140px;
}
footer .social-links li a {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
}
footer .social-links li a:focus {
  outline: 0.3em dashed hsl(345deg, 95%, 68%);
  outline-offset: 0.5em;
}
footer .social-links a path {
  -webkit-transition: 0.25s ease-in-out;
  transition: 0.25s ease-in-out;
}
footer .social-links a:hover path {
  fill: hsl(345deg, 95%, 68%);
}
footer a {
  display: inline-block;
  color: hsl(345deg, 95%, 68%);
  -webkit-transition: 0.25s ease-in-out;
  transition: 0.25s ease-in-out;
}
footer a:focus {
  outline: 0.3em dashed hsl(345deg, 95%, 68%);
  outline-offset: 0.5em;
}
footer a:hover {
  color: rgb(230, 171, 253);
}

@media screen and (min-width: 48.063em) {
  body {
    background-size: 100% 75%, 100% 25%;
  }
  .component {
    max-width: unset;
    min-width: 42.875rem;
  }
  .title {
    font-size: 1.29rem;
    letter-spacing: 0.35em;
    margin-bottom: 6.5rem;
    max-width: unset;
  }
  .counter-item {
    width: 9.063rem;
  }
  .counter-item .number {
    height: 140px;
    font-size: 4.688rem;
  }
  .counter-item .number .top-number,
.counter-item .number .top-flip {
    padding-top: 32px;
    height: 70px;
  }
  .counter-item .number .bottom-number,
.counter-item .number .bottom-flip {
    padding-bottom: 32px;
    height: 70px;
  }
  .counter-item .words {
    font-size: 1rem;
  }
  .social-links {
    gap: 1.25rem;
  }
}