/* === Mobile Hamburger Menu === */

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 3px;
  transition: background 0.15s;
}

.hamburger-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.hamburger-btn .hb {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1820;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* X (close) state */
.hamburger-btn.is-open .hb:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.is-open .hb:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.is-open .hb:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay — slides down from behind sticky nav */
#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 195;
  background: rgba(255, 255, 255, 0.99);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.32s;
  visibility: hidden;
  pointer-events: none;
  min-height: 100svh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#mobile-menu.is-open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding-top: 80px; /* clear the sticky nav */
  padding-bottom: 2.5rem;
}

.mobile-nav-links a {
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1820;
  text-decoration: none;
  letter-spacing: -0.01em;
  padding: 0 2rem;
  min-height: 52px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #D4D0C4;
  transition: color 0.15s, background 0.15s;
}

.mobile-nav-links a:first-child {
  border-top: 1px solid #D4D0C4;
  margin-top: 0.25rem;
}

.mobile-nav-links a:hover,
.mobile-nav-links a:active {
  color: #5533E8;
  background: #F6F4EE;
}

/* CTA-style links (Newsletter, Support) */
.mobile-nav-links .mm-cta {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff !important;
  background: #5533E8;
  border-radius: 3px;
  margin: 0.75rem 2rem 0;
  min-height: 48px;
  border-top: none;
  border-bottom: none;
  padding: 0 1.2rem;
  justify-content: center;
}

.mobile-nav-links .mm-cta + .mm-cta {
  margin-top: 0.5rem;
}

.mobile-nav-links .mm-cta:first-child {
  border-top: none;
  margin-top: 0.75rem;
}

.mobile-nav-links .mm-cta:hover,
.mobile-nav-links .mm-cta:active {
  background: #6644F5;
  color: #fff !important;
}

/* Desktop: hide hamburger and mobile menu entirely */
@media (min-width: 801px) {
  .hamburger-btn { display: none !important; }
  #mobile-menu   { display: none !important; }
}

/* Mobile: show hamburger, hide desktop nav items */
@media (max-width: 800px) {
  .hamburger-btn       { display: flex !important; }
  .nav .nlinks         { display: none !important; }
  .nav > .ncta         { display: none !important; }
  #navSearch           { display: none !important; }
}
