/* chrome.css — shared site chrome (SOURCE FILE, hand-maintained)
   Tokens, reset, base typography, header/masthead/nav/hamburger/mobile-drawer,
   buttons (.btn-docket-header / .btn-subscribe-mobile), footer, .mono, common utilities.
   Consumed by every page on the site: build-live-surfaces.py's externalize_article_css()
   COPIES this file verbatim to build/assets/chrome.css (and mirrors to the SFTP folder) —
   it no longer harvests chrome CSS from the hub template's <style>. Edit HERE, not there.
   --color-text-faint already carries the WCAG AA lift (4.83:1); enrich_pages()'s faint-token
   replace on build/assets/chrome.css is now a harmless no-op against this source.
   2026-09-05 Phase 2 CSS consolidation. */

:root {
  --color-bg: #f9f8f5;
  --color-surface: #ffffff;
  --color-surface-dim: #f2efe9;
  --color-surface-warm: #ede9e0;
  --color-text: #1a1918;
  --color-text-muted: #615d58;
  --color-text-faint: #726d66;
  
  --color-teal: #236f6b;
  --color-teal-dark: #174e4b;
  --color-teal-light: #e2efee;
  --color-teal-tint: #f0f7f6;
  
  --color-amber: #b45309;
  --color-amber-light: #fef3c7;
  
  --color-divider: #dcd7ce;
  --color-divider-strong: #1a1918;
  
  --font-heading: "Archivo", -apple-system, sans-serif;
  --font-body: "Archivo", -apple-system, sans-serif;
  --font-editorial: "Newsreader", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Type scale (site/docs/TYPE-SCALE.md, revised 2026-09-06). Seven steps; nothing new gets
     authored inline. The article blockquote's clamp(20,2.6vw,26) pull-quote is deliberately NOT
     tokenized — see the doc's Design Call 2 (no existing token is an honest fit, and the one
     new-token budget went to --text-stat instead). .brand-title (both masthead systems, below)
     now uses --text-caption per Design Call 1. */
  --text-display: clamp(34px, 5vw, 56px);
  --text-h1:       clamp(31px, 4.6vw, 52px);
  --text-h2:       clamp(24px, 3.2vw, 36px);
  --text-h3:       19px;
  --text-body:     17px;
  --text-caption:  clamp(15px, 4.2vw, 18px);
  --text-wordmark: clamp(20px, 2.6vw, 30px); /* the nameplate; NOT --text-caption — Design Call 1 rejected by the orchestrator 2026-09-06 pending Jennifer: the identity must not read smaller than the nav */
  --text-stat:     clamp(32px, 5vw, 54px); /* NEW — Evidence Docket numeric stat display only, see doc §2 */

  /* Motion tokens (site/docs/MOTION-DOCTRINE.md, 2026-09-06). Two durations, one curve — see the
     doctrine for the "why." Consumed by build-live-surfaces.py's EXTRAS_CSS (reveal rules) and
     assets/motion.js (stagger delays, IntersectionObserver reveals, Evidence Docket count-up).
     The sitewide prefers-reduced-motion rule in site-extras.css zeroes these automatically
     (universal selector on animation-/transition-duration) — no exception is ever added here. */
  --motion-fast: 160ms;    /* interactive feedback: hover, focus, active, tab switches */
  --motion-reveal: 420ms;  /* section/card entrance, number reveal, page-open stagger */
  --motion-ease: cubic-bezier(0.16, 1, 0.3, 1); /* "ease-out-expo"-family: fast start, soft landing */
  --motion-rise: 16px;     /* fade+rise entrance distance; shortens on mobile below */
}

@media (max-width: 680px) {
  :root { --motion-rise: 8px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}

p { margin: 0 0 14px; }
a { color: var(--color-teal); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--color-teal-dark); text-decoration: underline; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.editorial { font-family: var(--font-editorial); }

/* Banner & Navigation */
.site-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 248, 245, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--color-divider-strong);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-divider);
}

.masthead-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 0;
  gap: 16px;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--text-wordmark);
  letter-spacing: -0.03em;
  color: var(--color-text);
  text-decoration: none;
  text-align: center;
}
.brand-title span { color: var(--color-teal); }

