nav {
  background: transparent;
  width: 100vw;
  height: 5rem;
  position: fixed;
  top: 0;
  z-index: 11;
}

/* Change navbar style when scrolling with js */

.window-scroll {
  background: var(--primary-color);
  box-shadow: 0 1rem 2rem (rgba(222, 176, 176, 0.2));
}

.nav__container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo h4 {
  font-size: 2rem;
  color: transparent;
  background-clip: text;
  -webkit-text-stroke-width: 2px;
  -webkit-text-stroke-color: var(--bg2-color);
  transition: var(--transition);
}

.nav__logo:hover h4,
.nav__logo.active h4 {
  color: var(--white-color);
  -webkit-text-stroke-width: 0;
}

/* .nav__container a h4::first-letter {
  color: var(--bg2-color);
  text-decoration: underline;
  -webkit-text-stroke: none;
} */

nav button {
  display: none;
  transition: var(--transition);
  animation: appear linear 1s;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.nav__link {
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: 1rem;
  overflow: hidden;
}

.nav__link::before {
  content: "";
  width: 0%;
  height: 3px;
  position: absolute;
  bottom: 0;
  left: 0;
  background: var(--bg2-color);
  transition: var(--transition);
}

.nav__menu li:hover::before,
.nav__link.active::before {
  width: 100%;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--bg2-color);
  z-index: -1;
  transition: var(--transition);
  transition-delay: 0.5s;
}

.nav__link:hover::after,
.nav__link.active::after {
  height: 100%;
}

.nav__menu a {
  font-size: 0.9rem;
}

.nav__menu a:hover {
  color: var(--bg11-color);
}

/* ================== Media Queries (Tablet) ======================== */

@media screen and (max-width: 1024px) {
  nav button {
    display: inline-block;
    background: transparent;
    font-size: 1.8rem;
    color: var(--white-color);
    cursor: pointer;
  }

  nav button#close-menu-btn {
    display: none;
  }

  .nav__menu {
    position: fixed;
    top: 5rem;
    right: 5%;
    height: fit-content;
    width: 18rem;
    flex-direction: column;
    gap: 0;
    display: none;
  }

  .nav__menu li {
    width: 100%;
    height: 5.8rem;
    animation: animatedMenuItems 400ms linear forwards;
    transform-origin: top right;
    opacity: 0;
    background: rgba(0, 0, 0, 0.5);

    box-shadow: -4rem 6rem 10rem rgba(0, 0, 0, 0.6);
    cursor: pointer;
    font-weight: bolder;
  }

  .nav__link a {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
  }

  .nav__menu li:nth-child(2) {
    animation-delay: 200ms;
  }
  .nav__menu li:nth-child(3) {
    animation-delay: 400ms;
  }
  .nav__menu li:nth-child(4) {
    animation-delay: 600ms;
  }
}

/* ================== Media Queries (Phone) ======================== */

@media screen and (max-width: 600px) {
  .nav__menu {
    right: 3%;
  }
}

/* ================ Animations ================ */

@keyframes animatedMenuItems {
  from {
    transform: rotateZ(-90deg) rotateX(90deg) scale(0.1);
  }

  to {
    transform: rotateZ(0) rotateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
