/* ════════════════════════════════════════════════════════════════
   HEADER.CSS - TOPBAR NAVIGATION, BRAND MARK & OVERLAY MENU
   ════════════════════════════════════════════════════════════════ */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(88 * var(--u));
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 calc(75 * var(--u));
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  box-shadow: none;
  transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease,
              backdrop-filter 0.35s ease,
              box-shadow 0.35s ease;
}

/* Glassmorphism Dark Backdrop appears ONLY when scrolling past Hero! */
.topbar.is-scrolled {
  height: calc(72 * var(--u)) !important;
  background: rgba(8, 8, 8, 0.88) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;
}

.topbar-inner {
  position: relative;
  width: 100%;
  max-width: calc(1337 * var(--u));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand Custom JM SVG Mark */
.brand {
  position: relative;
  width: calc(48 * var(--u));
  height: calc(42 * var(--u));
  display: block;
  z-index: 101;
  text-decoration: none;
  transition: transform 0.3s ease, left 0.3s ease;
}

.brand:hover {
  transform: scale(1.05);
}

.brand svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Universal Frosted Burger Button */
.burger {
  display: flex;
  position: relative;
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: calc(5.5 * var(--u));
  cursor: pointer;
  z-index: 101;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.burger:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.burger i {
  display: block;
  width: calc(18 * var(--u));
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.stage.is-open .burger i:first-child {
  transform: translateY(calc(3.5 * var(--u))) rotate(45deg);
}

.stage.is-open .burger i:last-child {
  transform: translateY(calc(-3.5 * var(--u))) rotate(-45deg);
}

/* ════════════════════════════════════════
   FULLSCREEN OVERLAY MENU
   ════════════════════════════════════════ */
.menu {
  display: flex;
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.94) 0%, rgba(5,5,5,0.98) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(80 * var(--u)) calc(75 * var(--u));
}

.stage.is-open .menu {
  opacity: 1;
  visibility: visible;
}

.menu-inner {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
  text-align: center;
}

.menu-eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: calc(12 * var(--u));
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: calc(24 * var(--u));
}

.menu-list a {
  font-family: 'Poppins', sans-serif;
  font-size: calc(48 * var(--h));
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.3s ease, transform 0.3s ease;
}

.menu-list a:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

/* Mobile Header Overrides: Centered Logo in Middle */
@media (max-aspect-ratio: 11/10) {
  .topbar {
    padding: 0 calc(24 * var(--u));
  }

  .topbar-inner {
    position: relative;
    justify-content: flex-end; /* Burger stays on far right */
  }

  .brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .brand:hover {
    transform: translate(-50%, -50%) scale(1.05);
  }
}
