/* ==========================================
   SITE HEADER / NAV (shared by every page)
   Desktop: logo, links, CTA.
   Up to 860px: logo, CTA, menu button; the links open in a panel.
   Colours fall back to the brand values so a page that
   doesn't define the tokens still renders correctly.
========================================== */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 5%;
  background: rgba(245, 250, 255, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border, #E7ECF3);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.site-nav .nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto;
  text-decoration: none;
}
.site-nav .nav-logo img { display: block; height: 32px; width: auto; }

.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 6px 0 0;
  padding: 0;
  list-style: none;
}
.site-nav .nav-links a {
  display: inline-block;
  padding: 6px 0;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--grey-cool, #535E6B);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.site-nav .nav-links a:hover { color: var(--purple-text, #6338E6); }
.site-nav .nav-links a[aria-current="page"] {
  color: var(--purple-text, #6338E6);
  border-bottom-color: currentColor;
}

.site-nav .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 100px;
  background: var(--purple, #7D52FF);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(125, 82, 255, 0.25);
  transition: background 0.2s ease, transform 0.12s ease;
}
.site-nav .nav-cta:hover { background: var(--deep-purple, #693EEB); transform: translateY(-1px); }

.site-nav .nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink, #0F1624);
  cursor: pointer;
}
.site-nav .nav-toggle-bars,
.site-nav .nav-toggle-bars::before,
.site-nav .nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-nav .nav-toggle-bars { position: relative; }
.site-nav .nav-toggle-bars::before,
.site-nav .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.site-nav .nav-toggle-bars::before { top: -7px; }
.site-nav .nav-toggle-bars::after { top: 7px; }
.site-nav .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.site-nav .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.site-nav .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav a:focus-visible,
.site-nav button:focus-visible {
  outline: 3px solid var(--ink, #0F1624);
  outline-offset: 3px;
}

/* Skip link: first thing a keyboard user reaches. */
.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink, #0F1624);
  color: #fff;
  font: 600 0.875rem 'Inter', system-ui, sans-serif;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

@media (max-width: 860px) {
  .site-nav { gap: 10px; }
  .site-nav .nav-toggle { display: inline-flex; }
  .site-nav .nav-cta { padding: 10px 16px; font-size: 0.8125rem; }

  .site-nav .nav-links {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 5% 20px;
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    background: #F5FAFF;
    border-bottom: 1px solid var(--border, #E7ECF3);
    box-shadow: 0 16px 32px rgba(15, 22, 36, 0.12);
  }
  .site-nav .nav-links.is-open { display: flex; }
  .site-nav .nav-links li + li { border-top: 1px solid var(--border, #E7ECF3); }
  .site-nav .nav-links a {
    display: block;
    padding: 16px 4px;
    font-size: 1.0625rem;
    border-bottom: 0;
  }
  .site-nav .nav-links a[aria-current="page"] { color: var(--purple-text, #6338E6); text-decoration: underline; text-underline-offset: 6px; }
}

@media (max-width: 400px) {
  .site-nav { padding: 0 16px; }
  .site-nav .nav-logo img { height: 26px; }
  .site-nav .nav-cta { padding: 9px 14px; font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav *, .site-nav *::before, .site-nav *::after { transition: none !important; }
}
