#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base);
}

#nav.scrolled {
  border-bottom-color: var(--grey-2);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8vw;
  max-width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--white);
}

.nav-logo-dot {
  color: var(--grey-3);
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-4);
  transition: color var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--white);
  padding: 10px 20px;
  border: 1px solid var(--white);
  transition: background-color var(--transition-base),
              color var(--transition-base),
              transform var(--dur-press) var(--ease-out);
}

.nav-cta:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

@media (hover: hover) and (pointer: fine) {
  .nav-cta:hover {
    background: transparent;
    color: var(--white);
  }
}

.nav-hamburger {
  display: none;
  font-size: 22px;
  color: var(--white);
  background: none;
  border: none;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  transition: opacity 200ms var(--ease-out), visibility 0s linear 0s;
}

.nav-overlay .nav-link {
  font-family: var(--font-display);
  /* Fluid so the longest label still fits at 320px — and while the
     display face is still loading and the fallback runs wider. */
  font-size: clamp(28px, 7.5vw, 44px);
  letter-spacing: 0.1em;
  text-align: center;
  padding: 0 24px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-menu) var(--ease-out),
              transform var(--dur-menu) var(--ease-out);
}

/* Enter staggered; on close the delays drop to zero so dismissal is
   immediate — slow where the user is deciding, fast where we respond. */
.nav-overlay.open .nav-link {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(80ms + var(--i, 0) * 40ms);
}

.nav-overlay .nav-hamburger {
  position: absolute;
  top: 20px;
  right: 8vw;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .nav-overlay .nav-link {
    transform: none;
  }
  .nav-overlay.open .nav-link {
    transition-delay: calc(var(--i, 0) * 20ms);
  }
}

/* The mark carries the same weight as the wordmark beside it, so it is
   sized to the cap height of the 22px display type, not to its own box. */
.nav-logo-mark {
  display: block;
  width: 29px;
  height: 26px;
  flex-shrink: 0;
}
