/* ============================================================
   BBH HEADER + FOOTER CSS
   Depends on: global.css (CSS variables must be loaded first)
   ============================================================ */


/* ============================================================
   BODY OFFSET
   ============================================================ */

body {
  padding-top: 110px; /* 38px utility + 72px navbar */
}

body.bbh-no-scroll {
  overflow: hidden;
}


/* ============================================================
   HEADER BASE
   ============================================================ */

#bbh-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}


/* ============================================================
   UTILITY BAR
   ============================================================ */

#bbh-utility-bar {
  background: var(--brand-forest);
  height: 38px;
  width: 100%;
  transition: height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

#bbh-header.bbh-scrolled #bbh-utility-bar {
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.bbh-utility-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

#bbh-utility-bar a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.60);
  text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

#bbh-utility-bar a:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#bbh-utility-bar a:hover {
  color: var(--brand-mint);
  background: rgba(255, 255, 255, 0.04);
}


/* ============================================================
   NAVBAR
   ============================================================ */

#bbh-navbar {
  width: 100%;
  height: 72px;
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#bbh-header.bbh-scrolled #bbh-navbar {
  background: rgba(2, 28, 16, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 1px 0 rgba(53, 189, 143, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.28);
}

.bbh-navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 8px;
}


/* ============================================================
   LOGO
   ============================================================ */

.bbh-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}

.bbh-logo img {
  height: 42px;
  width: auto;
  display: block;
  opacity: 0.92;
  transition: opacity 0.25s;
}

.bbh-logo:hover img {
  opacity: 1;
}


/* ============================================================
   DESKTOP NAV
   ============================================================ */

.bbh-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.bbh-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.bbh-nav-list > li {
  position: relative;
}

.bbh-nav-list > li > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 13px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-inverse-dim);
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}

.bbh-nav-list > li > a svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  opacity: 0.45;
  transition: transform 0.22s ease;
}

.bbh-nav-list > li > a:hover {
  color: var(--text-inverse);
  background: rgba(53, 189, 143, 0.10);
}

.bbh-nav-list > li > a.bbh-active {
  color: var(--brand-mint);
}

/* Dropdown trigger hover */
.bbh-has-dropdown:hover > a svg {
  transform: rotate(180deg);
}


/* ============================================================
   DROPDOWN
   ============================================================ */

.bbh-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 230px;
  background: rgba(2, 28, 16, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  /* top padding bridges the gap so mouse doesn't escape */
  padding: 14px 6px 6px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.10),
    0 20px 40px rgba(0, 0, 0, 0.35);
  z-index: 100;
}

.bbh-has-dropdown:hover .bbh-dropdown,
.bbh-has-dropdown:focus-within .bbh-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bbh-dropdown li a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  color: rgba(245, 240, 232, 0.60);
  text-decoration: none;
  border-radius: 7px;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
  line-height: 1.3;
}

.bbh-dropdown li a:hover {
  background: rgba(53, 189, 143, 0.14);
  color: var(--text-inverse);
}


/* ============================================================
   RIGHT ACTIONS
   ============================================================ */

.bbh-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.bbh-btn-podcast {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-mint);
  background: rgba(53, 189, 143, 0.12);
  border: 1px solid rgba(53, 189, 143, 0.22);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s, border-color 0.22s, color 0.22s, transform 0.18s;
  line-height: 1;
}

.bbh-btn-podcast:hover {
  background: rgba(53, 189, 143, 0.22);
  border-color: rgba(53, 189, 143, 0.40);
  color: var(--text-inverse);
  transform: scale(0.97);
}

.bbh-btn-portal {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-inverse);
  background: rgba(0, 88, 89, 0.70);
  border: 1px solid rgba(53, 189, 143, 0.28);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s, border-color 0.22s, transform 0.18s;
  line-height: 1;
}

.bbh-btn-portal:hover {
  background: rgba(0, 88, 89, 0.95);
  border-color: rgba(53, 189, 143, 0.55);
  transform: scale(0.97);
  color: var(--text-inverse);
}


/* ============================================================
   HAMBURGER
   ============================================================ */

.bbh-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.bbh-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: rgba(245, 240, 232, 0.80);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.bbh-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.bbh-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.bbh-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}


/* ============================================================
   MOBILE MENU
   ============================================================ */

.bbh-mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-dark);
  z-index: 9998;
  overflow-y: auto;
  padding: 0 24px 48px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: block;
}

