.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.nav--solid {
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 30px rgba(35, 32, 28, 0.04);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 24px;
}

.nav__brand img {
  height: 152px;
  width: auto;
  transition: opacity 0.3s ease;
}

@media (max-width: 900px) {
  .nav__brand img {
    height: 84px;
  }
}

@media (max-width: 560px) {
  .nav__brand img {
    height: 68px;
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
  margin: 0 auto;
}

.nav__link {
  position: relative;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 0;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.85;
}

.nav__link:hover {
  opacity: 1;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__link.is-active {
  opacity: 1;
}

.nav__cta {
  padding: 12px 26px;
  font-size: 0.7rem;
}

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: all 0.35s ease;
}

.nav--open .nav__burger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav--open .nav__burger span:nth-child(2) {
  opacity: 0;
}

.nav--open .nav__burger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav__mobile,
.nav__scrim {
  display: none;
}

@media (max-width: 900px) {
  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .nav--open {
    background: var(--cream);
  }

  .nav__scrim {
    display: block;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 98;
    background: rgba(20, 18, 15, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .nav__scrim.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__mobile {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(20, 18, 15, 0.12);
    display: flex;
    flex-direction: column;
    padding: 8px clamp(20px, 6vw, 64px) 20px;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.4s ease, visibility 0.4s ease;
  }

  .nav__mobile.is-open {
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    visibility: visible;
  }

  .nav__mobile-link {
    font-family: var(--serif);
    font-size: 1.35rem;
    color: var(--ink);
    letter-spacing: 0.02em;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav__mobile-link:last-child {
    border-bottom: none;
  }

  .nav__mobile-link.is-active {
    color: var(--gold-deep);
  }
}
