/* Page frame: base type, header, footer, section rhythm. */

:root {
  --wrap: 70rem;
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --inset: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  --section: clamp(3rem, 7vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--body);
  color: var(--night);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font: italic 900 clamp(3.4rem, 10.5vw, 9rem)/0.9 var(--display); letter-spacing: -0.02em; }
h2, .h2 { font-size: clamp(2.1rem, 4.8vw, 3.4rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 60ch; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }

/* a finger-drag of paint under each section heading */
.block h2::after {
  content: "";
  display: block;
  width: 5.5rem; height: 0.7rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: var(--smear, var(--ember));
  transform: rotate(-2deg);
}
.block:nth-of-type(3n) { --smear: var(--sea); }
.block:nth-of-type(3n+1) { --smear: var(--ochre); }

.skip { position: absolute; left: -999px; top: 0; background: var(--night); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.btn {
  display: inline-block;
  font: 700 1.05rem/1 var(--body);
  text-decoration: none;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  border: 3px solid var(--night);
}
.btn-give { background: var(--night); border-color: var(--night); color: #fff; }
.btn-give:hover { background: var(--crimson); border-color: var(--crimson); }
.btn-plain { background: transparent; color: var(--night); }
.btn-plain:hover { background: var(--ochre); }

/* Header */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem var(--inset);
}
.brand { text-decoration: none; color: var(--night); font: 800 1.45rem/1 var(--display); }
.brand span { display: inline-block; width: 0.85em; height: 0.85em; margin-right: 0.45rem; border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%; background: var(--ember); vertical-align: -0.06em; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.4rem; }
.top nav a:not(.btn) { color: var(--night); font-weight: 600; text-decoration: none; }
.top nav a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--ember); text-decoration-thickness: 3px; }
.top .btn { padding: 0.7rem 1.1rem; border-width: 2px; }

/* Every block except the hero shares this rhythm. */
.block { padding: var(--section) var(--inset); }
.block.joined { padding-top: 0; }
.block.wash { background: var(--sea); color: #fff; }
.block.wash h2::after { background: var(--ochre); }

/* Footer */
.foot { background: var(--night); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) var(--inset); }
.closing { font: italic 900 clamp(2.4rem, 7vw, 4.75rem)/1 var(--display); color: var(--ochre); max-width: none; margin: 0 0 1.5rem; }
.foot a { color: #fff; font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 0 0 1.5rem; max-width: none; }
.legal, .legal-links, .credit { font-size: 0.9rem; margin: 0.5rem 0 0; max-width: none; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; }
.legal, .credit { opacity: 0.85; }

@media (max-width: 40rem) {
  .top nav a:not(.btn) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
