/**
 * VettID shared navigation styles: the header chrome (frame, logo, Coming
 * Soon chip), the hamburger toggle, slide-out menu chrome, and the desktop
 * inline nav (>=1024px). Loaded by every page alongside assets/site.css,
 * AND by /playbooks/* (separate repo, same CloudFront distribution).
 *
 * This file is the ONLY place header/nav chrome may be styled. site.css and
 * the playbooks repo must not redefine these selectors — both repos' check
 * scripts enforce that. That's what keeps the nav identical across sections.
 */

/* ── Header chrome ──
   Main-site pages use a bare <header>; playbooks marks it <header class="site">.
   The element selector covers both (page-top header only — neither site nests
   <header> elsewhere). var() fallbacks keep this file self-contained. */
header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(11, 11, 18, 0.9);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dark, #26263e);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo svg {
  width: 30px;
  height: auto;
  color: var(--gold, #ffc125);
}

.header-logo span {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-hi, #f7f7fa);
  letter-spacing: 1px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Coming Soon chip — lives in the header slot where sign-in/register will
   eventually go */
.desktop-nav { margin-left: auto; }

.coming-soon-chip {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--gold, #ffc125);
  color: #101018;
  padding: 7px 14px;
  border-radius: 4px;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .coming-soon-chip { margin-left: auto; }
}

@media (max-width: 768px) {
  .header-logo span { display: none; }
  .coming-soon-chip { font-size: 10px; padding: 6px 10px; }
}

/* Hamburger button - always visible */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1010;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: #ffc125;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle span:nth-child(1) {
  margin-bottom: 5px;
}

.nav-toggle span:nth-child(3) {
  margin-top: 5px;
}

/* Hamburger animation when open */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Navigation menu - hidden by default */
.nav-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background-color: #2e2d88;
  padding: 80px 20px 40px;
  z-index: 1005;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  border-left: 1px solid rgba(255, 193, 37, 0.2);
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

/* Show menu when open */
.nav-menu.open {
  display: flex;
}

/* Menu links */
.nav-menu a {
  display: block;
  color: #c9c9d6;
  text-decoration: none;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-menu a.active {
  color: #ffc125;
  background-color: rgba(255, 193, 37, 0.1);
}

/* Register button in menu */
.nav-menu .nav-register {
  background-color: #ffc125;
  color: #101018;
  font-weight: 600;
  text-align: center;
  margin-top: 16px;
}

.nav-menu .nav-register:hover {
  background-color: #ffd940;
  color: #101018;
}

/* Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(22,21,63,0.78);
  z-index: 1000;
}

.nav-overlay.visible {
  display: block;
}

/* Hide old header buttons */
.header-buttons {
  display: none;
}

/* Desktop inline nav — hamburger only below 1024px */
.desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
  }

  .desktop-nav a {
    color: #c9c9d6;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 150ms;
  }

  .desktop-nav a:hover {
    color: #ffc125;
  }

  .desktop-nav .desktop-nav-cta {
    background: #ffc125;
    color: #101018;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 6px;
  }

  .desktop-nav .desktop-nav-cta:hover {
    background: #ffd940;
    color: #101018;
  }

  .nav-toggle {
    display: none;
  }
}

/* Slide-out menu panel (markup lives in each page; behavior in nav.js) */
.nav-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: #2e2d88;
  padding: 80px 20px 40px;
  z-index: 1005;
  flex-direction: column;
  gap: 8px;
}

.nav-menu a {
  display: block;
  color: #c9c9d6;
  text-decoration: none;
  padding: 12px 16px;
  font-size: 1rem;
}

.nav-menu a:hover {
  color: #ffc125;
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(22, 21, 63, 0.78);
  z-index: 1000;
}
