/* ─── Orion Nav — Shared Stylesheet ─── */

:root {
  /* Fallback values — overridden when design-system.css is loaded */
  --void:         #05070f;
  --space:        #0a0e1a;
  --nebula:       #0f1629;
  --horizon:      #1a2340;
  --star-dim:     #4a5568;
  --star-mid:     #94a3b8;
  --star-bright:  #e2e8f0;
  --star-white:   #f8fafc;
  --pulsar:       #4f8ef7;
  --pulsar-glow:  rgba(79,142,247,0.15);
  --font-body:    'DM Sans', -apple-system, sans-serif;
  --font-mono:    'Space Mono', monospace;
  --radius-sm:    6px;
  --radius-md:    12px;
  /* Legacy aliases */
  --black:    #080b10;
  --navy:     #0b1120;
  --navy-mid: #111827;
  --navy-lt:  #1e2d45;
  --blue:     #1a5490;
  --blue-lt:  #2872c8;
  --sky:      #60a5fa;
  --gold:     #d4a847;
  --gold-lt:  #f0c96a;
  --white:    #f8fafc;
  --gray:     #94a3b8;
  --gray-lt:  #cbd5e1;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  padding: 0 2rem;
  background: rgba(5,7,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--horizon);
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  overflow: visible;
}

nav.scrolled { background: rgba(5,7,15,0.95); }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}

.nav-logo-mark {
  width: 32px; height: 32px;
  position: relative;
}

.nav-logo-mark svg { width: 100%; height: 100%; }

.nav-logo-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--star-white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-display, 'Syne', sans-serif);
  white-space: nowrap;
}

.nav-logo-text span {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none;
  flex: 1; justify-content: center;
}

.nav-links a, .nav-dropdown-trigger {
  display: flex; align-items: center; gap: 4px;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--star-mid);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  background: none; border: none;
}

.nav-links a:hover, .nav-dropdown-trigger:hover {
  color: var(--star-white);
  background: rgba(255,255,255,0.04);
}

/* Sprintsail standalone — highlighted */
.nav-links a.sprintsail-link,
.nav-links a.nav-link-sprintsail {
  color: var(--pulsar);
  border: 1px solid rgba(79,142,247,0.2);
}
.nav-links a.sprintsail-link:hover,
.nav-links a.nav-link-sprintsail:hover { background: rgba(79,142,247,0.08); }

/* Products trigger — highlighted */
.nav-trigger-products {
  color: var(--pulsar) !important;
  background: rgba(79,142,247,0.08) !important;
  border: 1px solid rgba(79,142,247,0.2) !important;
}
.nav-trigger-products:hover {
  background: rgba(79,142,247,0.14) !important;
}

.nav-dropdown { position: relative; }

.dropdown-panel {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0;
  width: 260px;
  max-width: calc(100vw - 2rem);
  background: var(--nebula);
  border: 1px solid var(--horizon);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  box-shadow: 0 20px 48px rgba(0,0,0,0.6);
  grid-template-columns: 1fr;
  gap: 0.1rem;
  overflow: hidden;
  z-index: 9999;
}

/* Invisible bridge over the gap — keeps hover active */
.dropdown-panel::before {
  content: '';
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 12px;
}

/* Company dropdown — narrow single-col, right-aligned */
.dropdown-panel--narrow {
  width: 220px;
  grid-template-columns: 1fr;
  right: 0; left: auto;
}

.nav-dropdown.open .dropdown-panel { display: grid; }

.dropdown-item {
  display: flex; align-items: center; gap: 11px;
  padding: 0.75rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-item:hover { background: rgba(255,255,255,0.04); }

.dropdown-icon {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--pulsar);
  background: rgba(79,142,247,0.1);
  border: 1px solid var(--horizon);
}

.dropdown-item-text {
  min-width: 0;
}

.dropdown-item-text strong {
  display: block; font-size: 0.8rem; font-weight: 500;
  color: var(--star-bright); margin-bottom: 1px;
  font-family: var(--font-body);
  white-space: nowrap;
}

.dropdown-item-text span {
  font-size: 0.72rem; color: var(--star-dim); line-height: 1.35;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Company dropdown items — no icon */
.dropdown-item--plain { padding: 0.55rem 0.75rem; }
.dropdown-item--plain strong {
  font-size: 0.8rem; font-weight: 500;
  color: var(--star-mid);
}
.dropdown-item--plain:hover strong { color: var(--star-white); }

.nav-badges {
  display: flex; align-items: center; gap: 0.5rem;
}

.badge-pill {
  font-size: 0.7rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: 0.03em; text-transform: uppercase;
  white-space: nowrap;
}

.badge-wosb {
  background: rgba(212,168,71,0.15);
  color: var(--gold-lt);
  border: 1px solid rgba(212,168,71,0.3);
}

.badge-aws {
  background: rgba(96,165,250,0.12);
  color: var(--sky);
  border: 1px solid rgba(96,165,250,0.25);
}

/* ─── HAMBURGER / MOBILE NAV ─── */
.hamburger {
  display: none; flex-direction: column;
  gap: 5px; background: none; border: none;
  cursor: pointer; padding: 4px;
}

.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--gray-lt); border-radius: 2px;
  transition: all 0.3s;
}

.nav-cta { flex-shrink: 0; }

/* Primary button used in nav CTA */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pulsar);
  color: var(--void);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500; font-size: 0.8rem;
  transition: opacity 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 0 20px rgba(79,142,247,0.4);
  color: var(--void);
  text-decoration: none;
}

/* Theme toggle button */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--horizon);
  cursor: pointer;
  color: var(--star-dim);
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0; padding: 0;
  margin-left: 1.25rem;
}
.theme-toggle:hover { border-color: var(--pulsar); color: var(--pulsar); }
.theme-toggle.is-pinned { border-color: var(--pulsar); color: var(--pulsar); }
.theme-toggle svg { pointer-events: none; }

.mobile-nav {
  display: none;
  position: fixed; top: 64px; inset-inline: 0;
  background: var(--nebula);
  border-bottom: 1px solid var(--horizon);
  padding: 1.5rem 2rem;
  z-index: 99;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block; padding: 0.6rem 0;
  font-size: 1rem; color: var(--star-mid);
  text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--horizon);
}

.mobile-nav a:last-child { border-bottom: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}
