/* Shared by design-canvas pages and the React header. */
.bh-header {
  position: relative;
  z-index: 50;
  overflow: visible;
  border-bottom: 1px solid var(--bh-border, rgba(247, 244, 234, 0.17));
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(24px);
  box-shadow: inset 0 -1px 0 rgba(155, 38, 21, 0.45), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.bh-header--sticky { position: sticky; top: 0; }

.bh-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(177, 38, 21, 0.8) 12%, rgba(255, 212, 0, 0.35) 50%, rgba(177, 38, 21, 0.8) 88%, transparent);
  opacity: 0.65;
}

.bh-header-inner {
  display: flex;
  min-height: var(--bh-header-height, 80px);
  max-width: var(--bh-max-width, 1280px);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 0 var(--bh-gutter, 32px);
  box-sizing: border-box;
}

.bh-header-home { display: block; min-width: 0; flex: 0 1 auto; }

.bh-header-logo {
  display: block;
  width: auto;
  height: 52px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  filter: sepia(0.16) contrast(1.1) drop-shadow(1px 1px 0 rgba(132, 22, 13, 0.5));
  transition: filter 180ms ease;
}

.bh-header-actions,
.bh-header-nav { display: flex; align-items: center; gap: 32px; }
.bh-header-actions { flex: 0 0 auto; }

.bh-header-link,
.bh-header-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--bh-display, "Bebas Neue"), Impact, sans-serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.bh-header-link { min-height: 44px; color: var(--bh-ink, #f7f4ea); }
.bh-header-link[aria-current="page"] { color: var(--bh-accent, #ffd400); }

.bh-header-cta {
  position: relative;
  height: 48px;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--bh-accent, #ffd400);
  border-radius: 3px;
  padding: 0 24px;
  background: var(--bh-accent, #ffd400);
  color: #000;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -8px 18px rgba(83, 51, 0, 0.14), 0 8px 22px rgba(0, 0, 0, 0.32), 0 0 26px rgba(255, 212, 0, 0.18);
  box-sizing: border-box;
}

.bh-header svg { flex-shrink: 0; }

.bh-header-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 212, 0, 0.5);
  border-radius: 3px;
  padding: 0;
  background: rgba(0, 0, 0, 0.4);
  color: var(--bh-accent, #ffd400);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.bh-header-menu {
  position: absolute;
  z-index: 60;
  top: 100%;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--bh-border, rgba(247, 244, 234, 0.17));
  border-bottom: 1px solid rgba(255, 212, 0, 0.35);
  padding: 12px var(--bh-gutter, 16px) 20px;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.bh-header-menu[hidden] { display: none; }

.bh-header-menu .bh-header-link {
  min-height: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 8px;
  font-size: 30px;
}

.bh-header-menu .bh-header-cta { min-height: 56px; margin-top: 12px; font-size: 26px; }

.bh-header :is(a, button):focus-visible {
  outline: 2px solid var(--bh-accent, #ffd400);
  outline-offset: 4px;
}

.bh-header-cta:active { transform: translateY(1px); }

@media (hover: hover) {
  .bh-header-home:hover .bh-header-logo {
    filter: sepia(0.16) contrast(1.1) brightness(1.18) drop-shadow(1px 1px 0 rgba(132, 22, 13, 0.5));
  }
  .bh-header-link:hover { color: var(--bh-accent, #ffd400); }
  .bh-header-cta:hover { background: #ffe15a; color: #000; transform: translateY(-2px); }
  .bh-header-toggle:hover { border-color: var(--bh-accent, #ffd400); background: rgba(255, 212, 0, 0.08); }
}

@media (min-width: 900px) {
  .bh-header-menu { display: none; }
}

@media (max-width: 899px) {
  .bh-header-nav { display: none; }
  .bh-header-toggle { display: inline-flex; }
  .bh-header-actions { gap: 16px; }
}

@media (max-width: 767px) {
  .bh-header-inner { padding-right: var(--bh-gutter, 16px); padding-left: var(--bh-gutter, 16px); }
  .bh-header-logo { max-width: min(224px, calc(100vw - 112px)); }
  .bh-header-cta--standalone { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bh-header-logo,
  .bh-header-link,
  .bh-header-cta,
  .bh-header-toggle { transition: none; }
  .bh-header-cta:hover,
  .bh-header-cta:active { transform: none; }
}
