.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(3, 16, 29, .72);
  border-bottom: 1px solid rgba(89, 223, 247, .18);
  backdrop-filter: blur(18px);
  transition: box-shadow .25s ease, background .25s ease;
}

.site-header.is-scrolled {
  background: rgba(3, 16, 29, .94);
  box-shadow: 0 18px 48px rgba(0, 10, 22, .45);
}

.header-inner {
  width: var(--container);
  height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  min-width: max-content;
}

.brand-mark {
  width: 46px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(89, 223, 247, .46);
  border-radius: 14px;
  color: #07111c;
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(89, 223, 247, .95), rgba(47, 141, 255, .95));
  box-shadow: 0 0 32px rgba(89, 223, 247, .24);
}

.brand-text {
  display: grid;
  line-height: 1.25;
}

.brand-text small {
  color: var(--color-light-muted);
  font-size: .75rem;
}

.primary-nav {
  margin-left: auto;
}

.primary-nav ul,
.mobile-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav a {
  color: rgba(231, 247, 255, .78);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.primary-nav a:hover,
.mobile-nav a:hover {
  color: var(--color-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-cta {
  padding: 10px 18px;
  border: 1px solid rgba(89, 223, 247, .42);
  border-radius: 14px;
  font-weight: 900;
}

.header-cta-primary {
  color: #041522;
  background: linear-gradient(135deg, #59dff7, #2f8dff);
}

.header-cta-secondary {
  color: var(--color-gold-soft);
  background: rgba(255, 255, 255, .045);
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(89, 223, 247, .34);
  border-radius: 14px;
  background: transparent;
  position: relative;
  z-index: 1002;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  margin: 0;
  background: #fff;
  transform: translate(-50%, -50%);
  transform-origin: center;
  transition: transform .2s ease, opacity .2s ease;
}

.mobile-menu-toggle span:nth-child(1) {
  transform: translate(-50%, calc(-50% - 6px));
}

.mobile-menu-toggle span:nth-child(2) {
  transform: translate(-50%, -50%);
}

.mobile-menu-toggle span:nth-child(3) {
  transform: translate(-50%, calc(-50% + 6px));
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-drawer {
  display: none;
  padding: 18px 20px 24px;
  border-top: 1px solid var(--color-line);
  background: rgba(9, 9, 9, .98);
}

.mobile-cta-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

.mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--color-gold);
  border-radius: 999px;
  font-weight: 900;
}

.mobile-cta-primary {
  color: #141008;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-soft));
}

.mobile-cta-secondary {
  color: var(--color-gold);
  background: rgba(255, 255, 255, .04);
}

@media (max-width: 940px) {
  .primary-nav,
  .header-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-drawer.is-open {
    display: block;
  }

  .mobile-nav ul {
    display: grid;
    gap: 14px;
  }

  .mobile-nav a {
    color: #fff;
    font-weight: 900;
  }
}

/* Mobile drawer overlay QA overrides */
body.drawer-open {
  overflow: hidden;
}

.mobile-drawer-backdrop {
  display: none;
}

@media (max-width: 940px) {
  .site-header {
    overflow: visible;
  }

  .mobile-drawer {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: min(86vw, 360px);
    max-width: 100vw;
    height: calc(100svh - var(--header-height));
    display: block;
    padding: 20px;
    border-top: 0;
    border-left: 1px solid rgba(89, 223, 247, .24);
    background: rgba(3, 16, 29, .98);
    transform: translateX(108%);
    transition: transform .28s ease;
    z-index: 1001;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .mobile-drawer::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .mobile-drawer.is-open {
    transform: translateX(0);
  }

  .mobile-drawer-backdrop {
    position: fixed;
    inset: var(--header-height) 0 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, .62);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 1000;
  }

  .mobile-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav ul {
    gap: 0;
  }

  .mobile-nav li + li {
    border-top: 1px solid rgba(255, 255, 255, .08);
  }

  .mobile-nav a {
    display: block;
    padding: 13px 0;
  }

  .mobile-cta {
    min-height: 46px;
  }

  .mobile-cta-secondary {
    color: var(--color-gold);
    background: transparent;
    border-color: rgba(89, 223, 247, .62);
  }
}

@media (max-width: 560px) {
  .mobile-drawer {
    width: 100vw;
    border-left: 0;
  }
}
