@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* Roboto Serif (OFL), trimmed to display sizes and weights 400-600. Name and home headings only. */
@font-face {
  font-family: "Roboto Serif Display";
  src: url("/assets/fonts/roboto-serif-display.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f7f6;
  --ink: #1b2a33;
  --muted: #5a6a72;
  --lake: #2c6577;
  --lake-hover: #1d4a58;
  --rule: #d3dcdc;
  --wash: #e8eeed;
  --measure: 36rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12191d;
    --ink: #e2e9eb;
    --muted: #93a3aa;
    --lake: #84bccb;
    --lake-hover: #a9d3de;
    --rule: #2a373d;
    --wash: #1a2328;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Literata", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.7;
  font-optical-sizing: auto;
}

.wrap {
  max-width: calc(var(--measure) + 2rem);
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--lake); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--lake-hover); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--lake); outline-offset: 3px; border-radius: 2px; }

/* Site header (archive pages) */
.site-head {
  padding: 2rem 0 0;
  font-size: 1rem;
}
.site-head a { color: var(--muted); text-decoration: none; }
.site-head a:hover { color: var(--ink); text-decoration: underline; }
.site-head nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-head .home-link { color: var(--ink); font-weight: 600; margin-right: auto; }

/* Home: a dark "stage" page, whatever the colour scheme */
.home-page {
  --stage: #0b0b0c;
  --ivory: #ece6da;
  --dim: #a7a094;
  --brass: #c9a560;
  --mallet: #86a8e6;
  background: var(--stage);
  color: var(--ivory);
  color-scheme: dark;
}
.home-page a { color: var(--ivory); text-decoration-color: var(--brass); }
.home-page a:hover { color: #fff; }
.home-page a:focus-visible { outline-color: var(--brass); }
.label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.stage { position: relative; }
.stage-photo img {
  display: block;
  width: 100%;
  height: min(94vh, 70vw);
  min-height: 30rem;
  object-fit: cover;
  object-position: 62% 30%;
}
.stage::after { /* fade the photo into the page */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, var(--stage));
  pointer-events: none;
}
.stage-text {
  position: absolute;
  z-index: 1;
  left: clamp(1.25rem, 5vw, 5rem);
  top: 50%;
  transform: translateY(-62%);
  max-width: min(36vw, 34rem);
}
.stage-text h1, .practice h2 {
  font-family: "Roboto Serif Display", Georgia, "Times New Roman", serif;
}
.stage-text h1 {
  font-size: clamp(3.5rem, 6.4vw, 7.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
  font-variation-settings: "opsz" 144;
}
.stage-text h1 span { display: block; }
.stage-text .lede {
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.5;
  color: var(--dim);
  margin: 0;
  max-width: 23rem;
  text-wrap: balance;
  border-top: 1px solid var(--brass);
  padding-top: 1rem;
}

.practices {
  max-width: 66rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6.5rem) 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}
.practices-rule { background: linear-gradient(to bottom, var(--mallet), var(--brass)); opacity: 0.5; }
.practice-photo { margin: 0 0 1.75rem; }
.practice-photo img {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--stage), 0 0 0 2px currentColor;
}
.practice-day .practice-photo img { color: var(--mallet); }
.practice-night .practice-photo img { color: var(--brass); }
.practice-day .label { color: var(--mallet); }
.practice-night .label { color: var(--brass); }
.practice h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-variation-settings: "opsz" 48;
}
.practice p:last-child { margin: 0; color: var(--dim); max-width: 27rem; }

.section-view { margin: 0; }
.section-view ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}
.section-view img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.section-view figcaption {
  text-align: center;
  font-style: italic;
  color: var(--dim);
  font-size: 0.95rem;
  padding: 1rem 1.5rem 0;
}

.home-close {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem 2rem;
  text-align: center;
}
.home-close p { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; margin: 0 0 2rem; text-wrap: balance; }
.home-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.home-links a { text-decoration-thickness: 1px; text-underline-offset: 0.35em; }
.home-links a:hover { text-decoration-thickness: 2px; }
.home-page .site-foot { border-top: 0; margin-top: 0; text-align: center; color: var(--dim); font-size: 0.85rem; }

