.header {
  background: var(--color-bg);
  border-bottom: 1px solid #eae4dd;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 16px;
}

.mobile-menu__body {
  background-image: url("../../images/mobile-menu-bg.svg");
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  min-height: 514.8895263671875px;
  margin-top: 65px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 71px;
  padding-inline: 32px;
}

.header__logo {
  width: 124px;
  height: 24px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 94px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-light);
  transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--color-dark);
}

.btn-cta {
  display: flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  padding: 0 14px;
  height: 42px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background var(--transition-fast);
  margin: 70px auto !important;
}

.btn-cta:hover {
  background: var(--color-navy-hover);
}

.header__toggle {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
}

.header__toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast),
    top var(--transition-fast);
}

.header__toggle span:nth-child(1) {
  top: 8px;
}
.header__toggle span:nth-child(2) {
  top: 16px;
}
.header__toggle span:nth-child(3) {
  top: 24px;
}

.header__toggle.is-active span:nth-child(1) {
  top: 16px;
  transform: rotate(45deg);
}
.header__toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.header__toggle.is-active span:nth-child(3) {
  top: 16px;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  padding-inline: 20px;
  overflow: hidden;
  background-color: var(--color-bg);
  background-image: url("../../images/mobile-menu-bg.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 50px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast),
    visibility var(--transition-fast);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 18px;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.19px solid var(--color-border);
}

.mobile-menu__close {
  position: relative;
}

.mobile-menu__close span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-navy);
}

.mobile-menu__close span:nth-child(1) {
  transform: rotate(45deg);
}
.mobile-menu__close span:nth-child(2) {
  transform: rotate(-45deg);
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  text-align: center;
}

.mobile-menu__link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-dark);
}

.no-scroll {
  overflow: hidden;
}

/* The full nav (logo + 5 links + CTA) needs ~1010px of room. Tighten the gaps
   just above that, and hand over to the mobile menu below it. */
@media (max-width: 1311px) and (min-width: 1025px) {
  .nav {
    gap: 40px;
  }

  .nav__list {
    gap: 28px;
  }
}

@media (max-width: 1024px) {
  .nav__list,
  .nav > .btn-cta {
    display: none;
  }

  .header__logo {
    width: 101px;
    height: 19px;
  }

  .header__toggle {
    display: block;
  }

  .btn-cta {
    margin-top: 20px;
  }
}

/* Mobile header, from Figma frame 2084:1653 (375 wide): the rule sits at
   y56, the logo at x16/y18 and the toggle at x337/y21 (21.67 x 15.17).
   The desktop 32px inner padding is dropped so the logo meets the rail. */
@media (max-width: 900px) {
  .header__inner {
    height: 55px;
    padding-inline: 0;
  }

  .header__toggle {
    width: 22px;
    height: 16px;
  }

  .header__toggle span:nth-child(1) {
    top: 0;
  }

  .header__toggle span:nth-child(2) {
    top: 7px;
  }

  .header__toggle span:nth-child(3) {
    top: 14px;
  }

  .header__toggle.is-active span:nth-child(1),
  .header__toggle.is-active span:nth-child(3) {
    top: 7px;
  }
}
