/* Shared site navigation. Keep page-level layout rules out of this file. */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  background: #090909;
  font-family: 'Martian Mono', monospace;
}

nav::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0.2px;
  background: #302e2a;
}

.nav-section {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-section-logo {
  width: 25.49%;
  min-width: 180px;
  padding-left: 10.9%;
  border-right: 0.2px solid #302e2a;
}

.nav-logo {
  display: block;
  width: 54px;
  height: 54px;
  overflow: hidden;
}

.nav-logo:has(.logo-full) {
  width: 190px;
}

.nav-logo img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  object-position: left center;
}

.nav-section-links {
  flex: 1;
  justify-content: center;
  border-right: 0.2px solid #302e2a;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
}

.nav-links a,
.nav-section-right a {
  position: relative;
  padding: 5px 14px;
  color: #d9d2c9;
  font-size: clamp(11px, 1.11vw, 16px);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.1s, background 0.1s, box-shadow 0.1s, text-shadow 0.1s;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-section-right a:hover,
.nav-section-right a:focus-visible {
  color: #000;
  background: linear-gradient(135deg, #d4c9b8 0%, #c8bba6 40%, #c2b8a8 60%, #cbbfa8 100%);
  box-shadow: inset 0 6px 6.4px -1px rgba(0, 0, 0, 0.15), inset 0 -1px 1px rgba(255, 255, 255, 0.3), 1px 1px 0 #000080, 3px 3px 0 #880000;
  outline: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.nav-section-right {
  width: 17.36%;
  min-width: 140px;
  justify-content: center;
  cursor: pointer;
  transition: background 0.1s, box-shadow 0.1s;
}

.nav-section-right a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.nav-section-right:hover,
.nav-section-right:focus-within {
  background: linear-gradient(135deg, #d4c9b8 0%, #c8bba6 40%, #c2b8a8 60%, #cbbfa8 100%);
  box-shadow: inset 0 6px 6.4px -1px rgba(0, 0, 0, 0.15), inset 0 -1px 1px rgba(255, 255, 255, 0.3), -3px 0 0 #000080, 0 3px 0 #880000;
}

.nav-section-right:hover a,
.nav-section-right:focus-within a {
  color: #000;
  background: none;
  box-shadow: none;
}

.nav-dropdown {
  position: fixed;
  top: 72px;
  right: 17.36%;
  left: 25.49%;
  z-index: 1001;
  display: flex;
  height: 87px;
  opacity: 0;
  pointer-events: none;
  background: #090909;
  border: 0.2px solid #b2a38b;
  transition: opacity 0.2s ease;
}

.nav-dropdown.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-dropdown-grid {
  align-items: stretch;
  padding: 0;
}

.nav-dropdown-tile {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #fff;
  border-right: 0.2px solid #b2a38b;
  font-family: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  font-size: 22px;
  font-weight: 550;
  letter-spacing: 0.035em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-text-stroke: 0.28px currentColor;
  transition: color 0.12s, background 0.12s, box-shadow 0.12s, text-shadow 0.12s;
}

.nav-dropdown-tile:last-child {
  border-right: 0;
}

.nav-dropdown-tile:hover,
.nav-dropdown-tile:focus-visible {
  color: #000;
  background: linear-gradient(135deg, #d4c9b8 0%, #c8bba6 40%, #c2b8a8 60%, #cbbfa8 100%);
  box-shadow: inset 0 6px 6.4px -1px rgba(0, 0, 0, 0.15), inset 0 -1px 1px rgba(255, 255, 255, 0.3);
  outline: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hamburger {
  position: absolute;
  top: 50%;
  right: 24px;
  display: none;
  color: #d9d2c9;
  background: none;
  border: 0;
  font-size: 24px;
  cursor: pointer;
  transform: translateY(-50%);
}

.mobile-menu {
  position: fixed;
  top: 72px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  display: block;
  padding: 0;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: #090909;
  transform: translateY(-18px);
  transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.34s;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.mobile-menu-section {
  opacity: 0;
  border-bottom: 0.5px solid #302e2a;
  transform: translateY(-10px);
  transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.open .mobile-menu-section {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open .mobile-menu-section:nth-child(1) { transition-delay: 0.04s; }
.mobile-menu.open .mobile-menu-section:nth-child(2) { transition-delay: 0.08s; }
.mobile-menu.open .mobile-menu-section:nth-child(3) { transition-delay: 0.12s; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
}

.mobile-menu-header span {
  color: #d9d2c9;
  font-family: 'Martian Mono', monospace;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-chevron {
  color: #555;
  font-size: 12px;
  transition: transform 0.3s;
}

.mobile-menu-section.open .mobile-chevron {
  color: #b2a38b;
  transform: rotate(90deg);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 0;
  padding: 0 24px 0 40px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), padding-bottom 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu-section.open .mobile-menu-links {
  max-height: 180px;
  padding-bottom: 18px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu-links a {
  color: #777;
  font-family: 'Martian Mono', monospace;
  font-size: 12px;
  font-weight: 200;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.mobile-menu-links a:hover,
.mobile-menu-links a:focus-visible {
  color: #d9d2c9;
  outline: none;
}

.mobile-menu-cta {
  padding: 24px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.26s ease 0.16s, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.16s;
}

.mobile-menu.open .mobile-menu-cta {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-cta a {
  display: block;
  padding: 14px;
  color: #000;
  background: #d9d2c9;
  font-family: 'Martian Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .nav-section-links,
  .nav-section-right,
  .nav-dropdown {
    display: none;
  }

  .nav-section-logo {
    width: auto;
    min-width: 0;
    padding-left: 24px;
    border-right: 0;
  }

  .nav-logo,
  .nav-logo:has(.logo-full) {
    width: 54px;
  }

  .nav-logo:has(.logo-full) {
    animation: none;
  }

  .nav-logo .logo-full {
    display: none;
  }

  .nav-logo .logo-icon {
    opacity: 1;
    animation: none;
  }

  .hamburger {
    display: block;
  }

  .mobile-menu-links a {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .nav-logo,
  .nav-logo:has(.logo-full),
  .nav-logo img {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown,
  .mobile-menu,
  .mobile-menu-section,
  .mobile-menu-links,
  .mobile-menu-cta {
    transition-duration: 0.01ms;
  }
}
