.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr 1fr 1fr 1fr 1fr auto;
  height: var(--nav-h);
  border-bottom: 1px solid #1a1a1a;
  background: var(--black);
}

.nav-logo-block {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  background: var(--black);
  border-right: 1px solid #1a1a1a;
  text-decoration: none;
}

.nav-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-size: 7px;
  font-weight: var(--fw-semi);
  color: var(--white);
  letter-spacing: -0.02em;
}

.nav-section {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #1a1a1a;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.15s, background 0.15s;
}

.nav-section:last-of-type {
  border-right: none;
}

.nav-section:hover {
  color: rgba(255, 255, 255, 0.7);
}

.nav-section--active { background: var(--white); color: var(--black); font-weight: 800; }

.nav-info {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: var(--font-main);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--black);
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--nav-h);
  height: var(--nav-h);
  background: none;
  border: none;
  border-left: 1px solid #1a1a1a;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-hamburger-bar {
  width: 18px;
  height: 1.5px;
  background: rgba(255,255,255,0.6);
  transition: transform 0.2s, opacity 0.2s, width 0.2s;
}

/* Full-screen drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + env(safe-area-inset-top)) var(--gutter)
           calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-100%);
  /* Opacity trails the slide slightly so the panel arrives rather than
     snapping in from the edge. */
  opacity: 0;
  transition: transform 0.34s var(--ease-out), opacity 0.24s var(--ease-out);
}

.nav-open .nav-drawer {
  transform: translateX(0);
  opacity: 1;
}

/* Without this the page behind the full-screen drawer still scrolls under
   a swipe, and iOS keeps the rubber-band bounce. */
body.nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.nav-drawer-link {
  font-family: var(--font-main);
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255,255,255,0.5);
  padding: 20px 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #1a1a1a;
  transition: color 0.15s, opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.nav-drawer-link:first-child { border-top: 1px solid #1a1a1a; }
.nav-drawer-link:active { color: var(--white); }

@media (hover: hover) and (pointer: fine) {
  .nav-drawer-link:hover { color: var(--white); }
}

/* Links settle in behind the panel, staggered. */
@media (prefers-reduced-motion: no-preference) {
  .nav-drawer-link { opacity: 0; transform: translateY(12px); }
  .nav-open .nav-drawer-link { opacity: 1; transform: none; }
  .nav-open .nav-drawer-link:nth-child(1) { transition-delay: 0.10s; }
  .nav-open .nav-drawer-link:nth-child(2) { transition-delay: 0.15s; }
  .nav-open .nav-drawer-link:nth-child(3) { transition-delay: 0.20s; }
  .nav-open .nav-drawer-link:nth-child(4) { transition-delay: 0.25s; }
  .nav-open .nav-drawer-link:nth-child(5) { transition-delay: 0.30s; }
}

.page-events   .nav-drawer-link--events,
.page-releases .nav-drawer-link--releases,
.page-about    .nav-drawer-link--about,
.page-merch    .nav-drawer-link--merch { color: var(--white); }

/* Hamburger to X animation when open */
.nav-open .nav-hamburger-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-hamburger-bar:nth-child(2) { opacity: 0; width: 0; }
.nav-open .nav-hamburger-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 640px) {
  /* 40px leaves the hamburger below the 44px minimum touch target. */
  :root { --nav-h: 48px; }

  .site-nav {
    grid-template-columns: auto 1fr auto;
    padding-top: env(safe-area-inset-top);
    height: calc(var(--nav-h) + env(safe-area-inset-top));
  }
  .nav-section { display: none; }
  .nav-info { display: none; }
  .nav-hamburger { display: flex; grid-column: 3; /* force to the rightmost column */ }

  /* Column 2 was an empty bordered box that read as a broken input. Name the
     current section there instead — the desktop nav shows it as the active
     tab, and the drawer is closed by default on mobile. */
  .site-nav::after {
    content: attr(data-section);
    grid-row: 1;
    grid-column: 2;
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
  }

  .nav-logo-block { padding: 0 14px; }
  .nav-dot { width: 24px; height: 24px; font-size: 7px; }
}
