:root {
  --primary-color: #087c35;
  --secondary-color: #cca90c;
  --base-font-size: 16px;
}

@font-face {
  font-family: 'Cairo';
  src: url('assets/fonts/Cairo-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cairo';
  src: url('assets/fonts/Cairo-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: #f4f4f4;
}

html {
  --width: min(0.3906vw, 7.5px);
  font-size: calc(var(--base-font-size) + var(--width));
  animation: root-anim 5s forwards;
}

@keyframes root-anim {
  0% {
    overflow: hidden;
  }
  100% {
    overflow: auto;
  }
}

* {
  box-sizing: border-box;
}

main {
  position: relative;
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100svh;
  background-color: white;
}

.wrapper {
  flex: 1;
  display: grid;
  background-color: var(--primary-color);
}

.bg {
  grid-area: 1 / 1;
  width: 100%;
  height: 35%;
  background-color: #f4f4f4;
}

.contents {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 5rem;
}

.cards {
  display: flex;
  flex-direction: row;
  padding: 0 2rem;
  gap: 2rem;
}

.card {
  --animation-duration: 1s;

  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-radius: 50px;
  background-color: #fff;
  padding: 2rem;
  padding-bottom: 0;
  gap: 2rem;
  box-shadow: 0 0 7px rgba(0, 0, 0, 0.2);
  animation: card var(--animation-duration) var(--easing-elastic) forwards, opacity-anim 200ms linear both;
  animation-delay: var(--animation-delay, 0s);
}

@keyframes card-item {
  0% {
    opacity: 0;
    scale: 0;
  }
  100% {
    opacity: 1;
    scale: 1;
  }
}

@keyframes card {
  0% {
    transform: translateY(50%);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes opacity-anim {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 25px;
  animation: card-item var(--animation-duration) var(--easing-elastic) forwards;
  animation-delay: var(--animation-delay, 0s);
}

.card .text {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  color: #fff;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 25px;
  background-color: var(--primary-color);
  animation: card-item var(--animation-duration) var(--easing-elastic) forwards;
  animation-delay: var(--animation-delay, 0s);
}

.card .text span {
  color: var(--secondary-color);
}

.card .title {
  text-align: center;
  color: #656565;
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
  margin-top: 2rem;
  animation: card-item var(--animation-duration) var(--easing-elastic) forwards;
  animation-delay: var(--animation-delay, 0s);
}

.card .play-button {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  background-color: var(--secondary-color);
  border-radius: 50%;
  padding: 2rem;
  text-decoration: none;
  transform: translateY(50%);
  cursor: pointer;
  animation: card-item var(--animation-duration) var(--easing-elastic) forwards;
  animation-delay: var(--animation-delay, 0s);
}

.card .play-button svg {
  width: 90px;
  height: 90px;
  fill: #fff;
}

.bottom {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 2rem;
}

.home-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  background-color: #fff;
  border: solid 2px #d9d9d9;
  border-radius: 24px;
}

.home-button svg {
  width: 40px;
  height: 40px;
  fill: var(--primary-color);
}

@media screen and (max-width: 1500px) {
  .cards {
    gap: 1rem;
    padding: 0 1rem;
  }

  .card {
    gap: 0;
  }

  .card .play-button {
    padding: 0.5rem;
  }

  .card .play-button svg {
    width: 60px;
    height: 60px;
  }

  .bottom {
    padding: 0 1rem;
  }
}

main {
  --easing-elastic: linear(
    0,
    0.214,
    0.537,
    0.778,
    0.94,
    1.043,
    1.101,
    1.124,
    1.122,
    1.104,
    1.063,
    1.002,
    0.951,
    0.924,
    0.916,
    0.92,
    0.938,
    0.968,
    1.001,
    1.026,
    1.041,
    1.047,
    1.046,
    1.037,
    1.022,
    1.007,
    0.995,
    0.987,
    0.983,
    0.983,
    0.985,
    0.989,
    0.992,
    0.997,
    1.001,
    1.003,
    1.002,
    1.001,
    0.999,
    0.997,
    0.996,
    0.996,
    0.996,
    0.996,
    0.997,
    0.997,
    0.998,
    0.998,
    0.999,
    1
  );
}
