/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 2.5rem;
  background: rgba(245, 240, 232, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition:
    padding 0.4s var(--ease-out-quart),
    background 0.4s;
}
nav.scrolled {
  padding: 1rem 2.5rem;
  background: rgba(245, 240, 232, 0.96);
}

.nav-mark {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.nav-mark::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out-quart);
}
.nav-mark:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nav-links a {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out-quart);
}
.nav-links a:hover {
  color: var(--rust);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: none;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  position: relative;
  z-index: 501;
}
.ham-line {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 0.5s var(--ease-out-expo),
    opacity 0.4s var(--ease-out-quart),
    width 0.4s var(--ease-out-quart),
    background 0.3s;
  will-change: transform, opacity;
}
.ham-line:nth-child(1) {
  width: 28px;
}
.ham-line:nth-child(2) {
  width: 20px;
}
.ham-line:nth-child(3) {
  width: 24px;
}

/* Open state — morphs into X */
.hamburger.open .ham-line:nth-child(1) {
  width: 24px;
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.open .ham-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0) translateX(-8px);
}
.hamburger.open .ham-line:nth-child(3) {
  width: 24px;
  transform: translateY(-7.5px) rotate(-45deg);
}
.hamburger.open .ham-line {
  background: var(--cream);
}

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 490;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 6rem 2.5rem 3rem;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease-out-expo);
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  pointer-events: all;
}
.mobile-menu ul {
  list-style: none;
  width: 100%;
}
.mobile-menu ul li {
  border-bottom: 1px solid rgba(245, 240, 232, 0.07);
  overflow: hidden;
}
.mobile-menu ul li a {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 8vw, 3.5rem);
  font-weight: 900;
  font-style: italic;
  color: var(--cream);
  text-decoration: none;
  padding: 0.9rem 0;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 0.5s var(--ease-out-expo),
    opacity 0.4s ease,
    color 0.2s;
}
.mobile-menu.open ul li a {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu ul li:nth-child(1) a {
  transition-delay: 0.06s;
}
.mobile-menu ul li:nth-child(2) a {
  transition-delay: 0.12s;
}
.mobile-menu ul li:nth-child(3) a {
  transition-delay: 0.18s;
}
.mobile-menu ul li:nth-child(4) a {
  transition-delay: 0.24s;
}
.mobile-menu ul li:nth-child(5) a {
  transition-delay: 0.3s;
}
.mobile-menu ul li a:hover {
  color: var(--rust);
}

.mobile-menu-footer {
  margin-top: 2.5rem;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s ease 0.38s,
    transform 0.4s var(--ease-out-quart) 0.38s;
}
.mobile-menu.open .mobile-menu-footer {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu-footer p {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: rgba(245, 240, 232, 0.3);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav {
    padding: 1.2rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}
