/* ==========================================================================
   Tandava Wellness — the site menu, shared by every page.

   Self-contained on purpose: no CSS variables, so it drops onto any page
   whatever that page's own stylesheet defines. Pairs with nav.js.
   ========================================================================== */

.topbar, .topbar *, .topbar *::before, .topbar *::after { box-sizing: border-box; }

.topbar {
  padding: 0 clamp(20px, 5vw, 72px);
  background: #F6F5F0;
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
}
.topbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  flex-wrap: wrap;
}

.topbar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.topbar .brand img { height: 20px; width: auto; display: block; }
.topbar .brand__rule { width: 1px; height: 18px; background: rgba(48,64,40,.3); }
.topbar .brand__suffix {
  font-family: 'Julius Sans One', system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: .24em;
  color: #BC7A48;
}

.topbar .nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
  flex-wrap: wrap;
  font-size: 15px;
}
.topbar .nav a { color: #212C28; text-decoration: none; transition: color .16s ease; }
.topbar .nav a:hover { color: #C29C3D; }

.topbar .shop { position: relative; padding: 8px 0; }
.topbar .shop__toggle {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #212C28;
  font: inherit;
}
.topbar .shop__toggle:hover { color: #C29C3D; }
.topbar .shop__menu {
  position: absolute;
  top: 100%;
  left: -14px;
  z-index: 50;
  padding-top: 6px;
  display: none;
}
.topbar .shop[data-open="true"] .shop__menu { display: block; }
.topbar .shop__panel {
  min-width: 210px;
  background: #F6F5F0;
  border: 1px solid rgba(48,64,40,.14);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(36,48,25,.10);
  padding: 8px;
  display: flex;
  flex-direction: column;
}
.topbar .shop__panel a { color: #212C28; padding: 10px 14px; border-radius: 8px; }
.topbar .shop__panel a:hover { background: #EDE2C0; color: #212C28; }
.topbar .shop__panel a[aria-current="page"] { color: #BC7A48; }
.topbar .nav > a[aria-current="page"] { color: #BC7A48; }
/* A toggle that is also a link, like Programs, can be the current page too. */
.topbar .nav .shop__toggle[aria-current="page"] { color: #BC7A48; }

.topbar .signin {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #212C28;
  border: 1px solid rgba(48,64,40,.28);
  border-radius: 999px;
  padding: 10px 18px;
}
.topbar .signin:hover { border-color: #34442E; background: rgba(52,68,46,.06); color: #212C28; }

/* `.nav a` is class+element, so it outranks a bare `.nav__cta`; scope the CTA
   under .nav to win the specificity contest and keep its light text. */
.topbar .nav .nav__cta {
  background: #34442E;
  color: #F6F5F0;
  border-radius: 999px;
  padding: 11px 20px;
  font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
  text-transform: uppercase;
}
.topbar .nav .nav__cta:hover { background: #3f5338; color: #F6F5F0; }

.topbar :focus-visible { outline: 3px solid #C29C3D; outline-offset: 3px; border-radius: 6px; }

/* The hamburger. Hidden on the wide layout; below 860px it replaces the row,
   and the menu drops under the bar with the same items in the same order. */
.topbar .navtoggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(48,64,40,.28);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.topbar .navtoggle__bars { position: relative; }
.topbar .navtoggle__bars,
.topbar .navtoggle__bars::before,
.topbar .navtoggle__bars::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #212C28;
  transition: transform .2s ease, background-color .2s ease;
}
.topbar .navtoggle__bars::before { position: absolute; top: -6px; }
.topbar .navtoggle__bars::after  { position: absolute; top: 6px; }
.topbar[data-menu="open"] .navtoggle__bars { background: transparent; }
.topbar[data-menu="open"] .navtoggle__bars::before { transform: translateY(6px) rotate(45deg); }
.topbar[data-menu="open"] .navtoggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .topbar .navtoggle { display: inline-flex; }
  .topbar .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 4px 0 16px;
    font-size: 16px;
  }
  .topbar[data-menu="open"] .nav { display: flex; }
  .topbar .nav > a { padding: 12px 2px; }
  /* Inside the hamburger the kits are listed, not tucked behind a second tap. */
  .topbar .shop { padding: 0; }
  .topbar .shop__toggle { padding: 12px 2px; }
  .topbar .shop__chev { display: none; }
  .topbar .shop__menu { position: static; display: block; padding: 0 0 4px 14px; }
  .topbar .shop__panel { min-width: 0; padding: 0; border: none; box-shadow: none; background: transparent; }
  .topbar .shop__panel a { padding: 10px 2px; }
  .topbar .signin { align-self: flex-start; margin-top: 6px; }
  .topbar .nav .nav__cta { align-self: flex-start; margin-top: 4px; }
}

/* Below this the wordmark plus the hamburger no longer fit on one line. */
@media (max-width: 420px) {
  .topbar .brand img { height: 17px; }
  .topbar .brand__rule { height: 15px; }
  .topbar .brand__suffix { font-size: 13px; letter-spacing: .2em; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar .navtoggle__bars,
  .topbar .navtoggle__bars::before,
  .topbar .navtoggle__bars::after,
  .topbar .nav a { transition: none; }
}
