/* =========================================================
   [Company] — Augmented Engineering & Collective AI
   Design system: Direction B
   One accent, two typefaces, no shadows, no gradients.
   ========================================================= */

:root {
  --ink: #16181D;
  --ground: #F6F5F1;
  --ground-2: #EDEAE2;
  --card: #FFFFFF;
  --line: #E4E0D6;
  --muted: #4F535C;
  --faint: #8C887E;
  --accent: #A8481F;
  --accent-hover: #7E3415;
  --on-accent: #FFFFFF;

  --band-ink: #16181D;
  --band-text: #F6F5F1;
  --band-muted: #B7BBC2;
  --band-line: #343840;
  --band-accent: #E0763F;

  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', var(--sans);
  --serif: 'Source Serif 4', Georgia, serif;

  --measure: 68ch;
  --max: 1264px;
  --pad: 88px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F2F1ED;
    --ground: #131417;
    --ground-2: #1B1D22;
    --card: #1B1D22;
    --line: #2C2F36;
    --muted: #B2B6BD;
    --faint: #8A8E96;
    --accent: #E0763F;
    --accent-hover: #F09059;
    --on-accent: #16181D;
  }
}

:root[data-theme="dark"] {
  --ink: #F2F1ED;
  --ground: #131417;
  --ground-2: #1B1D22;
  --card: #1B1D22;
  --line: #2C2F36;
  --muted: #B2B6BD;
  --faint: #8A8E96;
  --accent: #E0763F;
  --accent-hover: #F09059;
  --on-accent: #16181D;
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.14;
  margin: 0;
}

p { margin: 0 0 1.1em 0; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--ground);
  padding: 12px 20px; z-index: 100;
}
.skip:focus { left: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

section { padding: 88px 0; }
section.tight { padding: 56px 0; }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.eyebrow.quiet { color: var(--faint); }

.lead { font-size: 20px; line-height: 1.6; color: var(--muted); max-width: var(--measure); }

.h-xl { font-size: clamp(38px, 5.2vw, 72px); letter-spacing: -0.03em; }
.h-lg { font-size: clamp(30px, 3.4vw, 42px); }
.h-md { font-size: clamp(24px, 2.4vw, 32px); }
.h-sm { font-size: 21px; }

.muted { color: var(--muted); }
.faint { font-size: 13px; color: var(--faint); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 40px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.mark {
  width: 32px; height: 32px; flex: none;
  color: var(--ink);
  display: block;
}
.mark svg { width: 100%; height: 100%; display: block; }
.mark-sm { width: 24px; height: 24px; }
.footer-lockup { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.band-dark .mark, .btn .mark { color: currentColor; }
.brand-name { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

.nav { display: flex; gap: 28px; flex: 1 1 auto; font-size: 15px; }
.nav a { color: var(--ink); }
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 500; }

.nav-toggle { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 15px 30px;
  font-size: 16px; font-weight: 500;
  font-family: var(--sans);
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-dark { background: var(--ink); color: var(--ground); }
.btn-dark:hover { background: var(--muted); color: var(--ground); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 11px 20px; font-size: 15px; min-height: 42px; }

.arrow { font-weight: 500; }

/* ---------- bands ---------- */

.band-alt { background: var(--ground-2); }
.band-dark {
  background: var(--band-ink);
  color: var(--band-text);
}
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--band-text); }
.band-dark .muted, .band-dark .lead { color: var(--band-muted); }
.band-dark .eyebrow { color: var(--band-accent); }
.band-dark a { color: var(--band-accent); }

/* ---------- layout helpers ---------- */

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.split { display: flex; gap: 72px; align-items: flex-start; }
.split.center { align-items: center; }
.split > .col-narrow { width: 360px; flex: none; }
.split > .col-wide { flex: 1 1 auto; min-width: 0; }

.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }

.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 16px; color: var(--muted); }
a.card { color: inherit; display: block; }
a.card:hover { border-color: var(--accent); text-decoration: none; }
a.card:hover h3 { color: var(--accent); }

.card-lg { padding: 44px; }

.kicker {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 12px;
}

/* ---------- stats ---------- */

