:root {
  --ink: #1d2327;
  --muted: #5b6770;
  --brand: #5aa5f5;
  --link: #3b5fd9;
  --link-dark: #2842a8;
  --bar: #222;
  --bg: #e6e6e6;
  --paper: #fff;
  --line: #e2e2e2;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { overflow-y: scroll; } /* always reserve the scrollbar so pages don't shift sideways */
body { margin: 0; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-dark); text-decoration: underline; }

/* White column centered on a grey background. */
.page { max-width: 64rem; margin: 0 auto; background: var(--paper); min-height: 100vh; }
.site-header, main, .site-footer { padding-inline: 2rem; }

.site-header { padding-block: 1.5rem; }
.brand { color: var(--brand); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; line-height: 1.1; }
.brand:hover { color: var(--brand); text-decoration: none; }

.main-nav { background: var(--bar); display: flex; flex-wrap: wrap; padding-inline: 1rem; }
.main-nav a { color: #fff; font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .02em; padding: .9rem 1rem; background-color: transparent; transition: background-color 175ms ease; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: #3a3a3a; color: #fff; text-decoration: none; }

main { padding-block: 2rem 3rem; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; margin-top: 0; }
section { margin-block: 2.5rem; }
section:first-child { margin-top: 0; }

.hero h1 { margin-bottom: 1.5rem; }
.tagline { color: var(--muted); font-size: 1.15rem; margin-top: 0; }
.hero img.lead { display: block; width: 100%; }

.events, .posts { list-style: none; padding: 0; margin: 0; }
.event, .post-card { border-top: 1px solid var(--line); padding-block: 1rem; }
.event:first-child, .post-card:first-child { border-top: 0; }
.event h3, .post-card h3 { margin: .15rem 0; font-size: 1.1rem; }
.event p, .post-card p { margin: .25rem 0; }
time, .meta, .location { color: var(--muted); font-size: .92rem; }
.empty { color: var(--muted); font-style: italic; }

/* The human-readable sitemap: every page and post as one plain list (see sitemapPage in templates.mjs). */
.sitemap { list-style: none; padding: 0; margin: 0; }
.sitemap li { padding-block: .15rem; }
.sitemap li time { margin-right: .5rem; }

.prose { max-width: 46rem; }
.prose img.lead { display: block; margin-block: 1rem; }
.prose p img { max-height: 28rem; width: auto; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2rem; }

/* A paragraph that is only a bold link (see build.mjs) renders as a button, e.g. the donate link. */
.button-row { margin-block: 1.5rem; }
.button { display: inline-block; background: var(--link); color: #fff; font-weight: 700; padding: .75rem 1.75rem; border-radius: .3rem; }
.button:hover { background: var(--link-dark); color: #fff; text-decoration: none; }

/* Embedded videos (see videoEmbedSrc in build.mjs). */
.embed { background: #eee; padding: 1.25rem; margin-block: 1rem; }
.embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* Home: a video at the top of the body sits beside the text, like the old site. */
.home-body { max-width: none; }
@media (min-width: 48rem) {
  .home-body:has(> .embed:first-child) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; align-items: start; }
  .home-body:has(> .embed:first-child) > .embed { grid-row: 1 / span 20; margin-top: 0; }
  .home-body:has(> .embed:first-child) > :not(.embed) { grid-column: 2; }
  .home-body:has(> .embed:first-child) > :nth-child(2) { margin-top: 0; }
}

/* "Back to top" link at the end of every page (see layout in templates.mjs). */
.back-to-top { margin-top: 2.5rem; font-size: .9rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding-block: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.25rem; }
/* Social icon buttons (see SOCIAL in templates.mjs): inline SVG brand marks, each one filled with
   its network's own colour (the colour is set inline on the link, so `currentColor` is the brand). */
.social { display: flex; list-style: none; margin: 0; padding: 0; gap: .75rem; }
.social a { display: block; transition: filter 150ms ease, transform 150ms ease; }
.social a:hover { text-decoration: none; filter: brightness(.85); transform: translateY(-1px); }
.social svg { display: block; width: 1.5rem; height: 1.5rem; fill: currentColor; }
.site-footer p { margin: 0; }
