/* ─── Base: reset, type (heavy wide grotesk), layout primitives, square
   buttons, tags ──────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  /* Themed page scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--paper-2);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--paper-2); }
  ::-webkit-scrollbar-thumb { background: var(--ink); border: 2px solid var(--paper-2); }
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 500;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -.035em;
  line-height: .95;
}
h1 em, h2 em { font-style: normal; font-weight: 800; color: var(--accent); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }

.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--mark);
  padding: 3px 8px;
  margin-bottom: 14px;
}

.lede {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 640px;
}

section { position: relative; }

.sec-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 40px;
  align-items: end;
  margin-bottom: 44px;
}
.sec-head .kicker { grid-column: 1 / -1; margin: 0; }
.sec-head p { max-width: 420px; color: var(--muted); font-size: .98rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  font-weight: 700;
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-color); }
.btn.sm { padding: 9px 16px; font-size: .84rem; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: wait; }

/* Tag + meta */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--ink-2);
}
.tag { font-weight: 700; }
.tag::before { content: ""; width: 12px; height: 12px; background: var(--c, var(--accent)); }
.tag:hover { color: var(--c, var(--accent)); }

.meta {
  display: block;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--muted);
  margin-top: 12px;
}

/* Reveal on scroll (only when JS runs) */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
}

@media (max-width: 991.98px) {
  .sec-head { grid-template-columns: minmax(0, 1fr); }
}
