@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Text:wght@400;700&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --grayish-blue: hsl(237, 18%, 59%);
  --soft-red: hsl(345, 95%, 68%);
  --white: hsl(0, 0%, 100%);
  --dark-desaturated-blue: hsl(236, 21%, 26%);
  --very-dark-blue: hsl(235, 16%, 14%);
  --very-dark-black-blue: hsl(234, 17%, 12%);
}

body {
  font-family: "Red Hat Text", sans-serif;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  background-image: url("./images/bg-stars.svg");
  background-color: var(--very-dark-black-blue);]
  min-height: 100vh;
  margin: 0;
  background-color: hsl(235, 16%, 14%);
  position: relative;
  overflow: hidden; 
}

h2 {
  position: absolute;
  top: 15%;
  text-transform: uppercase;
  text-align: center;
  color: var(--white);
  letter-spacing: 6px;
  margin: 0 16px;
}

.countdown {
  display: flex;
  gap: 10px;
  text-align: center;
  margin: auto;
}

.flip-card {
  font-size: 2rem;
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  box-shadow: 0 13px 0 0 black;
  position: relative;
}

.top-flip,
.bottom-flip {
  position: absolute;
}

.top-flip {
  transform-origin: bottom;
  transform: rotateX(0deg);
  animation: flip-top 0.5s ease-in forwards;
}

.bottom-flip {
  bottom: 0;
  animation: flip-bottom 0.5s ease-out 0.5s;
  transform-origin: top;
  transform: rotateX(90deg);
}

.top,
.bottom,
.top-flip,
.bottom-flip {
  height: 33px;
  width: 80px;
  padding: 21px 16px;
  color: var(--soft-red);
  overflow: hidden;
  text-align: center;
}

.top,
.top-flip {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.7);
  background-color: rgb(48, 50, 78);
}

.bottom,
.bottom-flip {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  background-color: var(--dark-desaturated-blue);
  box-shadow: 0 2px rgb(71, 83, 115, 0.2) inset;
}

p {
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--grayish-blue);
  margin-top: 40px;
}

.title {
  margin-top: 1.2rem;
  font-size: 0.8rem;
}

.attribution {
  font-size: 11px;
  text-align: center;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}
.social-links {
    position: relative;
  z-index: 2; 
  margin-top: auto;
  padding-bottom: 72px; 
  }
  
  .social-icon {
    margin: 0 1rem;
  }
  
  .social-icon img {
    width: 24px;
    height: 24px;
  }
  
  .hills-pattern {
    position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 197px; 
  background-image: url('./images/pattern-hills.svg');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  z-index: 1; 
  }
@keyframes flip-top {
  to {
    transform: rotateX(90deg);
  }
}

@keyframes flip-bottom {
  to {
    transform: rotateX(0deg);
  }
}

@media (min-width: 376px) {
  .flip-card {
    font-size: 5rem;
  }

  .countdown {
    gap: 35px;
  }

  .top,
  .bottom,
  .top-flip,
  .bottom-flip {
    height: 80px;
    width: 150px;
    padding: 27px 16px;
  }

  .footer > img {
    width: 100%;
  }

  .media > span {
    margin-right: 25px;
  }

  .attribution {
    font-size: 1rem;
    bottom: 1vw;
  }
}