/* ===========================================================================
   Shared marketing chrome (UX-P5) — the ONE source of truth for the header,
   footer, container widths, buttons and base body styling across every
   aisbom.io marketing page. Linked AFTER _shared/tokens.css so it consumes the
   design tokens. Pages no longer duplicate this CSS in their inline <style>.

   Page-specific layout/visual styling still lives in each page's inline
   <style>; only the cross-page chrome belongs here.
   ======================================================================== */

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: "JetBrains Mono", var(--font-mono);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Faint grid backdrop shared by all marketing pages. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

/* --- Content widths (UX-P5) — one wide shell + one prose width. ---------
   Literal fallbacks are REQUIRED: tokens.css and site.css are cached
   separately (4h TTL), so a visitor can hold a stale tokens.css that predates
   these tokens while loading a fresh site.css. An undefined var() makes
   max-width invalid → `none` → the whole page goes full-width. The fallback
   keeps the layout correct even when --container-max/--prose-max are missing.
   Keep these literals in sync with shared/design-tokens.js (layout). */
.container {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 0 20px;
}

.container-prose {
  max-width: var(--prose-max, 800px);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--primary-accent);
  color: var(--primary-accent);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background: var(--primary-accent);
  color: var(--bg-color);
  box-shadow: 0 0 15px var(--primary-accent);
}

/* --- Header / nav ------------------------------------------------------- */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 32px;
  width: auto;
}

.logo a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Wordmark sits in its own span so the flex gap separates logo↔wordmark, not
   the letters; the inner span carries the accent on "_SBOM". */
.logo .logo-text span {
  color: var(--primary-accent);
}

/* Canonical nav links — replaces the per-link inline styles that used to be
   copy-pasted on every page (and drifted). */
.site-nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav__links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-nav__links a:hover {
  color: var(--primary-accent);
}

.site-nav__links a.btn {
  color: var(--primary-accent);
}

.site-nav__links a.btn:hover {
  color: var(--bg-color);
}

/* --- Footer ------------------------------------------------------------- */
footer {
  text-align: center;
  padding: 50px 0;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
}

footer a {
  color: var(--primary-accent);
  text-decoration: none;
}

footer .footer-meta {
  margin-top: 10px;
  color: var(--text-dim);
}

/* --- Responsive nav: collapse text links to logo + CTA on small screens. */
@media (max-width: 768px) {
  .site-nav__links {
    gap: 12px;
  }

  .site-nav__links a:not(.btn) {
    display: none;
  }

  .site-nav__links a.btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .logo {
    font-size: 1.2rem;
    gap: 8px;
  }

  .logo img {
    height: 26px;
  }
}
