/* The Architecture of Analysis
   Design system: black and white only. The instrument aesthetic comes from
   structure, not decoration: a visible grid, measured type, hairline rules,
   numbered sections and monospaced labels. Inversion is the only accent. */

:root {
  --ink: #0b0b0b;
  --paper: #ffffff;
  --rule: #dcdcdc;
  --rule-strong: #0b0b0b;
  --dim: #6a6a6a;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

/* ---------- type ---------- */

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }

h1 {
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.08;
  max-width: 20ch;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.125rem, 1.9vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
  max-width: 46ch;
}

.dim { color: var(--dim); }

.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

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

.wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section { border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }

.band { padding-block: clamp(3.5rem, 8vw, 7.5rem); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.1rem;
}

.masthead .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  text-transform: uppercase;
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(4rem, 11vw, 9rem) clamp(3rem, 7vw, 6rem); }

.hero h1 { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); text-wrap: balance; }

.hero .lead { margin-bottom: 2.5rem; }

/* the measuring rule: a quiet instrument motif, pure CSS */
.scale {
  height: 2.75rem;
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0;
  border-top: 1px solid var(--rule-strong);
  background-image: repeating-linear-gradient(
    to right,
    var(--rule-strong) 0 1px,
    transparent 1px 100%
  );
  background-size: 2.5% 100%;
  background-repeat: repeat-x;
  -webkit-mask-image: linear-gradient(to bottom, #000 0 0.55rem, transparent 0.55rem);
  mask-image: linear-gradient(to bottom, #000 0 0.55rem, transparent 0.55rem);
}

/* ---------- inverted band ---------- */

.invert {
  background: var(--ink);
  color: var(--paper);
  border-top-color: var(--ink);
}
.invert .label { color: #9a9a9a; }
.invert .dim { color: #a8a8a8; }
.invert a { color: var(--paper); }
.invert .rule { border-color: #3a3a3a; }

/* ---------- numbered items ---------- */

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.items li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--rule);
  align-items: start;
}

.invert .items li { border-top-color: #2e2e2e; }

.items li:first-child { border-top: 0; padding-top: 0; }

.items .n {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  padding-top: 0.25rem;
}

.invert .items .n { color: #8f8f8f; }

.items h3 + p { margin-top: 0.4rem; color: var(--dim); }
.invert .items h3 + p { color: #b0b0b0; }

/* ---------- two column prose ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
}

/* ---------- figures: scale without disclosure ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  border-top: 1px solid var(--rule);
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.invert .figures { border-top-color: #2e2e2e; }

.figures div {
  padding: 1.5rem 1.25rem 1.5rem 0;
  border-right: 1px solid var(--rule);
}
.invert .figures div { border-right-color: #2e2e2e; }
.figures div:last-child { border-right: 0; }

.figures .fig {
  font-family: var(--mono);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  display: block;
  margin-bottom: 0.5rem;
}

/* ---------- call to action ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border: 1px solid currentColor;
  color: inherit;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.button:hover { background: var(--ink); color: var(--paper); }
.invert .button:hover { background: var(--paper); color: var(--ink); }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

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

footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3.5rem;
  color: var(--dim);
  font-size: 0.875rem;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
