/* ========================================
   NAVIGATION
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 40px;
  transition: all 0.4s ease;
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.4s ease;
}

.nav.scrolled {
  background: rgba(248, 245, 240, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav.scrolled .nav-inner {
  padding: 16px 0;
  border-bottom-color: var(--paper-border);
}

.nav-logo {
  font-family: var(--sans);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.nav-logo span {
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white) !important;
  background: var(--ink);
  padding: 10px 24px;
  border-radius: 2px;
  transition: background 0.3s ease, transform 0.2s ease !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
}

/* Dark hero variant — add .nav-dark to <nav> on pages with dark heroes */
.nav-dark .nav-logo svg path {
  fill: rgba(255, 252, 248, 0.7);
  transition: fill 0.4s ease;
}

.nav-dark .nav-links a {
  color: rgba(255, 252, 248, 0.55);
}

.nav-dark .nav-links a:hover {
  color: rgba(255, 252, 248, 0.9);
}

.nav-dark .nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
}

.nav-dark .nav-cta:hover {
  background: var(--white) !important;
  color: var(--ink) !important;
}

.nav-dark .nav-mobile-toggle span {
  background: rgba(255, 252, 248, 0.7);
}

/* Revert to normal once scrolled (light background kicks in) */
.nav-dark.scrolled .nav-logo svg path {
  fill: black;
}

.nav-dark.scrolled .nav-links a {
  color: var(--ink-light);
}

.nav-dark.scrolled .nav-links a:hover {
  color: var(--ink);
}

.nav-dark.scrolled .nav-cta {
  background: var(--ink) !important;
  color: var(--white) !important;
}

.nav-dark.scrolled .nav-cta:hover {
  background: var(--accent) !important;
  color: var(--white) !important;
}

.nav-dark.scrolled .nav-mobile-toggle span {
  background: var(--ink);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: all 0.3s ease;
}
