/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-md) 0;
  background: transparent;
  transition: background var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
  opacity: 0;
  animation: navEntrance var(--duration-base) var(--ease-out) 200ms forwards;
}

@keyframes navEntrance {
  to { opacity: 1; }
}

.nav.scrolled {
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  position: relative;
  padding: var(--space-xs) 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-subscribe {
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}

.nav-subscribe:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--duration-base) var(--ease-out), opacity var(--duration-fast);
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Mobile Overlay ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: var(--z-overlay);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}

.nav-overlay.open {
  display: flex;
}

.nav-overlay-link {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  transition: color var(--duration-fast);
}

.nav-overlay-link:hover {
  color: var(--color-accent);
}

.nav-overlay-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-sm);
}

.nav-overlay-close svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-text);
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .nav-links,
  .nav-subscribe {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
}
