.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.header.scrolled {
  background-color: rgba(232, 232, 232, 0.70);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(127, 127, 127, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 30px;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #7f7f7f;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo img {
  max-height: 48px;
  width: auto;
  display: block;
}

.logo span {
  color: #7f7f7f;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.1vw, 30px);
  list-style: none;
}

.nav-link {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7f7f7f;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  inset: auto 0 -7px;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover {
  color: #555555;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #7f7f7f;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    gap: 24px;
    border-bottom: 1px solid rgba(127, 127, 127, 0.35);
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    padding 0.35s ease;
  }

  .nav-menu.active {
    max-height: calc(100vh - 80px);
    opacity: 1;
    padding: 40px 20px;
    overflow-y: auto;
  }
}