.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  --header-inset: var(--pad);
  min-height: 72px;
  padding: 14px var(--header-inset);
  pointer-events: none;
  transition: transform .45s var(--ease);
}

.site-header.hidden {
  transform: translateY(-100%);
}

.site-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(232, 242, 251, .78);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border-bottom: 1px solid rgba(10, 39, 72, .08);
  pointer-events: none;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.site-header.scrolled::before {
  background: rgba(232, 242, 251, .9);
  border-bottom-color: rgba(10, 39, 72, .12);
  box-shadow: 0 10px 36px rgba(10, 39, 72, .06);
}

.site-header > * {
  pointer-events: auto;
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
  color: var(--ink);
  text-decoration: none;
  transition: opacity .25s ease;
}

.brand:hover {
  opacity: .82;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 12px;
  line-height: 1;
}

.brand-text > span {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.055em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
}

.header-menu {
  display: contents;
}

.glass-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.glass-nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s ease, background .25s ease;
}

.glass-nav a:hover {
  color: var(--blue-dark);
  background: rgba(255, 255, 255, .35);
}

.glass-nav a.is-active,
.glass-nav a[aria-current="page"] {
  color: var(--blue-dark);
  font-weight: 600;
  background: rgba(255, 255, 255, .42);
}

.header-cta {
  position: relative;
  z-index: 2;
  min-height: 48px;
  gap: 12px;
  padding: 4px 4px 4px 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
  transition: transform .3s var(--ease), box-shadow .3s ease, background .3s ease;
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(10, 39, 72, .24);
}

.header-cta.is-active,
.header-cta[aria-current="page"] {
  box-shadow: 0 0 0 1px rgba(59, 130, 196, .35), 0 16px 38px rgba(10, 39, 72, .2);
}

.header-cta b {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.menu-toggle {
  position: relative;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  box-shadow: 0 8px 24px rgba(10, 39, 72, .1);
  cursor: pointer;
  transition: background .25s ease, box-shadow .25s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(10, 39, 72, .14);
}

.menu-toggle i {
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s ease, opacity .3s ease;
}

.menu-toggle[aria-expanded="true"] i:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] i:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

@media (max-width: 1180px) {
  .site-header {
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .header-menu {
    position: absolute;
    z-index: 1;
    top: calc(100% + 8px);
    left: var(--header-inset);
    right: var(--header-inset);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 24px;
    background: rgba(245, 249, 253, .94);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    backdrop-filter: blur(28px) saturate(140%);
    box-shadow: 0 24px 60px rgba(10, 39, 72, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transform-origin: top right;
    transition: opacity .28s ease, transform .28s var(--ease), visibility .28s;
  }

  .header-menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .glass-nav {
    position: static;
    transform: none;
    display: grid;
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .glass-nav a {
    padding: 14px 16px;
    border-radius: 14px;
    font-size: var(--fs-sm);
  }

  .glass-nav a.is-active,
  .glass-nav a[aria-current="page"] {
    box-shadow: none;
  }

  .header-cta {
    width: 100%;
    min-height: 52px;
    justify-content: space-between;
  }

  .header-cta:hover {
    transform: none;
  }
}

@media (max-width: 820px) {
  .site-header {
    --header-inset: var(--pad);
  }

  .site-header .brand small {
    display: none;
  }

  .brand-text {
    margin-left: 10px;
  }

  .brand-text > span {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-text > span {
    font-size: 18px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header::before,
  .glass-nav a,
  .header-cta,
  .menu-toggle,
  .header-menu {
    transition: none;
  }

  .header-cta:hover {
    transform: none;
  }
}
