.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 232, 0.94);
  border-bottom: 1px solid rgba(217, 204, 186, 0.55);
  backdrop-filter: blur(18px);
  transform: translateY(0);
  transition: transform 260ms ease, background 180ms ease, border-color 180ms ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(calc(-100% - 2px));
}

body.menu-open .site-header {
  transform: translateY(0);
}

.site-header__inner {
  width: var(--container);
  min-height: 104px;
  margin-inline: auto;
  padding-block: 12px;
  display: grid;
  grid-template-columns: 190px 1fr auto;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.site-header__brand img {
  width: 190px;
  height: auto;
}

.site-header__nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 1.6vw, 24px);
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.site-header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--color-beige);
  transition: transform 180ms ease;
}

.site-header__nav a:hover::after {
  transform: scaleX(1);
}

.site-header__toggle {
  display: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--color-navy);
  background: var(--color-paper);
  border: 1px solid rgba(19, 44, 84, 0.14);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}

.site-header__icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 1320px) {
  .site-header__inner {
    grid-template-columns: 170px 1fr auto;
  }

  .site-header__brand img {
    width: 170px;
  }

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

  .button--nav {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-header__inner {
    min-height: 86px;
    padding-block: 10px;
    grid-template-columns: 156px auto auto;
    justify-content: space-between;
    gap: 12px;
  }

  .site-header__brand img {
    width: 156px;
  }

  .site-header__toggle {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    width: 52px;
    height: 52px;
    color: var(--color-navy);
    background: var(--color-paper);
    border: 1px solid rgba(19, 44, 84, 0.14);
    border-radius: 999px;
    box-shadow: var(--shadow-card);
    font-weight: 800;
  }

  .site-header__toggle span {
    width: 21px;
    height: 2px;
    background: var(--color-navy);
    border-radius: 999px;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .site-header__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

  .site-header__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-header__nav {
    position: fixed;
    left: 18px;
    right: 18px;
    top: 94px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 14px;
    background: var(--color-paper);
    border: 1px solid rgba(217, 204, 186, 0.7);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
  }

  .site-header__nav.is-open {
    display: flex;
  }

  .site-header__nav a {
    padding: 14px 16px;
    border-radius: 16px;
  }

  .site-header__nav a:hover {
    background: var(--color-cream);
  }

  .site-header__actions {
    display: flex;
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .site-header__inner {
    grid-template-columns: 132px auto auto;
  }

  .site-header__brand img {
    width: 132px;
  }

  .site-header__icon,
  .site-header__toggle {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}
