/* Header: transparent over the hero/banner, solid white once scrolled. */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition:
    background var(--rnx-dur) var(--rnx-ease),
    box-shadow var(--rnx-dur) var(--rnx-ease);
}

.site-header.is-stuck {
  position: fixed;
  background: var(--rnx-white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
  animation: rnx-drop 0.4s var(--rnx-ease);
}

@keyframes rnx-drop {
  from {
    transform: translateY(-100%);
  }
}

.header-inner {
  height: var(--rnx-header-h);
  display: flex;
  align-items: center;
  gap: 30px;
}

/* ---- Logo ---------------------------------------------------------------- */

.logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--rnx-white);
  white-space: nowrap;
}

.logo:hover {
  color: var(--rnx-white);
}

.logo-mark {
  color: var(--rnx-accent);
}

.site-header.is-stuck .logo,
.site-header--solid:not(.is-stuck) .logo {
  color: var(--rnx-ink);
}

/* ---- Nav ----------------------------------------------------------------- */

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

.nav-list {
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 9px;
  font-size: 14px;
  font-weight: 300;
  color: var(--rnx-white);
  white-space: nowrap;
}

.site-header.is-stuck .nav-link {
  color: var(--rnx-ink);
}

.nav-link:hover,
.nav-link.is-active,
.site-header.is-stuck .nav-link:hover,
.site-header.is-stuck .nav-link.is-active {
  color: var(--rnx-accent);
}

.ico {
  width: 1em;
  height: 1em;
  flex: none;
}

.ico-chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--rnx-dur) var(--rnx-ease);
}

.has-dropdown:hover .ico-chevron,
.has-dropdown.is-open .ico-chevron {
  transform: rotate(180deg);
}

/* ---- Dropdowns ----------------------------------------------------------- */

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  gap: 30px;
  min-width: 230px;
  padding: 22px 26px;
  background: var(--rnx-white);
  border-radius: var(--rnx-radius-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--rnx-dur) var(--rnx-ease);
}

.has-dropdown--wide .dropdown {
  min-width: 560px;
}

/* Anchor to the right edge for the wide panel and the trailing menus, so nothing
   spills past the viewport on a 1200px container. */
.has-dropdown--wide .dropdown,
.nav-item:nth-last-child(-n + 3) .dropdown {
  left: auto;
  right: 0;
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.is-open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dropdown-col {
  min-width: 165px;
}

.dropdown-title {
  margin: 0 0 8px;
  color: var(--rnx-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--rnx-tracking-eyebrow);
  text-transform: uppercase;
}

.dropdown a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--rnx-body);
}

.dropdown a:hover,
.dropdown a[aria-current="page"] {
  color: var(--rnx-accent);
}

/* ---- "Need help?" block -------------------------------------------------- */

.header-help {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--rnx-white);
}

.header-help:hover {
  color: var(--rnx-white);
}

.site-header.is-stuck .header-help {
  color: var(--rnx-ink);
}

.header-help__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--rnx-accent);
  border-radius: 50%;
  color: var(--rnx-accent);
  font-size: 20px;
  transition: background var(--rnx-dur) var(--rnx-ease);
}

.header-help:hover .header-help__icon {
  background: var(--rnx-accent);
  color: var(--rnx-ink);
}

.header-help__text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.header-help__text small {
  font-size: 12px;
  font-weight: 300;
  opacity: 0.8;
}

.header-help__text strong {
  font-size: 15px;
  font-weight: 600;
}

/* ---- Mobile toggle ------------------------------------------------------- */

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--rnx-white);
  font-size: 26px;
  cursor: pointer;
}

.site-header.is-stuck .nav-toggle {
  color: var(--rnx-ink);
}

.nav-toggle__close {
  display: none;
}
