/* Mooch · Nat — shared design system */
:root {
  --black: #000000;
  --ink: #1d1d1f;
  --paper: #ffffff;
  --surface: #fbfbfd;
  --muted: #86868b;
  --hairline: #d2d2d7;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", monospace;
  --pad-x: clamp(20px, 5vw, 56px);
  --rhythm: clamp(80px, 12vw, 160px);
  --max: 1320px;
  --col: 760px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "tnum", "kern", "liga", "ss01";
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ─── Topbar ─── */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--pad-x);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}
.topbar .left { justify-self: start; }
.topbar .center { justify-self: center; color: var(--ink); font-weight: 600; letter-spacing: 0.18em; }
.topbar .right { justify-self: end; text-align: right; }
.topbar .num { color: var(--ink); }
.topbar a { border-bottom: 1px solid transparent; transition: border-color 0.15s ease; }
.topbar a:hover { border-bottom-color: var(--muted); }
.topbar .crumb { color: var(--muted); }
.topbar .crumb .you { color: var(--ink); font-weight: 600; }

/* ─── Buttons ─── */
.pill, .ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.pill { background: var(--black); color: var(--paper); border-color: var(--black); }
.pill:hover { background: var(--ink); transform: translateY(-1px); }
.pill .arrow, .ghost .arrow { transition: transform 0.2s ease; }
.pill:hover .arrow, .ghost:hover .arrow { transform: translateX(3px); }
.ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.ghost:hover { border-color: var(--ink); color: var(--black); }

/* ─── Section primitives ─── */
.section {
  padding: var(--rhythm) var(--pad-x);
  border-bottom: 1px solid var(--hairline);
}
.section-inner { max-width: var(--max); margin: 0 auto; }

.section-num {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-num strong { color: var(--ink); font-weight: 600; }
.section-num .rule { flex: 1; height: 1px; background: var(--hairline); max-width: 80px; }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--black);
}
.section-title em { font-style: italic; }

.section-lead {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 48ch;
  margin-top: 12px;
}

/* ─── Reveal animation ─── */
.reveal { opacity: 0; transform: translateY(12px); animation: reveal 0.8s cubic-bezier(0.2, 0, 0.2, 1) forwards; }
.reveal.d1 { animation-delay: 0.05s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.32s; }
.reveal.d4 { animation-delay: 0.46s; }
.reveal.d5 { animation-delay: 0.60s; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

/* ─── Mooch colophon ─── */
.colophon {
  padding: 56px var(--pad-x) 40px;
  background: var(--black);
  color: var(--paper);
}
.colophon-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
.colophon-mark {
  font-family: var(--serif);
  font-size: clamp(72px, 16vw, 240px);
  line-height: 0.85;
  letter-spacing: -0.04em;
}
.colophon-mark em { font-style: italic; color: var(--muted); }
.colophon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 24px;
  padding-top: 36px;
  border-top: 1px solid #2a2a2c;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.colophon-grid h4 { color: var(--muted); font-weight: 400; margin-bottom: 12px; }
.colophon-grid a, .colophon-grid li { color: var(--paper); display: block; margin-bottom: 6px; }
.colophon-grid a { border-bottom: 1px solid transparent; transition: border-color 0.15s ease; }
.colophon-grid a:hover { border-bottom-color: var(--paper); }
.colophon-foot {
  border-top: 1px solid #2a2a2c;
  margin-top: 36px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
@media (min-width: 880px) {
  .colophon-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}
