@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap');

:root {
  --bg: #14171a;
  --surface: #1b1f23;
  --surface-2: #22262b;
  --text: #ece9e2;
  --muted: #8b9298;
  --brass: #c98a3e;
  --teal: #4fa89f;
  --line: #2c3136;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .mono {
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}

a { color: inherit; }

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

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

header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(20, 23, 26, 0.92);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 20px;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark span { color: var(--brass); }

nav { display: flex; gap: 28px; }

nav a {
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

nav a:hover, nav a.active {
  color: var(--text);
  border-color: var(--brass);
}

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

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 96px 0 88px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-size: 52px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}

.hero p {
  color: var(--muted);
  font-size: 19px;
  max-width: 46ch;
  margin: 0;
}

.diagram { width: 100%; height: auto; }

/* ---------- sections ---------- */

section { padding: 76px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
  gap: 24px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-head .tick {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--surface);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.card h3 {
  font-size: 19px;
  margin: 0;
  font-weight: 600;
}

.card p {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0;
  line-height: 1.55;
}

.card .go {
  margin-top: auto;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13.5px;
  color: var(--brass);
  padding-top: 8px;
}

/* ---------- page header (non-home) ---------- */

.page-head {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}

.page-head .kicker {
  color: var(--brass);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  margin-bottom: 14px;
}

.page-head h1 {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.page-head p {
  color: var(--muted);
  font-size: 18.5px;
  max-width: 58ch;
  margin: 0;
}

/* ---------- prose blocks ---------- */

.prose { max-width: 68ch; }
.prose h3 { font-size: 21px; margin: 40px 0 12px; font-weight: 600; }
.prose p { margin: 0 0 16px; }
.prose ul { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; color: var(--muted); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.callout {
  border-left: 2px solid var(--brass);
  padding: 4px 0 4px 22px;
  color: var(--muted);
  font-size: 16.5px;
}

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

footer {
  padding: 40px 0 56px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

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

@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; padding: 56px 0; }
  .hero h1 { font-size: 38px; }
  .grid3 { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 8px; }
  nav { gap: 18px; }
  .page-head h1 { font-size: 32px; }
  footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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