/* Mobile menu — hamburger + dropdown panel. Erik Jun-26-2026.
   Loaded on every marketing page; activates below 720px (matches the
   existing nav breakpoint that already hides .nav-link on mobile).
   The hamburger + the inline "Get started" CTA stay in the header
   on mobile so the primary action is always one tap away. */

.hm-hamburger {
  display: none;                    /* desktop default — flex on mobile */
  border: 0; background: transparent;
  width: 40px; height: 40px;
  padding: 0; cursor: pointer;
  align-items: center; justify-content: center;
}
.hm-hamburger-bars,
.hm-hamburger-bars::before,
.hm-hamburger-bars::after {
  display: block;
  width: 22px; height: 2px;
  background: var(--text, #111827);
  position: relative;
  transition: transform .2s ease, top .2s ease, bottom .2s ease, background .2s ease;
}
.hm-hamburger-bars::before,
.hm-hamburger-bars::after {
  content: ''; position: absolute; left: 0;
}
.hm-hamburger-bars::before { top: -7px; }
.hm-hamburger-bars::after  { bottom: -7px; }
.hm-hamburger[aria-expanded="true"] .hm-hamburger-bars { background: transparent; }
.hm-hamburger[aria-expanded="true"] .hm-hamburger-bars::before { top: 0; transform: rotate(45deg); }
.hm-hamburger[aria-expanded="true"] .hm-hamburger-bars::after  { bottom: 0; transform: rotate(-45deg); }

/* Slide-down panel under the sticky header.
   max-height transition avoids height:auto animation gotchas. */
.hm-mobile-panel {
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: var(--navy, #07122a);
  color: #fff;
  z-index: 99;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height .22s ease, opacity .22s ease;
}
.hm-mobile-panel.hm-open {
  max-height: calc(100vh - 60px);
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
}
.hm-mobile-panel-inner {
  padding: 18px 22px 28px;
  display: flex; flex-direction: column;
}
.hm-mobile-link {
  display: block;
  padding: 18px 4px;
  font-size: 18px; font-weight: 600;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color .15s ease;
}
.hm-mobile-link:hover,
.hm-mobile-link:focus-visible { color: var(--cyan, #1eb8e0); }
.hm-mobile-link.hm-mobile-link--accent {
  color: var(--cyan, #1eb8e0);
}
.hm-mobile-link.hm-mobile-link--accent:hover,
.hm-mobile-link.hm-mobile-link--accent:focus-visible {
  color: #fff;
}

/* Inline language accordion — Erik Jun-26-2026 mobile fix.
   The previous version embedded the .hm-lang-picker popover here but
   that's position:absolute and got clipped by the panel's
   overflow-y: auto. Inline accordion lives in document flow → no
   clipping, no off-screen offsets. */
.hm-mobile-lang {
  margin-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 18px;
}
.hm-mobile-lang-toggle {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 12px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.hm-mobile-lang-label {
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
.hm-mobile-lang-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}
.hm-mobile-lang-arrow {
  display: inline-block;
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.hm-mobile-lang--open .hm-mobile-lang-arrow {
  transform: rotate(-135deg);
}
.hm-mobile-lang-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}
.hm-mobile-lang-list[hidden] { display: none; }
.hm-mobile-lang-option {
  display: block;
  padding: 14px 12px;            /* tap target ≥ 44px */
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.hm-mobile-lang-option:hover,
.hm-mobile-lang-option:focus-visible {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.hm-mobile-lang-option--active {
  color: var(--cyan, #1eb8e0);
  background: rgba(30,184,224,0.10);
}
.hm-mobile-lang-option--active::after {
  content: '✓';
  margin-left: 8px;
  color: var(--cyan, #1eb8e0);
}

body.hm-mobile-locked { overflow: hidden; }

@media (max-width: 720px) {
  .hm-hamburger { display: flex; }
  /* Keep the inline "Get started" CTA visible — Erik recommendation:
     CTA pinned in header next to the hamburger. */
  /* Hide the inline lang picker in the header; the panel hosts its own. */
  nav > .nav-right > .hm-lang-picker { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-mobile-panel,
  .hm-hamburger-bars,
  .hm-hamburger-bars::before,
  .hm-hamburger-bars::after { transition: none; }
}