@media (max-width: 40rem) {
  .stage-photo img { height: auto; min-height: 0; aspect-ratio: 900 / 1106; object-position: 50% 0; }
  .stage::after { height: 45%; }
  .stage-photo img { aspect-ratio: 900 / 960; }
  .stage-text { position: relative; left: auto; top: auto; transform: none; max-width: none; margin: -3rem 1.25rem 0; }
  .home-links { gap: 0.75rem 1.5rem; }
  .stage-text h1 { font-size: clamp(3rem, 15vw, 4.5rem); margin-bottom: 1rem; text-shadow: 0 2px 18px rgba(0,0,0,0.7); }
  .stage-text .lede { color: var(--ivory); }
  .practices { grid-template-columns: 1fr; gap: 3rem; }
  .practices-rule { height: 1px; background: linear-gradient(to right, var(--mallet), var(--brass)); }
  .practice-photo img { width: 6rem; height: 6rem; }
  .section-view ul { grid-template-columns: 1fr; }
}

/* Lists of posts */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 0.55rem 0; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline; }
.post-list li + li { border-top: 1px solid var(--rule); }
.post-list time { color: var(--muted); font-size: 0.95rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-list a { text-decoration: none; }
.post-list a:hover { text-decoration: underline; }

.year-group { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.year-group h2 { font-size: 1.35rem; font-weight: 300; margin: 0.35rem 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Article */
.page-title { padding: 3.5rem 0 0; }
.page-title h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0 0 0.75rem;
  font-variation-settings: "opsz" 48;
  text-wrap: balance;
}
.dateline { color: var(--muted); font-size: 1rem; margin: 0; }
.archive-note {
  margin: 1.75rem 0 2rem;
  padding: 0.85rem 1rem;
  background: var(--wash);
  border-left: 3px solid var(--lake);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}
.archive-note p { margin: 0; }

.prose { padding-bottom: 2rem; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure { margin: 0 0 1.25rem; }
.prose h2, .prose h3 { line-height: 1.25; margin: 2.25rem 0 0.75rem; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.prose li + li { margin-top: 0.3rem; }
.prose ul ul, .prose ol ul { margin: 0.3rem 0 0; }
.prose blockquote {
  margin-left: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  font-style: italic;
}
.prose blockquote blockquote { font-style: normal; }
.prose img { max-width: 100%; height: auto; border-radius: 2px; }
.prose .alignright { float: right; margin: 0.3rem 0 1rem 1.25rem; max-width: 45%; }
.prose .alignleft { float: left; margin: 0.3rem 1.25rem 1rem 0; max-width: 45%; }
.prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose .gallery-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; clear: both; }
.prose .gallery-row a { display: block; }
.prose .gallery-row img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.prose .clear { clear: both; }
.prose audio { width: 100%; margin: 0 0 1.25rem; }
.prose .embed { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.25rem; }
.prose .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .embed-audio iframe { width: 100%; border: 0; }
.prose del { color: var(--muted); }
.prose small, .prose .small { font-size: 0.875rem; }
.featured { float: right; width: min(40%, 15rem); margin: 0.3rem 0 1rem 1.5rem; }
.featured img { width: 100%; height: auto; border-radius: 2px; display: block; }

.comments { clear: both; border-top: 1px solid var(--rule); padding: 2rem 0; }
.comments h2 { font-size: 1.2rem; font-weight: 600; margin: 0 0 1.25rem; }
.comment { margin: 0 0 1.75rem; }
.comment-head { margin: 0 0 0.35rem; font-size: 1rem; }
.comment-head strong { font-weight: 600; }
.comment-head time { color: var(--muted); margin-left: 0.5rem; }
.comment-body { font-size: 1.05rem; }
.comment-body p { margin: 0 0 0.75rem; }

.site-foot {
  clear: both;
  border-top: 1px solid var(--rule);
  margin-top: 1rem;
  padding: 1.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-foot a { color: var(--muted); }

@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  .featured, .prose .alignright, .prose .alignleft { float: none; width: auto; max-width: 100%; margin: 0 0 1.25rem; }
  .featured img { max-width: 16rem; }
  .year-group { grid-template-columns: 1fr; }
  .year-group h2 { margin-bottom: 0.25rem; }
  .post-list li { grid-template-columns: 1fr; gap: 0; }
  .prose .gallery-row { grid-template-columns: repeat(2, 1fr); }
}
