/* Shared base + site header (matches homepage navigation) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0b0e17;
  --surface: #141825;
  --surface-2: #1c2133;
  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 92, 252, 0.25);
  --gold: #f5c542;
  --text: #e8e6f0;
  --text-muted: #9896a8;
  --text-dim: #6b6980;
  --border: rgba(255, 255, 255, 0.06);
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  left: 12px;
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* SITE HEADER */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(11, 14, 23, 0.92);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s, border-color 0.25s;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  min-height: 72px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
}

.nav-brand span {
  background: linear-gradient(135deg, var(--accent-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-primary {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item { position: relative; }

.nav-link,
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-dropdown-trigger:hover,
.nav-item.is-open .nav-dropdown-trigger {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.is-active {
  color: var(--text);
  background: rgba(124, 92, 252, 0.12);
}

.nav-dropdown-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.nav-item.is-open .nav-dropdown-chevron { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 220px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown,
.nav-item.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav-dropdown a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.nav-link-muted { color: var(--text-dim); }
.nav-link-muted:hover { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  box-shadow: 0 2px 12px var(--accent-glow);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 92, 252, 0.4);
  background: #8b6cfc;
}

.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-toggle svg { width: 22px; height: 22px; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(11, 14, 23, 0.98);
  padding: 16px 24px 24px;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
}

.mobile-menu.is-open { display: block; }

.mobile-menu-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  font-weight: 600;
  margin: 16px 0 8px;
  padding: 0 4px;
}

.mobile-menu-section:first-child { margin-top: 0; }

.mobile-menu a {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 12px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.mobile-menu a:hover,
.mobile-menu a.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.mobile-menu-cta {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.mobile-menu-cta .btn {
  flex: 1;
  justify-content: center;
  padding: 14px 16px;
  font-size: 0.95rem;
}

body.nav-open { overflow: hidden; }
body.has-mobile-cta { padding-bottom: 76px; }

.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 190;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(11, 14, 23, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mobile-cta-bar .nav-cta {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .mobile-cta-bar { display: block; }
  body.has-mobile-cta { padding-bottom: 80px; }
}

.nav-dropdown-trigger:focus-visible,
.nav-link:focus-visible,
.nav-cta:focus-visible,
.mobile-toggle:focus-visible,
.mobile-menu a:focus-visible,
.nav-brand:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .nav-primary { display: none; }
  .nav-actions .nav-link-muted { display: none; }
  .mobile-toggle { display: inline-flex; }
  .nav-actions .nav-cta { display: none; }
}

@media (max-width: 640px) {
  .nav-inner { min-height: 64px; padding: 0 16px; }
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
}

.site-footer .footer-links {
  margin-top: 8px;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--text); }

.site-footer a:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
