@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 1);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  padding: 0.5rem 0;
  transition:
    background-color 0.3s ease,
    backdrop-filter 0.3s ease;
}

header.scrolled {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

nav {
  margin: 0rem calc(10px + 2vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav h2,
footer .rightSec h2 {
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  font-size: calc(10px + 0.8vw);
}

nav h2 span,
footer .rightSec span {
  color: var(--brand-color);
}

nav .options {
  display: flex;
  gap: 1.3rem;
  font-size: calc(10px + 0.3vw);
  text-transform: uppercase;
  align-items: center;
}

nav .options a {
  position: relative;
  padding-bottom: 4px;
  color: white;
  text-decoration: none;
  transition: color 0.25s ease;
}

nav .options a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-color);
  transform: scaleX(0);
  transition: transform 0.25s ease-out;
  transform-origin: right;
}

nav .options a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

nav .options a:hover {
  color: var(--brand-color);
}

nav svg,
nav .hamburger {
  display: none;
  fill: white;
}

nav .options a:last-child {
  background: transparent;
  padding: 0.5rem 0.9rem;
  border-radius: 30px;
  color: var(--brand-color);
  border: 2px solid var(--brand-color);
}

nav .options a:last-child::after {
  display: none;
}

nav .options a:last-child:hover {
  border: 2px solid transparent;
  background: var(--brand-color);
  color: black;
}

/* Tablets  */
@media (max-width: 1024px) {
  nav {
    margin: 0 calc(10px + 1.5vw);
  }

  nav .options {
    gap: 0.8rem;
    font-size: calc(10px + 0.6vw);
  }

  nav h2 {
    font-size: calc(10px + 1.2vw);
  }

  nav .options {
    align-items: normal;
  }

  nav .options a:last-child {
    background: transparent;
    color: white;
    padding: 0;
    border-radius: 0;
    padding-bottom: 4px;
    border: transparent;
  }

  nav .options a:last-child:hover {
    color: var(--brand-color);
    background: transparent;
    border: transparent;
  }

  nav .options a:last-child::after {
    display: block;
  }
}

/* Mobile phones */
@media (max-width: 600px) {
  nav {
    margin: 0 calc(10px + 1.5vw);
    position: relative;
  }

  nav .options {
    position: absolute;
    top: 3rem;
    left: calc(-1 * (10px + 1.5vw));
    right: calc(-1 * (10px + 1.5vw));
    width: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: transparent;
    padding: 1.5rem calc(10px + 1.5vw);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 9998;
    isolation: isolate;
    will-change: backdrop-filter;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition:
      max-height 0.4s ease,
      opacity 0.3s ease,
      background-color 0.3s ease;
  }

  nav .options.active {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  nav .options a {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    width: fit-content;
  }

  nav .options a:hover svg {
    fill: var(--brand-color);
  }

  nav .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
  }

  nav .hamburger div {
    display: block;
    width: calc(10px + 1.5vw);
    height: 2px;
    background-color: white;
    margin: 3px 0;
    border-radius: 3px;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
  }

  nav .hamburger.active div:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  nav .hamburger.active div:nth-child(2) {
    opacity: 0;
  }

  nav .hamburger.active div:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  nav svg {
    display: block;
    width: calc(10px + 2vw);
    height: calc(10px + 2vw);
  }
}
