/* ============================================================
   BlueTeamAutomation — shared brand chrome (nav + footer mark)
   Loaded AFTER each page's inline <style> so it overrides the
   legacy nav. Mirrors the homepage's refined header exactly.

   Every var() carries a brand fallback so the header renders
   identically even on pages whose :root omits some tokens
   (e.g. legal/faq pages that only define a subset).
   ============================================================ */

@keyframes btaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(4,120,87,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(4,120,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(4,120,87,0); }
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h, 68px);
  display: flex; align-items: center;
  background: rgba(248,250,252,0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.nav.scrolled {
  background: rgba(248,250,252,0.85);
  border-bottom-color: var(--border, #E2E8F0);
  box-shadow: 0 8px 28px -18px rgba(15,23,42,0.45);
}
.nav-progress {
  position: absolute; left: 0; top: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--primary, #1E3A5F), var(--accent, #2563EB) 55%, var(--sky, #0EA5E9));
  box-shadow: 0 0 12px rgba(37,99,235,0.5);
  transition: width .1s linear;
  z-index: 2;
}
.nav-inner {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--display, 'Space Grotesk', system-ui, sans-serif); font-weight: 700;
  font-size: 1.0625rem; letter-spacing: -0.025em; color: var(--ink, #0F172A);
}
.nav-logo span { color: inherit; }   /* neutralize legacy span coloring */
.nav-logo .mark {
  position: relative; width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary, #1E3A5F), var(--accent, #2563EB));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 2px 6px rgba(30,58,95,0.30), 0 0 0 1px rgba(30,58,95,0.06);
  transition: width .3s ease, height .3s ease, border-radius .3s ease;
}
.nav-logo .mark::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(120% 80% at 30% 8%, rgba(255,255,255,0.40), transparent 62%);
  pointer-events: none;
}
.nav-logo .mark svg { position: relative; width: 14px; height: 14px; color: #fff; }
.nav.scrolled .nav-logo .mark { width: 23px; height: 23px; border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-size: 0.875rem; font-weight: 500; color: var(--ink-75, #334155);
  position: relative; transition: color .2s ease;
}
.nav-link:hover { color: var(--ink, #0F172A); }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  height: 1.5px; width: 0; background: var(--accent, #2563EB); transition: width .25s ease;
}
.nav-link:hover::after, .nav-link--active::after { width: 100%; }
.nav-link--active { color: var(--ink, #0F172A); }
.nav-link--live { display: inline-flex; align-items: center; gap: 7px; }
.nav-link--live .live {
  width: 6px; height: 6px; border-radius: 50%; background: var(--teal, #047857);
  box-shadow: 0 0 0 0 rgba(4,120,87,0.5); animation: btaPulse 2.2s ease-out infinite;
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; background: var(--ink, #0F172A); color: #fff;
  font-size: 0.8125rem; font-weight: 600; border-radius: var(--radius-md, 10px);
  box-shadow: 0 1px 2px rgba(15,23,42,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.nav-cta:hover { background: #1E293B; transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgba(15,23,42,0.5); }
.nav-cta .arr { transition: transform .25s ease; }
.nav-cta:hover .arr { transform: translateX(3px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 24px; padding: 0; background: none; border: none; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink, #0F172A); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- FOOTER BRAND MARK ---------- */
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display, 'Space Grotesk', system-ui, sans-serif); font-weight: 700; letter-spacing: -0.02em; color: var(--ink, #0F172A); }
.footer-brand span { color: inherit; }
.footer-brand .mark {
  position: relative; width: 24px; height: 24px; border-radius: 6px;
  background: linear-gradient(135deg, var(--primary, #1E3A5F), var(--accent, #2563EB));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 2px 6px rgba(30,58,95,0.30);
}
.footer-brand .mark svg { width: 13px; height: 13px; color: #fff; }
/* dark footers (legacy interior pages use a dark footer) keep the wordmark white */
.footer .footer-brand { color: #fff; }

/* ---------- MOBILE (re-asserted last so it wins the cascade) ---------- */
@media (max-width: 760px) {
  .nav-links {
    display: none; position: fixed; top: var(--nav-h, 68px); left: 0; right: 0; bottom: 0;
    background: rgba(248,250,252,0.98);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  }
  .nav-links.open { display: flex; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}
