:root {
  --primary-background-color: #1f1f1f;
  --secondary-background-color: #121314;
  --title-font-family: "Lato", sans-serif;
  --text-font-family: "Raleway", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

.navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--text-font-family);
  color: var(--secondary-background-color);
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #fff;
  animation: enhance-header linear both;
  animation-timeline: scroll(root block);
  animation-range: 0 200px;
}

.navbar__icons {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
}

.navbar__icon--menu {
  margin-right: 28px;
}

.navbar__button-signin {
  border: none;
  background-color: #0070cc;
  border-radius: 20px;
  padding: 5px;
  width: 8rem;
  color: #ffffff;
  font-family: var(--text-font-family);
  text-transform: capitalize;
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar__container-logo {
  margin: 20px 0;
  text-align: center;
  animation: reduce-logo linear both;
  animation-timeline: scroll(root block);
  animation-range: 0 200px;
}

.navbar__logo {
  max-inline-size: 200px;
  block-size: auto;
}

.navbar__list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style-type: none;
  font-size: 1.6rem;
}

.navbar__item {
  margin-bottom: 20px;
}

.navbar__link {
  color: #000000;
  text-decoration: none;
  text-transform: capitalize;
  animation: change-color linear both;
  animation-timeline: scroll(root block);
  animation-range: 0 200px;
  &:hover {
    color: #ff0000;
  }
}

.banner-container {
  background-color: #000000;
}

.game-video {
  width: 100%;
  aspect-ratio: 2560/956;
  display: block;
}

.game {
  height: auto;
  background-color: var(--primary-background-color);
  position: relative;
  padding-bottom: 10px;
}

.game::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
}

.game__info-container {
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-left: 16px;
  position: relative;
  color: #ffffff;
  top: -30px;
}

.game__title {
  font-family: var(--title-font-family);
  text-transform: capitalize;
  font-size: 4rem;
}

.game__text,
.game__button {
  font-family: var(--text-font-family);
  font-size: 1.5rem;
}

.game__text::first-letter {
  text-transform: uppercase;
}

.game__text--ps5 {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  text-transform: uppercase;
  font-size: 1.2rem;
  font-weight: bold;
  border: 1px solid #ffffff;
}

.game__text--bold {
  font-size: 1.8rem;
  font-weight: bold;
  text-transform: capitalize;
}

.game__text--price {
  margin-top: 16px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 2rem;
}

.game__button {
  background-color: #d63d00;
  border: 0;
  border-radius: 40px;
  width: 270px;
  padding: 10px;
  color: #ffffff;
  font-weight: bold;
  margin-right: 10px;
  vertical-align: middle;
}

.game__button::first-letter {
  text-transform: capitalize;
}

.favorite-icon {
  vertical-align: middle;
  fill: #ffffff;
}

.media {
  background-color: var(--primary-background-color);
  padding-bottom: 40px;
}

.media-container {
  display: flex;
  flex-wrap: wrap;
}

.media-container__img {
  width: 100%;
  aspect-ratio: 16/9;
  padding: 10px;
  border-radius: 20px;
  animation: reveal linear both;
  animation-timeline: view();
  animation-range: entry 20% cover 50%;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Aspect ratio 16:9 */
}

.media-container__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 10px;
  border: 0;
  border-radius: 20px;
  animation: reveal linear both;
  animation-timeline: view();
  animation-range: entry 20% cover 50%;
}

.overview {
  position: relative;
  background-image: url('../assets/images/marvels-spider-man-2-page-banner-desktop-miles-and-peter-01-en-11sep23-1x.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top;
  height: 600px;
  color: #ffffff;
  font-family: var(--text-font-family);
  font-size: 1.5rem;
  padding-left: 10px;
}

/* DPR 2 */
@media (min-resolution: 2dppx), (min-device-pixel-ratio: 2) {
  .overview {
    background-image: url('../assets/images/marvels-spider-man-2-page-banner-desktop-miles-and-peter-01-en-11sep23-2x.webp');
  }
}

/* DPR 3 */
/* @media (min-resolution: 3dppx), (min-device-pixel-ratio: 3) {
  .overview {
    background-image: url('../assets/images/marvels-spider-man-2-page-banner-desktop-miles-and-peter-01-en-11sep23-3x.webp');
  }
} */

.overview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.overview__body {
  position: absolute;
  bottom: 40px;
  animation: fadeInUp 1s ease-out both;
  animation-timeline: view();
  animation-range: entry 25% cover 20%;
}

.overview__subtitle {
  background-color: #ff0000;
  display: inline-block;
  width: 180px;
  text-align: center;
  font-weight: bold;
  text-transform: capitalize;
  margin-bottom: 10px;
}

.overview__title {
  font-family: var(--title-font-family);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.overview__paragraph {
  margin-bottom: 20px;
  line-height: 1.5;
}

.features {
  background-color: var(--secondary-background-color);
  color: #ffffff;
  padding: 80px 0 40px;
  text-align: center;
}

.features__title {
  font-family: var(--title-font-family);
  text-transform: uppercase;
  font-size: 4rem;
  animation: fadeInUp 1s ease-out both;
  animation-timeline: view();
  animation-range: entry 25% cover 20%;
}

.features__container {
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 0 20px;
}

.features__media {
  font-family: var(--text-font-family);
  margin-bottom: 40px;
}

.features__image {
  width: 80%;
  aspect-ratio: 400/471;
  border: 2px solid #3a8080;
  animation: reveal-feature-images linear both;
  animation-timeline: view();
  animation-range: entry 25% cover 30%;
}

.features__image--big {
  aspect-ratio: 800/943;
}

.features__image-caption {
  margin-top: 40px;
  animation: fadeInUp 1s ease-out both;
  animation-timeline: view();
  animation-range: entry 25% cover 20%;
}

.features__subtitle {
  font-size: 2rem;
  margin-bottom: 20px;
}

.features__paragraph {
  font-size: 1.5rem;
}

.my-github {
  background-color: var(--secondary-background-color);
  color: #ffffff;
  text-align: center;
  font-size: 1.8rem;
  padding-bottom: 5vh;
}

.my-github__link {
  color: #f402f4;
}

@keyframes enhance-header {
  to {
    background-color: rgba(255, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    color: #fff;
  }
}

@keyframes reduce-logo {
  to {
    transform: scale(0.8);
  }
}

@keyframes change-color {
  to {
    color: #fff;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal-feature-images {
  from {
    opacity: 0;
    clip-path: inset(45% 20% 45% 20%);
  }

  to {
    opacity: 1;
    clip-path: inset(0% 0% 0% 0%);
  }
}
