/* ============================================================================
   Zenara Jaya — shared site navigation (site-nav.css)
   ----------------------------------------------------------------------------
   ONE navbar for every public page. Self-contained: all colours, fonts and
   z-indexes are hardcoded and every selector is namespaced `zj-` so it renders
   identically regardless of the host page's own :root / .topbar / .brand /
   .menu-overlay / .acct-* styles. Injected + wired by site-nav.js.

   Uses position:fixed (NOT sticky) + a JS-sized spacer, because several pages
   set `body{ overflow-x:hidden }` which traps position:sticky.
   ========================================================================== */

:where(.zj-nav, .zj-menu-overlay, .zj-acct-modal) {
  --zj-ink: #0B0918;
  --zj-purple: #5B21B6;
  --zj-purple-mid: #7C3AED;
  --zj-purple-light: #A78BFA;
  --zj-ghost: #F4F3FF;
  --zj-dim: #6B6783;
  --zj-hairline: rgba(11, 9, 24, 0.10);
  --zj-easing: cubic-bezier(.2, .8, .2, 1);
  --zj-font: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
}

/* ───────── Top bar ───────── */
.zj-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(244, 242, 252, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
          backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(124, 58, 237, 0.10);
  box-shadow: 0 8px 26px -16px rgba(11, 9, 24, 0.30);
  transition: transform .42s var(--zj-easing);
  will-change: transform;
}
.zj-nav.zj-hidden { transform: translateY(-120%); }

.zj-nav-inner {
  max-width: 120rem;
  margin: 0 auto;
  padding: 12px 24px;
  /* 3-column grid (1fr · auto · 1fr) so the brand stays at the TRUE centre
     regardless of how wide the left (Menu) or right (actions) sides are. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.zj-nav-inner > .zj-menu-pill { justify-self: start; }
.zj-nav-inner > .zj-brand { justify-self: center; }
.zj-nav-inner > .zj-actions { justify-self: end; }

/* Reserves the space the fixed bar would have taken in flow (height set by JS). */
.zj-nav-spacer { width: 100%; }

/* ───────── Menu pill (left) ───────── */
.zj-menu-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 4px 4px;
  border: 0;
  border-radius: 9999px;
  background: var(--zj-purple-mid);
  color: #fff;
  font-family: var(--zj-font);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.30);
  transition: transform .3s var(--zj-easing), background .3s;
}
.zj-menu-pill:hover { transform: translateY(-1px); background: var(--zj-purple); }
.zj-menu-pill .zj-ic {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: #fff;
  color: var(--zj-purple-mid);
  border-radius: 9999px;
}
.zj-menu-pill .zj-ic svg { width: 16px; height: 16px; }

/* ───────── Brand (centre) ───────── */
.zj-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--zj-font);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1747;
  text-decoration: none;
  white-space: nowrap;
}
.zj-brand img { width: 30px; height: 30px; object-fit: contain; display: block; }

/* ───────── Actions (right) ───────── */
.zj-actions { display: inline-flex; align-items: center; gap: 10px; }
.zj-guest { display: inline-flex; align-items: center; gap: 10px; }

.zj-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-family: var(--zj-font);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--zj-easing), background .25s, border-color .25s, opacity .25s;
}
.zj-btn:hover { transform: translateY(-1px); }

