.af-header {
  position: relative;
  z-index: 100;
  min-height: 4.75rem;
  border-bottom: 1px solid var(--cor-ferro);
  background: var(--cor-carvao);
  color: var(--cor-creme);
}

.af-header__inner {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  gap: var(--espaco-4);
}

.af-header__brand,
.af-header__mobile-brand,
.af-footer__brand-link {
  text-decoration: none;
}

.af-header__brand {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: var(--espaco-2);
  min-width: 0;
  color: var(--cor-creme);
}

.af-header__brand:hover,
.af-header__mobile-brand:hover {
  color: var(--cor-creme);
}

.af-header__logo {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  object-fit: contain;
}

.af-header__brand-name,
.af-header__mobile-brand {
  color: var(--cor-creme);
  font-family: var(--fonte-titulo);
  font-size: 1.5rem;
  font-weight: var(--peso-negrito);
  line-height: 1;
  white-space: nowrap;
}

.af-header__brand-name strong,
.af-header__mobile-brand strong {
  color: var(--cor-ambar);
}

.af-header__navigation {
  min-width: 0;
  margin-inline-start: auto;
}

.af-header__nav-top,
.af-header__mobile-cta,
.af-header__toggle,
.af-header__close {
  display: none;
}

.af-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--espaco-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-header__nav-list li,
.af-header__nav-list li + li {
  margin: 0;
  padding: 0;
}

.af-header__nav-list a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--cor-creme);
  font-size: var(--texto-auxiliar);
  font-weight: var(--peso-semi);
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.af-header__nav-list a:hover,
.af-header__nav-list a[aria-current="page"] {
  color: var(--cor-ambar);
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

.af-header__cta {
  flex: 0 0 auto;
  min-height: 2.5rem;
  white-space: nowrap;
}

@media (max-width: 72rem) {
  .af-header {
    min-height: 4rem;
  }

  .af-header__inner {
    min-height: 4rem;
    justify-content: space-between;
    gap: var(--espaco-3);
  }

  .af-header__logo {
    width: 2.5rem;
    height: 2.5rem;
    flex-basis: 2.5rem;
  }

  .af-header__brand-name {
    font-size: 1.25rem;
  }

  .af-header__cta {
    display: none;
  }

  .af-header__toggle {
    display: inline-flex;
    width: 2.75rem;
    min-height: 2.75rem;
    flex: 0 0 2.75rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px solid var(--cor-ferro);
    border-radius: var(--raio-2);
    background: transparent;
    color: var(--cor-creme);
  }

  .af-header__toggle-line {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    transition: transform var(--transicao-rapida), opacity var(--transicao-rapida);
  }

  .af-header__toggle[aria-expanded="true"] .af-header__toggle-line:first-child {
    transform: translateY(0.375rem) rotate(45deg);
  }

  .af-header__toggle[aria-expanded="true"] .af-header__toggle-line:nth-child(2) {
    opacity: 0;
  }

  .af-header__toggle[aria-expanded="true"] .af-header__toggle-line:last-child {
    transform: translateY(-0.375rem) rotate(-45deg);
  }

  .af-header__navigation {
    position: fixed;
    z-index: 110;
    inset: 0 0 0 auto;
    width: min(24rem, 100vw);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-inline-start: 1px solid var(--cor-ferro);
    background: var(--cor-carvao);
    padding: var(--espaco-4);
    box-shadow: var(--sombra-sobreposta);
    transform: translateX(100%);
    transition: transform var(--transicao-rapida);
    visibility: hidden;
  }

  .af-header__navigation.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .af-header__nav-top {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    gap: var(--espaco-3);
    border-bottom: 1px solid var(--cor-ferro);
    padding-bottom: var(--espaco-3);
  }

  .af-header__close {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    border: 1px solid var(--cor-ferro);
    border-radius: var(--raio-2);
    background: transparent;
    padding: var(--espaco-2) var(--espaco-3);
    color: var(--cor-creme);
    font-weight: var(--peso-semi);
  }

  .af-header__nav-list {
    display: grid;
    gap: 0;
    margin: var(--espaco-4) 0;
  }

  .af-header__nav-list a {
    min-height: 3rem;
    border-bottom: 1px solid color-mix(in srgb, var(--cor-ferro) 70%, transparent);
    font-size: var(--texto-corpo);
  }

  .af-header__mobile-cta {
    display: inline-flex;
    width: 100%;
    margin-top: auto;
  }

  body.af-menu-open {
    overflow: hidden;
  }
}

@media (max-width: 22rem) {
  .af-header__brand-name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af-header__navigation,
  .af-header__toggle-line {
    transition: none;
  }
}