/* Global header and footer. Loaded by every page after its own styles so the
   site chrome is identical everywhere. Self-contained: defines the tokens it
   needs rather than depending on each page's variables. */

:root {
  --chrome-bg: rgba(4, 5, 20, 0.78);
  --chrome-text: #F4F6FF;
  --chrome-soft: rgba(244, 246, 255, 0.46);
  --chrome-stroke: rgba(244, 246, 255, 0.10);
  --chrome-spectrum: linear-gradient(100deg, #5BB8FF 0%, #FF5BC1 50%, #FFB23D 100%);
  --chrome-nav-h: 64px;
}

/* ---------- Header ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid var(--chrome-stroke);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: var(--chrome-bg);
}

.site-nav-inner {
  width: min(1120px, 100% - 48px);
  margin: 0 auto;
  height: var(--chrome-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--chrome-text);
  flex: none;
}

.site-nav .brand-mark {
  width: 27px;
  height: 27px;
  display: block;
  border-radius: 7px;
}

.site-nav .brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.site-nav .brand-wordmark .dust {
  background: var(--chrome-spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  min-width: 0;
}

.site-nav-links a {
  color: var(--chrome-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav-links a:hover,
.site-nav-links a[aria-current="page"] {
  color: var(--chrome-text);
}

/* Narrow screens: scroll the links rather than hiding any, so the same set of
   destinations is present on every page at every width. */
@media (max-width: 860px) {
  .site-nav-inner {
    width: min(1120px, 100% - 32px);
    gap: 16px;
  }

  .site-nav-links {
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    padding: 0 12px;
  }

  .site-nav-links::-webkit-scrollbar { display: none; }
}

@media (max-width: 520px) {
  .site-nav-links { gap: 16px; }
  .site-nav-links a { font-size: 14px; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--chrome-stroke);
  padding: 48px 0 64px;
  margin-top: auto;
}

.site-footer-inner {
  width: min(1120px, 100% - 48px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer-inner small {
  color: var(--chrome-soft);
  font-size: 13.5px;
}

.site-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer-links a {
  color: var(--chrome-soft);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer-links a:hover,
.site-footer-links a[aria-current="page"] {
  color: var(--chrome-text);
}

@media (max-width: 680px) {
  .site-footer-inner {
    width: min(1120px, 100% - 32px);
    justify-content: center;
    text-align: center;
  }

  .site-footer-links { justify-content: center; }
}
