/* Golden Data — mobile navigation (hamburger).
   Loaded after each page's own styles so it can override the historic
   `@media(max-width:880px){nav .links a:not(.cta){display:none}}` rule that
   hid the whole menu on phones and tablets with nothing to replace it.
   Desktop (>880px) is untouched: the toggle button is simply not rendered. */

nav .nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: 10px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #e9e2f7;
  cursor: pointer;
  flex: 0 0 auto;
}
nav .nav-toggle:hover { background: rgba(255, 255, 255, 0.09); }
nav .nav-toggle:focus-visible { outline: 2px solid #e483e6; outline-offset: 2px; }
nav .nav-toggle .bars,
nav .nav-toggle .bars::before,
nav .nav-toggle .bars::after {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.18s ease;
}
nav .nav-toggle .bars { position: relative; }
nav .nav-toggle .bars::before,
nav .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
nav .nav-toggle .bars::before { top: -6px; }
nav .nav-toggle .bars::after { top: 6px; }
nav .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
nav .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
nav .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

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

  /* Closed state keeps the historic behaviour: the bar shows the logo, the
     "Book a demo" CTA and the toggle. Opening turns .links into a panel. */
  nav .links.open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 18px 18px;
    background: rgba(26, 21, 48, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.65);
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }

  /* Reveal everything the historic rule hid — 44px tall touch targets. */
  nav .links.open > a,
  nav .links.open > a:not(.cta),
  nav .links.open .dropdown {
    display: block !important;
    width: 100%;
    padding: 12px 4px;
    min-height: 44px;
    line-height: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  nav .links.open .dropdown { position: static; padding-bottom: 6px; }

  /* Flatten the Products dropdown: hover menus do not work on touch, so the
     product pages are listed inline instead. */
  nav .links.open .dropbtn {
    display: block;
    padding: 12px 4px 6px;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.62;
    cursor: default;
  }
  nav .links.open .dropbtn::after { display: none; }
  nav .links.open .dropdown-menu {
    position: static;
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
  /* `display` is required here: the historic rule hides every non-CTA anchor
     inside .links, including these nested product links. */
  nav .links.open .dropdown-menu a {
    display: block !important;
    padding: 12px 4px 12px 14px;
    min-height: 44px;
    line-height: 20px;
    border-radius: 0;
    white-space: normal;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  nav .links.open .dropdown-menu a:last-child { border-bottom: 0; }

  /* The CTA becomes a full-width button at the end of the panel. */
  nav .links.open > a.cta {
    margin-top: 14px;
    padding: 13px 18px;
    text-align: center;
    border-bottom: 0;
    border-radius: 30px;
  }
}

@media (max-width: 880px) and (prefers-reduced-motion: reduce) {
  nav .nav-toggle .bars,
  nav .nav-toggle .bars::before,
  nav .nav-toggle .bars::after { transition: none; }
}
