/* =========================================
   HEADER
========================================= */

.site-header {
  background: var(--ink);
  color: #fff;
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-wrap {
  min-height: 82px;
  max-width: 1400px;
  padding: 0 32px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-wrap > nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nav-wrap > nav .primary-menu {
  pointer-events: auto;
}

/* =========================================
   BRAND
========================================= */

.brand {
  font: 900 26px / 0.72 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.035em;
  max-width: 130px;
}

.brand span {
  color: var(--red);
}

/* =========================================
   HAMBURGER NAVIGATION
   Always used on desktop and mobile
========================================= */

.menu-toggle {
  display: flex;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #fff;
  width: 42px;
  height: 42px;
  padding: 10px 7px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   NAVIGATION MENU
   Hidden until hamburger is clicked
========================================= */

.primary-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 82px;
  background: var(--ink);
  padding: 18px 32px 26px;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  list-style: none;
  margin: 0;
  text-transform: uppercase;
  font: 700 14px var(--display);
  letter-spacing: 0.08em;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.primary-menu.is-open {
  display: flex;
}

.primary-menu a {
  padding: 10px 0;
  position: relative;
}

.primary-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 5px;
  height: 2px;
  background: var(--red);
  transition: right 0.22s;
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item a::after {
  right: 0;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 70px;
    padding: 0 20px;
  }

  .brand {
    font-size: 23px;
  }

  .primary-menu {
    top: 70px;
    padding: 12px 20px 22px;
  }
}
