/* ─── Reset & Base ──────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: background var(--dur) ease, color var(--dur) ease;
}

main { flex: 1; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img { height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

ul, ol { list-style: none; }

::selection { background: var(--gold); color: var(--text-inv); }

/* ─── Layout Utilities ──────────────────────────────────────── */
.wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ─── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); }
h3 { font-size: clamp(1rem, 1.8vw, 1.3rem); }
h4 { font-size: 1rem; letter-spacing: 0; }

p { color: var(--text-2); }

small {
  font-size: .78rem;
  color: var(--text-3);
}

time {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-3);
  letter-spacing: .02em;
}

/* ─── Visually hidden ───────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ─── Page padding ──────────────────────────────────────────── */
.page-body {
  padding-top: var(--nav-h);
  flex: 1;
}
