/**
 * Base: reset, typography, links, media, forms, accessibility.
 */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  line-height: var(--lh-head);
  letter-spacing: -0.018em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
  font-optical-sizing: auto;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.01em; }

p { margin: 0 0 var(--s-5); }
p:last-child { margin-bottom: 0; }

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

/* Editorial links inside prose get the animated underline, nothing else does. */
.prose a {
  color: var(--clay);
  background-image: linear-gradient(var(--clay), var(--clay));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--dur) var(--ease);
}
@media (hover: hover) {
  .prose a:hover { background-size: 0% 1px; background-position: 100% 100%; }
}

img, svg, video { max-width: 100%; height: auto; display: block; }

strong, b { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }

ul, ol { margin: 0 0 var(--s-5); padding-left: 1.35em; }
li { margin-bottom: var(--s-2); }

blockquote { margin: 0; }

code, pre { font-family: var(--mono); font-size: 0.9em; }

table { border-collapse: collapse; width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

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

::selection { background: var(--brass-soft); color: var(--ink); }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s-4); top: -4rem; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: var(--s-3) var(--s-5);
  font-size: var(--t-meta); letter-spacing: 0.12em; text-transform: uppercase;
  transition: top 180ms var(--ease);
}
.skip-link:focus { top: var(--s-4); }

/* ---- Editorial primitives ------------------------------------------- */

.kicker {
  font-family: var(--sans);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin: 0 0 var(--s-4);
}
.kicker--clay    { color: var(--clay); }
.kicker--mineral { color: var(--mineral); }
.kicker--olive   { color: var(--olive); }
.kicker--brass   { color: var(--brass); }

.meta {
  font-size: var(--t-meta);
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.meta > * + *::before { content: '·'; margin: 0 0.55em; color: var(--line-2); }

.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Buttons — two only. A filled primary, an outlined secondary. */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding: 0.95em 1.7em;
  font-size: var(--t-meta); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--outline-light:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn .arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Reveal-on-scroll. Content is visible by default and only hides once JS
   confirms it can animate it back in — a no-JS or reduced-motion visitor
   always sees a finished page. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
