/*
   NAVBAR - Premium floating pill
   ================================ */

nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 28px));
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 18px;
  border-radius: 100px;
  background: rgba(252, 250, 246, 0.75);
  border: 1px solid rgba(28, 26, 24, 0.07);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 4px rgba(28, 26, 24, 0.03),
    0 8px 28px rgba(28, 26, 24, 0.07);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
}
.mobile-perf nav {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(252, 250, 246, 0.98);
}

nav.scrolled {
  padding: 7px 7px 7px 16px;
  background: rgba(252, 250, 246, 0.92);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(28, 26, 24, 0.05),
    0 14px 40px rgba(28, 26, 24, 0.11);
}

/* ── Brand ── */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1C1A18;
  box-shadow: 0 1px 4px rgba(28, 26, 24, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.nav-brand:hover .nav-logo-mark {
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 4px 14px rgba(212, 96, 122, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.nav-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: #1C1A18;
  letter-spacing: -0.025em;
  line-height: 1;
}

.nav-wordmark em {
  font-style: italic;
  color: var(--rose);
}

/* ── Center nav (desktop) ── */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  z-index: 201;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 4px;
  background: rgba(28, 26, 24, 0.028);
  border: 1px solid rgba(28, 26, 24, 0.04);
  border-radius: 100px;
}

.nav-links a {
  position: relative;
  display: block;
  color: rgba(44, 40, 36, 0.52);
  text-decoration: none;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 14px;
  border-radius: 100px;
  white-space: nowrap;
  transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.nav-links a:hover {
  color: #1C1A18;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 3px rgba(28, 26, 24, 0.06), inset 0 0 0 1px rgba(28, 26, 24, 0.04);
}

.nav-links a.active {
  color: #1C1A18;
  background: #fff;
  font-weight: 700;
  box-shadow:
    0 1px 4px rgba(28, 26, 24, 0.07),
    0 4px 12px rgba(28, 26, 24, 0.04),
    inset 0 0 0 1px rgba(28, 26, 24, 0.05);
}

/* ── Right actions ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-signin {
  padding: 7px 15px;
  border-radius: 100px;
  color: rgba(44, 40, 36, 0.65);
  text-decoration: none;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-signin:hover {
  color: #1C1A18;
  background: rgba(28, 26, 24, 0.04);
}

.nav-signup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 100px;
  background: #1C1A18;
  color: rgba(250, 247, 242, 0.94);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 6px rgba(28, 26, 24, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-signup:hover {
  background: var(--rose);
  box-shadow: 0 4px 18px rgba(212, 96, 122, 0.38), 0 1px 4px rgba(212, 96, 122, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* kept for legacy references elsewhere */
@keyframes navDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.22); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14); }
}

/* ── Mobile hamburger ── */
.nav-mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(28, 26, 24, 0.09);
  background: rgba(255, 255, 255, 0.65);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.nav-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.92);
}

.nav-mobile-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  border-radius: 2px;
  background: #1C1A18;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

/* ── Mobile overlay ── */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(18, 16, 14, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-perf .mobile-nav-overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(18, 16, 14, 0.6);
}
.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(86vw, 340px);
  background: linear-gradient(160deg, rgba(255, 253, 249, 0.98) 0%, rgba(248, 243, 234, 0.96) 100%);
  border: 1px solid rgba(28, 26, 24, 0.06);
  border-radius: 22px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 30px 80px rgba(28, 26, 24, 0.2),
    0 8px 20px rgba(28, 26, 24, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transform: translateX(calc(100% + 24px));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay.open .mobile-nav-panel {
  transform: translateX(0);
  pointer-events: auto;
  z-index: 200;
}
.mobile-nav-panel a,
.mobile-nav-panel button {
  pointer-events: auto;
  touch-action: manipulation;
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(28, 26, 24, 0.055);
}

.mobile-nav-head button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(28, 26, 24, 0.09);
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1C1A18;
  transition: background 0.2s ease;
}

.mobile-nav-head button:hover {
  background: rgba(28, 26, 24, 0.05);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  margin-bottom: 16px;
}

.mobile-nav-links a {
  display: block;
  text-decoration: none;
  color: #1C1A18;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 620;
  padding: 13px 14px;
  border-radius: 12px;
  transition: background 0.18s ease;
}

.mobile-nav-links a:hover {
  background: rgba(28, 26, 24, 0.04);
}

.mobile-nav-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(28, 26, 24, 0.055);
}

.mobile-nav-signin {
  display: block;
  text-align: center;
  text-decoration: none;
  color: #1C1A18;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 650;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(28, 26, 24, 0.1);
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.2s ease;
}

.mobile-nav-signin:hover {
  background: rgba(255, 255, 255, 0.88);
}

.mobile-nav-signup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: rgba(250, 247, 242, 0.95);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 12px;
  background: #1C1A18;
  box-shadow: 0 4px 14px rgba(28, 26, 24, 0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.mobile-nav-signup:hover {
  background: var(--rose);
  box-shadow: 0 6px 22px rgba(212, 96, 122, 0.3);
  transform: translateY(-1px);
}

/* ── Legacy button classes (used by other page sections) ── */
.btn-ghost {
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  display: inline-block;
}

.btn-ghost:hover {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--cream);
}

.btn-fill {
  background: var(--charcoal);
  color: var(--cream);
  border: 1.5px solid var(--charcoal);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  display: inline-block;
}

.btn-fill:hover {
  background: var(--rose);
  border-color: var(--rose);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212, 96, 122, 0.3);
}

/* ── Responsive ── */
@media (min-width: 961px) {
  .nav-mobile-toggle {
    display: none !important;
  }
}

/* Mobile / tablet: hide desktop link strip + Sign In — only logo, Sign Up, menu */
@media (max-width: 960px) {
  nav {
    top: 10px;
    width: calc(100% - 16px);
    padding: 7px 7px 7px 14px;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  nav.scrolled {
    top: 6px;
  }

  .nav-center {
    display: none !important;
  }

  .nav-signin {
    display: none !important;
  }

  .nav-mobile-toggle {
    display: inline-flex !important;
  }

  .nav-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-actions {
    flex-shrink: 0;
    gap: 8px;
  }

  .nav-wordmark {
    font-size: 1rem;
  }

  .nav-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .nav-signup {
    padding: 7px 14px;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  nav {
    width: calc(100% - 10px);
    padding: 6px 6px 6px 12px;
  }

  .nav-signup {
    padding: 6px 12px;
    font-size: 0.74rem;
  }

  .nav-wordmark {
    font-size: 0.92rem;
  }
}
