/* Layout: header, navigation, container, global sections, footer */

.site-header .site-container {
  width: min(var(--bbhm-shell-width), 100% - 48px);
}

.site-header {
  border-top: 0;
  border-bottom: 0;
  position: relative;
  z-index: 20;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--bbhm-space-2);
  min-height: auto;
  padding: 1.25rem 0 0.65rem;
  position: relative;
  border-bottom: 1px solid var(--bbhm-border);
}

.brand {
  font-family: var(--bbhm-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  width: 100%;
  text-align: center;
  margin-inline: 0;
}

.brand-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo .custom-logo-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.brand-logo .custom-logo {
  width: auto;
  max-width: min(520px, 82vw);
  max-height: 72px;
}

.nav-toggle {
  display: none;
  border: 1px solid #a6a6a6;
  background: none;
  padding: 0.42rem 0.68rem;
  font-family: var(--bbhm-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-toggle-icon {
  position: relative;
  display: inline-block;
  width: 1.15rem;
  height: 0.95rem;
}

.nav-toggle-icon span {
  position: absolute;
  left: 0;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  transform-origin: center;
}

.nav-toggle-icon span:nth-child(1) {
  top: 0;
}

.nav-toggle-icon span:nth-child(2) {
  top: calc(50% - 1px);
}

.nav-toggle-icon span:nth-child(3) {
  bottom: 0;
}

.scroll-top-toggle {
  display: inline-flex;
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  width: 3.15rem;
  height: 3.15rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #121212;
  box-shadow: 0 10px 24px rgba(18, 18, 18, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
  transform: translateY(8px);
  z-index: 109;
}

.scroll-top-toggle.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

body.nav-open .scroll-top-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}

.scroll-top-icon {
  width: 0.8rem;
  height: 0.8rem;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(2px) rotate(45deg);
}

.primary-nav {
  width: 100%;
  display: flex;
  justify-content: center;
  border-top: 0;
  margin-top: 0;
  padding-top: 0.35rem;
}

.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.95rem;
  margin: 0;
  padding: 0;
}

.menu a {
  text-decoration: none;
  font-family: var(--bbhm-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.menu-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--bbhm-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.menu-label-button {
  appearance: none;
  background: none;
  border-inline: 0;
  border-top: 0;
  color: inherit;
  cursor: pointer;
  line-height: 1;
  padding-inline: 0;
}

.menu a:hover,
.menu a:focus-visible {
  color: var(--bbhm-accent);
  text-decoration: none;
  border-bottom-color: transparent;
}

.menu-primary {
  align-items: center;
  gap: 1.3rem;
}

.menu-primary > li {
  position: relative;
}

.menu-primary > li:hover > .menu-label,
.menu-primary > li:focus-within > .menu-label,
.menu-primary > li:hover > a,
.menu-primary > li:focus-within > a {
  color: var(--bbhm-accent);
  border-bottom-color: transparent;
}

.menu-primary .sub-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  min-width: 13.5rem;
  margin: 0;
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.55rem;
  border: 1px solid var(--bbhm-border);
  background: #fff;
  box-shadow: 0 14px 32px rgba(18, 18, 18, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 40;
}

.menu-primary .sub-menu::before {
  content: "";
  position: absolute;
  top: -0.45rem;
  left: 0;
  right: 0;
  height: 0.45rem;
}

.menu-primary li:hover > .sub-menu,
.menu-primary li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.menu-primary .sub-menu a {
  white-space: nowrap;
}

.site-main {
  padding: var(--bbhm-space-5) 0;
}

.section-block {
  border-top: 2px solid var(--bbhm-text);
  padding: var(--bbhm-space-4) 0 0;
  background: none;
  margin-bottom: var(--bbhm-space-5);
}

.hero-block {
  background: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b6b6b;
  font-family: var(--bbhm-ui);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: var(--bbhm-space-2);
}

.section-head h1 {
  font-size: clamp(2.1rem, 3.7vw, 3.35rem);
  line-height: 1.08;
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.3vw, 2.15rem);
  line-height: 1.15;
}

.section-head {
  margin-bottom: var(--bbhm-space-4);
}

.hero-subtext {
  max-width: 66ch;
  color: #333;
  font-size: 1.05rem;
}

.section-head-with-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--bbhm-space-3);
  margin-bottom: var(--bbhm-space-4);
}

.section-head-with-link a {
  color: var(--bbhm-accent);
  font-family: var(--bbhm-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bbhm-space-3);
  margin-top: var(--bbhm-space-4);
}


.site-footer {
  margin-top: var(--bbhm-space-6);
  border-top: 0;
  background: var(--bbhm-accent);
  color: #fff;
}

.site-footer .site-container {
  border-top: 0;
  padding-top: var(--bbhm-space-5);
  padding-bottom: var(--bbhm-space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
  gap: var(--bbhm-space-5);
  padding: 0 0 var(--bbhm-space-5);
}

.footer-brand,
.footer-column {
  display: grid;
  align-content: start;
  min-width: 0;
}

.footer-title {
  font-size: 1.7rem;
  margin-bottom: var(--bbhm-space-2);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.9);
  max-width: 32ch;
  font-size: 0.95rem;
}

.footer-copy-compact {
  max-width: 20ch;
  margin-bottom: var(--bbhm-space-2);
}

.footer-heading {
  margin-bottom: var(--bbhm-space-3);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
}

.footer-links a,
.footer-contact a {
  font-size: 1rem;
  text-decoration: none;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: var(--bbhm-space-4);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 0;
}

.footer-social-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social-icon svg {
  width: 100%;
  height: 100%;
}

.footer-contact {
  margin-bottom: 0;
}

.footer-meta {
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  padding-top: var(--bbhm-space-3);
  text-align: center;
}

.footer-meta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--bbhm-ui);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible,
.site-footer .footer-contact a:hover,
.site-footer .footer-contact a:focus-visible {
  color: #fff;
  text-decoration-line: underline;
  text-decoration-thickness: var(--bbhm-underline-thickness);
  text-decoration-color: #fff;
  text-underline-offset: 0.12em;
}

.site-footer .footer-social a:hover,
.site-footer .footer-social a:focus-visible {
  color: #fff;
  text-decoration: none;
}

.site-footer .menu a:hover,
.site-footer .menu a:focus-visible {
  border-bottom-color: transparent;
}
