/* === Bridge Digital — shared base styles ===================================
   Loaded by every page. Contains: reset / vars / body / overlay,
   nav (incl. hamburger toggle + mobile drawer), footer (5-col grid +
   responsive collapses), accessibility focus-visible base, reduced
   motion, and the V2 light-theme overrides for shared elements
   (logo weight, footer color cascade, body overlay opacity, footer
   compaction). Page-specific styles live in home.css / legal.css.
   ----------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* === V2: bridge.digital LIGHT theme palette ===
     Variable names kept for compatibility with existing rules.
     Semantic mapping:
       --black  = page background (now WHITE)
       --white  = primary text     (now NAVY)
       --yellow = accent           (now AMBER)
       --blue   = feature-section  (now NAVY, same as text)
       --gray   = subtle section bg (now light blue-grey)
       --red    = destructive (kept) */
  --black: #ffffff;
  --white: #102c39;
  --yellow: #f69220;
  --red: #d94f3d;
  --blue: #102c39;
  --blue-light: #6d8e9e;
  --gray: #f3f6f8;
  --mid: #e5e7eb;
  --muted: #6d8e9e;
  --border: #e5e7eb;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Onest', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 5vw;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Onest', sans-serif;
  font-size: 24px;
  letter-spacing: 4px;
  color: var(--yellow);
  text-decoration: none;
}
.logo span { color: var(--white); }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--white); }

.nav-links .nav-highlight,
.nav-links a.active,
.nav-links a[aria-current="true"] {
  color: var(--yellow);
  border-bottom: 1px solid rgba(240,201,58,0.4);
  padding-bottom: 2px;
}

.nav-cta {
  background: var(--yellow);
  color: var(--black) !important;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}
.nav-cta:hover { background: var(--white) !important; }

/* HAMBURGER NAV (pure-CSS checkbox toggle) */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  position: relative;
  flex-shrink: 0;
  margin-left: 12px;
}
.nav-toggle-label span {
  display: block;
  position: absolute;
  left: 6px;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}
.nav-toggle-label span:nth-child(1) { top: 11px; }
.nav-toggle-label span:nth-child(2) { top: 18px; }
.nav-toggle-label span:nth-child(3) { top: 25px; }
.nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
  top: 18px;
  transform: rotate(45deg);
}
.nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
  top: 18px;
  transform: rotate(-45deg);
}
.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 6vw;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer-brand .logo { font-size: 20px; display: block; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.footer-brand .tagline { font-style: italic; }

.footer-col h4 {
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: #666; font-size: 14px; text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { color: #444; font-size: 13px; }
.footer-contacts { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-contacts a { color: #555; font-size: 13px; text-decoration: none; transition: color 0.2s; }
.footer-contacts a:hover { color: var(--yellow); }

/* ACCESSIBILITY — focus-visible base for keyboard users */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}
.nav-cta:focus-visible {
  outline-offset: 4px;
}

/* Skip link — visible on focus only (used on every page) */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  background: var(--yellow);
  color: var(--black);
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.5px;
  z-index: 1000;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; }

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* MOBILE NAV BEHAVIOR (≤900px) */
@media (max-width: 900px) {
  .nav-toggle-label { display: block; margin-left: auto; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 5vw 20px;
    list-style: none;
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 15px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child a { border-bottom: none; }

  /* Keep CTA visible at all viewports — sits between hamburger and edge */
  .nav-cta {
    padding: 9px 18px;
    font-size: 12px;
    order: 2;
  }
  .nav-toggle-label { order: 3; margin-left: 14px; }

  /* Footer collapses to two columns at this breakpoint */
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* Footer collapses to one column on small phones */
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* === V2 LIGHT-THEME shared overrides ====================================== */

body::before { opacity: 0.12; }

.logo { font-weight: 800; letter-spacing: 0.5px; }
footer .logo { font-weight: 700; letter-spacing: -0.01em; }

.footer-bottom p,
footer p,
.nav-cta { letter-spacing: 0.4px; }

.footer-bottom p,
.footer-bottom,
.footer-col ul li a { color: var(--muted); }

footer { padding: 32px 6vw; }
