/* Flux site header: Chalk bar, Ink type, one Heat CTA (stays visible on mobile). */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 88px;
  color: var(--flux-ink);
  background: var(--flux-chalk);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}

.site-header--scrolled {
  border-bottom-color: var(--flux-mist);
}

.site-header__inner {
  width: calc(100% - 32px);
  max-width: 1372px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-header__logo {
  flex: 0 0 auto;
  width: 132px;
  line-height: 0;
}

.site-header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header__nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 28px;
  font-size: 16px;
  font-weight: 600;
}

.site-header__nav > a,
.site-header__nav-item,
.site-header__nav-item > a {
  display: flex;
  align-items: center;
}

.site-header__nav-item > a {
  height: 100%;
}

.site-header__nav a {
  position: relative;
  gap: 8px;
  white-space: nowrap;
}

.site-header__nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--flux-heat) 50%, var(--flux-cold) 50%);
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.site-header__nav a:hover::after,
.site-header__nav a:focus-visible::after,
.site-header__nav-item:hover > a::after,
.site-header__nav-item.is-open > a::after {
  transform: scaleX(1);
}

.site-header__nav-chevron {
  width: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 160ms ease;
}

.site-header__nav a[aria-expanded="true"] > .site-header__nav-chevron {
  transform: rotate(180deg);
}

.site-header__phone {
  margin-left: auto;
  font-family: var(--rui-font-mono);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.site-header__cta {
  flex: 0 0 auto;
  margin-left: auto;
}

.site-header__phone + .site-header__cta {
  margin-left: 0;
}

.site-header__mega-menu {
  position: absolute;
  top: 88px;
  left: 0;
  right: 0;
  padding: 40px max(16px, calc((100% - 1340px) / 2)) 48px;
  color: var(--flux-ink);
  background: var(--flux-chalk);
  border-top: 1px solid var(--flux-mist);
  border-bottom: 2px solid var(--flux-ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 48px;
}

.site-header__mega-links {
  display: contents;
}

.site-header__mega-group h2 {
  margin: 0 0 24px;
  font-family: var(--rui-font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--flux-text-secondary);
}

.site-header__mega-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__mega-group li + li {
  margin-top: 18px;
}

.site-header__mega-group a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  font-stretch: 112%;
}

.site-header__mega-group a:hover {
  color: var(--flux-heat);
}

.site-header__arrow {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--flux-ink);
}

.site-header__arrow svg {
  width: 8px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 2;
}

.site-header__promo {
  margin: 0;
  background: var(--flux-cold);
  color: var(--flux-on-cold);
}

.site-header__promo > img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.site-header__promo > div {
  padding: 24px;
}

.site-header__promo h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-stretch: 112%;
}

.site-header__promo p {
  margin: 0 0 18px;
  font-size: 15px;
}

.site-header__menu-button,
.site-header__mobile-menu {
  display: none;
}

@media (max-width: 1180px) {
  .site-header__inner {
    gap: 20px;
  }

  .site-header__nav {
    gap: 18px;
    font-size: 15px;
  }
}

@media (max-width: 1024px) {
  .site-header {
    height: 72px;
  }

  .site-header__nav,
  .site-header__phone,
  .site-header__mega-menu {
    display: none;
  }

  .site-header__inner {
    width: 100%;
    padding: 0 16px;
    gap: 12px;
  }

  .site-header__logo {
    width: 104px;
  }

  /* The CTA stays visible in the collapsed bar */
  .site-header__cta {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
  }

  .site-header__menu-button {
    display: grid;
    gap: 5px;
    padding: 8px;
    border: 0;
    color: inherit;
    background: transparent;
  }

  .site-header__menu-button span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
  }

  .site-header__mobile-menu {
    display: grid;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 8px 16px 24px;
    color: var(--flux-ink);
    background: var(--flux-chalk);
    border-bottom: 2px solid var(--flux-ink);
  }

  .site-header__mobile-group {
    display: grid;
    padding: 12px 0;
    border-bottom: 1px solid var(--flux-mist);
  }

  .site-header__mobile-group > a:first-child {
    font-size: 18px;
    font-weight: 800;
    font-stretch: 112%;
  }

  .site-header__mobile-sublink {
    padding: 8px 0 0 16px;
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .site-header__logo {
    width: 84px;
  }
}
