/* ============================================================
   NAV — Join Future style: logo | floating glass pill | CTA
   ============================================================ */

.nav {
  position: fixed; top: 18px; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center;
  pointer-events: none;
  padding: 0 20px;
}

.nav-inner {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: min(1160px, 100%);
  height: 64px;
}

/* ── brand ── */
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
  color: var(--navy);
  text-decoration: none;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.nav-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--mint-soft) 0%, var(--sky) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px -6px rgba(79,211,163,0.55);
  flex-shrink: 0;
}
.nav-mark img {
  width: 17px;
  filter: brightness(0) saturate(100%) invert(8%) sepia(48%) saturate(2900%) hue-rotate(212deg) brightness(95%) contrast(98%);
}
.nav-word { font-weight: 700; }

/* ── floating glass pill — links only ── */
.nav-pill {
  display: flex; align-items: center; gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.60));
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.80);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 -1px 0 rgba(10,23,51,0.04) inset,
    0 16px 40px -14px rgba(10,23,51,0.16),
    0 4px 12px -6px rgba(10,23,51,0.08);
  position: relative; z-index: 1;
  overflow: hidden;
}
.nav-pill::before {
  content: "";
  position: absolute; left: -10%; right: -10%; top: -80%; height: 120%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(79,211,163,0.10), transparent 70%);
  pointer-events: none;
}
.nav-link {
  padding: 8px 15px;
  font-size: 13.5px; font-weight: 500;
  color: var(--navy-55);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 160ms, background 160ms;
}
.nav-link:hover  { color: var(--navy); background: rgba(10,23,51,0.05); }
.nav-link.active { color: var(--navy); background: rgba(10,23,51,0.07); }

/* ── end actions ── */
.nav-end {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  position: relative; z-index: 1;
}
.lang-toggle {
  padding: 8px 12px; font-size: 12px; font-weight: 600;
  color: var(--navy-55);
  border-radius: 999px; background: transparent; border: 0; cursor: pointer;
  font-family: inherit;
  transition: color 160ms, background 160ms;
}
.lang-toggle:hover { color: var(--navy); background: rgba(10,23,51,0.05); }

.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint-glow);
  flex-shrink: 0;
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--paper);
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 8px 22px -8px rgba(10,23,51,0.40);
  transition: transform 200ms ease, box-shadow 220ms ease;
  white-space: nowrap;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 14px 30px -8px rgba(10,23,51,0.45);
}

/* ── hamburger ── */
.nav-burger {
  display: none;
  width: 38px; height: 38px; border-radius: 999px;
  background: rgba(255,255,255,0.70); border: 1px solid rgba(10,23,51,0.08);
  backdrop-filter: blur(16px);
  cursor: pointer; align-items: center; justify-content: center;
  color: var(--navy); flex-shrink: 0;
}
.nav-burger svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── mobile drawer ── */
.nav-drawer {
  display: none; position: fixed; inset: 0; z-index: 49; flex-direction: column;
}
.nav-drawer.open { display: flex; }
.nav-drawer-bg {
  position: absolute; inset: 0;
  background: rgba(10,23,51,0.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.nav-drawer-panel {
  position: absolute; top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(32px);
  padding: 80px 24px 32px;
  border-radius: 0 0 32px 32px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 28px 64px -20px rgba(10,23,51,0.22);
}
html[lang="ar"] .nav-drawer-panel { direction: rtl; }
.nav-drawer-link {
  padding: 14px 16px; font-size: 18px; font-weight: 600;
  color: var(--navy-70); border-radius: 14px;
  transition: background 160ms, color 160ms; text-decoration: none;
}
.nav-drawer-link:hover, .nav-drawer-link.active { background: rgba(10,23,51,0.04); color: var(--navy); }
.nav-drawer-divider { height: 1px; background: var(--navy-08); margin: 8px 0; }
.nav-drawer-cta {
  margin-top: 8px; padding: 16px;
  background: var(--navy); color: var(--paper);
  border-radius: 14px; font-size: 16px; font-weight: 600;
  text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.nav-drawer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--navy-08);
}
.nav-drawer-bottom .lang-toggle { font-size: 14px; padding: 10px 14px; }

/* ── responsive ── */
@media (max-width: 980px) {
  .nav-pill { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 640px) {
  .nav { top: 12px; padding: 0 14px; }
  .nav-inner { height: 56px; }
  .nav-brand { font-size: 15px; }
  .nav-mark { width: 28px; height: 28px; }
  .nav-mark img { width: 15px; }
  .nav-cta { height: 40px; padding: 0 16px; font-size: 13px; }
}
