/* ============================================================
   OUTSPUN — shared design system
   Institutional OSINT intelligence. Graphite base, restrained
   signal-green accent, IBM Plex Sans + Mono.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* base — cool institutional neutrals (LIGHT theme) */
  --bg:        #f5f7f8;
  --bg-1:      #e9eef1;
  --bg-2:      #ffffff;
  --bg-3:      #f9fbfb;
  --bg-elev:   #ffffff;

  /* dark accent panels (used sparingly for contrast) */
  --paper:     #ffffff;
  --paper-2:   #eef2f4;
  --paper-ink: #15181b;
  --paper-ink-2: #565b60;
  --paper-line: rgba(20,24,28,0.12);

  /* ink — charcoal on light */
  --ink:       #15191d;
  --ink-2:     #4c5258;
  --ink-3:     #767c82;
  --ink-4:     #9aa0a6;

  /* lines — dark on light */
  --line:      rgba(20,24,28,0.13);
  --line-2:    rgba(20,24,28,0.085);
  --line-strong: rgba(20,24,28,0.24);

  /* signal accent — operational cyan, used sparingly */
  --signal:    #0f8a9b;
  --signal-2:  #0b7180;
  --signal-dim: rgba(15,138,155,0.10);
  --signal-glow: rgba(15,138,155,0.22);

  /* premium card shadows */
  --shadow-sm: 0 1px 2px rgba(20,24,28,0.04), 0 1px 1px rgba(20,24,28,0.03);
  --shadow:    0 1px 2px rgba(20,24,28,0.05), 0 12px 28px -18px rgba(20,24,28,0.22);
  --shadow-lg: 0 2px 4px rgba(20,24,28,0.05), 0 30px 60px -28px rgba(20,24,28,0.30);

  /* type */
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --display-font: var(--sans);

  /* themed chrome */
  --nav-bg: rgba(245,247,248,0.90);
  --mobile-bg: rgba(245,247,248,0.98);

  /* layout */
  --container: 1240px;
  --container-narrow: 920px;
  --radius: 4px;
  --radius-lg: 8px;

  --nav-h: 72px;
}

* { box-sizing: border-box; }

/* ---------- dark theme (tweakable) ---------- */
html[data-theme="dark"] {
  --bg:        #0e1012;
  --bg-1:      #121518;
  --bg-2:      #171b1f;
  --bg-3:      #1d2227;
  --bg-elev:   #20262c;
  --paper:     #14181b;
  --paper-2:   #1c2126;
  --paper-ink: #e9ecef;
  --paper-ink-2: #98a0a7;
  --paper-line: rgba(255,255,255,0.10);
  --ink:       #e9ecef;
  --ink-2:     #98a0a7;
  --ink-3:     #6a7178;
  --ink-4:     #474d53;
  --line:      rgba(255,255,255,0.10);
  --line-2:    rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.17);
  --shadow-sm: none;
  --shadow:    0 12px 30px -18px rgba(0,0,0,0.65);
  --shadow-lg: 0 30px 70px -28px rgba(0,0,0,0.75);
  --nav-bg:    rgba(14,16,18,0.72);
  --mobile-bg: rgba(14,16,18,0.96);
}

/* ---------- brand mark (theme + accent aware) ---------- */
.mark .mark-field { fill: var(--bg-2); stroke: var(--line); }
.mark .edge { stroke: var(--ink-3); }
.mark .nprimary { fill: var(--ink); }
.mark .nsec { fill: var(--ink-3); }
.mark .nsig { fill: var(--signal); }

/* headline character tuning (tweakable) */
html[data-headline="serif"] .display { letter-spacing: -0.012em; }
html[data-headline="mono"] .display,
html[data-headline="mono"] .h2 { letter-spacing: -0.045em; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  line-height: 1.6;
}

::selection { background: var(--signal); color: #fff; }

a { color: inherit; text-decoration: none; }

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

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}
.narrow { max-width: var(--container-narrow); }

.section {
  padding: 96px 0;
  position: relative;
}
.section--tight { padding: 72px 0; }

/* light section */
.paper {
  background: var(--paper);
  color: var(--paper-ink);
}
.paper .eyebrow { color: var(--paper-ink-2); }
.paper .eyebrow::before { background: var(--signal-2); }

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-family: var(--display-font);
}

.h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: -0.025em;
  font-family: var(--display-font);
}
.h3 {
  font-size: clamp(21px, 2vw, 26px);
  letter-spacing: -0.015em;
  font-weight: 500;
}

.lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  font-weight: 350;
}
.paper .lead { color: var(--paper-ink-2); }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--signal);
  border-radius: 1px;
  flex: none;
  box-shadow: 0 0 8px var(--signal-glow);
}

.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* section header block */
.sec-head {
  max-width: 760px;
  margin-bottom: 64px;
}
.sec-head .eyebrow { margin-bottom: 22px; }
.sec-head p { margin-top: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

.btn--signal {
  background: var(--signal);
  color: #fff;
  font-weight: 600;
}
.btn--signal:hover { background: var(--signal-2); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink-2); background: rgba(20,24,28,0.04); }

.paper .btn--ghost { color: var(--paper-ink); border-color: rgba(20,24,28,0.22); }
.paper .btn--ghost:hover { border-color: rgba(20,24,28,0.4); background: rgba(20,24,28,0.03); }

.btn--lg { padding: 16px 28px; font-size: 16px; }

.textlink {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color .18s, color .18s;
}
.textlink .arr { transition: transform .2s ease; }
.textlink:hover { color: var(--signal); border-color: var(--signal); }
.textlink:hover .arr { transform: translateX(3px); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-2);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand .mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 6px 12px rgba(20,24,28,0.08)); }
.brand .word {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 400;
  color: var(--ink-2);
  padding: 9px 13px;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  white-space: nowrap;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 1.5px;
  background: var(--signal);
  border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 14px; flex: none; }
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--ink); border-radius: var(--radius);
  width: 40px; height: 40px; align-items: center; justify-content: center;
  cursor: pointer;
}

/* mobile menu */
.mobile-menu {
  display: none;
  position: fixed; top: calc(var(--nav-h) + 10px); left: 14px; right: 14px; z-index: 99;
  background: var(--mobile-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  padding: 8px 14px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 13px 12px; font-size: 16px; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.mobile-menu a:hover { color: var(--ink); background: var(--bg-3); }
.mobile-menu a:last-child { border-bottom: 0; }

/* ---------- smart nav dropdowns ---------- */
.nav-links .has-menu { position: relative; }
.nav-links .has-menu > a { display: inline-flex; align-items: center; gap: 7px; }
.nav-links .has-menu > a::after {
  content: ''; width: 5px; height: 5px;
  border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translate(-1px,-2px); opacity: .45; transition: transform .2s, opacity .2s;
}
.nav-links .has-menu:hover > a::after,
.nav-links .has-menu.open > a::after { transform: rotate(225deg) translate(-2px,-1px); opacity: .8; }

.menu-panel {
  position: absolute; top: calc(100% + 14px); left: 0;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 12px; width: 540px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 120;
}
.menu-panel::before { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.nav-links .has-menu:hover .menu-panel,
.nav-links .has-menu:focus-within .menu-panel,
.nav-links .has-menu.open .menu-panel {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.menu-item { display: block; padding: 11px 13px; border-radius: var(--radius); transition: background .15s; }
.menu-item:hover { background: var(--bg-3); }
.menu-item .mi-code { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--signal); display: block; margin-bottom: 5px; }
.menu-item .mi-t { font-size: 14px; color: var(--ink); font-weight: 500; display: block; }
.menu-item .mi-d { font-size: 12px; color: var(--ink-3); display: block; margin-top: 3px; line-height: 1.45; }
.menu-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding: 13px 13px 5px; border-top: 1px solid var(--line-2);
}
.menu-foot .mf-note { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-4); }
.menu-foot .mf-link { font-size: 13px; font-weight: 500; color: var(--signal); display: inline-flex; gap: 7px; align-items: center; }
.menu-foot .mf-link:hover { color: var(--signal-2); }

/* ---------- intelligence briefs cards ---------- */
.brief-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bcard {
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.bcard:hover { border-color: var(--line); box-shadow: var(--shadow); transform: translateY(-2px); }
.bcard .bc-top { padding: 22px 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bcard .bc-cat { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--signal); }
.bcard .bc-date { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); letter-spacing: .04em; white-space: nowrap; }
.bcard .bc-body { padding: 14px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.bcard h3 { font-size: 18px; line-height: 1.25; margin-bottom: 11px; letter-spacing: -0.01em; }
.bcard p { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin: 0 0 20px; flex: 1; }
.bcard .bc-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); display: flex; gap: 16px; align-items: center; }
.bcard .bc-meta .arr { margin-left: auto; color: var(--signal); transition: transform .2s; }
.bcard:hover .bc-meta .arr { transform: translateX(3px); }

