/* Editorial Vanguard Motion, Responsive Header & Mobile/Tablet Navigation Drawer */
html {
  scroll-behavior: smooth;
}

/* Crisp crimson focus ring without fuzzy browser halos */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 1px solid #BC312E;
  outline-offset: 2px;
}

/* Subtle custom dark scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #141316;
}
::-webkit-scrollbar-thumb {
  background: #363437;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #BC312E;
}

/* Floating Auth Menu */
.bdm-auth-menu {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 70;
  width: 260px;
  background: #211f22;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  padding: 12px;
  color: #e7e1e5;
  font-family: Inter, system-ui, sans-serif;
}

/* Tablet & Mobile Hamburger Menu Trigger (< 1280px where desktop xl:flex nav hides) */
.bdm-mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  min-width: 40px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(43, 41, 44, 0.85);
  color: #ffffff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
  flex-shrink: 0;
}

.bdm-mobile-menu-btn:hover {
  border-color: #BC312E;
  background: rgba(188, 49, 46, 0.2);
}

.bdm-mobile-menu-btn[aria-expanded="true"] {
  border-color: #BC312E;
  background: #BC312E;
  color: #ffffff;
}

.bdm-mobile-menu-btn .bdm-menu-label {
  display: none;
}

@media (min-width: 640px) and (max-width: 1279.98px) {
  .bdm-mobile-menu-btn .bdm-menu-label {
    display: inline;
  }
}

@media (min-width: 1280px) {
  .bdm-mobile-menu-btn {
    display: none !important;
  }
}

/* Prevent narrow mobile header clipping/overflow */
@media (max-width: 639.98px) {
  header a[data-path="book-growth-audit"],
  header a[data-path="growth-audit"],
  header a[data-path="institutional-dossier"],
  header a[data-path="tryst-harb"],
  header a[data-path="tryst-and-harb"] {
    display: none !important;
  }
}

/* Mobile & Tablet Full Navigation Drawer */
#bdm-mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  top: 72px;
  z-index: 55;
  background: rgba(10, 9, 12, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

#bdm-mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

#bdm-mobile-nav-drawer {
  position: fixed;
  top: 72px;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(420px, 100vw);
  background: #141316;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -16px 0 42px rgba(0, 0, 0, 0.65);
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: Inter, system-ui, sans-serif;
  color: #e7e1e5;
}

#bdm-mobile-nav-drawer.open {
  transform: translateX(0);
}

.bdm-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.bdm-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 6px;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 150ms ease, color 150ms ease;
}

.bdm-drawer-link:hover {
  background: #211f22;
  color: #ffb3ac;
}

.bdm-drawer-group {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0;
}

.bdm-drawer-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 150ms ease;
}

.bdm-drawer-group-btn:hover {
  background: #211f22;
}

.bdm-drawer-chevron {
  transition: transform 180ms ease;
  color: #a98986;
}

.bdm-drawer-group-btn[aria-expanded="true"] .bdm-drawer-chevron {
  transform: rotate(180deg);
  color: #ffb3ac;
}

.bdm-drawer-sublist {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 8px 12px;
}

.bdm-drawer-sublist.open {
  display: flex;
}

.bdm-drawer-sublink {
  display: block;
  padding: 8px 12px;
  border-radius: 5px;
  color: #c7c6c6;
  text-decoration: none;
  font-size: 13px;
  transition: background-color 150ms ease, color 150ms ease;
}

.bdm-drawer-sublink:hover {
  background: #2b292c;
  color: #ffffff;
}

.bdm-drawer-sublink.featured {
  background: rgba(188, 49, 46, 0.18);
  color: #ffb3ac;
  font-weight: 600;
  border: 1px solid rgba(188, 49, 46, 0.4);
}

.bdm-drawer-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f0e10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.bdm-drawer-locked {
  overflow: hidden;
}