.bbh-mobile-menu.bbh-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bbh-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bbh-mobile-list > li {
  border-bottom: 1px solid rgba(53, 189, 143, 0.08);
}

.bbh-mobile-list > li > a {
  display: flex;
  align-items: center;
  padding: 18px 4px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  color: rgba(245, 240, 232, 0.75);
  text-decoration: none;
  transition: color 0.18s;
  line-height: 1;
}

.bbh-mobile-list > li > a:hover,
.bbh-mobile-list > li > a.bbh-active {
  color: var(--brand-mint);
}

/* Mobile submenu toggle */
.bbh-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.bbh-mobile-toggle > a {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 18px 4px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  color: rgba(245, 240, 232, 0.75);
  text-decoration: none;
  transition: color 0.18s;
  line-height: 1;
}

.bbh-mobile-toggle > a:hover {
  color: var(--brand-mint);
}

.bbh-mobile-toggle > svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: rgba(53, 189, 143, 0.50);
  transition: transform 0.25s ease;
  margin-right: 4px;
}

.bbh-mobile-has-sub.bbh-sub-open .bbh-mobile-toggle > svg {
  transform: rotate(180deg);
}

/* Mobile sub-menu */
.bbh-mobile-sub {
  list-style: none;
  margin: 0;
  padding: 0 0 10px 16px;
  display: none;
}

.bbh-mobile-has-sub.bbh-sub-open .bbh-mobile-sub {
  display: block;
}

.bbh-mobile-sub li a {
  display: block;
  padding: 10px 4px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(245, 240, 232, 0.42);
  text-decoration: none;
  transition: color 0.18s;
  line-height: 1.4;
}

.bbh-mobile-sub li a:hover {
  color: var(--brand-mint);
}

/* Mobile CTA */
.bbh-mobile-actions {
  padding: 24px 4px 0;
}

.bbh-mobile-actions .bbh-btn-portal {
  width: 100%;
  justify-content: center;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
  .bbh-nav-list > li > a {
    font-size: 13px;
    padding: 8px 10px;
  }
}

@media (max-width: 960px) {
  .bbh-nav,
  .bbh-nav-actions {
    display: none;
  }

  .bbh-hamburger {
    display: flex;
  }

  .bbh-logo {
    margin-right: 0;
  }

  .bbh-logo img {
    height: 34px;
  }

  .bbh-navbar-inner,
  .bbh-utility-inner {
    padding: 0 20px;
  }

  body {
    padding-top: 110px;
  }
}

@media (max-width: 640px) {
  .bbh-navbar-inner,
  .bbh-utility-inner {
    padding: 0 16px;
  }
}


/* ============================================================
   FOOTER
   ============================================================ */

#bbh-footer {
  background: #010E08;
  border-top: 1px solid rgba(53, 189, 143, 0.08);
  padding: 72px 0 0;
}

.bbh-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.bbh-footer-top {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(53, 189, 143, 0.08);
}

/* Brand column */
.bbh-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bbh-footer-logo img {
  height: 48px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.25s;
}

.bbh-footer-logo:hover img {
  opacity: 1;
}

.bbh-footer-tagline {
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 240, 232, 0.42);
  margin: 0;
}

.bbh-footer-social {
  display: flex;
  gap: 12px;
}

.bbh-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(53, 189, 143, 0.14);
  color: rgba(245, 240, 232, 0.42);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.bbh-footer-social a svg {
  width: 15px;
  height: 15px;
}

.bbh-footer-social a:hover {
  border-color: rgba(53, 189, 143, 0.40);
  color: var(--brand-mint);
  background: rgba(53, 189, 143, 0.08);
}

/* Nav columns */
.bbh-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.bbh-footer-col h4 {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.30);
  margin: 0 0 16px;
}

.bbh-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bbh-footer-col ul li a {
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(245, 240, 232, 0.52);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1;
}

.bbh-footer-col ul li a:hover {
  color: rgba(245, 240, 232, 0.90);
}

/* Bottom bar */
.bbh-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.bbh-footer-legal,
.bbh-footer-copy {
  font-family: var(--font-ui);
  font-size: 12px;
  color: rgba(245, 240, 232, 0.28);
  margin: 0;
  line-height: 1.5;
}

/* Footer responsive */
@media (max-width: 900px) {
  .bbh-footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  #bbh-footer {
    padding: 48px 0 0;
  }

  .bbh-footer-inner {
    padding: 0 20px;
  }

  .bbh-footer-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .bbh-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 400px) {
  .bbh-footer-nav {
    grid-template-columns: 1fr;
  }
}