.zj-btn-ghost { background: #fff; color: var(--zj-ink); border-color: rgba(11, 9, 24, 0.14); }
.zj-btn-ghost:hover { border-color: var(--zj-ink); }

.zj-btn-signup { background: var(--zj-purple-mid); color: #fff; }
.zj-btn-signup:hover { background: var(--zj-purple); }

.zj-cta { background: var(--zj-ink); color: #fff; }
.zj-cta:hover { opacity: .92; }
.zj-cta .zj-arr { width: 16px; height: 16px; flex-shrink: 0; transition: transform .3s var(--zj-easing); }
.zj-cta:hover .zj-arr { transform: translateX(3px); }

/* ───────── Account pill + dropdown (logged-in) ───────── */
.zj-acct-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: #fff;
  border: 1px solid var(--zj-hairline);
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  transition: border-color .15s ease;
}
.zj-acct-pill:hover { border-color: var(--zj-purple-mid); }
.zj-acct-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zj-purple-mid), var(--zj-purple));
  color: #fff;
  font-family: var(--zj-font); font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.zj-acct-name {
  font-family: var(--zj-font); font-size: 14px; font-weight: 600; color: var(--zj-ink);
  max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zj-acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--zj-hairline);
  border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(91, 33, 182, 0.22), 0 4px 12px -4px rgba(11, 9, 24, 0.06);
  padding: 8px;
  z-index: 60;
  display: none;
}
.zj-acct-menu.zj-open { display: block; animation: zj-pop .18s ease-out; }
@keyframes zj-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.zj-acct-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--zj-hairline); margin-bottom: 4px; }
.zj-acct-menu-head .zj-who { font-family: var(--zj-font); font-weight: 700; font-size: 14px; color: var(--zj-ink); }
.zj-acct-menu-head .zj-role { font-size: 11px; color: var(--zj-dim); margin-top: 2px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; }
.zj-acct-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--zj-ink); text-decoration: none;
  background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer;
  font-family: inherit;
}
.zj-acct-item:hover { background: var(--zj-ghost); color: var(--zj-purple); }
.zj-acct-item.zj-danger { color: var(--zj-dim); }
.zj-acct-item.zj-danger:hover { background: #fee2e2; color: #991b1b; }

.zj-hidden-el { display: none !important; }

/* ───────── Responsive ───────── */
@media (max-width: 860px) {
  .zj-cta { display: none; }              /* Connect lives in the overlay's contact row on small screens */
}
@media (max-width: 600px) {
  .zj-nav-inner { padding: 10px 14px; gap: 10px; }
  .zj-menu-pill { font-size: 0; gap: 0; padding: 4px; }   /* icon-only */
  .zj-menu-pill .zj-ic { width: 32px; height: 32px; }
  .zj-brand span { display: none; }       /* logo only */
  .zj-btn { padding: 9px 13px; font-size: 13px; }
  .zj-acct-name { display: none; }        /* avatar-only */
}

/* ===================== Full-screen menu overlay ===================== */
.zj-menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9500;
  background: rgba(11, 9, 24, 0.42);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
          backdrop-filter: blur(28px) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px -10px rgba(11, 9, 24, 0.30);
  border-radius: 0 0 28px 28px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 32px 28px;
  transform: translateY(-105%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .55s cubic-bezier(.65, 0, .35, 1), opacity .35s var(--zj-easing), visibility .35s var(--zj-easing);
}
.zj-menu-overlay.zj-open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
.zj-menu-overlay-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(167, 139, 250, 0.20), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(96, 165, 250, 0.15), transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}
.zj-menu-eyebrow {
  position: absolute; top: 24px; left: 28px;
  font-family: var(--zj-font); font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  z-index: 2;
}
.zj-menu-close {
  position: absolute; top: 18px; right: 20px;
  width: 38px; height: 38px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: background .35s var(--zj-easing), transform .45s var(--zj-easing);
  z-index: 2;
}
.zj-menu-close:hover { background: rgba(255, 255, 255, 0.22); transform: rotate(90deg); }
.zj-menu-close svg { width: 18px; height: 18px; }
.zj-menu-nav {
  display: flex; flex-direction: column; gap: 0;
  width: 100%; max-width: 640px;
  position: relative; z-index: 2;
}
.zj-menu-link {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 0;
  font-family: var(--zj-font);
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color .35s var(--zj-easing), border-color .35s var(--zj-easing), padding-left .3s var(--zj-easing);
}
.zj-menu-link .zj-num {
  font-size: clamp(11px, 1vw, 13px); letter-spacing: 0.22em; font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  width: clamp(28px, 3vw, 44px); flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  transition: color .35s var(--zj-easing), transform .35s var(--zj-easing);
}
.zj-menu-link .zj-label { flex: 1; }
.zj-menu-link .zj-arrow {
  width: clamp(18px, 2vw, 24px); height: clamp(18px, 2vw, 24px);
  color: #c4b5fd; opacity: 0; transform: translateX(-12px); flex-shrink: 0;
  transition: opacity .35s var(--zj-easing), transform .35s var(--zj-easing);
}
.zj-menu-link:hover { padding-left: 8px; border-color: rgba(196, 181, 253, 0.55); color: #c4b5fd; }
.zj-menu-link:hover .zj-num { color: #c4b5fd; transform: translateX(4px); }
.zj-menu-link:hover .zj-arrow { opacity: 1; transform: translateX(0); }
.zj-menu-link.zj-active { color: #c4b5fd; }
.zj-menu-link.zj-active .zj-num { color: #c4b5fd; }
.zj-menu-meta {
  position: relative; z-index: 2;
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  width: 100%; max-width: 640px;
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between;
  font-size: 12px; color: rgba(255, 255, 255, 0.62);
}
.zj-menu-meta a { color: rgba(255, 255, 255, 0.85); text-decoration: none; transition: color .3s; }
.zj-menu-meta a:hover { color: #c4b5fd; }

/* ───────── Scroll progress bar ───────── */
.zj-scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--zj-purple-mid), var(--zj-purple-light));
  z-index: 9600;
  pointer-events: none;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.5);
  will-change: width;
}

/* ===================== Account modal ===================== */
.zj-acct-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.zj-acct-modal.zj-open { display: flex; animation: zj-fade .18s ease-out; }
@keyframes zj-fade { from { opacity: 0; } to { opacity: 1; } }
.zj-acct-shade { position: absolute; inset: 0; background: rgba(11, 9, 24, 0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.zj-acct-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  max-width: 420px; width: 100%;
  padding: 28px 28px 24px;
  box-shadow: 0 28px 60px -20px rgba(11, 9, 24, 0.40);
  animation: zj-pop .22s cubic-bezier(.21, 1.02, .4, 1.0);
  max-height: calc(100vh - 40px); overflow-y: auto;
  font-family: var(--zj-font);
}
.zj-acct-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: transparent; border: 0; font-size: 18px; cursor: pointer; color: var(--zj-dim);
  border-radius: 50%; line-height: 1;
}
.zj-acct-modal-close:hover { background: var(--zj-ghost); color: var(--zj-ink); }
.zj-acct-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 20px;
  background: #fafaf8; border: 1px solid var(--zj-hairline); border-radius: 999px;
}
.zj-acct-tab {
  appearance: none; background: transparent; border: 0; font: inherit;
  font-size: 12.5px; font-weight: 700; padding: 7px 16px; border-radius: 999px;
  color: var(--zj-dim); cursor: pointer; transition: color .15s ease, background .15s ease;
}
.zj-acct-tab.zj-active { background: var(--zj-ink); color: #fff; }
.zj-acct-tab:hover:not(.zj-active) { color: var(--zj-ink); }
.zj-acct-card h3 { font-family: var(--zj-font); font-size: 1.4rem; margin: 0 0 6px; letter-spacing: -0.01em; color: var(--zj-ink); }
.zj-acct-card .zj-lede { color: var(--zj-dim); font-size: 13.5px; line-height: 1.5; margin: 0 0 18px; }
.zj-acct-card label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--zj-dim); margin: 14px 0 5px; }
.zj-acct-card input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--zj-hairline); border-radius: 10px;
  font: inherit; font-size: 14.5px; outline: none;
  transition: border-color .15s ease;
}
.zj-acct-card input:focus { border-color: var(--zj-purple-mid); }
.zj-acct-full-btn {
  width: 100%; margin-top: 18px; padding: 12px;
  background: var(--zj-ink); color: #fff; border: 0; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s ease;
}
.zj-acct-full-btn:hover { background: var(--zj-purple-mid); }
.zj-acct-full-btn:disabled { opacity: .6; cursor: wait; }
.zj-acct-panel { display: none; }
.zj-acct-panel.zj-active { display: block; }
.zj-acct-error { font-size: 12.5px; color: #dc2626; margin-top: 10px; min-height: 1em; line-height: 1.4; }
.zj-acct-sub { font-size: 12px; color: var(--zj-dim); text-align: center; margin-top: 14px; }
.zj-acct-sub a { color: var(--zj-purple-mid); font-weight: 600; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .zj-nav, .zj-menu-overlay, .zj-acct-modal *, .zj-menu-link { transition: none !important; animation: none !important; }
}