@media (max-width: 980px) {
  .brief-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .brief-cards { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.footer {
  background: var(--bg-1);
  border-top: 1px solid var(--line-2);
  padding: 72px 0 40px;
  color: var(--ink-2);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-2);
}
.footer .brand .word { font-size: 20px; }
.footer-blurb { margin-top: 20px; max-width: 320px; font-size: 15px; color: var(--ink-3); line-height: 1.6; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14.5px; color: var(--ink-2); transition: color .15s; }
.footer-col a:hover { color: var(--signal); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; gap: 24px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--ink-4);
  letter-spacing: 0.02em;
}
.footer-bottom .legal { display: flex; gap: 24px; flex-wrap: wrap; }

/* ---------- generic cards ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: var(--line); box-shadow: var(--shadow); }

/* divider tick rows */
.tickrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 12px;
}
.tickrow::before { content:''; width:6px; height:6px; background: var(--signal); border-radius:1px; }

/* ---------- reveal (no-op: content always visible) ---------- */
.reveal { opacity: 1; transform: none; }

/* ============================================================
   INNER PAGE COMPONENTS
   ============================================================ */
.page-hero {
  padding: 92px 0 56px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.page-hero .eyebrow { margin-bottom: 24px; }
.page-hero h1 { font-size: clamp(38px, 4.6vw, 60px); letter-spacing: -0.03em; line-height: 1.04; max-width: 16ch; font-family: var(--display-font); }
.page-hero .lead { margin-top: 24px; max-width: 620px; }
.page-hero .crumbs { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 22px; }
.page-hero .crumbs a { color: var(--ink-3); }
.page-hero .crumbs a:hover { color: var(--signal); }

/* generic two-col feature rows */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 64px 0; border-bottom: 1px solid var(--line-2);
}
.feature-row:last-child { border-bottom: 0; }
.feature-row.flip .fr-media { order: -1; }
.feature-row h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 16px; }
.feature-row p { color: var(--ink-2); max-width: 48ch; }

/* spec / definition list */
.specs { display: grid; grid-template-columns: repeat(2,1fr); gap: 0; border-top: 1px solid var(--line); }
.spec { padding: 22px 0; border-bottom: 1px solid var(--line-2); display:grid; grid-template-columns: 150px 1fr; gap: 24px; }
.spec .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--signal); text-transform: uppercase; }
.spec .v { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

/* prose */
.prose { max-width: 680px; }
.prose p { color: var(--ink-2); font-size: 17px; line-height: 1.7; }
.prose h3 { font-size: 22px; margin: 40px 0 14px; }
.prose .lead { color: var(--ink); font-size: 21px; line-height: 1.5; font-weight: 300; }

/* contact form */
.form-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; }
.field { margin-bottom: 20px; }
.field label { display:block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 9px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); font-family: var(--sans); font-size: 15px;
  padding: 13px 14px; transition: border-color .15s, background .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--signal); background: var(--bg-3); }
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-aside { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); }
.form-aside h4 { font-size: 18px; margin-bottom: 16px; }
.form-aside .ar { display:flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); align-items:flex-start; }
.form-aside .ar:first-of-type { border-top: 0; }
.form-aside .ar .n { font-family: var(--mono); color: var(--signal); font-size: 12px; padding-top: 2px; }
.form-ok { background: var(--signal-dim); border: 1px solid var(--signal); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); font-size: 15px; display:none; }
.form-ok.show { display:block; }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--bg-1); padding: 32px 28px; }
.stat .big { font-size: clamp(34px,4vw,48px); font-weight: 500; letter-spacing: -0.03em; color: var(--ink); }
.stat .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 10px; line-height:1.5; }

@media (max-width: 1000px) {
  .feature-row { grid-template-columns: 1fr; gap: 28px; }
  .feature-row.flip .fr-media { order: 0; }
  .form-grid { grid-template-columns: 1fr; gap: 40px; }
  .specs, .stats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .spec { grid-template-columns: 1fr; gap: 6px; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .nav-links { display: none; }
  .nav-cta > .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 900px) {
  body { font-size: 16px; }
  .container { padding: 0 22px; }
  .section { padding: 72px 0; }
  .sec-head { margin-bottom: 44px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer { padding: 54px 0 32px; }
}
