:root {
  color-scheme: light dark;
  --bg: #F1EFEA;
  --ink: #141311;
  --muted: #6E6B64;
  --rule: #DDD8CD;
  --gold: #B8872E; /* decoration only: too faint for text on the light background */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --ink: #FFFFFF;
    --muted: #A3A097;
    --rule: #2A2825;
  }
}

@font-face {
  font-family: Marcellus;
  src: url(/fonts/Marcellus-Regular.ttf) format("truetype");
  font-display: swap;
}

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

body {
  margin: 0;
  padding: 0 16px;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

header, main, footer {
  max-width: 38rem;
  margin: 0 auto;
}

header {
  padding-top: clamp(3rem, 10vh, 6rem);
}

/* The lockup is never narrower than 240 px (brand/README.md). */
header img {
  display: block;
  width: clamp(240px, 64vw, 360px);
  height: auto;
}

main {
  padding: 2.5rem 0;
}

h1, h2 {
  font-family: Marcellus, Georgia, serif;
  font-weight: 400;
  line-height: 1.25;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* The analytics switch in the footer looks like a link. */
button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

button:hover {
  text-decoration-thickness: 2px;
}

footer {
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0;
}
