/* ===========================================================
   HUMAN SIGNAL — DESIGN SYSTEM v1
   Monochrome editorial. Boska + Satoshi. Apple-style cards.
   This file is the single source of truth for: tokens,
   typography, nav, footer, buttons, eyebrows, sections,
   marquee strip, signal bar, and motion primitives.
   Page-specific styles live in /assets/<page>.css
   =========================================================== */

/* -------- TOKENS -------- */
:root {
  --bg: #f5f5f7;
  --page: #ffffff;
  --ink: #0a0a0b;
  --ink-soft: #1d1d1f;
  --muted: #6b6b70;
  --muted-2: #8e8e93;
  --hairline: rgba(10, 10, 11, 0.12);
  --hairline-strong: rgba(10, 10, 11, 0.2);
  --accent-red: #d12d2d;

  --font-display: "Boska", "Iowan Old Style", "Georgia", serif;
  --font-body: "Satoshi", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-pill: 999px;
  --radius-card: 24px;
  --shell-margin: clamp(12px, 2vw, 24px);
}

/* -------- BASE -------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: #fff; }

/* -------- TYPOGRAPHY PRIMITIVES -------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.eyebrow--invert { color: rgba(255,255,255,0.7); }

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  color: var(--ink);
}
.display em {
  font-style: italic;
  font-weight: 500;
}
.display--lg { font-size: clamp(40px, 7vw, 96px); }
.display--md { font-size: clamp(36px, 5.4vw, 72px); }
.display--sm { font-size: clamp(28px, 3.6vw, 48px); }

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 60ch;
}

/* -------- NAV (shared across all pages) -------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 56px;
  padding: 0 clamp(16px, 3vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink);
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  gap: clamp(14px, 2.4vw, 28px);
  font-size: 13px;
  color: var(--muted);
}
.nav__links a { transition: color .2s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  transition: transform .25s ease, background .25s ease;
}
.nav__cta:hover { transform: translateY(-1px); background: #000; }
@media (max-width: 880px) { .nav__links { display: none; } }

/* -------- BUTTONS (shared) -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  cursor: pointer;
  font-family: inherit;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #000; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--invert { background: #fff; color: var(--ink); }
.btn--invert:hover { background: #f0f0f2; transform: translateY(-1px); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: #f0f0f2; transform: translateY(-1px); }
.btn--full { width: 100%; justify-content: center; padding: 14px 22px; }

/* -------- SHARED SECTION CHROME -------- */
.section {
  position: relative;
  margin: var(--shell-margin);
  padding: clamp(56px, 7vw, 120px) clamp(28px, 5vw, 96px);
  background: var(--bg);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.section--invert {
  background: var(--ink);
  color: #fff;
}
.section--invert .display { color: #fff; }
.section--invert .lede { color: rgba(255,255,255,0.85); }
.section--invert .eyebrow { color: rgba(255,255,255,0.6); }
.section__head { max-width: 760px; margin: 0 0 clamp(32px, 4vw, 56px); }
.section__head--split {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
}
.section__sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--muted);
  line-height: 1.55;
  max-width: 56ch;
  margin: 18px 0 0;
}
.section__sub--right { margin-top: 0; align-self: end; }
@media (max-width: 800px) {
  .section__head--split { grid-template-columns: 1fr; }
}

/* -------- MARQUEE STRIP (shared component) -------- */
.strip {
  position: relative;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 14px 0;
  overflow: hidden;
  background: rgba(10,10,11,0.02);
}
.strip__track {
  display: inline-flex; align-items: center;
  gap: 28px; white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-mono);
  animation: marquee 38s linear infinite;
  will-change: transform;
}
.strip__track .dot-sep { color: var(--muted-2); font-size: 6px; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* -------- SIGNAL BAR (shared stat row) -------- */
.signalbar {
  margin: var(--shell-margin);
  padding: clamp(28px, 4vw, 52px) clamp(28px, 5vw, 72px);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.signalbar__cell { display: flex; flex-direction: column; gap: 6px; }
.signalbar__num {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1;
}
.signalbar__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
@media (max-width: 800px) { .signalbar { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .signalbar { grid-template-columns: 1fr; } }

/* -------- FOOTER (shared) -------- */
.foot {
  margin: var(--shell-margin);
  padding: clamp(48px, 6vw, 80px) clamp(28px, 5vw, 72px) clamp(24px, 3vw, 36px);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-card);
}
.foot .nav__logo { color: #fff; }
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(28px, 4vw, 60px);
  padding-bottom: clamp(36px, 4vw, 56px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.foot__brand p {
  margin: 14px 0 0;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  max-width: 30ch;
}
.foot__head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 14px;
}
.foot__grid > div > a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  transition: color .2s ease;
}
.foot__grid > div > a:hover { color: #fff; }
.foot__bottom {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
@media (max-width: 800px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .foot__grid { grid-template-columns: 1fr; }
  .foot__bottom { flex-direction: column; gap: 8px; }
}

/* -------- MOTION (shared) -------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .strip__track { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
