/* ==========================================================================
   BlackKey — shared navigation system
   Used by every page. Edit here once to change the header/nav sitewide.
   ========================================================================== */

/* Sitewide utilities the nav relies on (kept here so pages only need one
   extra <link> to get consistent focus states and anchor offsets). */
a:focus-visible, button:focus-visible {
  outline: 2px solid rgba(200,192,176,0.6);
  outline-offset: 2px;
}
[id] { scroll-margin-top: 104px; }

/* Horizontal-scroll guard belongs on the root scrolling element, not on an
   inner wrapper div. Putting overflow-x:hidden on a descendant makes that
   element its own scroll container (per spec, the other overflow axis
   computes to auto), which breaks position:sticky for anything inside it —
   the header would just scroll away instead of sticking to the viewport. */
html, body { overflow-x: hidden; }

/* ---- Header shell -------------------------------------------------- */
.bk-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}
.bk-header.bk-scrolled {
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ---- Primary row ----------------------------------------------------- */
.bk-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: padding 0.25s ease;
}
.bk-header.bk-scrolled .bk-nav-inner {
  padding-top: 14px;
  padding-bottom: 14px;
}

.bk-logo {
  font-family: 'Piazzolla', serif;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: #f0f0f0;
  font-weight: 500;
  flex-shrink: 0;
  margin-left: -10px;
  margin-right: 28px;
}
.bk-logo-img {
  display: block;
  height: 22.6px;
  width: auto;
  transition: height 0.25s ease;
}
.bk-header.bk-scrolled .bk-logo-img { height: 16.8px; }
.bk-logo span { color: #c8c0b0; }

.bk-nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.bk-nav-links a {
  color: #8a8a8a;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.bk-nav-links a:hover { color: #d4d4d4; }

/* The CTA never changes position: it's simply the last flex item in the
   same primary row on every page, so its coordinates are identical
   sitewide regardless of whether a secondary nav is present below it. */
.bk-nav-links a.bk-nav-cta,
.bk-mobile-panel a.bk-mobile-cta {
  border: 1px solid rgba(255,255,255,0.14);
  padding: 11px 24px;
  border-radius: 2px;
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}
.bk-nav-links a.bk-nav-cta:hover,
.bk-mobile-panel a.bk-mobile-cta:hover { border-color: rgba(255,255,255,0.32); color: #f0f0f0; }

/* ---- Hamburger toggle (mobile only) ----------------------------------- */
.bk-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 2px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.bk-nav-toggle span { position: relative; display: block; width: 16px; height: 1.5px; background: #e8e8e8; }
.bk-nav-toggle span::before,
.bk-nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: #e8e8e8;
  transition: transform 0.2s ease;
}
.bk-nav-toggle span::before { top: -5px; }
.bk-nav-toggle span::after { top: 5px; }
.bk-header.bk-open .bk-nav-toggle span { background: transparent; }
.bk-header.bk-open .bk-nav-toggle span::before { transform: translateY(5px) rotate(45deg); }
.bk-header.bk-open .bk-nav-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

/* ---- Mobile menu panel -------------------------------------------- */
.bk-mobile-panel {
  display: none;
  flex-direction: column;
  padding: 4px 32px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.bk-mobile-panel a {
  padding: 14px 2px;
  font-size: 15px;
  color: #c8c8c8;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bk-mobile-panel a.bk-mobile-cta {
  margin-top: 14px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.bk-header.bk-open .bk-mobile-panel { display: flex; }

/* ---- Secondary (section) nav --------------------------------------
   Appears only on pages that belong to a category (Services, Who We
   Serve, etc). Add it to a page by dropping a <nav class="bk-subnav">
   block inside the header — no other markup or script changes needed. */
.bk-subnav {
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 13px 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bk-subnav::-webkit-scrollbar { display: none; }
.bk-subnav a {
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.bk-subnav a:hover { color: #d4d4d4; }
.bk-subnav a.active {
  color: #f0f0f0;
  font-weight: 600;
  border-bottom-color: #c8c0b0;
}

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 880px) {
  .bk-nav-links { display: none; }
  .bk-nav-toggle { display: flex; }
  .bk-subnav { padding-left: 24px; padding-right: 24px; }
}
