/* ─────────────────────────────────────────────────────────────────────────────
   Nav — Midnight Celestial, ported from the shipped Dark Romance redesign.
   Structure change only: MC's 3-column grid (mono | centred list | cta)
   becomes the redesign's single flush bar — monogram hard left, letterspaced
   links and a bordered RSVP button hard right, glass from the first pixel.
   DOM gains a hamburger + full-screen overlay (MC had none); the desktop rail
   stays in the DOM below 1024px as the clone source (site.js). All of MC's
   existing {{#if}}-gated nav items and their data-scroll-to hooks are
   untouched — see PORT-NOTES.md § Nav.
   ──────────────────────────────────────────────────────────────────────────── */

.nav-top {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.5s, border-color 0.5s, box-shadow 0.5s;
  border-bottom: 1px solid var(--rule);
  /* Glass from the top, not opaque-then-glass. */
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-top.nav-scrolled {
  background: rgba(10, 14, 26, 0.92);
  border-bottom-color: var(--rule-bright);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.nav-top-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px clamp(14px, 2.4vw, 30px);
  padding: 14px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Monogram — hard left, pushes everything else right */
.nav-mono {
  display: flex; align-items: baseline; gap: 5px;
  cursor: pointer;
  margin-right: auto;
  flex-shrink: 0;
  color: var(--gold-warm);
  font-family: var(--ff-editorial);
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0.12em;
  transition: opacity 0.4s;
}
.nav-mono:hover { opacity: 0.82; }
.mono-letter { font-family: var(--ff-sc); font-weight: 600; font-size: 22px; letter-spacing: 0.1em; }
.mono-amp { color: var(--gold); font-size: 15px; font-family: var(--ff-editorial); font-style: italic; }

/* Link rail — one line, always. Right-aligned when the gated items fit;
   quietly scrollable when they do not, so the bar never becomes two rows and
   no item is ever hidden. */
.nav-top-list {
  display: flex;
  justify-content: flex-end;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(10px, 1.05vw, 22px);
  list-style: none; margin: 0; padding: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 100%);
}
.nav-top-list::-webkit-scrollbar { display: none; }
.nav-top-list li { flex: 0 0 auto; }
.nav-top-list button {
  background: none; border: none; padding: 8px 0;
  color: var(--parchment);
  letter-spacing: 0.1em;
  font-size: clamp(9px, 0.72vw, 10.5px);
  white-space: nowrap;
  transition: color 0.4s;
  position: relative;
}
.nav-top-list button:hover { color: var(--bone); }
.nav-top-list button:focus-visible {
  outline: 1px solid var(--rule-bright);
  outline-offset: 4px;
}
.nav-top-list li.active button { color: var(--gold); }
.nav-top-list li.active button::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* RSVP — bordered, never wraps away from the bar */
.nav-top-cta { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-cta-btn {
  background: none;
  border: 1px solid var(--rule-bright);
  padding: 10px 22px;
  color: var(--bone);
  font-size: 10px; letter-spacing: var(--tr-wide);
  white-space: nowrap;
  transition: background 0.45s, border-color 0.45s, color 0.45s;
}
.nav-cta-btn .eyebrow { color: inherit; }
.nav-cta-btn:hover {
  /* Filled state stays a cool navy wash, never gold — the metallic remains
     type/border-only even on the primary nav CTA. */
  background: rgba(27, 35, 64, 0.55);
  border-color: var(--gold);
  color: var(--gold-pale);
}
.nav-cta-btn:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

/* ── Hamburger ─────────────────────────────────────────────────────────────── */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  background: none;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: border-color 0.4s;
}
.nav-burger:hover { border-color: var(--rule-bright); }
.nav-burger:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
.nav-burger-bar {
  display: block;
  width: 18px; height: 1px;
  background: var(--bone);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), opacity 0.25s;
}
.nav-burger.is-open .nav-burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open .nav-burger-bar:nth-child(2) { opacity: 0; }
.nav-burger.is-open .nav-burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Full-screen overlay menu ──────────────────────────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 14, 26, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px clamp(24px, 8vw, 56px) 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.nav-overlay[hidden] { display: none; }
.nav-overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}
.nav-overlay-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.nav-overlay-link {
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 15px 0;
  text-align: left;
  font-family: var(--ff-sc);
  font-weight: 600;
  font-size: clamp(20px, 5.6vw, 25px);
  letter-spacing: 0.04em;
  color: var(--bone);
  cursor: pointer;
  transition: color 0.3s, padding-left 0.3s;
}
.nav-overlay-link:hover,
.nav-overlay-link:focus-visible { color: var(--gold); padding-left: 8px; }
.nav-overlay-link:focus-visible { outline: 1px solid var(--rule-bright); outline-offset: 2px; }
.nav-overlay-cta {
  margin-top: 26px;
  padding: 17px 34px;
  text-align: center;
  background: linear-gradient(180deg, rgba(27, 35, 64, 0.62), rgba(14, 21, 40, 0.34));
  border: 1px solid var(--rule-bright);
  color: var(--bone);
  cursor: pointer;
  transition: background 0.45s, border-color 0.45s;
}
.nav-overlay-cta .eyebrow { color: var(--bone); letter-spacing: var(--tr-wide); }
.nav-overlay-cta:hover { background: linear-gradient(180deg, rgba(38, 48, 84, 0.9), rgba(27, 35, 64, 0.6)); border-color: var(--gold); }
.nav-overlay-cta:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .nav-overlay, .nav-burger-bar, .nav-overlay-link { transition: none; }
}

/* ── Tablet / mobile ───────────────────────────────────────────────────────── */
/* Swapped for the hamburger at 1024px (not 900px, matching DR's rationale): a
   fully gated 14-item wedding nav plus monogram and RSVP button does not fit
   on one line below ~1100px. */
@media (max-width: 1024px) {
  .nav-top-inner { padding: 12px var(--gutter); }
  /* Rail stays in the DOM — it is the source site.js clones the overlay from,
     and the {{#if}} gates live on it. */
  .nav-top-list { display: none; }
  .nav-burger { display: flex; }
  .nav-cta-btn { padding: 9px 16px; }
}

@media (max-width: 480px) {
  .nav-mono { font-size: 17px; }
  .mono-letter { font-size: 19px; }
  .mono-amp { font-size: 13px; }
}
