/* ============================================================
   NAV v7 — "Clean Glass, Unified Sienna"
   Standalone nav CSS extracted from homepage-v7.css.
   Works on any page without other CSS dependencies.
   Version: 2026032901
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');


/* ── Scoped variables ── */
.nav,
.mobile-menu,
.mobile-menu-overlay {
  --parchment: #FAF7F2;
  --parchment-dk: #F2EBE0;
  --paper: #FFFDF9;
  --paper-warm: #FFF9F0;
  --white: #FFFFFF;
  --ink: #1C1917;
  --ink-2: #57534E;
  --ink-3: #A8A29E;
  --ink-4: #D6D3D1;
  --ink-5: #E7E5E4;
  --forest: #1B4332;
  --forest-mid: #2D6A4F;
  --forest-glow: rgba(45,106,79,.08);
  --sienna: #C4532B;
  --sienna-dk: #A3401F;
  --sienna-lt: rgba(196,83,43,.08);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 9999px;
  --sh-xl: 0 20px 50px rgba(28,25,23,.10);
  --ease: cubic-bezier(.4,0,.2,1);
}


/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 56px;
  background: rgba(250,247,242,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(28,25,23,.06);
  box-shadow: 0 1px 12px rgba(28,25,23,.04);
  font-family: var(--sans);
}

.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav__wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.nav__wordmark .g { font-weight: 600; color: var(--ink); }
.nav__wordmark .c { font-weight: 500; font-style: italic; color: var(--sienna); margin-left: 0.02em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  padding: 0.25rem 0;
  transition: color .15s var(--ease);
  text-decoration: none;
}

.nav__link:hover { color: var(--ink); }

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1.5px;
  background: var(--sienna);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
  transform-origin: center;
}

.nav__link:hover::after { transform: scaleX(1); }


/* ============================================================
   AUTH BUTTONS (pre-auth state)
   ============================================================ */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-ghost {
  padding: 0.4rem 1rem;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--ink-2);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  text-decoration: none;
}

.btn-ghost:hover { color: var(--ink); background: rgba(28,25,23,.04); }

.btn-primary {
  padding: 0.42rem 1.2rem;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--white);
  background: var(--sienna);
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--sienna-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,83,43,.2);
}


/* ============================================================
   USER MENU & DROPDOWN (logged-in state)
   ============================================================ */
.user-menu {
  display: none;
  position: relative;
}

.user-menu.active {
  display: flex;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-full);
  transition: background .15s var(--ease);
  font-family: var(--sans);
}

.user-btn:hover {
  background: rgba(28,25,23,.04);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--forest-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--forest-mid);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(28,25,23,.1);
  min-width: 210px;
  padding: 0.5rem;
  z-index: 1100;
}

.user-dropdown.active,
.user-dropdown.show,
.user-menu:hover .user-dropdown {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .1s var(--ease);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--parchment);
  color: var(--ink);
}

.dropdown-item i,
.dropdown-item svg { flex-shrink: 0; color: var(--ink-3); width: 15px; height: 15px; }

.dropdown-item:hover i,
.dropdown-item:hover svg { color: var(--sienna); }

.logout-item {
  color: #dc2626;
  border-top: 1px solid var(--ink-5);
  margin-top: 0.25rem;
  padding-top: 0.75rem;
}

.logout-item:hover {
  background: rgba(220,38,38,.05);
  color: #dc2626;
}


/* ============================================================
   NAV DROPDOWN (Resources)
   ============================================================ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color .15s var(--ease);
  font-family: var(--sans);
}

.nav-dropdown-toggle:hover { color: var(--ink); }

.nav-dropdown-toggle svg {
  transition: transform .2s var(--ease);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: -12px;
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(28,25,23,.1);
  min-width: 230px;
  padding: 0.5rem;
  z-index: 1050;
}

/* Show on hover (desktop) AND on JS click toggle */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.is-open {
  display: block;
}

.nav-dropdown:hover .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: all .1s var(--ease);
  text-decoration: none;
}

.nav-dropdown-item:hover {
  background: var(--parchment);
  color: var(--ink);
}

.nav-dropdown-item svg {
  color: var(--ink-3);
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.nav-dropdown-item:hover svg {
  color: var(--sienna);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--ink-5);
  margin: 0.35rem 0.75rem;
}


/* ============================================================
   MOBILE MENU TOGGLE
   ============================================================ */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

.mobile-menu-toggle .menu-open { display: block; }
.mobile-menu-toggle .menu-close { display: none; }
.mobile-menu-toggle.active .menu-open { display: none; }
.mobile-menu-toggle.active .menu-close { display: block; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all .2s var(--ease);
}


/* ============================================================
   MOBILE MENU OVERLAY & DRAWER
   ============================================================ */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(28,25,23,.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--white);
  z-index: 1200;
  box-shadow: var(--sh-xl);
  transform: translateX(100%);
  transition: transform .3s var(--ease);
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: var(--sans);
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-link {
  display: block;
  padding: 0.85rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--ink-5);
  transition: color .15s var(--ease);
  text-decoration: none;
}

.mobile-menu-link:hover {
  color: var(--sienna);
}

.mobile-menu-divider {
  height: 1px;
  background: var(--ink-5);
  margin: 0.5rem 0;
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.mobile-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  width: 100%;
  text-decoration: none;
}

.mobile-auth-btn.primary {
  background: var(--sienna);
  color: var(--white);
  border: none;
}

.mobile-auth-btn.primary:hover {
  background: var(--sienna-dk);
}

.mobile-auth-btn.secondary {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--ink-5);
}

.mobile-auth-btn.secondary:hover {
  border-color: var(--ink-4);
  color: var(--ink);
}

.mobile-menu-section-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

body.mobile-menu-open {
  overflow: hidden;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .mobile-menu-toggle { display: flex; }

  /* Touch target minimums (44px) */
  .nav__hamburger,
  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .user-dropdown {
    position: fixed;
    top: 56px;
    right: 1rem;
    left: auto;
    width: 260px;
  }
}
