/* Pax Agentica — site styles
   Brand rule: vermillion (#D63A1F) appears ONLY in the wordmark and sigil.
   Never use it for buttons, links, section fills or accent stripes. */

@font-face { font-family: "Geist"; src: url("fonts/geist-sans-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #fafaf8;
  --paper-cool: #f2f3f4;
  --ink: #0a0a0a;
  --muted: #6b6862;
  --vermillion: #d63a1f; /* logo rule only */

  --bg: var(--paper);
  --bg-alt: var(--paper-cool);
  --fg: var(--ink);
  --fg-2: var(--muted);
  --line: #e2e1dc;
  --invert-bg: var(--ink);
  --invert-fg: var(--paper);
  --invert-fg-2: #a8a49c;
  --invert-line: #2a2a28;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --bg-alt: #141413;
    --fg: var(--paper);
    --fg-2: #a8a49c;
    --line: #262624;
    --invert-bg: #141413;
    --invert-fg: var(--paper);
    --invert-fg-2: #a8a49c;
    --invert-line: #2a2a28;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 17px/1.6 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.wordmark { color: var(--fg); display: inline-flex; }
.wordmark svg { height: 26px; width: auto; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--fg-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--fg); font: 500 14px var(--sans); padding: 6px 12px; border-radius: 2px; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; font-size: 17px; }
}

/* Type */
.eyebrow { font: 400 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); margin: 0 0 20px; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(40px, 6.4vw, 76px); max-width: 15ch; }
h1 .light, h2 .light { font-weight: 300; }
h2 { font-size: clamp(30px, 4vw, 46px); max-width: 20ch; }
h3 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.3; }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--fg-2); max-width: 60ch; margin: 28px 0 0; }
p { margin: 0 0 1em; }
.muted { color: var(--fg-2); }

/* Sections */
section { padding: clamp(64px, 10vw, 120px) 0; border-top: 1px solid var(--line); }
.hero { border-top: 0; padding-top: clamp(72px, 12vw, 148px); }
.alt { background: var(--bg-alt); }
.invert { background: var(--invert-bg); color: var(--invert-fg); border-top-color: var(--invert-bg); --fg: var(--invert-fg); --bg: var(--invert-bg); --fg-2: var(--invert-fg-2); --line: var(--invert-line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: 56px; }
.section-head p { color: var(--fg-2); margin: 0; max-width: 52ch; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; margin-bottom: 40px; } }

/* Grids */
.grid { display: grid; gap: 0; border-top: 1px solid var(--line); }
.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)); }
.cell { padding: 32px 28px 36px 0; border-bottom: 1px solid var(--line); }
.cell + .cell { padding-left: 28px; border-left: 1px solid var(--line); }
.grid-2 .cell:nth-child(2n+1), .grid-3 .cell:nth-child(3n+1), .grid-4 .cell:nth-child(4n+1) { padding-left: 0; border-left: 0; }
.cell .num { font: 400 12px var(--mono); color: var(--fg-2); letter-spacing: 0.06em; display: block; margin-bottom: 28px; }
.cell h3 { margin-bottom: 12px; }
.cell p { color: var(--fg-2); margin: 0; font-size: 16px; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 .cell:nth-child(n) { padding-left: 28px; border-left: 1px solid var(--line); } .grid-4 .cell:nth-child(2n+1) { padding-left: 0; border-left: 0; } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .grid .cell:nth-child(n) { padding-left: 0; border-left: 0; padding-right: 0; } }

/* Lists */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 48px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.rows li strong { font-weight: 500; font-size: 19px; letter-spacing: -0.01em; }
.rows li span { color: var(--fg-2); }
@media (max-width: 720px) { .rows li { grid-template-columns: 1fr; } }

/* Table */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 16px 24px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 400 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
td:first-child { font-weight: 500; white-space: nowrap; }
td:last-child { color: var(--fg-2); }

/* Buttons — ink, never vermillion */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; font: 500 15px var(--sans); text-decoration: none; border: 1px solid var(--fg); border-radius: 2px; transition: background .15s, color .15s; }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: transparent; color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.invert .btn-primary { background: var(--invert-fg); color: var(--invert-bg); border-color: var(--invert-fg); }
.invert .btn-primary:hover { background: transparent; color: var(--invert-fg); }
.arrow::after { content: "→"; font-family: var(--mono); }

/* Two routes */
.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.route { border: 1px solid var(--line); padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; }
.route .eyebrow { margin-bottom: 16px; }
.route h3 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 16px; }
.route p { color: var(--fg-2); }
.route ul { margin: 8px 0 28px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.route li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.route .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 820px) { .routes { grid-template-columns: 1fr; } }

/* Contact cards */
.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.contacts div { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.contacts div:nth-child(2n) { padding-left: 28px; border-left: 1px solid var(--line); }
.contacts a { font-size: clamp(19px, 2.2vw, 24px); font-weight: 500; letter-spacing: -0.01em; }
.contacts p { color: var(--fg-2); margin: 8px 0 0; font-size: 15px; }
@media (max-width: 720px) { .contacts { grid-template-columns: 1fr; } .contacts div:nth-child(2n) { padding-left: 0; border-left: 0; } }

/* Prose (privacy etc.) */
.prose { max-width: 68ch; }
.prose h2 { font-size: 24px; margin: 48px 0 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; color: var(--fg-2); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer .wordmark svg { height: 22px; margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px; font: 400 12px/1.6 var(--mono); letter-spacing: 0.02em; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .brand-col { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.note { margin-top: 36px; }
