/*
 * Mobile navigation overlay — applied site-wide.
 * Hamburger button + full-screen overlay shown at ≤980px (matches existing
 * desktop-nav hide breakpoints across all pages). Above 980px the desktop
 * nav remains and the mobile chrome is fully hidden.
 *
 * Colors hardcoded (no CSS vars) so this file works even when included on
 * pages whose inline <style> doesn't define :root brand tokens.
 */

/* ============ Hamburger toggle button ============ */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  margin: 0;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-toggle-bar {
  display: block;
  width: 28px;
  height: 2px;
  background-color: #1B2A35;
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
  border-radius: 1px;
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============ Full-screen overlay ============ */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background-color: #1B2A35;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  display: flex;
  flex-direction: column;
}
.mobile-nav-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.mobile-nav-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 2rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.mobile-nav-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.mobile-nav-logo-mark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  color: #FDFCFA;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.mobile-nav-close {
  background: transparent;
  border: none;
  color: #FDFCFA;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 12px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1.5rem;
  justify-content: center;
}

.mobile-nav-link {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.875rem;
  font-weight: 400;
  color: #FDFCFA;
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: color 0.15s ease;
}
.mobile-nav-link:hover,
.mobile-nav-link:focus { color: #3D8584; }

.mobile-nav-footer {
  padding-top: 2rem;
  border-top: 1px solid rgba(253, 252, 250, 0.15);
  text-align: center;
}
.mobile-nav-footer-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253, 252, 250, 0.6);
  margin: 0 0 0.5rem 0;
}
.mobile-nav-phone {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #FDFCFA;
  text-decoration: none;
  letter-spacing: 0.02em;
}

/* Body lock when menu is open */
body.mobile-nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ============ Breakpoint switching ============ */
@media (max-width: 980px) {
  .mobile-nav-toggle { display: block; }
  /* Hide both nav patterns (.nav-menu site-wide, .nav-links legal pages) */
  .nav-menu,
  .nav-links { display: none !important; }
  /* Hide any inline-defined desktop CTA pills next to the menu on mobile */
  .nav-cta { display: none !important; }
  /* Suppress about.html's pre-existing unused hamburger button */
  .nav-toggle { display: none !important; }
}

@media (min-width: 981px) {
  .mobile-nav-toggle { display: none; }
  .mobile-nav-overlay { display: none !important; }
}
