/* ══════════════════════════════════════════════════════════════════
   narcissus.black — Nav enhancements (mobile menu, Learn dropdown, auth CTA)
   Loaded on every page alongside content-pages.css / tokens.css
   ══════════════════════════════════════════════════════════════════ */

/* ── Hamburger button (mobile only) ── */
.nx-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--bd);
  border-radius: 6px;
  cursor: pointer;
}
.nx-burger span {
  display: block;
  height: 2px;
  width: 16px;
  margin: 0 auto;
  background: var(--txt);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
body.nx-menu-open .nx-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg) }
body.nx-menu-open .nx-burger span:nth-child(2) { opacity: 0 }
body.nx-menu-open .nx-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg) }

/* ── Desktop "Learn" dropdown ── */
.nx-dropdown { position: relative; display: inline-flex; align-items: center }
.nx-dropdown-trigger::after {
  content: '▾';
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  color: var(--mut);
  vertical-align: middle;
}
.nx-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 380px;
  padding: 16px;
  background: var(--surf);
  border: 1px solid var(--bd);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
  z-index: 210;
}
.nx-dropdown:hover .nx-dropdown-panel,
.nx-dropdown:focus-within .nx-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nx-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.nx-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--txt) !important;
  white-space: nowrap;
}
.nx-dropdown-item:hover { background: rgba(255,255,255,.05) }
.nx-emoji { font-size: 15px }
.nx-dropdown-seeall {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--bd);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--pur) !important;
  text-align: center;
}

@media (max-width: 640px) {
  .nx-dropdown-panel { display: none !important }
}

/* ── Auth-aware nav CTA (desktop) ── */
.nx-login-link {
  font-size: 13px;
  color: var(--mut);
  margin-right: 4px;
}
.nx-login-link:hover { color: var(--txt) }

/* ── Mobile slide-down panel ── */
.nx-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 185;
}
body.nx-menu-open .nx-mobile-backdrop { display: block }

.nx-mobile-panel {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80vh;
  background: var(--bg, #080510);
  border-top: 1px solid var(--bd);
  border-radius: 16px 16px 0 0;
  z-index: 190;
  overflow-y: auto;
  padding: 8px 20px 28px;
}
body.nx-menu-open .nx-mobile-panel { display: block }
body.nx-menu-open { overflow: hidden }

.nx-mobile-links {
  display: flex;
  flex-direction: column;
}
.nx-mobile-links > a {
  padding: 14px 4px;
  border-bottom: 1px solid var(--bd);
  color: var(--txt);
  font-size: 15px;
}
.nx-mobile-concepts {
  display: flex;
  flex-direction: column;
  padding: 4px 0 10px 16px;
  border-bottom: 1px solid var(--bd);
}
.nx-mobile-concept {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 4px;
  font-size: 13.5px;
  color: var(--mut) !important;
}
.nx-mobile-seeall {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--pur) !important;
  padding-top: 10px;
}

.nx-mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.nx-mobile-cta {
  display: block;
  text-align: center;
  padding: 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--txt);
  border: 1px solid var(--bd);
}
.nx-mobile-cta.primary {
  background: rgba(192,132,252,.15);
  border-color: rgba(192,132,252,.4);
  color: var(--pur);
}

@media (min-width: 641px) {
  .nx-mobile-panel { display: none !important }
}

@media (max-width: 640px) {
  .nx-burger { display: flex }
}
