/* Mobile menu — shared across all pages.
   Relies on CSS variables defined in each page's :root block:
   --cream, --sepia, --sepia-ink, --sepia-soft, --border. */

/* Hamburger button — hidden on desktop, shown ≤980px. */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 6px;
  margin: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--sepia);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

@media (max-width: 980px) {
  .nav-toggle { display: flex; }
}

/* Mobile menu overlay — full-screen, fades in. */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

/* Menu header — brand + close (X). */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  position: sticky;
  top: 0;
}
.mobile-menu-header .brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--sepia);
  text-decoration: none;
}
.mobile-menu-close {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 6px;
  position: relative;
}
.mobile-menu-close::before,
.mobile-menu-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 1px;
  background: var(--sepia);
}
.mobile-menu-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.mobile-menu-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* Menu body — primary links, divider, secondary links, legal, tag. */
.mobile-menu-body {
  padding: 56px 32px 48px;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  text-align: center;
  min-height: calc(100vh - 76px);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.mm-link {
  display: block;
  padding: 14px 0;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--sepia-ink);
  text-decoration: none;
  line-height: 1.15;
}
.mm-link.active {
  font-style: italic;
}

.mm-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0 20px;
  width: 50%;
  align-self: center;
}

.mm-secondary {
  display: block;
  padding: 11px 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sepia-soft);
  text-decoration: none;
}
.mm-secondary.active { color: var(--sepia-ink); }

.mm-spacer {
  flex: 1 1 auto;
  min-height: 32px;
}

.mm-legal {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-top: 24px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.mm-legal a { color: var(--sepia-soft); text-decoration: none; }
.mm-legal a.active { color: var(--sepia-ink); }

.mm-tag {
  font-size: 13px;
  font-style: italic;
  color: var(--sepia-soft);
  margin-top: 12px;
  padding-bottom: 8px;
}

/* Body lock when menu is open. */
body.menu-open { overflow: hidden; }

/* Above the breakpoint, menu is fully unreachable + invisible. */
@media (min-width: 981px) {
  .mobile-menu { display: none; }
}