.nav-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 7px 0 8px;
  border-top: 1px dashed var(--color-divider);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav-links a { color: var(--color-text); }
.nav-links a.active { color: var(--color-teal); font-weight: 700; }
.nav-links a:hover { color: var(--color-teal); text-decoration: none; }

/* EYEBROW BAR */
.eyebrow-bar {
  background: var(--color-surface-dim);
  border-bottom: 2px solid var(--color-divider-strong);
  padding: 10px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

/* NEWSROOM FOOTER */
footer.newsroom-footer {
  border-top: 2px solid var(--color-divider-strong);
  background: var(--color-surface);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h5 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; font-size: 13.5px; }
.footer-col ul li a { color: var(--color-text); }
.footer-col ul li a:hover { color: var(--color-teal); }

/* ─── SITE CONTAINER & RESPONSIVE GUTTERS ─── */
.site-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box;
}

/* ─── MASTHEAD & HEADER SYSTEM ─── */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 248, 245, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--color-divider-strong);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-divider);
}

/* DESKTOP MASTHEAD (Visible only on desktop > 768px) */
.masthead-desktop {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 16px 0;
  gap: 28px;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--text-wordmark);
  letter-spacing: -0.03em;
  color: var(--color-text);
  text-decoration: none;
  text-align: left;
  white-space: nowrap;
  line-height: 1;
}
.brand-title span { color: var(--color-teal); }

.btn-docket-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  background: var(--color-teal);
  color: #ffffff !important;
  border: 1.5px solid var(--color-divider-strong);
  box-shadow: 2px 2px 0px var(--color-divider-strong);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-docket-header:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--color-divider-strong);
  text-decoration: none;
}

.nav-links-desktop {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 0;
  border-top: none;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.nav-links-desktop a { color: var(--color-text); text-decoration: none; }
.nav-links-desktop a:hover { color: var(--color-teal); text-decoration: none; }

/* MOBILE MASTHEAD (Visible only on mobile <= 768px) */
.masthead-mobile {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 8px;
}
.mobile-menu-btn {
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  margin-left: 2px;
  flex-shrink: 0;
}
.brand-title-mobile {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--text-caption);
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.brand-title-mobile span { color: var(--color-teal); }

.btn-subscribe-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  background: var(--color-teal);
  color: #ffffff !important;
  border: 1.5px solid var(--color-divider-strong);
  box-shadow: 2px 2px 0px var(--color-divider-strong);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.03em;
  line-height: 1.2;
  margin-right: 5px;
  flex-shrink: 0;
}

/* MOBILE DROPDOWN */
.mobile-nav-dropdown {
  display: none;
  background: var(--color-surface-dim);
  border-top: 1px solid var(--color-divider);
  border-bottom: 2px solid var(--color-divider-strong);
  padding: 16px 20px 20px;
}
.mobile-nav-dropdown.open {
  display: block;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.mobile-nav-links a {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
}
.mobile-nav-links a:hover {
  color: var(--color-teal);
}
.mobile-nav-socials {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-muted);
  padding-top: 4px;
}
.mobile-nav-socials a {
  color: var(--color-teal);
  text-decoration: none;
}

/* ─── GLOBAL OVERFLOW LOCK ─── */
html { overflow-x: hidden !important; }
body { overflow-x: clip !important; }
html, body {
  max-width: 100vw !important;
  width: 100% !important;
}

/* ─── RESPONSIVE BREAKPOINT SWITCHING ─── */
@media (max-width: 768px) {
  .masthead-desktop,
  .nav-links-desktop {
    display: none !important;
  }
  .masthead-mobile {
    display: flex !important;
  }
  .site-wrapper {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .top-bar {
    justify-content: center !important;
    text-align: center !important;
    font-size: 9px !important;
    padding: 5px 0 !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  .hero-section {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding-top: 24px !important;
    padding-bottom: 28px !important;
  }
  .hero-headline {
    font-size: 30px !important;
    line-height: 1.05 !important;
  }
  .host-card, .dossier-card {
    grid-template-columns: 1fr !important;
  }
  .phases-grid, .pillars-grid, .trust-nav-grid, .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .tier-row {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}

@media (min-width: 769px) {
  .masthead-mobile,
  .mobile-nav-dropdown {
    display: none !important;
  }
}
