/* ---------- Mobile menu: bottom-center bar + bottom sheet ----------
   Canonical shared implementation — see docs/UX_DESIGN_GUIDELINES.md §8.
   Consumed by every marketing page (index.html, privacy.html) via
   mobile-nav.js; any future app screen should adopt the same pair rather
   than re-implementing the pattern.

   A floating pill anchored to the bottom, thumb-reachable on tall phones,
   rather than a top-corner hamburger. Uses env(safe-area-inset-*) so it
   stays clear of the home indicator / gesture bar once wrapped in Capacitor.

   Depends on design tokens (--surface-3, --border-strong, --text-primary,
   --font-display, --surface, --border, --text-secondary, --primary) being
   defined by the consuming page's own :root block. */

.mobile-menu-bar {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom) + 10px);
  transform: translateX(-50%);
  z-index: 90;
  align-items: center;
  gap: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 14px 26px;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.mobile-menu-bar:hover { border-color: var(--text-secondary); }
.mobile-menu-bar svg { flex-shrink: 0; }

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 70;
}
.mobile-nav-backdrop.open { opacity: 1; pointer-events: auto; }

#mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 20px 24px calc(96px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.22s ease;
}
#mobile-nav.open { transform: translateY(0); }
#mobile-nav a.mobile-nav-link {
  padding: 8px 0;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
}
#mobile-nav a.mobile-nav-link--emphasis {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 900px) {
  .mobile-menu-bar { display: flex; }
  .mobile-nav-backdrop { display: block; }
  #mobile-nav { display: flex; }
}
