/* ─────────── Mobile overflow guard (shared) ─────────── */
html { overflow-x: hidden; }
body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}
@media (max-width: 768px) {
  html, body {
    overflow-x: clip;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    width: 100vw;
    max-width: 100vw;
  }
}

/* ─────────── Mobile nav (shared) ─────────── */

/* Hamburger button — hidden on desktop, shown on mobile */
.g-nav__menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--ink, #013228);
  cursor: pointer;
  border-radius: 8px;
  transition: background 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
.g-nav__menu-btn:hover { background: rgba(1,33,27,0.06); }
.g-nav__menu-btn:active { background: rgba(1,33,27,0.10); }
.g-nav__menu-btn-icon {
  font-size: 24px;
  line-height: 1;
  display: block;
}

/* Mobile overlay — full container; hidden by default */
.g-nav__mobile {
  position: fixed;
  inset: 0;
  z-index: 49;
  visibility: hidden;
  pointer-events: none;
}
.g-nav[data-mobile-open="true"] + .g-nav__mobile {
  visibility: visible;
  pointer-events: auto;
}

/* Scrim behind panel */
.g-nav__mobile-scrim {
  position: absolute;
  inset: 0;
  background: rgba(1,17,14,0.55);
  opacity: 0;
  transition: opacity 220ms cubic-bezier(.2,0,0,1);
}
.g-nav[data-mobile-open="true"] + .g-nav__mobile .g-nav__mobile-scrim {
  opacity: 1;
}

/* Panel — slides down from under the sticky header */
.g-nav__mobile-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(246,245,241,0.97);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(1,33,27,0.08);
  padding: 76px 20px 24px;
  transform: translateY(-100%);
  transition: transform 260ms cubic-bezier(.2,0,0,1);
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.g-nav[data-mobile-open="true"] + .g-nav__mobile .g-nav__mobile-panel {
  transform: translateY(0);
}

/* Mobile link list */
.g-nav__mobile-links {
  display: grid;
  gap: 0;
}
.g-nav__mobile-link,
.g-nav__mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 4px;
  font: 500 17px/1.1 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink, #013228);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(1,33,27,0.08);
  text-align: left;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.g-nav__mobile-link[aria-current="page"] {
  color: var(--grove, #014437);
  font-weight: 600;
}

/* Small "Beta" / "New" tag that sits next to a nav link label.
   Used on both desktop (.g-nav__links > a) and mobile (.g-nav__mobile-link)
   so it lives in mobile-nav.css (loaded by every page). */
.g-nav-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px 3px;
  border-radius: 999px;
  background: #E4ECDF;
  color: #014437;
  font: 600 9px/1 "Geist Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-left: 6px;
  vertical-align: middle;
}
.g-nav__mobile-toggle .ph,
.g-nav__mobile-link .ph {
  font-size: 16px;
  transition: transform 200ms ease;
  opacity: 0.55;
}
.g-nav__mobile-toggle[aria-expanded="true"] .ph {
  transform: rotate(180deg);
  opacity: 1;
}

/* Product accordion sub-items */
.g-nav__mobile-sub {
  display: none;
  padding: 4px 0 12px 8px;
  border-bottom: 1px solid rgba(1,33,27,0.08);
}
.g-nav__mobile-toggle[aria-expanded="true"] + .g-nav__mobile-sub {
  display: grid;
  gap: 0;
}
.g-nav__mobile-sub a {
  display: block;
  padding: 12px 8px;
  font: 400 14px/1.35 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink, #013228);
  opacity: 0.72;
  text-decoration: none;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.g-nav__mobile-sub a:hover,
.g-nav__mobile-sub a:active {
  opacity: 1;
  background: rgba(1,33,27,0.04);
}

/* Secondary CTA inside panel */
.g-nav__mobile-cta {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.g-nav__mobile-cta .g-btn {
  width: 100%;
  justify-content: center;
}

/* Mobile activation — at 980px (matches existing breakpoint that hides .g-nav__links) */
@media (max-width: 980px) {
  /* Restore sticky header on mobile (existing CSS overrides this to position:relative) */
  .g-nav {
    position: sticky !important;
    top: 0 !important;
  }
  /* Show hamburger */
  .g-nav__menu-btn {
    display: inline-flex;
  }
  /* Hide the ghost-style CTA (Schedule demo) in the header — it lives inside the mobile panel */
  .g-nav__cta .g-btn--ghost {
    display: none;
  }
  /* Tighten gap so the remaining elements have breathing room */
  .g-nav__inner {
    gap: 8px !important;
  }
  /* Lock body scroll while menu is open */
  body[data-mobile-nav-open="true"] {
    overflow: hidden;
  }
}

/* Hide hamburger on desktop unconditionally */
@media (min-width: 981px) {
  .g-nav__menu-btn { display: none !important; }
  .g-nav__mobile { display: none !important; }
}
