/* =========================================================================
   BrightSpot ZA — Shared site chrome (nav, footer, buttons, layout)
   Loaded after colors_and_type.css on every page.
   ========================================================================= */

html, body { margin: 0; background: var(--bs-bg); scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--bs-fg-1); -webkit-font-smoothing: antialiased; }

img, svg, video { display: block; max-width: 100%; }

.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 600px) { .wrap { padding: 0 20px; } }

/* ============ SCROLL PROGRESS BAR ============ */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--bs-grad);
  z-index: 300;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
  transition: width 0.08s linear;
}

/* ============ SITE NAV ============ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), border-color 0.3s var(--ease), padding 0.3s var(--ease);
  border-bottom: 1px solid transparent;
  /* baseline gradient so even un-scrolled, the nav has a readable backdrop
     (iOS Safari downgrades backdrop-filter under low-power / older versions) */
  background: linear-gradient(180deg, rgba(5, 6, 9, 0.72) 0%, rgba(5, 6, 9, 0.45) 60%, rgba(5, 6, 9, 0) 100%);
}
.site-nav.scrolled {
  /* solid fallback for iOS / low-power, with translucent blur for capable browsers */
  background: rgba(7, 8, 13, 0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(255,255,255,0.08);
  padding: 10px 32px;
}
@supports (backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px)) {
  .site-nav.scrolled { background: rgba(7, 8, 13, 0.78); }
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo img { height: 26px; width: auto; display: block; }
.site-logo .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bs-blue);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.18), 0 0 16px rgba(37,99,235,0.6);
  flex-shrink: 0;
}
.site-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #5B8DFF 0%, #A475FF 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.site-links { display: flex; gap: 32px; align-items: center; }
.site-links a {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  color: var(--bs-fg-2);
  text-decoration: none;
  padding: 8px 2px;
  position: relative;
  transition: color var(--dur) var(--ease);
}
.site-links a:hover { color: var(--bs-fg-1); }
.site-links a.current { color: var(--bs-fg-1); }
.site-links a.current::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--bs-blue); border-radius: 2px;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.7);
}

.site-cta {
  font-family: var(--font-display);
  font-weight: 600; font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--bs-grad);
  color: #fff !important;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), filter var(--dur) var(--ease);
  box-shadow: 0 6px 20px -6px rgba(37, 99, 235, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
}
.site-cta:hover { filter: brightness(1.08); box-shadow: 0 10px 28px -6px rgba(37, 99, 235, 0.75), 0 0 24px rgba(124,58,237,0.35); transform: translateY(-1px); }

@media (max-width: 880px) { .site-links { gap: 22px; } }
@media (max-width: 760px) { .site-links { display: none; } .site-nav { padding: 12px 20px; } }

/* ============ BUTTONS ============ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 15px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  background: var(--bs-grad);
  color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 28px -8px rgba(37, 99, 235, 0.65);
  transition: all var(--dur) var(--ease);
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 14px 34px -8px rgba(37,99,235,0.75), 0 0 28px rgba(124,58,237,0.35); transform: translateY(-2px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  background: rgba(245,242,234,0.05);
  color: var(--bs-fg-1);
  text-decoration: none;
  border: 1px solid rgba(245,242,234,0.16);
  transition: all var(--dur) var(--ease);
  cursor: pointer;
}
.btn-secondary:hover { background: rgba(245,242,234,0.10); border-color: rgba(245,242,234,0.32); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 14px;
  padding: 8px 0;
  color: var(--bs-fg-1);
  text-decoration: none;
  border-bottom: 1px solid rgba(245,242,234,0.32);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn-ghost:hover { border-bottom-color: var(--bs-blue-hi); color: var(--bs-blue-hi); }

/* ============ EYEBROW (section labels) ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-fg-3);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ''; width: 28px; height: 1px;
  background: currentColor; opacity: 0.7;
}
.eyebrow.no-bar::before { display: none; }
.eyebrow.brand { color: var(--bs-blue-hi); }
.eyebrow.violet { color: var(--bs-violet-hi); }
.eyebrow.beam { color: var(--bs-beam); }
.eyebrow.signal { color: var(--bs-signal); }

/* ============ REVEAL ON SCROLL ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ PIXEL-GRID OVERLAY ============ */
.pixel-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(245,242,234,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,242,234,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ============ SITE FOOTER ============ */
.site-footer {
  padding: 96px 32px 40px;
  background: #05060A;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 120px;
  position: relative; overflow: hidden;
}
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--bs-grad);
  opacity: 0.6;
}
.site-footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 56px;
}
@media (max-width: 800px) { .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; } }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245,242,234,0.48);
  margin: 0 0 16px; font-weight: 500;
}
.site-footer a, .site-footer p {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(245,242,234,0.72);
  text-decoration: none;
  margin: 0 0 10px;
  line-height: 1.5;
  max-width: none;
}
.site-footer a:hover { color: var(--bs-fg-1); }
.site-footer .footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.site-footer .footer-brand img { height: 30px; width: auto; display: block; }
.site-footer .footer-brand .dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--bs-blue);
  box-shadow: 0 0 12px rgba(37,99,235,0.6);
}
.site-footer .footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  background: linear-gradient(135deg, #5B8DFF 0%, #A475FF 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.site-footer-bar {
  max-width: 1280px; margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(245,242,234,0.48);
  letter-spacing: 0.06em;
}
