/* Sandwich menu (hamburger) — shared by anywave.health home and /docs/ pages.
   Colours come from the site's :root tokens (--casing, --logo, --coral). */

/* The toggle is absolutely placed inside the (sticky/positioned) <header>;
   each page already positions its own header. */

.nav-toggle {
  position: absolute;
  top: 50%;
  right: 26px;
  transform: translateY(-50%);
  width: 26px;
  height: 20px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 70;                 /* stays above the overlay */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #eceef0;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle:hover span { background: var(--logo, #E8403A); }
/* three bars morph into an X */
.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--casing, #383E42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.nav-overlay[hidden] { display: none; }

/* While the menu is open, lift the header (and with it the toggle) above the
   overlay so the X stays visible and clickable. The header and overlay share
   the same anthracite, so the bar blends seamlessly. */
body.nav-open header { z-index: 80; border-bottom-color: transparent; }
.nav-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 560px;
  text-align: center;
}
.nav-panel a.nav-item {
  display: block;
  font-size: clamp(22px, 4.6vw, 32px);
  font-weight: 600;
  letter-spacing: .01em;
  color: #f4f5f6;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 12px;
  transition: color .2s ease, background .2s ease;
}
.nav-panel a.nav-item:hover { color: var(--logo, #E8403A); background: rgba(255,255,255,.05); }
.nav-panel a.nav-item .num {
  color: rgba(255,255,255,.4);
  font-weight: 400;
  font-size: .55em;
  margin-right: 12px;
  vertical-align: .1em;
}
.nav-panel .nav-meta {
  margin-top: 22px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.nav-panel .nav-meta a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.3);
}
.nav-panel .nav-meta a:hover { color: var(--logo, #E8403A); border-color: var(--logo, #E8403A); }

@media (max-width: 640px) {
  .nav-toggle { right: 18px; }
}
