/* ── Navigation ───────────────────────────────────────────────────────── */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 36px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}

.nav-logo      { display: flex; align-items: center; text-decoration: none; }
.nav-logo-mark { height: 40px; width: auto; display: block; }

.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover  { color: var(--navy); }
.nav-links a.active { color: var(--navy); font-weight: 500; }

/* Groups the CTA button + burger so they stay together */
.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-cta {
  background: var(--navy); color: var(--white);
  border: none; padding: 10px 22px; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background 0.2s;
}
.nav-cta:hover { background: var(--navy-dark); }

/* ── Hamburger button ─────────────────────────────────────────────────── */
.nav-burger {
  display: none; /* shown only on mobile */
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; width: 40px; height: 40px; padding: 8px;
  background: none; border: none; cursor: pointer;
  border-radius: 8px; flex-shrink: 0;
  transition: background 0.15s;
}
.nav-burger:hover { background: rgba(0, 0, 0, 0.06); }

.nav-burger span {
  display: block; width: 20px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.2s ease, width 0.2s ease;
}

/* Morph to × when open */
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ────────────────────────────────────────────────────── */
/*
 * The drawer is position:fixed so it always covers the viewport below the nav.
 * Mobile nav height = 12px padding-top + 40px logo + 12px padding-bottom + 1px border = 65px.
 * visibility:hidden keeps it accessible-hidden without display:none so CSS transitions work.
 */
.nav-drawer {
  position: fixed;
  top: 65px; left: 0; right: 0; bottom: 0;
  z-index: 99;
  visibility: hidden;
  pointer-events: none;
}
.nav-drawer.open {
  visibility: visible;
  pointer-events: auto;
}

/* Darkened backdrop */
.nav-drawer-bg {
  position: absolute; inset: 0;
  background: rgba(5, 12, 26, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav-drawer.open .nav-drawer-bg { opacity: 1; }

/* Sliding panel */
.nav-drawer-panel {
  position: absolute; top: 0; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(5, 12, 26, 0.15);
  padding: 12px 20px 24px;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}
.nav-drawer.open .nav-drawer-panel {
  transform: translateY(0);
  opacity: 1;
}

/* Links inside drawer */
.nav-drawer-links {
  display: flex; flex-direction: column; gap: 2px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.nav-drawer-links a {
  display: block;
  font-size: 15px; font-family: 'DM Sans', sans-serif;
  color: var(--muted); text-decoration: none;
  padding: 11px 10px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-drawer-links a:hover  { color: var(--navy); background: var(--navy-light, #E8E9FB); }
.nav-drawer-links a.active { color: var(--navy); font-weight: 500; }

/* CTA button inside drawer */
.nav-drawer-cta {
  display: block; width: 100%; padding: 14px;
  background: var(--navy); color: var(--white);
  border: none; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  cursor: pointer; text-align: center;
  transition: background 0.2s;
}
.nav-drawer-cta:hover { background: var(--navy-dark); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  nav         { padding: 12px 16px; }
  .nav-links  { display: none; }
  .nav-cta    { display: none; }
  .nav-burger { display: flex; }
}
