/* =============================================================
   MANUVA — MOBILE STYLES (shared across all pages)
   Loaded after tokens.css on every page.
   ============================================================= */

/* ----- Shared responsive overrides (apply everywhere) ----- */

/* Tighter page gutters on tablet down */
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
}

/* ----- Nav hide desktop links -----
   Higher specificity (.nav .nav-links) wins over the per-page inline
   `.nav-links { display: flex }` rule that loads after this file. */

@media (max-width: 959px) {
  .nav .nav-links { display: none; }
}

/* ----- Burger button ----- */

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--ink-strong);
  cursor: pointer;
  margin-left: 4px;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.nav-burger:hover { background: var(--bg-card-2); }
.nav-burger:focus-visible {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: var(--shadow-focus);
}
.nav-burger svg { width: 22px; height: 22px; }

@media (max-width: 959px) {
  .nav .nav-burger { display: inline-flex; }
  /* Hide inline Sign in / Start free trial CTAs — both live in the drawer. */
  .nav .nav-right .btn { display: none; }
}

/* ----- Drawer ----- */

.nav-drawer {
  position: fixed; inset: 0;
  z-index: 100;
}
.nav-drawer[hidden] { display: none; }

.nav-drawer-scrim {
  position: absolute; inset: 0;
  background: var(--bg-overlay);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}

.nav-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(360px, 84vw);
  background: var(--bg-card);
  border-left: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg);
  padding: 20px 20px 24px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 200ms var(--ease-out);
}

.nav-drawer.is-open .nav-drawer-scrim { opacity: 1; }
.nav-drawer.is-open .nav-drawer-panel { transform: translateX(0); }

.nav-drawer-close {
  align-self: flex-end;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-xs);
  font-size: 24px; line-height: 1; color: var(--ink-muted);
  cursor: pointer;
  margin-bottom: 4px;
}
.nav-drawer-close:hover { color: var(--ink-strong); background: var(--bg-card-2); }
.nav-drawer-close:focus-visible {
  outline: none; border-color: var(--brand-1); box-shadow: var(--shadow-focus);
}

.nav-drawer-links {
  display: flex; flex-direction: column;
  margin-bottom: 16px;
}
.nav-drawer-links a {
  display: block;
  padding: 14px 4px;
  font-size: 16px; font-weight: 500;
  color: var(--ink-strong);
  border-bottom: 1px solid var(--stroke);
}
.nav-drawer-links a:last-child { border-bottom: none; }
.nav-drawer-links a:hover { color: var(--brand-1); }

.nav-drawer-ctas {
  display: flex; flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.nav-drawer-ctas .btn { width: 100%; justify-content: center; }

/* Lock body scroll when drawer open */
body.no-scroll {
  overflow: hidden;
  /* Prevent layout shift from scrollbar disappearing */
  padding-right: var(--scrollbar-width, 0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nav-drawer-scrim,
  .nav-drawer-panel {
    transition: none;
  }
}
