/* Colours and fonts live here, so the look can be changed in one place. */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #1f1d1a;
  --muted: #6b655c;
  --line: #e6e0d6;
  --accent: #8a3b2a;
  --accent-text: #ffffff;
  --cover: #e9e1d3;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --surface: #211e1b;
    --text: #efeae2;
    --muted: #a39b8f;
    --line: #34302b;
    --accent: #e08a6f;
    --accent-text: #171513;
    --cover: #2c2824;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
main { padding-bottom: 64px; }
main > .wrap:first-child { padding-top: 48px; }

.meta { color: var(--muted); font-size: .9rem; margin: 0 0 .25em; }
.meta a { color: inherit; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.back { margin-top: 48px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--text); text-decoration: none; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 640px) {
  .header-inner { position: relative; }
  .nav-toggle-label { display: block; width: 28px; height: 20px; position: relative; cursor: pointer; }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    position: absolute; left: 0; width: 28px; height: 2px; background: var(--text); content: "";
  }
  .nav-toggle-label span { top: 9px; }
  .nav-toggle-label span::before { top: -8px; }
  .nav-toggle-label span::after { top: 8px; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; z-index: 10;
    flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .site-nav a { padding: 14px 20px; border-top: 1px solid var(--line); }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* Buttons */
.button {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text);
  font-weight: 600; text-decoration: none; border: 1px solid var(--accent);
}
.button:hover { opacity: .9; }
.button-ghost { background: transparent; color: var(--accent); }
.button-disabled { background: transparent; color: var(--muted); border-color: var(--line); }

/* Home */
.hero { padding: 88px 0 72px; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 14em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.section { padding-top: 64px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head a { white-space: nowrap; }

.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; }
.callout p { color: var(--muted); }

/* Posts */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.post-grid .post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.post-list .post-card { padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-card h3 { margin: .2em 0 .4em; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p:last-child { margin-bottom: 0; color: var(--muted); }

.post-header { margin-bottom: 32px; }
.byline { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 500; }
.prose { font-size: 1.1rem; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.2em; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 1em; color: var(--muted); font-style: italic; }

/* Members */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-lg { width: 120px; height: 120px; }
.avatar-initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--cover); color: var(--accent); font-family: var(--font-display); font-weight: 600;
}
.avatar-lg.avatar-initials { font-size: 2.4rem; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; margin-top: 24px; }
.member-card {
  display: block; padding: 28px 24px; text-align: center; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.member-card:hover { border-color: var(--accent); }
.member-card .avatar { width: 96px; height: 96px; margin: 0 auto 16px; font-size: 2rem; }
.member-card p { color: var(--muted); margin: 0; font-size: .95rem; }

.member-header { display: flex; align-items: center; gap: 28px; margin-bottom: 32px; }
.member-header h1 { margin-bottom: .2em; }
.tagline { color: var(--muted); margin: 0 0 .5em; font-size: 1.1rem; }
.links { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; }
@media (max-width: 640px) { .member-header { flex-direction: column; align-items: flex-start; } }

.featured-list { list-style: none; padding: 0; margin: 0; }
.featured-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.featured-list a { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.featured-list p { margin: .3em 0 0; color: var(--muted); }

/* Books */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px; margin-top: 24px; }
.book-card .cover { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.book-card .cover-placeholder { display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--cover); text-align: center; font-family: var(--font-display); font-size: 1.3rem; }
.book-card h3 { margin-bottom: .2em; }
.book-card p { font-size: .95rem; }
.book-card .button { margin-top: 4px; font-size: .9rem; padding: 8px 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }
@media (max-width: 640px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .book-card .cover-placeholder { font-size: 1rem; }
}
