/* ─────────────────────────────────────────────────────────────
   Shared marketing-site navbar.

   Single source of truth for the nav on every static sub-page
   (about / plans / privacy / terms / 404) so they match the home
   page exactly. The home page (index.html) carries its own inline
   copy of these same rules; keep the two in sync.

   Depends on tokens from /theme.css (--serif, --text, --glass-bg …).
   Behaviour (hamburger + scroll glass) lives in /js/nav.js.
   ───────────────────────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
nav.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: var(--serif-tracking);
  color: var(--text);
  line-height: 1;
  user-select: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
/* Flex keeps the padded anchors vertically centered (baseline alignment
   inside the list item pushes them above the nav midline otherwise) */
.nav-links li { display: flex; }
.nav-links a {
  display: inline-block;
  padding: 0.75rem 0.25rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 200;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { color: var(--text) !important; font-weight: 300 !important; }

/* Mobile nav toggle — padded to a ≥44px tap target, negative margin keeps
   the icon optically aligned with the nav's right edge */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 12px;
  margin-right: -12px;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
/* Open state: morph the bars into an X */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    /* Translucent but opaque enough to keep the links legible over page
       content. The navbar matches this when open so the top of the panel
       reads as one seamless surface. */
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 1.25rem 2rem;
    gap: 0.35rem;
    align-items: stretch;
  }
  .nav-links.open li { display: block; }
  .nav-links.open a { display: block; padding: 0.85rem 0; text-align: center; }
  .nav-hamburger { display: flex; }
  nav.nav-open {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
  }
}
