/**
 * GeminiPrime — Premium off-canvas mobile menu
 * Slides in from the right with a frosted-glass panel.
 * Works on every page (index, inner, legal).
 * Breakpoint: ≤ 991 px (matches Webflow data-collapse="medium").
 */

/* ── Scrim (dark backdrop behind the panel) ── */
.axm-scrim {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.axm-scrim.is-visible {
  background: rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

/* ── Off-canvas panel ── */
.axm-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9999;
  width: min(340px, 85vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(8, 10, 22, 0.97);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border-left: 1px solid rgba(109, 80, 255, 0.15);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.15, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.axm-panel.is-open {
  transform: translateX(0);
}

/* ── Panel header ── */
.axm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.axm-panel-logo img {
  height: 26px;
  width: auto;
  display: block;
}

.axm-close-btn {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.axm-close-btn:hover {
  background: rgba(109, 80, 255, 0.2);
  color: #fff;
}

.axm-close-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ── Nav links ── */
.axm-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.axm-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.82rem 1rem;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.axm-link:hover,
.axm-link:focus-visible {
  background: rgba(109, 80, 255, 0.1);
  color: #fff;
}

.axm-link:active {
  transform: scale(0.98);
}

.axm-link.is-current {
  background: rgba(11, 209, 220, 0.08);
  color: #0bd1dc;
}

/* Dropdown group */
.axm-group-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.82rem 1rem;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  user-select: none;
}

.axm-group-label:hover {
  background: rgba(109, 80, 255, 0.1);
  color: #fff;
}

.axm-group-label .axm-chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.25s ease;
}

.axm-group.is-expanded .axm-group-label .axm-chevron {
  transform: rotate(180deg);
}

.axm-group-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-left: 1.15rem;
}

.axm-group.is-expanded .axm-group-sub {
  max-height: 200px;
  padding-top: 2px;
  padding-bottom: 4px;
}

.axm-sub-link {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.83rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.axm-sub-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

/* ── Divider ── */
.axm-divider {
  height: 1px;
  margin: 0.5rem 1rem;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

/* ── Panel footer (CTA) ── */
.axm-panel-footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-shrink: 0;
}

.axm-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 0;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: filter 0.2s, transform 0.15s;
}

.axm-cta:active {
  transform: scale(0.97);
}

.axm-cta-primary {
  background: linear-gradient(135deg, #0bd1dc 0%, #6d50ff 100%);
  color: #fff;
}

.axm-cta-primary:hover {
  filter: brightness(1.12);
}

.axm-cta-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.axm-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ── Burger button override ── */
@media (max-width: 991px) {
  .menu-button-4.w-nav-button {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: transparent;
    transition: background 0.2s;
    cursor: pointer;
    padding: 0;
  }

  .menu-button-4.w-nav-button:hover {
    background: rgba(109, 80, 255, 0.12);
  }

  .menu-button-4.w-nav-button.w--open {
    background: transparent !important;
  }

  .burger-line-2 {
    background-color: rgba(255, 255, 255, 0.8) !important;
    width: 20px;
    height: 2px;
    border-radius: 2px;
  }

  .burger-line-2.open {
    background-color: rgba(255, 255, 255, 0.8) !important;
  }

  .navbar-3 {
    z-index: 100;
  }
}

/* ── Hide original Webflow overlay so it doesn't fight us ── */
@media (max-width: 991px) {
  .w-nav-overlay {
    display: none !important;
  }
}

/* ── Desktop: hide off-canvas elements entirely ── */
@media (min-width: 992px) {
  .axm-scrim,
  .axm-panel {
    display: none !important;
  }
}