.stat { border-top: 2px solid var(--accent); padding-top: 22px; }
.band-dark .stat { border-top-color: var(--band-accent); }
.stat .figure {
  font-family: var(--display); font-size: 46px; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1; margin-bottom: 14px;
}
.stat p { font-size: 15px; }
.stat cite { display: block; font-size: 13px; font-style: normal; color: var(--faint); margin-top: 10px; }
.band-dark .stat cite { color: #8A8F97; }

/* ---------- list rows ---------- */

.rows { border-top: 1px solid var(--line); }
.row-item {
  display: flex; gap: 40px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid var(--line);
  color: inherit;
}
a.row-item:hover { text-decoration: none; }
a.row-item:hover .row-title { color: var(--accent); }
.row-num { width: 48px; flex: none; font-family: var(--display); font-size: 14px; color: var(--accent); }
.row-title { width: 300px; flex: none; font-family: var(--display); font-size: 24px; font-weight: 500; }
.row-body { flex: 1 1 auto; font-size: 16px; color: var(--muted); }
.row-meta { width: 210px; flex: none; font-size: 14px; color: var(--muted); }
.row-meta strong { display: block; color: var(--ink); font-weight: 600; }

/* ---------- media placeholder ---------- */

.media {
  background: var(--ground-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--faint);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 24px;
  min-height: 240px;
}
.band-dark .media { background: #22252B; border-color: var(--band-line); color: #797E87; }
.media-tall { min-height: 380px; }
.media-wide { min-height: 420px; }

/* ---------- article ---------- */

.article-head { max-width: 780px; margin: 0 auto; }
.article-body { max-width: 780px; margin: 0 auto; font-family: var(--serif); font-size: 19px; line-height: 1.75; }
.article-body h2 { font-family: var(--display); font-size: 30px; margin: 44px 0 16px 0; }
.article-body h3 { font-family: var(--display); font-size: 22px; margin: 32px 0 12px 0; }
.article-body ul, .article-body ol { margin: 0 0 1.2em 0; padding-left: 26px; }
.article-body li { margin-bottom: 10px; }
.article-body blockquote {
  margin: 40px 0; padding: 26px 30px;
  border-left: 3px solid var(--accent);
  background: var(--ground-2);
  font-family: var(--display); font-size: 24px; line-height: 1.4; font-weight: 500;
}
.article-body blockquote p { margin: 0; }
.deck { font-family: var(--serif); font-size: 23px; line-height: 1.5; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--ground-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--faint);
}
.sources { font-family: var(--sans); font-size: 15px; border-top: 1px solid var(--line); padding-top: 26px; margin-top: 40px; }
.sources h3 { font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.sources ol { padding-left: 22px; }
.sources li { color: var(--muted); margin-bottom: 8px; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 14px 16px;
  font-size: 16px; font-family: var(--sans); color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--line); border-radius: 4px;
  min-height: 48px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field .hint { font-size: 13px; color: var(--faint); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }

.newsletter { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input {
  flex: 1 1 260px; padding: 15px 16px; font-size: 16px; font-family: var(--sans);
  border: 1px solid var(--band-line); border-radius: 4px;
  background: #22252B; color: var(--band-text); min-height: 48px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- table ---------- */

.compare { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 20px 26px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--ground-2); font-family: var(--display); font-size: 15px; }
.compare thead th:last-child { color: var(--accent); }
.compare tbody th { font-weight: 600; width: 28%; }
.compare td { color: var(--muted); }
.compare td:last-child { color: var(--ink); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: none; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 44px 0; }
.footer-inner { display: flex; gap: 72px; align-items: flex-start; flex-wrap: wrap; }
.footer-brand { width: 280px; }
.footer-cols { display: flex; gap: 56px; flex: 1 1 auto; flex-wrap: wrap; font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col strong { font-family: var(--display); font-weight: 600; margin-bottom: 4px; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--accent); }
.footer-legal { font-size: 13px; color: var(--faint); }

/* ---------- motion ---------- */

.reveal { opacity: 0; transform: translateY(8px); transition: opacity 220ms ease, transform 220ms ease; }
.reveal.shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  :root { --pad: 48px; }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-item { flex-wrap: wrap; gap: 16px 32px; }
  .row-title { width: 260px; }
  .row-meta { width: 100%; }
}

@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--ground); border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px var(--pad); border-top: 1px solid var(--line); }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 48px; height: 48px; margin-left: auto;
    background: transparent; border: none; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); }
  .header-inner { gap: 16px; }
  .header-inner .btn { display: none; }
  .split { flex-direction: column; gap: 40px; }
  .split > .col-narrow { width: 100%; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section { padding: 64px 0; }
}

@media (max-width: 680px) {
  :root { --pad: 20px; }
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .grid-5, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .card-lg { padding: 26px; }
  .row-item { flex-direction: column; gap: 10px; padding: 24px 0; }
  .row-title, .row-num, .row-meta { width: 100%; }
  .row-between { flex-direction: column; align-items: flex-start; gap: 12px; }
  .article-body { font-size: 18px; }
  .article-body blockquote { font-size: 20px; padding: 20px 22px; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare thead { display: none; }
  .compare tbody th { padding-bottom: 6px; }
  .compare td { padding-top: 0; }
  .compare td::before { content: attr(data-label); display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
  .footer-inner { gap: 36px; }
}
