/* wesbecher.llc · global navigation
 * Shared chrome across /, /playbook, /pmf and /capacity. Self-contained: it
 * depends on no route's tokens, so the four pages stay independently servable.
 * Each page sets --gnav-w and --gnav-pad to match its own container so the
 * brand lines up with the content beneath it.
 * The drawer is a <details> element: it opens and closes with no JS.
 */

.gnav-skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: #4361EE; color: #FFFFFF;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.85rem; font-weight: 700;
  padding: 12px 18px; text-decoration: none;
}
.gnav-skip:focus { left: 0; }

.gnav {
  position: sticky; top: 0; z-index: 200;
  background: #0A0A0A;
  border-bottom: 1px solid #363B45;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
}
.gnav-in {
  max-width: var(--gnav-w, 1180px);
  margin: 0 auto;
  padding: 0 var(--gnav-pad, 24px);
  display: flex; align-items: center; gap: 16px;
  min-height: 46px;
}

.gnav-brand {
  display: inline-flex; align-items: center; flex: none;
  padding: 7px 0; text-decoration: none;
}
/* 26px tall renders the lockup at ~131px wide, clear of the 120px minimum */
.gnav-brand img { display: block; height: 26px; width: auto; }
@media (max-width: 420px) { .gnav-brand img { height: 24px; } }
.gnav-brand:hover { opacity: 0.82; }

/* current section or module, mobile only, written by the page's scrollspy */
.gnav-here {
  display: none;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: #9AA3B2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.gnav-routes { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.gnav-routes a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
  color: #9AA3B2; text-decoration: none; white-space: nowrap;
  padding: 13px 0;
  transition: color 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.gnav-routes a:hover { color: #F2F5FF; }
.gnav-routes a[aria-current="page"] { color: #FFFFFF; }
.gnav-routes a[aria-current="page"]::before { content: ''; width: 7px; height: 7px; background: #4361EE; flex: none; }

.gnav-menu { display: none; margin-left: auto; position: relative; }
.gnav-menu > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 0 2px 0 14px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: #F2F5FF;
}
.gnav-menu > summary::-webkit-details-marker { display: none; }
.gnav-menu > summary::after {
  content: ''; width: 18px; height: 12px; flex: none;
  background:
    linear-gradient(#F2F5FF, #F2F5FF) top left / 18px 2px no-repeat,
    linear-gradient(#F2F5FF, #F2F5FF) center left / 18px 2px no-repeat,
    linear-gradient(#F2F5FF, #F2F5FF) bottom left / 18px 2px no-repeat;
}
.gnav-menu[open] > summary::after {
  background:
    linear-gradient(#F2F5FF, #F2F5FF) center left / 18px 2px no-repeat,
    linear-gradient(#F2F5FF, #F2F5FF) center left / 18px 2px no-repeat;
}

.gnav-panel {
  position: absolute; right: 0; top: calc(100% + 1px);
  min-width: min(78vw, 300px);
  background: #151515; border: 1px solid #363B45;
  padding: 6px 0 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.gnav-group {
  display: block;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: #8FA3FF;
  padding: 14px 20px 7px;
}
.gnav-panel a {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 4px 20px;
  font-size: 0.9rem; font-weight: 600; color: #F2F5FF; text-decoration: none;
}
.gnav-panel a:hover, .gnav-panel a:focus-visible { background: #22262E; }
.gnav-panel a[aria-current="page"]::before { content: ''; width: 7px; height: 7px; background: #4361EE; flex: none; }
.gnav-panel a .gn { color: #8FA3FF; font-size: 0.72rem; font-weight: 700; min-width: 1.6em; }
.gnav-panel hr { border: 0; border-top: 1px solid #363B45; margin: 8px 0 0; }

.gnav a:focus-visible, .gnav summary:focus-visible {
  outline: 2px solid #8FA3FF; outline-offset: 2px;
}

@media (max-width: 860px) {
  .gnav-routes { display: none; }
  .gnav-menu { display: block; }
  .gnav-here { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .gnav-routes a { transition: none; }
}

@media print {
  .gnav, .gnav-skip { display: none !important; }
}
