/* ── BD shared header (single source) ──────────────────────────────
   The ONE place the site nav is styled. Linked on every page; markup is
   injected by /js/hub-nav.js into <div id="bd-nav">. Edit here once →
   every page + subdomain updates. Faithful to the _hub.html (home) nav.
   var() fallbacks let it render correctly even on pages without :root. */

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  padding: 0 48px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .35s ease, backdrop-filter .35s ease, border-color .35s ease, box-shadow .35s ease;
  border-bottom: 3px solid transparent;
}
nav.scrolled {
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom-color: var(--sky, #0EA5E9);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.18);
}
/* Light-hero pages (e.g. case studies) carry the frosted bar from the top so the
   white logo/links stay legible over a light hero — same shared nav, just not transparent at rest. */
body.light-hero #nav {
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom-color: var(--sky, #0EA5E9);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.18);
}
.nav-logo { display:flex; align-items:center; text-decoration:none; gap: 0; }
.nav-logo img {
  width: 38px; height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 0 10px rgba(108,180,255,0.5))
    drop-shadow(0 0 22px rgba(14,165,233,0.32))
    drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  animation: nav-logo-float 7s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes nav-logo-float {
  0%, 100% { transform: translate(-2px, 1px);
    filter: drop-shadow(0 0 10px rgba(108,180,255,0.45)) drop-shadow(0 0 20px rgba(14,165,233,0.25)) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  }
  33% { transform: translate(2px, -3px);
    filter: drop-shadow(0 0 14px rgba(108,180,255,0.6)) drop-shadow(0 0 28px rgba(14,165,233,0.4)) drop-shadow(0 3px 6px rgba(0,0,0,0.32));
  }
  66% { transform: translate(-1px, -5px);
    filter: drop-shadow(0 0 16px rgba(108,180,255,0.7)) drop-shadow(0 0 32px rgba(14,165,233,0.48)) drop-shadow(0 4px 7px rgba(0,0,0,0.34));
  }
}
.nav-logo-text {
  font-family: var(--font-display, 'Cabinet Grotesk', sans-serif); font-weight: 700; font-size: 15px;
  letter-spacing: -.01em; color: #fff;
  max-width: 0; overflow: hidden; opacity: 0;
  margin-left: 0;
  white-space: nowrap;
  transition: max-width 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease, margin-left 0.45s cubic-bezier(0.22,1,0.36,1), color 0.35s ease;
}
.nav-logo:hover .nav-logo-text { max-width: 200px; opacity: 1; margin-left: 12px; }
.nav-links { display:flex; align-items:center; gap:36px; list-style:none; padding: 0; margin: 0; }
.nav-links a {
  position: relative;
  font-size: 13px; font-weight: 500; letter-spacing: .03em;
  text-decoration: none; color: rgba(255,255,255,0.85);
  transition: color .2s ease;
}
nav.scrolled .nav-links a { color: rgba(255,255,255,0.7); }
nav.scrolled .nav-links a:hover { color: #fff; }
.nav-links a:hover { color: #fff; }
/* "you are here" — consistent active-link rule (the active nav-bar glow home) */
.nav-links a.active, nav.scrolled .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; border-radius: 2px;
  background: var(--sky, #0EA5E9);
  box-shadow: 0 0 8px rgba(56,189,248,0.55);
}
.nav-cta {
  padding: 9px 20px;
  background: transparent; color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.35);
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif); font-size: 13px; font-weight: 500;
  text-decoration: none; border-radius: 100px;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.nav-cta:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); color: #fff; transform: scale(1.03); }

/* mobile burger + slide menu */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: none;
  padding: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  z-index: 401;
}
.nav-burger span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease, background .25s ease;
}
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(11,18,32,0.97);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  z-index: 350;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.mobile-menu-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.mobile-menu-links a {
  display: inline-block;
  font-family: var(--font-display, 'Cabinet Grotesk', sans-serif); font-size: 28px; font-weight: 700;
  letter-spacing: -.01em; color: #fff;
  text-decoration: none;
  padding: 14px 24px;
  min-height: 44px;
}
.mobile-menu-links a:hover, .mobile-menu-links a.active { color: var(--sky, #0EA5E9); }
.mobile-menu-cta {
  margin-top: 12px;
  padding: 14px 32px;
  background: var(--sky, #0EA5E9); color: #fff;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif); font-size: 14px; font-weight: 600;
  letter-spacing: .03em;
  text-decoration: none; border-radius: 100px;
  min-height: 44px; display: inline-flex; align-items: center;
}
@media (max-width: 768px) {
  nav { padding: 0 20px; height: 60px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-logo img { width: 34px; height: auto; }
  .nav-logo-text { display: none; }
}
