/* Global Liberty Media header — logo + hamburger
   Default / dark bg → white logo (.lm-logo-light)
   Light bg (.nav-black) → dark logo (.lm-logo-dark)
   Contrast is auto-sampled; pages can lock via __lmSetNavContrast */

@font-face {
  font-family: "Supply Sans";
  src: url("/assets/fonts/PPSupplySans-Regular.otf") format("opentype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Supply Mono";
  src: url("/assets/fonts/PPSupplyMono-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Soft black blur bar behind logo/menu when scrolled */
.lm-header-shade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 128px;
  z-index: 12240;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    180deg,
    rgba(3, 7, 5, 0.82) 0%,
    rgba(3, 7, 5, 0.5) 62%,
    rgba(3, 7, 5, 0) 100%
  );
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  transition: opacity 0.35s ease;
}
body.lm-header-scrolled .lm-header-shade {
  opacity: 1;
}
body.nav-black .lm-header-shade {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 255, 255, 0.35) 62%,
    rgba(255, 255, 255, 0) 100%
  );
}

.lm-menu-btn {
  --lm-gap: 7px;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 40010;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--lm-gap);
  padding: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 40px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.lm-menu-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 48px rgba(0, 0, 0, 0.28);
}
.lm-menu-btn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.65);
  outline-offset: 4px;
}
.lm-menu-btn span {
  display: block;
  width: 20px;
  height: 2.5px;
  background: #ffffff;
  border-radius: 2px;
  transform-origin: center;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease,
    width 0.35s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}
.lm-menu-btn:hover span {
  width: 22px;
  background: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.5);
}
.lm-menu-btn.is-open {
  background: rgba(10, 10, 10, 0.55);
  border-color: rgba(255, 255, 255, 0.22);
}
.lm-menu-btn.is-open span:nth-child(1) {
  transform: translateY(calc(var(--lm-gap) + 2.5px)) rotate(45deg);
  width: 20px;
}
.lm-menu-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.lm-menu-btn.is-open span:nth-child(3) {
  transform: translateY(calc(-1 * (var(--lm-gap) + 2.5px))) rotate(-45deg);
  width: 20px;
}

/* Light backgrounds → dark logo + hamburger */
body.nav-black .lm-menu-btn {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 10px 36px rgba(0, 0, 0, 0.12);
}
body.nav-black .lm-menu-btn:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(0, 0, 0, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 40px rgba(0, 0, 0, 0.14);
}
body.nav-black .lm-menu-btn span {
  background: #111111;
  box-shadow: none;
}
body.nav-black .lm-menu-btn:hover span {
  background: #000000;
  box-shadow: none;
}
body.nav-black .lm-menu-btn.is-open {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.2);
}
body.nav-black .lm-menu-btn:focus-visible {
  outline-color: rgba(0, 0, 0, 0.55);
}

.lm-logo {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 40010;
  display: block;
  width: min(168px, 38vw);
  height: auto;
  line-height: 0;
  text-decoration: none;
  pointer-events: auto;
}
.lm-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.lm-logo-light {
  opacity: 1;
}
.lm-logo-dark {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
/* Instant swap — no opacity crossfade (avoids blink) */
body.nav-black .lm-logo-light {
  opacity: 0;
}
body.nav-black .lm-logo-dark {
  opacity: 1;
}

.lm-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  cursor: auto;
}
.lm-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.lm-menu-open .lm-cursor {
  display: none !important;
}
body.lm-menu-open {
  cursor: auto;
}

.lm-menu-panel {
  width: min(440px, 100%);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(14, 14, 14, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  padding: 36px 28px 28px;
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  font-family: "Supply Sans", "PP Supply Mono", system-ui, sans-serif;
  color: #f2f2f2;
  -webkit-font-smoothing: antialiased;
}
.lm-menu-overlay.is-open .lm-menu-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lm-menu-kicker {
  margin: 0 0 18px;
  font-family: "Supply Sans", "PP Supply Mono", system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  letter-spacing: 0.28em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.42) !important;
  line-height: 1.2 !important;
}

.lm-menu-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  gap: 4px !important;
}
.lm-menu-list li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.lm-menu-list a {
  display: block !important;
  padding: 14px 12px !important;
  border-radius: 14px !important;
  text-decoration: none !important;
  font-family: "Supply Sans", "PP Supply Mono", system-ui, sans-serif !important;
  font-size: clamp(22px, 4vw, 30px) !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  line-height: 1.15 !important;
  text-transform: uppercase !important;
  color: #f2f2f2 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease !important;
  cursor: pointer !important;
}
.lm-menu-list a:hover,
.lm-menu-list a:focus-visible {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  padding-left: 18px !important;
  outline: none !important;
}
.lm-menu-list a.is-current {
  color: #9fd4b5 !important;
}

@media (max-width: 768px) {
  .lm-logo {
    top: 14px;
    left: 14px;
    width: min(132px, 42vw);
  }
  .lm-menu-btn {
    top: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
}
