/* ═══ Global pre-login topbar — one design across landing, pricing, login and guest chat ═══
   Self-contained: hardcoded landing-exact colors so every page renders pixel-identical.
   Light is the default; [data-theme="dark"] flips it. Pages are expected to set
   data-theme explicitly (the include's normaliser script does this). */

.gnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 clamp(16px, 3vw, 32px);
  border-bottom: 1px solid rgba(93, 82, 110, .14);
  background: rgba(250, 247, 242, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
[data-theme="dark"] .gnav { background: rgba(14, 14, 16, .68); border-bottom-color: rgba(93, 82, 110, .18); }

.gnav-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }

/* Brand — the Athena signature lockup (script + swash ending in the Aristos seal),
   oversized so it hangs out of the bar onto the page. Brand ch. 16: min 160 px wide,
   artwork used exactly as supplied (no shadow, glow or recolour). */
.gnav-brand { position: relative; display: block; flex-shrink: 0; width: 214px; height: 56px; }
.gnav-sig { position: absolute; left: -8px; top: 5px; height: 102px; width: auto; max-width: none; pointer-events: none; }
.gnav-brand { z-index: 2; }
.gnav-sig-dark { display: none; }
[data-theme="dark"] .gnav-sig-light { display: none; }
[data-theme="dark"] .gnav-sig-dark { display: block; }

/* Links — underline sweep on hover, like the landing */
.gnav-right { display: flex; align-items: center; gap: clamp(8px, 1.5vw, 16px); flex-shrink: 0; }
.gnav-link {
  font-size: 13px; font-weight: 600; color: #70677c;
  transition: color .2s; position: relative; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center;
}
[data-theme="dark"] .gnav-link { color: #9d94a8; }
.gnav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px;
  background: #c5a572; transition: width .3s cubic-bezier(.4, 0, .2, 1);
}
.gnav-link:hover { color: #30283e; }
[data-theme="dark"] .gnav-link:hover { color: #ece7f0; }
.gnav-link:hover::after { width: 100%; }
.gnav-link:focus-visible { outline: 2px solid #a88550; outline-offset: 2px; border-radius: 4px; }

/* Sign in — the gold gradient pill */
.gnav-cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px;
  border-radius: 999px; background: linear-gradient(135deg, #c5a572, #a88550);
  color: #14102E; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none;
  transition: transform .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s ease;
  box-shadow: 0 4px 14px rgba(197, 165, 114, .25);
}
.gnav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(197, 165, 114, .35); color: #14102E; }
.gnav-cta:focus-visible { outline: 2px solid #a88550; outline-offset: 2px; }

/* Theme toggle — quiet icon button */
.gnav-theme {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: #70677c; background: none; border: none; cursor: pointer;
  transition: background .2s, color .2s;
}
[data-theme="dark"] .gnav-theme { color: #9d94a8; }
.gnav-theme:hover { background: rgba(93, 82, 110, .08); color: #30283e; }
[data-theme="dark"] .gnav-theme:hover { color: #ece7f0; }

/* Ambient music (landing only) */
.gnav-audio {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: #70677c; background: none; border: none; cursor: pointer;
  transition: background .2s, color .2s;
}
[data-theme="dark"] .gnav-audio { color: #9d94a8; }
.gnav-audio:hover { background: rgba(93, 82, 110, .08); color: #30283e; }

.gnav-audio svg { width: 18px; height: 18px; }
.gnav-audio .icon-audio-on { display: none; }
.gnav-audio { position: relative; }
.gnav-audio.playing { color: #a88550; }
.gnav-audio.playing .icon-audio-off { display: none; }
.gnav-audio.playing .icon-audio-on { display: block; }
.gnav-audio.playing::after { content: ''; position: absolute; bottom: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: #c5a572; box-shadow: 0 0 6px rgba(197,165,114,.6); }

/* Guest chat sits below the fixed bar */
body.is-guest .app { padding-top: 56px; box-sizing: border-box; }

/* Chat extras — burger (sidebar) and the free-message counter */
.gnav-burger {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: #70677c; background: none; border: none; cursor: pointer; flex-shrink: 0;
  transition: background .2s, color .2s;
}
[data-theme="dark"] .gnav-burger { color: #9d94a8; }
.gnav-burger:hover { background: rgba(93, 82, 110, .08); color: #30283e; }
[data-theme="dark"] .gnav-burger:hover { color: #ece7f0; }
.gnav-counter {
  font-size: 11px; font-weight: 700; color: #70677c; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(93, 82, 110, .2);
}
[data-theme="dark"] .gnav-counter { color: #9d94a8; border-color: rgba(157, 148, 168, .25); }

/* Mobile menu */
.gnav-menu { display: none; width: 40px; height: 40px; border-radius: 8px; place-items: center; color: #70677c; background: none; border: none; cursor: pointer; transition: background .2s, color .2s; }
[data-theme="dark"] .gnav-menu { color: #9d94a8; }
.gnav-menu:hover { background: rgba(93, 82, 110, .08); color: #30283e; }
[data-theme="dark"] .gnav-menu:hover { color: #ece7f0; }
.gnav-menu .gm-close { display: none; }
.gnav-menu.open .gm-open { display: none; }
.gnav-menu.open .gm-close { display: block; }
.gnav-panel {
  position: fixed; top: 60px; right: 12px; width: min(300px, calc(100vw - 24px)); z-index: 1250;
  background: #FFFFFF; border: 1px solid #E3E1EE; border-radius: 8px; padding: 6px;
  box-shadow: 0 12px 32px rgba(45, 39, 105, .16);
}
[data-theme="dark"] .gnav-panel { background: #1c1a22; border-color: #2a2730; box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
.gnav-panel[hidden] { display: none; }
.gp-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px;
  border-radius: 6px; font-size: 14px; font-weight: 600; color: #191423; text-decoration: none; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit;
}
[data-theme="dark"] .gp-item { color: #ece7f0; }
a.gp-item:hover, .gp-btn:hover { background: rgba(45, 39, 105, .07); }
[data-theme="dark"] a.gp-item:hover, [data-theme="dark"] .gp-btn:hover { background: rgba(255, 255, 255, .07); }
.gp-item:focus-visible { outline: 2px solid #9889C0; outline-offset: -2px; }
.gp-meta { cursor: default; }
.gp-label { font-size: 14px; }

@media (max-width: 700px) {
  .gnav-link, .gnav-right .gnav-counter, .gnav-theme, .gnav-audio { display: none; }
  .gnav-menu { display: grid; }
  .gnav { gap: 8px; }
  .gnav-right { gap: 8px; }
  .gnav-brand { width: min(172px, 46vw); }
  .gnav-sig { width: min(172px, 46vw); height: auto; left: -6px; top: 6px; }
}
@media (min-width: 701px) { .gnav-panel { display: none !important; } }
