/* Gravy's palette, from azilnik/HeyGravy. The logo has #f1f1f1 strokes, so the site stays dark. */
:root {
  --bg: #222;
  --surface: #2c2c2c;
  --text: #f1f1f1;
  /* The old footer grey (#717171) is 3.6:1 on #222; this keeps the tone and clears 4.5:1. */
  --muted: #a3a3a3;
  --accent: #b999d6;
  /* Lighter on hover: on a dark page, darker reads as dimming, and #a77fcb is under 4.5:1 on the card. */
  --accent-hover: #cdb3e4;
  --rule: #3a3a3a;
  color-scheme: dark;

  /* Vertical rhythm: every line height is a multiple of 4px and every gap a multiple of 8px, and a
     heading sits closer to the text it introduces than to the section before it. */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-7: 56px;
  --space-10: 80px;

  /* A fluid modular scale on an 18px base: a minor third (1.2) at 320px rising to a major third (1.25)
     at 1240px, the Utopia model — headings get more contrast as the screen gets room for it.
     Steps used: 0 body and h3, 1 lede, 2 h2, 4 h1. */
  --step-1: clamp(21.60px, 21.29px + 0.098vw, 22.50px);
  --step-2: clamp(25.92px, 25.15px + 0.240vw, 28.12px);
  --step-4: clamp(37.32px, 35.02px + 0.720vw, 43.95px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/28px "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  /* Short pages (contact) keep the footer at the bottom of the window. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

main :is(p, ul, dl) { margin: 0 0 var(--space-2); }
main ul { padding-left: var(--space-3); }
main li + li { margin-top: var(--space-1); }
main > :last-child { margin-bottom: 0; }

h1, h2, .lede { text-wrap: balance; }
p { text-wrap: pretty; }

/* No underlines. Inside running text a link is lavender and heavier, so it doesn't rest on color
   alone (lavender on #f1f1f1 is under the 3:1 that color-only would need, WCAG 1.4.1). */
a { color: var(--accent); text-decoration: none; }
main a { font-weight: 700; }
a:hover { color: var(--accent-hover); }

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

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  /* Inline only: a class outranks `main`, so `padding: 0 16px` here silently zeroed main's block padding. */
  padding-inline: 16px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-3) 16px;
}

.brand { display: block; line-height: 0; }
.brand img { width: 160px; height: auto; }

.site-header nav ul,
.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 8px of block padding takes the links past the 24px target minimum (WCAG 2.5.8). */
.site-header nav a,
.site-footer nav a { display: inline-block; padding-block: 8px; }

.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--text); }
/* The current page is white among grey; weight stays the same, since bold Lato is wider and the row
   would shift from page to page. */
.site-footer nav a[aria-current="page"] { color: var(--text); }

main { padding-block: var(--space-4) var(--space-10); }

/* Line height tightens as type grows (body ~1.55, lede ~1.45, h2 ~1.25, h1 ~1.15) and snaps to the 4px grid. */
h1 {
  font-size: var(--step-4);
  line-height: round(1.15em, 4px);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}

h2 {
  font-size: var(--step-2);
  line-height: round(1.25em, 4px);
  font-weight: 700;
  margin: var(--space-7) 0 var(--space-1);
}

h3 {
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  margin: var(--space-4) 0 4px;
}
/* A question directly under its section heading doesn't need the full gap. */
h2 + h3 { margin-top: var(--space-2); }

.lede { font-size: var(--step-1); line-height: round(1.45em, 4px); margin: 0 0 var(--space-3); }
.meta { color: var(--muted); font-size: 15px; line-height: 24px; margin: 0 0 var(--space-3); }
/* A lede and the line that qualifies it read as one unit. */
.lede:has(+ .meta) { margin-bottom: var(--space-1); }
h1 + .meta { margin-top: calc(-1 * var(--space-1)); }

.card {
  background: var(--surface);
  border-radius: 12px;
  padding: var(--space-4);
  margin: var(--space-5) 0;
}
@media (max-width: 480px) {
  .card { padding: var(--space-3); }
}
.card h2 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.shots figure { margin: 0; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}
.shots figcaption { color: var(--muted); font-size: 15px; line-height: 24px; margin-top: var(--space-1); }

address { font-style: normal; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1) var(--space-3); }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
@media (max-width: 480px) {
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dt:not(:first-child) { margin-top: var(--space-2); }
}

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  /* Step −1 of the scale (18 / 1.2), the same size as the meta line. */
  font-size: 15px;
  line-height: 24px;
}
/* The border runs full width; the padding keeps the content in the same 640px column as main. */
.site-footer {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) max(16px, calc((100% - 608px) / 2)) var(--space-5);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; }
