/*
 * EEA Design System — Unified Navigation
 * Version: 1.0.0
 *
 * Depends on: tokens.css (must be loaded first)
 *
 * Usage:
 *   <link rel="stylesheet" href="https://entethalliance.github.io/eea-design-system/tokens.css">
 *   <link rel="stylesheet" href="https://entethalliance.github.io/eea-design-system/nav.css">
 *   <script src="https://entethalliance.github.io/eea-design-system/nav.js"></script>
 *
 * HTML structure:
 *   <nav class="eea-unified-nav">
 *     <a class="eea-unified-nav-brand" href="/ops-finance/">
 *       <span>EEA</span>
 *       <span>Enterprise <em>Ethereum</em> Alliance</span>
 *     </a>
 *     <div class="eea-unified-nav-links">
 *       <a href="/" class="active">Hub</a>
 *       <a href="/finance.html">Finance</a>
 *       ...
 *     </div>
 *     <button class="eea-unified-nav-toggle" aria-label="Toggle theme">🌙</button>
 *   </nav>
 */

/* ─────────────────────────────────────────────────────────────
   NAV SHELL
───────────────────────────────────────────────────────────── */
.eea-unified-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--eea-nav-z, 99999);
  height: var(--eea-nav-height, 52px);
  background: #0d0d14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  padding: 0 var(--eea-space-6, 1.5rem);
  font-family: var(--eea-font);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--eea-space-4, 1rem);
}

.eea-unified-nav a {
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   BRAND MARK
───────────────────────────────────────────────────────────── */
.eea-unified-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: var(--eea-weight-semi, 600);
  font-size: 0.95rem;
  white-space: nowrap;
}

/* "EEA" badge */
.eea-unified-nav-brand span:first-child {
  background: var(--eea-accent, #627eea);
  color: #fff;
  padding: 0.3rem 0.5rem;
  border-radius: var(--eea-radius-sm, 6px);
  font-size: 0.7rem;
  font-weight: var(--eea-weight-bold, 700);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* "Enterprise Ethereum Alliance" — em highlights "Ethereum" */
.eea-unified-nav-brand em {
  font-style: normal;
  color: var(--eea-accent, #627eea);
}

/* ─────────────────────────────────────────────────────────────
   NAV LINKS
───────────────────────────────────────────────────────────── */
.eea-unified-nav-links {
  display: flex;
  gap: var(--eea-space-1, 0.25rem);
  flex: 1;
}

.eea-unified-nav-links a {
  color: #888;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--eea-radius-sm, 6px);
  transition: color var(--eea-transition-fast, 0.15s ease),
              background var(--eea-transition-fast, 0.15s ease);
}

.eea-unified-nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.eea-unified-nav-links a.active {
  color: #fff;
  background: var(--eea-accent-bg, rgba(98, 126, 234, 0.20));
}

/* ─────────────────────────────────────────────────────────────
   THEME TOGGLE
───────────────────────────────────────────────────────────── */
.eea-unified-nav-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #888;
  padding: 0.4rem 0.6rem;
  border-radius: var(--eea-radius-sm, 6px);
  cursor: pointer;
  font-size: 1rem;
  transition: color var(--eea-transition-fast, 0.15s ease),
              border-color var(--eea-transition-fast, 0.15s ease);
  flex-shrink: 0;
}

.eea-unified-nav-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.30);
}

/* ─────────────────────────────────────────────────────────────
   LIGHT THEME OVERRIDES
───────────────────────────────────────────────────────────── */
[data-theme="light"] .eea-unified-nav {
  background: #f8f9fc;
  border-color: rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .eea-unified-nav-brand {
  color: #111;
}

[data-theme="light"] .eea-unified-nav-links a {
  color: #555;
}

[data-theme="light"] .eea-unified-nav-links a:hover {
  color: #111;
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .eea-unified-nav-links a.active {
  color: #111;
  background: rgba(98, 126, 234, 0.15);
}

[data-theme="light"] .eea-unified-nav-toggle {
  color: #555;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .eea-unified-nav-toggle:hover {
  color: #111;
  border-color: rgba(0, 0, 0, 0.30);
}

/* ─────────────────────────────────────────────────────────────
   BODY OFFSET — always push content below fixed nav
───────────────────────────────────────────────────────────── */
body {
  padding-top: var(--eea-nav-height, 52px);
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — collapse links on mobile
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .eea-unified-nav-links {
    display: none;
  }

  /* Hide the long name text, keep "EEA" badge */
  .eea-unified-nav-brand span:last-child {
    display: none;
  }
}
