/* St Michael's site styles: one file, built from styles.css, home-v1.css, home-v2.css, chosen-type.css and nav.css (5 Nov 2026) */
/* St Michael and All Angels, Penkridge
   Layout: one left edge runs down every page; photographs break out to the
   right or full width and link one section to the next. The crimson giving
   band is the one loud moment on the home page.
   Colours come from the building: the crimson nave carpet, limewashed walls,
   worn stone, black and white. No gold anywhere: text is red, black or white. */

:root {
  --paper: #ffffff;
  --stone: #ebe8e2;
  --stone-line: #d9d3c9;
  --ink: #141416;
  --ink-soft: #55555b;
  --crimson: #7a2428;
  --crimson-deep: #7a2428;
  --red: #7a2428;
  --band: #6c272c;
  --black: #111113;

  --display: "Castoro Titling", "Trajan Pro", "Times New Roman", serif;
  --script: "Castoro", "Iowan Old Style", Georgia, serif;
  --body: "Josefin Sans", "Futura", "Century Gothic", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.75rem);
  --step-4: clamp(2.6rem, 6vw, 4.25rem);

  --edge: clamp(1rem, 4vw, 5rem);
  --measure: 36rem;
  --space: clamp(3.5rem, 8vw, 6.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--crimson);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--crimson-deep);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}

h2 {
  font-size: var(--step-3);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

p {
  margin: 0 0 1rem;
}

address {
  font-style: normal;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  left: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border-radius: 2px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--crimson);
  color: var(--paper);
  border: 2px solid var(--crimson);
}

.btn:hover {
  background: var(--crimson-deep);
  border-color: var(--crimson-deep);
  color: var(--paper);
}

.btn-quiet {
  background: transparent;
  color: var(--crimson);
}

.btn-quiet:hover {
  background: var(--crimson);
  color: var(--paper);
}

.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.btn-light:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.btn-line-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-line-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.text-link {
  font-weight: 400;
}

/* Masthead: one slim line */
.masthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
  column-gap: 1.75rem;
  row-gap: 0;
  padding: 1rem var(--edge);
  border-bottom: 1px solid var(--stone-line);
  background: var(--paper);
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark-name {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wordmark-place {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.35rem 0.75rem;
  min-width: 0;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(0.62rem, 0.5rem + 0.35vw, 0.86rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--crimson);
  border-bottom-color: var(--stone-line);
}

.nav a[aria-current="page"] {
  color: var(--crimson);
  border-bottom-color: var(--crimson);
}

.masthead .btn {
  min-height: 2.6rem;
  padding: 0.45rem 1.1rem;
}

@media (max-width: 1280px) {
  .masthead {
    column-gap: 1rem;
  }

  .wordmark-name {
    font-size: clamp(0.78rem, 0.65rem + 0.5vw, 1rem);
    letter-spacing: 0.04em;
  }
}

@media (max-width: 900px) {
  .masthead {
    column-gap: 0.5rem;
    padding-inline: 0.75rem;
  }

  .wordmark-name {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
  }

  .wordmark-place {
    display: none;
  }

  .nav {
    gap: 0.25rem 0.35rem;
  }

  .nav a {
    letter-spacing: 0.03em;
  }
}

@media (max-width: 760px) {
  .wordmark-name {
    font-size: 0.68rem;
  }

  .nav {
    gap: 0.15rem 0.2rem;
  }

  .nav a {
    font-size: 0.58rem;
    letter-spacing: 0.02em;
  }

  .nav a[data-nav="donate"] {
    padding: calc(0.45rem + 0.12em) 0.65rem calc(0.45rem - 0.12em) calc(0.65rem + 0.05em);
  }
}

/* Shared section rhythm */
.band {
  padding: var(--space) var(--edge);
}

.band-stone {
  background: var(--stone);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.prose {
  max-width: var(--measure);
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Home: opening */
.opening {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--paper);
}

.opening-text {
  padding: clamp(2.5rem, 6vw, 5rem) var(--edge) clamp(2.5rem, 5vw, 4rem);
}

.opening h1 {
  margin-bottom: 1.25rem;
  max-width: 12ch;
}

.opening .lede {
  margin-bottom: 1.5rem;
}

.sunday-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  padding: 1rem 0;
  border-top: 1px solid var(--stone-line);
  border-bottom: 1px solid var(--stone-line);
  max-width: var(--measure);
}

.sunday-time {
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--crimson);
}

.sunday-what {
  font-weight: 400;
}

.sunday-next {
  flex-basis: 100%;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.opening-photo {
  margin: 0;
  min-height: 22rem;
}

.opening-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

@media (min-width: 900px) {
  .opening {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 34rem;
  }

  .opening-text {
    padding-right: 3rem;
    align-self: center;
  }
}

/* Home: at a glance */
.glance {
  display: grid;
  gap: 1.25rem 2rem;
  padding: 1.75rem var(--edge);
  background: var(--stone);
}

.glance h2 {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--crimson);
  margin-bottom: 0.25rem;
}

.glance p {
  margin: 0;
}

@media (min-width: 760px) {
  .glance {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .glance > div + div {
    border-left: 1px solid var(--stone-line);
    padding-left: 2rem;
  }
}

/* Home: life events */
.occasions {
  padding-top: var(--space);
}

@media (min-width: 900px) {
  .occasions {
    padding-top: calc(var(--space) + 3rem);
  }
}

.occasions-grid {
  display: grid;
  gap: 1.5rem 2.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 760px) {
  .occasions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.occasions-grid > div {
  padding-top: 1rem;
  border-top: 1px solid var(--stone-line);
}

.occasions-grid p {
  margin: 0;
  color: var(--ink-soft);
}

.occasions-contact {
  margin-top: 1.75rem;
}

/* Gravefindr band: a main feature, kept to one band */

/* Coming up */
.coming-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  max-width: 44rem;
}

.coming-list li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--stone-line);
}

.coming-list li:first-child {
  border-top: 1px solid var(--stone-line);
}

.coming-date {
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.coming-day {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--crimson);
  margin-right: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.coming-more {
  margin-top: 1.25rem;
}

@media (max-width: 480px) {
  .coming-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }
}

/* History, leading into giving */

/* Giving: everything in one centred box on white, lifted by six stacked shadows */
:root { --shadow-6: 0 1px 1px rgba(20, 20, 22, .07), 0 2px 2px rgba(20, 20, 22, .07), 0 4px 4px rgba(20, 20, 22, .07), 0 8px 8px rgba(20, 20, 22, .07), 0 16px 16px rgba(20, 20, 22, .07), 0 32px 32px rgba(20, 20, 22, .07); }
.give { padding: clamp(3rem, 6vw, 5rem) var(--edge); background: #fff; }
.give-box {
  max-width: 44rem; margin: 0 auto; overflow: hidden; border-radius: 8px; color: #fff; background: var(--black); text-align: center;
  box-shadow: var(--shadow-6);
}
.give-photo { margin: 0; aspect-ratio: 16 / 7; }
.give-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.give-text { display: grid; justify-items: center; padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 4vw, 3rem); }
.give h2 { max-width: 16ch; margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3rem); }
.give .actions { justify-content: center; gap: 1rem; }
.give .btn-square { min-width: 12rem; min-height: 3.4rem; padding: .75rem 1.75rem; font-size: 1rem; }
@media (max-width: 480px) { .give .actions { display: grid; justify-content: stretch; width: 100%; } }

.give-charity { margin: 1.25rem 0 0; font-size: var(--step--1); color: rgba(255, 255, 255, .65); }
.give h2 { color: #fff; }
.give :focus-visible, .give .btn-give:focus-visible { outline-color: #fff; }

/* Visit */
.visit {
  display: grid;
  gap: 2.5rem;
}

.visit h3 {
  margin-top: 1.75rem;
}

.visit address {
  margin-bottom: 0.75rem;
}

.visit-map iframe,
.visit-map .map-fallback {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 22rem;
  border: 0;
  background: var(--stone);
}

@media (min-width: 900px) {
  .visit {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem;
  }
}

/* Footer: black, quiet and clean, with every photo credit in the base line */
.footer { padding: clamp(3rem, 6vw, 4.5rem) var(--edge) 2rem; color: rgba(255, 255, 255, .78); background: var(--black); font-size: .95rem; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-cols { display: grid; gap: 2.25rem; max-width: 76rem; margin: 0 auto; }
footer.footer h2 { margin: 0 0 .9rem; font-size: .95rem; letter-spacing: .08em; color: var(--brass-soft); }
.footer p, .footer address { margin: 0 0 .45rem; font-style: normal; }
.footer ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 2rem; }
.footer li { margin-bottom: .45rem; break-inside: avoid; }
.footer-base { max-width: 76rem; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .55); font-size: var(--step--1); }
.footer-base p { margin: 0 0 .3rem; }
.footer-base a { color: rgba(255, 255, 255, .85); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: .2em; }
@media (min-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr 1.4fr; } }

/* Inner pages */
.page-head {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--edge) clamp(1.5rem, 3vw, 2.5rem);
}

.page-head h1 {
  margin-bottom: 1rem;
}

.page-head .lede {
  margin: 0;
}

/* Churchyard page */
.finder {
  padding: 0 var(--edge) var(--space);
}

.gravefindr-embed {
  --gravefindr-h: 520px;
  height: var(--gravefindr-h);
  border: 1px solid var(--stone-line);
  background: var(--paper);
  overflow: hidden;
}

.gravefindr-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.finder-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 1rem;
}

.finder-meta p {
  margin: 0;
  max-width: 40rem;
}

.care {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: center;
}

.care p {
  margin: 0;
  max-width: 38rem;
}

@media (min-width: 760px) {
  .care {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* What's on */
.weekly {
  display: grid;
  gap: 1.25rem 2rem;
  margin-top: 1.5rem;
}

.weekly > div {
  padding-top: 1rem;
  border-top: 1px solid var(--stone-line);
}

.weekly p {
  margin: 0;
  color: var(--ink-soft);
}

@media (min-width: 760px) {
  .weekly {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.year {
  display: grid;
  gap: 0 3rem;
  margin-top: 1.5rem;
}

.year-month {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--stone-line);
}

.year-month h3 {
  font-size: 1.05rem;
  color: var(--crimson);
}

.year-month ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.year-month li + li {
  margin-top: 0.4rem;
}

.year-month time {
  font-weight: 400;
}

@media (min-width: 900px) {
  .year {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .year-month {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }
}

/* History and photos */
.history-page {
  display: grid;
  gap: 2rem 4rem;
  padding-top: 0;
}

.history-page .prose p {
  font-size: 1.1rem;
}

.history-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  align-content: start;
}

.history-facts li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--stone-line);
}

.history-facts strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--crimson);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 900px) {
  .history-page {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

.gallery-section {
  padding-top: 0;
}

.gallery-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gallery-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gallery-filter {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.4rem 0.85rem;
  border-radius: 2px;
  border: 1px solid var(--stone-line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.gallery-filter:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.gallery-filter.is-active {
  background: var(--crimson);
  border-color: var(--crimson);
  color: var(--paper);
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 1;
  column-gap: 1rem;
}

@media (min-width: 600px) {
  .gallery {
    columns: 2;
  }
}

@media (min-width: 1000px) {
  .gallery {
    columns: 3;
  }
}

.gallery-cell {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.gallery-item {
  margin: 0;
}

.gallery-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--stone);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: auto;
}

.gallery-item figcaption {
  padding: 0.45rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.gallery-error {
  padding: 2rem 0;
  color: var(--ink-soft);
}

.lightbox {
  padding: 0;
  border: none;
  max-width: min(96vw, 1100px);
  width: 100%;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(17, 17, 19, 0.9);
}

.lightbox-figure {
  margin: 0;
  background: var(--ink);
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  background: #0b0b0c;
}

.lightbox figcaption {
  padding: 0.85rem 1rem;
  color: #e4e4e7;
}

.lightbox-close {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
}

.welcome-dialog {
  padding: 0;
  border: none;
  border-radius: 2px;
  max-width: min(92vw, 30rem);
  width: 100%;
  background: var(--paper);
  box-shadow: 0 1.5rem 4rem rgba(17, 17, 19, 0.35);
}

.welcome-dialog::backdrop {
  background: rgba(17, 17, 19, 0.6);
}

.welcome-body {
  padding: 2.5rem 2rem 2rem;
}

.welcome-body .actions .btn-square {
  flex: 1;
}

/* Square, bordered buttons: a bordered alternative to the pill .btn family.
   -fill/-ghost are for light (paper/stone) backgrounds; -light/-light-ghost
   are for dark backgrounds (the crimson give/monthly bands). */
.btn-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 2px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.btn-square-fill {
  border: 2px solid var(--crimson);
  background: var(--crimson);
  color: var(--paper);
}

.btn-square-fill:hover,
.btn-square-fill:focus-visible {
  background: var(--crimson-deep);
  border-color: var(--crimson-deep);
  color: var(--paper);
}

.btn-square-ghost {
  border: 2px solid var(--crimson);
  background: transparent;
  color: var(--crimson);
}

.btn-square-ghost:hover,
.btn-square-ghost:focus-visible {
  background: var(--crimson);
  color: var(--paper);
}

.btn-square-light {
  border: 2px solid #fff;
  background: #fff;
  color: var(--btn-ink);
}

.btn-square-light:hover,
.btn-square-light:focus-visible {
  background: transparent;
  color: #fff;
}

.btn-square-light-ghost {
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
}

.btn-square-light-ghost:hover,
.btn-square-light-ghost:focus-visible {
  background: #fff;
  color: var(--btn-ink);
}

.welcome-where {
  color: var(--ink-soft);
}

.welcome-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  color: var(--ink-soft);
}

.welcome-close:hover {
  background: var(--stone);
  color: var(--ink);
}

/* Donate page */
.donate-main {
  display: grid;
  gap: 2.5rem 4rem;
  padding-top: 0;
  align-items: start;
}

.monthly {
  background: var(--crimson);
  color: #fff;
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.monthly h2 {
  color: var(--paper);
  font-size: var(--step-3);
}

.monthly .btn {
  margin-top: 0.5rem;
}

.monthly .small {
  color: #fff;
  opacity: 0.85;
  margin: 1rem 0 0;
}

@media (min-width: 900px) {
  .donate-main {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }
}

.ways {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  max-width: 50rem;
}

.ways li {
  display: grid;
  gap: 0.35rem 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--stone-line);
}

.ways li:last-child {
  border-bottom: 1px solid var(--stone-line);
}

.ways p {
  margin: 0;
  color: var(--ink-soft);
}

@media (min-width: 760px) {
  .ways li {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
}

.impact {
  margin: 0;
  padding-left: 1.2rem;
  max-width: var(--measure);
}

.impact li {
  margin-bottom: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Script line for the welcome, used once per page at most */
.script {
  display: block;
  font-family: var(--script);
  font-style: italic;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  line-height: 1;
  color: var(--crimson);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0.6rem;
  padding-left: 0.12em;
}

/* Small red labels above headings */
.kicker {
  display: block;
  padding-left: 0;
  margin-bottom: 0.45rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--crimson);
}

.subhead {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson);
  margin: -0.4rem 0 1.25rem;
}

/* Age counter */
.counter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, auto));
  justify-content: start;
  gap: 0 clamp(1rem, 3vw, 2.5rem);
  margin: 0.5rem 0 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--stone-line);
  border-bottom: 1px solid var(--stone-line);
}

.counter div {
  display: flex;
  flex-direction: column;
}

.counter strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--crimson);
  font-variant-numeric: tabular-nums;
}

.counter div > span {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

@media (max-width: 520px) {
  .counter {
    grid-template-columns: repeat(3, minmax(0, auto));
    row-gap: 1rem;
  }
}

/* Gallery carousel */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
  overscroll-behavior-x: contain;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track .gallery-cell {
  flex: 0 0 auto;
  width: min(86%, 46rem);
  scroll-snap-align: start;
  margin: 0;
}

.carousel-track .gallery-thumb {
  height: clamp(16rem, 52vw, 32rem);
  overflow: hidden;
}

.carousel-track .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.carousel-btn {
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--crimson);
  border-radius: 2px;
  background: var(--paper);
  color: var(--crimson);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-btn:hover {
  background: var(--crimson);
  color: var(--paper);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
  background: var(--paper);
  color: var(--crimson);
}

.carousel-pos {
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* Full-screen hero: the church fills the first screen */
:root {
  --mast-h: 4.9rem;
}

@media (max-width: 900px) {
  :root {
    --mast-h: 7.9rem;
  }
}

.hero-full {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - var(--mast-h));
  min-height: calc(100svh - var(--mast-h));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--paper);
  background: var(--ink);
}

.hero-full > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  z-index: -2;
}

.hero-full::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(17, 17, 19, 0.9) 0%, rgba(17, 17, 19, 0.55) 30%, rgba(17, 17, 19, 0.08) 62%, rgba(17, 17, 19, 0) 100%),
    linear-gradient(to right, rgba(17, 17, 19, 0.35) 0%, rgba(17, 17, 19, 0) 55%);
}

.hero-copy {
  padding: 3rem var(--edge) 1.75rem;
}

.hero-full .script {
  color: #fff;
}

.hero-full h1 {
  font-size: clamp(2.8rem, 7.5vw, 6rem);
  line-height: 0.98;
  max-width: 15ch;
  text-shadow: 0 2px 30px rgba(17, 17, 19, 0.35);
  margin-bottom: 0.9rem;
}

.hero-full .lede {
  color: #f2f2f4;
  margin: 0;
  max-width: 34rem;
}

@media (max-width: 760px) {
  .hero-copy {
    padding-top: 2rem;
    padding-bottom: 1.25rem;
  }

  .hero-full .lede {
    font-size: 1.05rem;
  }
}

/* Stained glass: real lights from the east window and the aisle chapel,
   set in pointed lancet frames */
.lancets {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.4rem, 1.2vw, 0.9rem);
}

.lancet {
  margin: 0;
  flex: 0 1 6.5rem;
  aspect-ratio: 1 / 4.2;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 420' preserveAspectRatio='none'%3E%3Cpath d='M0 420V70C0 36 22 12 50 0C78 12 100 36 100 70V420Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 420' preserveAspectRatio='none'%3E%3Cpath d='M0 420V70C0 36 22 12 50 0C78 12 100 36 100 70V420Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  background: var(--stone);
}

.lancet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lancet.tall {
  aspect-ratio: 1 / 4.8;
}

.glass-band {
  background: var(--ink);
  padding: clamp(2.5rem, 6vw, 4rem) var(--edge);
}

.glass-band .lancets {
  max-width: 62rem;
  margin: 0 auto;
}

.glass-band p {
  margin: 1.25rem auto 0;
  text-align: center;
  color: #9c9ca3;
  font-size: var(--step--1);
}

@media (max-width: 600px) {
  .glass-band .lancet:nth-child(n+6) {
    display: none;
  }
}

/* Inner page heads carry a small set of lancets */
.page-head.with-glass {
  display: grid;
  gap: 2rem;
  align-items: end;
}

.page-head .lancets {
  justify-content: flex-start;
}

.page-head .lancet {
  flex-basis: 4.25rem;
}

@media (min-width: 860px) {
  .page-head.with-glass {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .page-head .lancets {
    justify-content: flex-end;
  }

  .page-head .lancet {
    flex-basis: 4.75rem;
  }
}

@media (max-width: 859px) {
  .page-head .lancets {
    display: none;
  }
}

/* Through the month */
.month-grid {
  display: grid;
  gap: 1.5rem 3rem;
  margin-top: 1.5rem;
}

.month-grid > div {
  padding-top: 1rem;
  border-top: 1px solid var(--stone-line);
}

.month-grid p {
  margin: 0 0 0.5rem;
  color: var(--ink-soft);
}

@media (min-width: 760px) {
  .month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* History page: written sections between carousels */
.chapter {
  display: grid;
  gap: 1rem 4rem;
}

.chapter .prose p {
  font-size: 1.08rem;
}

@media (min-width: 900px) {
  .chapter {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }
}

.reel {
  padding: 0 var(--edge) var(--space);
}

.reel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1rem;
}

.reel-head h2 {
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  margin: 0;
}

.carousel-play {
  font-size: 1rem;
}

.band-stone.history-page {
  padding-top: var(--space);
}

.hero-full .script {
  text-shadow: 0 2px 14px rgba(17, 17, 19, 0.65);
}

/* Keep the whole hero inside shorter screens too */
.hero-full h1 {
  font-size: clamp(2.2rem, min(6vw, 8vh), 5rem);
}

.hero-full .script {
  font-size: clamp(1.6rem, min(3.6vw, 5vh), 2.5rem);
}

@media (max-height: 780px) {
  .hero-copy {
    padding-top: 1.5rem;
    padding-bottom: 1.1rem;
  }
}

@media (max-height: 700px) and (max-width: 760px) {
  .hero-full .lede {
    display: none;
  }
}

/* Castoro comes in one weight, so emphasis uses the titling capitals instead of fake bold */
strong,
b {
  font-weight: 600;
}

.text-link,
.sunday-what,
.year-month time {
  font-family: var(--display);
  font-size: 0.92em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .wordmark-name {
    font-size: 0.86rem;
    letter-spacing: 0.03em;
  }

  .wordmark-place {
    font-size: 0.8rem;
  }

  .masthead .btn {
    min-height: 2.3rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 760px) {
  .hero-full .lede {
    font-size: 0.98rem;
    line-height: 1.55;
  }
}

/* Hero: frosted glass instead of the brown strip, and a neutral shade on the photo */
.hero-full::after {
  background:
    linear-gradient(to top, rgba(12, 14, 18, 0.62) 0%, rgba(12, 14, 18, 0.3) 34%, rgba(12, 14, 18, 0.05) 62%, rgba(12, 14, 18, 0) 100%),
    linear-gradient(to right, rgba(12, 14, 18, 0.32) 0%, rgba(12, 14, 18, 0) 55%);
}

.hero-full h1,
.hero-full .lede {
  text-shadow: 0 1px 12px rgba(12, 14, 18, 0.45);
}

/* ---------------------------------------------------------------
   Buttons, after the video: a pill, a real font, almost black,
   one crimson dot with an arrow that turns on hover, a soft light
   that follows the cursor, a gentle magnet and a press.
   Secondary buttons are clear glass with no edge.
   --------------------------------------------------------------- */
:root {
  --btn-ink: #141416;
  --btn-dot: var(--red);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 3.25rem;
  padding: 0.4rem 1.6rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  line-height: 1;
  background: var(--btn-ink);
  color: #fff;
  transform: translate(var(--tx, 0), var(--ty, 0));
  transition: transform 0.35s var(--ease-out), background-color 0.2s ease;
  will-change: transform;
}

.btn:has(.btn-dot) {
  padding-right: 0.4rem;
}

.btn:hover,
.btn:focus-visible {
  background: #000;
  color: #fff;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.97);
}

.btn-dot {
  display: inline-grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  background: var(--btn-dot);
  color: #fff;
  flex: 0 0 auto;
}

.btn-dot svg {
  width: 1.05rem;
  height: 1.05rem;
  transform: rotate(-45deg);
  transition: transform 0.35s var(--ease-out);
}

.btn:hover .btn-dot svg,
.btn:focus-visible .btn-dot svg {
  transform: rotate(0deg);
}

/* Light button for dark backgrounds */
.btn-light {
  background: #fff;
  color: var(--btn-ink);
}

.btn-light:hover,
.btn-light:focus-visible {
  background: #fff;
  color: var(--btn-ink);
}

.btn-light::before {
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(179, 38, 44, 0.14), transparent 70%);
}

/* Clear glass, no edge */
.btn-quiet {
  background: rgba(20, 20, 22, 0.06);
  color: var(--btn-ink);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-quiet:hover,
.btn-quiet:focus-visible {
  background: rgba(20, 20, 22, 0.1);
  color: var(--btn-ink);
}

.btn-quiet::before {
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(20, 20, 22, 0.08), transparent 70%);
}

.btn-line-light {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
}

.btn-line-light:hover,
.btn-line-light:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.masthead .btn {
  min-height: 2.9rem;
  padding: 0.3rem 0.3rem 0.3rem 1.2rem;
  font-size: 0.95rem;
}

.masthead .btn .btn-dot {
  width: 2.2rem;
  height: 2.2rem;
}

@media (max-width: 900px) {
  .masthead .btn {
    min-height: 2.75rem;
    padding: 0.25rem 0.25rem 0.25rem 1rem;
    font-size: 0.88rem;
    gap: 0.6rem;
  }

  .masthead .btn .btn-dot {
    width: 2.05rem;
    height: 2.05rem;
  }
}

/* Carousel controls get the same clear glass */
.carousel-btn {
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.06);
  color: var(--btn-ink);
  transition: background-color 0.2s ease, transform 0.35s var(--ease-out);
}

.carousel-btn:hover {
  background: var(--btn-ink);
  color: #fff;
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-btn:disabled,
.carousel-btn:disabled:hover {
  opacity: 0.35;
  background: rgba(20, 20, 22, 0.06);
  color: var(--btn-ink);
}

.carousel-pos {
  font-family: var(--body);
  text-transform: none;
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-dot svg,
  .carousel-btn {
    transition: none;
  }
}

@media (max-height: 700px) and (max-width: 760px) {
  .hero-copy {
    padding-top: 1rem;
    padding-bottom: 0.75rem;
  }
}

@media (max-width: 400px) {
  .wordmark-name {
    font-size: 0.78rem;
  }

  .masthead .btn {
    font-size: 0.82rem;
    padding-left: 0.85rem;
    gap: 0.45rem;
  }

  .masthead .btn .btn-dot {
    width: 1.85rem;
    height: 1.85rem;
  }
}

/* Black everywhere the brown used to be */
.glass-band,
.band-ink,
.lightbox-figure,
.hero-full {
  background: var(--black);
}

/* Hero: the photo has the whole first screen, with the name and welcome over it.
   Service times are further down the page, after "Your first Sunday". */
.hero-full {
  min-height: calc(100vh - var(--mast-h, 0px));
  min-height: calc(100svh - var(--mast-h, 0px));
}

.hero-inner {
  padding: 3rem var(--edge) clamp(2rem, 7vh, 4.5rem);
}

.hero-full .hero-copy {
  padding: 0;
  min-width: 0;
}

@media (max-width: 599px) {
  .hero-inner {
    padding-top: 2rem;
    padding-bottom: 1.75rem;
  }
}

@media (max-height: 700px) {
  .hero-inner {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
}

.nowrap {
  white-space: nowrap;
}

/* Red, black and white only: links and focus rings on the dark bands */
.monthly a:not(.btn):not(.btn-square) {
  color: #fff;
  text-decoration-color: #fff;
}

.hero-full :focus-visible,
.glass-band :focus-visible,
.monthly :focus-visible,
.footer :focus-visible,
.lightbox :focus-visible {
  outline-color: #fff;
}

/* Header stays at the top, and the menu underlines the page you're on in red */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  transition: box-shadow 0.3s ease;
}

.masthead.is-scrolled {
  box-shadow: 0 10px 30px rgba(17, 17, 19, 0.07);
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: calc(var(--mast-h, 0px) + 0.5rem);
}

.nav a {
  position: relative;
  padding: 0.4rem 0;
  border-bottom: 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  color: var(--crimson);
}

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Donate is the one action in the menu: a square button like the giving box, not another text link */
.nav a[data-nav="donate"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  line-height: 1;
  /* Titling caps sit high in the em box, so the top padding is larger to put the letters in the middle */
  padding: calc(0.6rem + 0.12em) 1rem calc(0.6rem - 0.12em) calc(1rem + 0.05em);
  border-radius: 2px;
  letter-spacing: 0.05em;
  flex: 0 0 auto;
  text-align: center;
}

.nav a[data-nav="donate"]::after {
  display: none;
}

/* Every donate button (and .btn-line, the same look elsewhere): white with a thin engraved line, and a slight pull towards the cursor (buttons.js) */
.btn-give,
.btn-line,
.nav a[data-nav="donate"] {
  border: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--btn-ink);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .2);
  outline: 1px solid rgba(20, 20, 22, .35);
  outline-offset: -4px;
  translate: var(--tx, 0) var(--ty, 0);
  transition: translate .35s cubic-bezier(.23, 1, .32, 1), background-color .15s ease-out;
}

.btn-give:is(:hover, :focus-visible),
.btn-line:is(:hover, :focus-visible),
.nav a[data-nav="donate"]:is(:hover, :focus-visible) {
  color: var(--btn-ink);
  background: #f3f1ed;
}

.btn-give:focus-visible,
.btn-line:focus-visible,
.nav a[data-nav="donate"]:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}

.nav a[data-nav="donate"][aria-current="page"] {
  background: transparent;
  outline: 1px solid rgba(20, 20, 22, .35);
  outline-offset: -1px;
  box-shadow: none;
}


/* Stained glass tilts a little towards the cursor, with a soft glint */
.lancet {
  position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--ls, 1));
  transition: transform 0.7s var(--ease-out);
}

.lancet.is-tilting {
  --ls: 1.03;
  transition-duration: 0.2s;
}

.lancet::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 8rem at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lancet.is-tilting::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .nav a::after,
  .lancet,
  .masthead {
    transition: none;
  }
}

/* Phones on their side: keep the header out of the way and the hero on one screen */
@media (max-height: 480px) and (orientation: landscape) {
  .masthead {
    position: static;
  }

  .hero-inner {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .hero-full .lede {
    display: none;
  }

  .hero-full .script {
    font-size: 1.3rem;
  }

  .hero-full h1 {
    font-size: clamp(1.8rem, 7vh, 2.6rem);
    margin-bottom: 0;
  }
}

@media (max-width: 400px) {
  .nav {
    gap: 0.4rem;
  }

  .nav a {
    font-size: 0.66rem;
    letter-spacing: 0.02em;
  }
}

/* History carousels: one continuous strip across the full width of the page.
   Photos are 40% smaller than before so more of them show at once. */
.carousel-viewport {
  margin-inline: calc(-1 * var(--edge));
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}

.carousel-viewport.is-dragging {
  cursor: grabbing;
}

.carousel-viewport .carousel-track {
  width: max-content;
  gap: 0.9rem;
  overflow: visible;
  scroll-snap-type: none;
  scroll-behavior: auto;
  will-change: transform;
}

.carousel-viewport .carousel-track:focus-visible {
  outline-offset: -3px;
}

.carousel-viewport .carousel-track .gallery-cell {
  width: min(calc((100vw - 2 * var(--edge)) * 0.516), 27.6rem);
  margin: 0;
  scroll-snap-align: none;
}

.carousel-viewport .carousel-track .gallery-thumb {
  height: clamp(9.6rem, 31.2vw, 19.2rem);
}

.carousel-viewport .gallery-item img {
  transition: transform 0.6s var(--ease-out);
}

.carousel-viewport .gallery-thumb:hover img {
  transform: scale(1.04);
}

.carousel-viewport .gallery-item figcaption {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-viewport .gallery-item img {
    transition: none;
  }
}

/* Wordmark: both lines in the same lettering, the place set small and spaced */
.wordmark-place {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .wordmark-place {
    margin-top: 0.25rem;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
  }
}

@media (max-width: 400px) {
  .wordmark-place {
    font-size: 0.56rem;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 380px) {
  .page-head h1 {
    font-size: 2.05rem;
  }

  .page-head.with-glass > div {
    min-width: 0;
  }
}

/* Wide screens: columns stretch across the page, but lines of text stay a comfortable length */
.month-grid p,
.occasions-grid p,
.weekly-grid p {
  max-width: 38rem;
}

/* Home: Coming up follows straight on from Your first Sunday */
.home-coming {
  padding-top: 0;
}

/* Life events page */
.life-grid h2 {
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.life-grid p {
  color: var(--ink-soft);
}

/* Shorter labels below 1280px; full labels and normal spacing above */
.nav-short {
  display: none;
}

@media (min-width: 1281px) {
  .nav {
    justify-content: flex-start;
    gap: 0.25rem 1.35rem;
  }

  .nav a {
    font-size: 0.86rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 1280px) {
  .nav-long {
    display: none;
  }

  .nav-short {
    display: inline;
  }
}

@media (max-width: 600px) {
  .nav {
    gap: 0.2rem 0.25rem;
  }

  .nav a {
    letter-spacing: 0.02em;
  }
}

@media (max-width: 380px) {
  .nav a {
    letter-spacing: 0.01em;
  }
}

/* ---------------------------------------------------------------
   Home: one continuous story on white instead of separate bands.
   First Sunday, the glass you see in church, the churchyard
   outside, then the age of the building, each leading to the next.
   --------------------------------------------------------------- */

/* The glass, straight under First Sunday */
.glass-row .lancets {
  max-width: 62rem;
  margin: 0 auto;
}

.glass-row p {
  max-width: 40rem;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

@media (max-width: 600px) {
  .glass-row .lancet:nth-child(n+6) {
    display: none;
  }
}

/* The churchyard: photo left, words right, inside the page margins */

/* The age of the church: words left, photo right */

/* Visit: a clean closing section on white */
.visit-compact { display: grid; gap: 2rem clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(3rem, 6vw, 5rem) max(var(--edge), calc((100% - 76rem) / 2)); background: #fff; }
.visit-compact h2 { margin: 0 0 1rem; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.visit-compact address { margin: 0 0 .5rem; font-size: 1.15rem; font-style: normal; }
.visit-compact p { margin: 0; color: var(--ink-soft); }
.visit-compact .actions { gap: 1rem; }
.visit-compact .btn-square { min-width: 11rem; min-height: 3.2rem; font-size: .95rem; }
.visit-compact .map-load { font-family: var(--display); }
.visit-compact .map-facade { min-height: clamp(14rem, 24vw, 18rem); border-radius: 8px; background: #f3f1ed; }
.visit-compact .visit-map iframe, .visit-compact .visit-map .map-fallback { min-height: 0; height: clamp(14rem, 24vw, 18rem); border-radius: 8px; }
@media (min-width: 900px) { .visit-compact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* Lists use a plain dash instead of a bullet */

.impact {
  list-style: none;
  padding-left: 0;
}

.impact li {
  position: relative;
  padding-left: 1.2rem;
}

.impact li::before {
  content: "-";
  position: absolute;
  left: 0;
}

/* The bottom of the hero photo melts into the black service times band.
   An eased fade (many small steps, not one straight line) so there's no visible edge. */
.hero-full::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(17, 17, 19, 1) 0%,
    rgba(17, 17, 19, 0.987) 8.1%,
    rgba(17, 17, 19, 0.951) 15.5%,
    rgba(17, 17, 19, 0.896) 22.5%,
    rgba(17, 17, 19, 0.825) 29%,
    rgba(17, 17, 19, 0.741) 35.3%,
    rgba(17, 17, 19, 0.648) 41.2%,
    rgba(17, 17, 19, 0.55) 47.1%,
    rgba(17, 17, 19, 0.45) 52.9%,
    rgba(17, 17, 19, 0.352) 58.8%,
    rgba(17, 17, 19, 0.259) 64.7%,
    rgba(17, 17, 19, 0.175) 71%,
    rgba(17, 17, 19, 0.104) 77.5%,
    rgba(17, 17, 19, 0.049) 84.5%,
    rgba(17, 17, 19, 0.013) 91.9%,
    rgba(17, 17, 19, 0) 100%
  );
  pointer-events: none;
}

.hero-full::after {
  background: linear-gradient(to right, rgba(17, 17, 19, 0.38) 0%, rgba(17, 17, 19, 0) 55%);
}

/* Donate in the header: 30% bigger */
.masthead .btn {
  min-height: 3.77rem;
  padding: 0.39rem 0.39rem 0.39rem 1.56rem;
  font-size: 1.235rem;
  gap: 1.1rem;
}

.masthead .btn .btn-dot {
  width: 2.86rem;
  height: 2.86rem;
}

.masthead .btn .btn-dot svg {
  width: 1.35rem;
  height: 1.35rem;
}

@media (max-width: 900px) {
  .masthead .btn {
    min-height: 3.575rem;
    padding: 0.33rem 0.33rem 0.33rem 1.3rem;
    font-size: 1.14rem;
    gap: 0.8rem;
  }

  .masthead .btn .btn-dot {
    width: 2.67rem;
    height: 2.67rem;
  }
}

/* Small phones: the name and Donate still share the top line */
@media (max-width: 400px) {
  .masthead .btn {
    min-height: 3.1rem;
    padding: 0.28rem 0.28rem 0.28rem 1rem;
    font-size: 1rem;
    gap: 0.55rem;
  }

  .masthead .btn .btn-dot {
    width: 2.3rem;
    height: 2.3rem;
  }
}

@media (max-width: 380px) {
  .wordmark-name {
    font-size: 0.72rem;
  }
}

@media (max-width: 340px) {
  .wordmark-name {
    font-size: 0.66rem;
  }

  .masthead .btn {
    min-height: 2.9rem;
    font-size: 0.9rem;
    padding-left: 0.85rem;
  }

  .masthead .btn .btn-dot {
    width: 2.1rem;
    height: 2.1rem;
  }
}

/* Mount colour for the thin frames on the History page photo strips */
:root {
  --mount: #f6f4ef;
}

/* The History page photo strips and the Bygone days album: thin black frames with a pale mount */
.carousel-viewport .carousel-track .gallery-thumb,
.album img {
  padding: 0.4rem;
  background: var(--mount);
  border: 4px solid #141416;
  border-image: linear-gradient(145deg, #505056 0%, #222225 30%, #121214 62%, #050506 100%) 1;
  box-shadow: inset 0 1px 2px rgba(17, 17, 19, 0.25), 0 3px 8px -4px rgba(17, 17, 19, 0.35), 0 14px 24px -16px rgba(17, 17, 19, 0.45);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.carousel-viewport .gallery-item img {
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(17, 17, 19, 0.14);
}

.carousel-viewport .gallery-thumb:hover img {
  transform: none;
}

.carousel-viewport .gallery-thumb:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 2px rgba(17, 17, 19, 0.25), 0 6px 12px -6px rgba(17, 17, 19, 0.35), 0 22px 32px -18px rgba(17, 17, 19, 0.5);
}

.carousel-viewport .carousel-track {
  padding-block: 0.5rem 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-viewport .carousel-track .gallery-thumb {
    transition: none;
  }
}

/* ---------------------------------------------------------------
   History page: the story first, each chapter with a photo beside
   it, then the key dates, then the photo strips
   --------------------------------------------------------------- */
.hist > .hist-row {
  display: grid;
  gap: 1.75rem 4.5rem;
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--edge);
}

.hist > .hist-row:first-child {
  padding-top: 0;
}

.hist-row .prose p {
  font-size: 1.08rem;
}

.hist-photo {
  margin: 0;
}

.hist-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hist-photo.tall img {
  aspect-ratio: 4 / 5;
  max-height: 34rem;
}

.hist-photo figcaption {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .hist > .hist-row {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }

  .hist > .hist-row.flip {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .hist > .hist-row.flip .hist-photo {
    order: -1;
  }
}

.photos-intro {
  padding-bottom: 1.5rem;
}

.photos-intro p {
  margin: 0;
}

/* Visit page */
.visit-page {
  align-items: center;
}

.visit-page h2 {
  font-size: var(--step-2);
}

.visit-page address {
  font-size: var(--step-1);
  line-height: 1.5;
}

.visit-page .visit-map iframe,
.visit-page .visit-map .map-fallback {
  min-height: 0;
  height: clamp(18rem, 34vw, 28rem);
}

@media (max-width: 600px) {
  .nav a {
    font-size: 0.74rem;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 380px) {
  .nav a {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }
}

/* History page key dates: three eras side by side, each a timeline with red dots */
.eras {
  display: grid;
  gap: 2.5rem 3.5rem;
  margin-top: 2rem;
}

.era h3 {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--stone-line);
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 1.4rem 1.75rem;
  border-left: 2px solid var(--stone-line);
  margin-left: 0.4rem;
}

.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 0.35rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 0 4px var(--stone);
}

.timeline strong {
  display: block;
  font-family: var(--script);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--crimson);
  font-variant-numeric: tabular-nums;
}

.timeline span {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink);
  line-height: 1.5;
}

@media (min-width: 900px) {
  .eras {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* What's on: Coming up as date cards */
.coming-cards {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem;
}

.coming-cards li {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  padding: 1.25rem;
  border: 1px solid var(--stone-line);
  background: var(--paper);
}

.cal {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--stone-line);
  text-align: center;
}

.cal-month {
  align-self: stretch;
  padding: 0.2rem 0;
  background: var(--crimson);
  color: #fff;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cal-day {
  padding-top: 0.35rem;
  font-family: var(--script);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--ink);
}

.cal-dow {
  padding: 0.15rem 0 0.45rem;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.coming-cards h3 {
  margin: 0.15rem 0 0.4rem;
}

.coming-cards p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Sundays page */
.sun-intro {
  display: grid;
  gap: 2rem 4rem;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) var(--edge);
}

.sun-intro h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  margin-bottom: 1rem;
}

.sun-facts {
  display: grid;
  gap: 0;
  margin: 1.75rem 0 0;
  max-width: 30rem;
}

.sun-facts div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--stone-line);
}

.sun-facts div:last-child {
  border-bottom: 1px solid var(--stone-line);
}

.sun-facts dt {
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson);
  padding-top: 0.2rem;
}

.sun-facts dd {
  margin: 0;
}

.sun-intro-photo {
  margin: 0;
}

.sun-intro-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 60%;
}

.sun-steps {
  padding-top: 0;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem 2.5rem;
}

.steps li {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 2px solid var(--crimson);
}

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--script);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--crimson);
  margin-bottom: 0.5rem;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
}

.sun-cards {
  display: grid;
  gap: 2rem 3rem;
}

.sun-cards h2 {
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.sun-cards p {
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

@media (min-width: 700px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sun-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .sun-intro {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  }
}

@media (min-width: 1100px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Sundays: First Sunday reads as plain paragraphs */
.sun-steps .prose p {
  font-size: 1.08rem;
}

/* Notices at the top of What's on, written by the office in the members area */
.notices {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 2.25rem;
  max-width: 48rem;
}

.notices[hidden] {
  display: none;
}

.notice {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--red);
  background: var(--stone);
}

.notice h3 {
  margin: 0 0 0.3rem;
}

.notice p {
  margin: 0;
  white-space: pre-line;
}

/* ===== home-v1.css ===== */
/* V1 home: limestone, crimson and photographs held within the architecture. */
.home-v1 { --paper: #f7f4ee; --stone: #eae4da; --ink: #292724; --ink-soft: #615b55; --edge: clamp(1.25rem, 6vw, 6rem); }
.home-v1 h1, .home-v1 h2, .home-v1 h3 { font-family: var(--script); text-transform: none; letter-spacing: -.035em; }
.home-v1 .masthead { padding-block: 1.25rem; }
.home-v1 .wordmark-place { display: block; margin-top: .4rem; }
.home-v1 .hero-full { min-height: 40rem; min-height: min(780px, 85svh); justify-content: flex-end; }
.home-v1 .hero-full > img { object-position: 50% 38%; }
.home-v1 .hero-inner { padding: 0; }
.home-v1 .hero-full::after { background: linear-gradient(90deg,rgba(20,24,22,.85),rgba(20,24,22,.38) 55%,rgba(20,24,22,.12)),linear-gradient(0deg,rgba(20,24,22,.3),transparent 60%); }
.home-v1 .hero-copy { padding: 5rem var(--edge); background: none; backdrop-filter: none; border: 0; border-radius: 0; max-width: none; }
.hero-eyebrow { display: block; color: #f4e9dc; font-size: .8rem; text-transform: uppercase; letter-spacing: .18em; margin-bottom: 1.5rem; }
.home-v1 .hero-full h1 { font-size: clamp(2.7rem, 5.6vw, 5.5rem); max-width: 18ch; line-height: 1.04; margin-bottom: 1.5rem; }
.home-v1 .hero-full .lede { display: block; max-width: 31rem; font-size: 1.15rem; line-height: 1.65; }
.hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem 2rem; margin-top: 2rem; }
.hero-links > a { color: white; }
.hero-links .btn { background: #f7f4ee; color: #292724; gap: 2rem; }
.home-v1 .kicker { font-size: .75rem; letter-spacing: .15em; }
.board-demo { color: var(--crimson); font-size: .9rem; }
.board-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2rem; margin-top: 2.5rem; }
.board-links > a { color: var(--ink); text-decoration: none; border-top: 1px solid #c9bfb0; padding-top: 1.5rem; }
.board-links h3 { font-size: 1.5rem; display: flex; justify-content: space-between; gap: .75rem; }
.board-links a:hover h3 { color: var(--crimson); }
.board-links p { font-size: 1rem; color: var(--ink-soft); margin: .75rem 0 0; }


@media (max-width: 1150px) {
  .home-v1 .masthead { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  .home-v1 .wordmark-name { font-size: 1rem; }
  .home-v1 .nav { flex-wrap: wrap; justify-content: flex-start; gap: .5rem 1.25rem; }
  .home-v1 .nav a { font-size: .75rem; min-height: 2.5rem; display: inline-flex; align-items: center; }
}
@media (max-width: 899px) {
  .home-v1 .hero-full { min-height: 36rem; }
  .home-v1 .hero-copy { padding-block: 3.5rem; }
}
@media (max-width: 600px) {
  .home-v1 .masthead { position: static; }
  .home-v1 .nav { gap: .2rem 1rem; }
  .home-v1 .hero-full { min-height: 35rem; }
  .home-v1 .hero-full > img { object-position: 58% center; }
  .home-v1 .hero-full::after { background: linear-gradient(0deg,rgba(20,24,22,.92),rgba(20,24,22,.25)); }
  .home-v1 .hero-copy { padding-block: 3rem; }
  .hero-eyebrow { font-size: .7rem; letter-spacing: .12em; }
  .board-links { grid-template-columns: 1fr; }
}

/* ===== home-v2.css ===== */
/* Second pass: typography studies and a continuous history / giving section. */
.home-v1 { font-family: var(--reading-font); }
.home-v1 h1, .home-v1 h2, .home-v1 h3, .home-v1 .counter strong { font-family: var(--heading-font); }
.home-v1 .wordmark-name { font-family: var(--heading-font); font-size: 1.1rem; letter-spacing: .025em; }
.home-v1 .nav a, .home-v1 .kicker, .home-v1 .text-link { font-family: var(--label-font); }
.home-v1 .btn, .home-v1 input, .home-v1 button { font-family: var(--reading-font); }
.home-v1 .hero-full > img { object-position: 50% 43%; }
.home-v1 .hero-full::after { background: linear-gradient(90deg,rgba(16,23,23,.76),rgba(16,23,23,.12) 72%),linear-gradient(0deg,rgba(16,23,23,.5),transparent 65%); }
.home-v1 .hero-copy { padding-block: 4rem; }
.home-v1 .hero-full h1 { max-width: 17ch; }

.home-v1 .notice-date { display: block; margin-bottom: .6rem; color: var(--crimson); }

@media (max-width: 600px) {
  .home-v1 .hero-full > img { object-position: 47% center; }
  .home-v1 .hero-full::after { background: linear-gradient(0deg,rgba(16,23,23,.9),rgba(16,23,23,.12)); }
  .home-v1 .hero-full h1 { font-size: 2.8rem; }
}

/* ===== chosen-type.css ===== */
/* Selected pairing: Cormorant Garamond headings, Source Sans 3 reading text. */
:root { --display: 'Cormorant Garamond', Georgia, serif; --script: 'Cormorant Garamond', Georgia, serif; --body: 'Source Sans 3', system-ui, sans-serif; }
body { font-family: var(--body); }
h1, h2, h3 { text-transform: none; letter-spacing: -.025em; font-weight: 500; }
.home-v1 { --heading-font: 'Cormorant Garamond', Georgia, serif; --reading-font: 'Source Sans 3', system-ui, sans-serif; --label-font: 'Source Sans 3', system-ui, sans-serif; }
.nav a, .kicker, .text-link, .btn, button, input, textarea, select { font-family: var(--body); }
.wordmark-name { font-family: var(--display); }
.home-v1 .hero-full > img { object-position: 50% 24%; }
.home-v1 .hero-full::after { background: linear-gradient(90deg,rgba(16,23,23,.65),rgba(16,23,23,.08) 75%),linear-gradient(0deg,rgba(16,23,23,.6),transparent 75%); }
.home-v1 .hero-full h1 { font-weight: 500; font-size: clamp(3rem,6.2vw,6rem); }
.events-page { background: #f7f4ee; }
.events-head { padding: 4rem var(--edge) 1rem; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; }
.events-head h1 { font-size: clamp(2.5rem,4vw,3.5rem); line-height: 1; }
.events-head p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.events-page .events-coming { padding-bottom: 2rem; }
.events-page .events-coming > .kicker { display: none; }
.events-page #coming-title { font-size: 1.6rem; }
.events-page .coming-cards { margin-top: 1rem; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.events-page .coming-cards li { background: #fffdf9; padding: 1rem; }
.events-page .coming-cards h3 { font-size: 1.5rem; line-height: 1.1; }
.events-page .coming-cards p { font-size: 1rem; line-height: 1.45; }
.events-page .coming-more { margin-top: 1rem; font-size: .95rem; }
.events-page .notices { margin: 1rem 0 0; }
.events-page #notice-demo { margin-bottom: .5rem; font-size: .85rem; }
@media (max-width: 1150px) {
  .masthead { grid-template-columns: minmax(0,1fr); gap: .75rem; }
  .nav { flex-wrap: wrap; justify-content: flex-start; gap: .25rem 1.2rem; }
  .nav a { font-size: .8rem; min-height: 2.5rem; display: inline-flex; align-items: center; }
}
@media (max-width: 600px) {
  .events-head { padding-top: 2.75rem; }
  .events-head p { font-size: .95rem; }
  .events-page .coming-cards { grid-template-columns: 1fr; }
  .home-v1 .hero-full > img { object-position: 43% 22%; }
  .home-v1 .hero-full h1 { font-size: 3rem; }
}

/* ===== nav.css ===== */
/* Grouped main menu: dropdowns on wide screens, a Menu button with folding sections on phones. Loaded last on every page. */
.masthead .nav { justify-content: flex-end; flex-wrap: nowrap; gap: 0 1.6rem; }
.masthead .nav > a, .nav-group-btn {
  font-family: var(--body); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  min-height: 2.75rem; display: inline-flex; align-items: center; white-space: nowrap;
}
.nav-group { position: relative; }
.nav-group-btn {
  appearance: none; border: 0; background: none; padding: 0; margin: 0; cursor: pointer;
  color: var(--ink); gap: .45rem;
}
.nav-group-btn::after {
  content: ""; width: .38rem; height: .38rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .2s;
}
.nav-group-btn:hover, .nav-group-btn:focus-visible, .nav-group.is-current > .nav-group-btn { color: var(--crimson); }
.nav-group.is-open > .nav-group-btn::after { transform: translateY(2px) rotate(-135deg); }
.nav-group-btn:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--crimson); outline-offset: 4px; }

.nav-menu {
  display: none; position: absolute; top: 100%; left: -1.25rem; z-index: 50; min-width: 16rem;
  flex-direction: column; background: #fffdf9; border-top: 3px solid var(--crimson);
  box-shadow: 0 14px 34px rgba(30, 22, 16, .14);
}
.nav-group.is-open > .nav-menu { display: flex; }
@media (hover: hover) and (min-width: 1001px) {
  .nav-group:hover > .nav-menu { display: flex; }
}
.nav .nav-menu a {
  font-family: var(--body); font-size: 1rem; letter-spacing: 0; text-transform: none; white-space: normal;
  color: var(--ink); padding: .85rem 1.25rem; min-height: 0; display: block;
  border-bottom: 1px solid #e6ded2;
}
.nav .nav-menu a:last-child { border-bottom: 0; }
.nav .nav-menu a::after { display: none; }
.nav .nav-menu a:hover, .nav .nav-menu a:focus-visible { color: var(--crimson); background: #f6f0e7; }
.nav .nav-menu a[aria-current="page"] { color: var(--crimson); box-shadow: inset 3px 0 0 var(--crimson); }
.nav-menu small { display: block; margin-top: .15rem; font-size: .85rem; color: var(--ink-soft); }

.nav-toggle {
  display: none; appearance: none; border: 1px solid #cfc5b8; background: transparent; color: var(--ink);
  border-radius: 999px; padding: .55rem 1rem; min-height: 2.75rem; cursor: pointer;
  font-family: var(--body); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  align-items: center; gap: .6rem;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 1rem; height: 1.5px; background: currentColor; transition: transform .2s, opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.masthead.nav-open .nav-toggle-bars { background: transparent; }
.masthead.nav-open .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.masthead.nav-open .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1000px) {
  .masthead, .home-v1 .masthead {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem;
  }
  .wordmark { flex: 1 1 0; min-width: 0; }
  .nav-toggle { display: inline-flex; flex: 0 0 auto; }
  .masthead .nav, .home-v1 .masthead .nav {
    display: none; flex: 0 0 100%; flex-direction: column; align-items: stretch; gap: 0;
    border-top: 1px solid #e6ded2; margin-top: .25rem; max-height: calc(100svh - 6rem); overflow-y: auto;
  }
  .masthead.nav-open .nav { display: flex; }
  .masthead .nav > a, .nav-group-btn {
    width: 100%; justify-content: space-between; font-size: .95rem; min-height: 3.25rem;
    border-bottom: 1px solid #e6ded2;
  }
  .masthead .nav > a::after { display: none; }
  .masthead .nav > a[aria-current="page"] { color: var(--crimson); }
  .nav-menu {
    position: static; min-width: 0; box-shadow: none; border-top: 0; background: transparent;
    border-bottom: 1px solid #e6ded2; padding: .25rem 0 .5rem;
  }
  .nav .nav-menu a { border-bottom: 0; padding: .7rem 1rem; }
  .masthead .nav > a[data-nav="donate"] {
    margin-top: 1rem; justify-content: center; min-height: 3rem; border-bottom: 0; align-self: stretch;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-group-btn::after, .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none; }
}
@media print { .nav-toggle { display: none; } }

/* ===== 5 Nov 2026 fixes ===== */
/* Fallback faces sized to match the web fonts, so text doesn't jump when they load */
@font-face { font-family: "Cormorant Fallback"; src: local("Times New Roman"), local("Liberation Serif"), local("Georgia"); size-adjust: 96%; ascent-override: 96.3%; descent-override: 29.9%; line-gap-override: 0%; }
@font-face { font-family: "Source Sans Fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica"); size-adjust: 92.4%; ascent-override: 110.8%; descent-override: 43.3%; line-gap-override: 0%; }
:root {
  --display: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
  --script: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
  --body: "Source Sans 3", "Source Sans Fallback", system-ui, sans-serif;
}
.home-v1 { --heading-font: var(--display); --reading-font: var(--body); --label-font: var(--body); --ink-soft: #524c47; }
:root { --ink-soft: #4a4a50; }

/* Sentence case instead of capitals (easier to read); the church name keeps its lettering */
.btn, .kicker, .subhead, .text-link, .sunday-what, .year-month time, .cal-month, .sun-facts dt,
.counter div > span, .carousel-pos, .hero-eyebrow, .masthead .nav > a, .nav-group-btn, .nav-toggle {
  text-transform: none;
}
.kicker, .hero-eyebrow, .counter div > span, .sun-facts dt, .subhead { letter-spacing: .02em; }
.masthead .nav > a, .nav-group-btn, .nav-toggle { letter-spacing: .01em; font-size: .95rem; }
.text-link { letter-spacing: 0; }

/* Phones: a shorter hero so the 10:30 band shows on the first screen */
@media (max-width: 600px) {
  .home-v1 .hero-full { min-height: 0; min-height: min(30rem, 62svh); }
  .home-v1 .hero-copy { padding-block: 2.25rem; }
  .home-v1 .hero-full h1 { font-size: 2.35rem; margin-bottom: 1rem; }
  .home-v1 .hero-full .lede { font-size: 1.02rem; }
  .hero-links { margin-top: 1.25rem; gap: 1rem 1.5rem; }
}

/* Map that loads only when asked */
.map-facade {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  min-height: 16rem; height: 100%; padding: 1.5rem; text-align: center;
  background: var(--stone, #eae4da); color: var(--ink);
}
.map-facade p { margin: 0; }

/* Phone menu: no sideways scroll bar; a thin, quiet one only if the menu is taller than the screen */
@media (max-width: 1000px) {
  .masthead .nav, .home-v1 .masthead .nav {
    overflow-x: hidden; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: #cfc5b8 transparent;
  }
  .masthead .nav::-webkit-scrollbar { width: 6px; height: 0; }
  .masthead .nav::-webkit-scrollbar-thumb { background: #cfc5b8; border-radius: 3px; }
  .masthead .nav::-webkit-scrollbar-track { background: transparent; }
}

/* ===== 6 Nov 2026: Cinzel headings and the full-photo altar hero ===== */
@font-face { font-family: "Cinzel Fallback"; src: local("Times New Roman"), local("Liberation Serif"), local("Georgia"); size-adjust: 118%; ascent-override: 85%; descent-override: 33%; line-gap-override: 0%; }
:root {
  --display: "Cinzel", "Cinzel Fallback", "Times New Roman", serif;
  --script: var(--display);
  --brass: #e3c48e; --brass-soft: #e8d3ad;
}
h1, h2, h3 { font-weight: 400; letter-spacing: .02em; line-height: 1.15; }
.wordmark-name { font-family: var(--display); text-transform: none; letter-spacing: .06em; }
.masthead .nav > a, .masthead .nav-group-btn, .masthead .nav-toggle, .home-v1 .masthead .nav-group-btn, .home-v1 .masthead .nav-toggle { font-family: var(--display); font-size: .82rem; letter-spacing: .12em; }

/* Homepage header floats over the photo, then turns solid once you scroll or open the menu */
.home-v1 .masthead {
  position: fixed; top: 0; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.home-v1 .masthead.is-scrolled, .home-v1 .masthead.nav-open { background: var(--paper); border-bottom-color: var(--stone-line); }
.home-v1 .masthead:not(.is-scrolled):not(.nav-open) :is(.wordmark, .nav > a, .nav-group-btn, .nav-toggle) { color: #fff; }
.home-v1 .masthead:not(.is-scrolled):not(.nav-open) .wordmark-place { color: rgba(255,255,255,.78); }
.home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav > a::after { background: var(--brass); }
.home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle { border-color: rgba(255,255,255,.6); }
.home-v1 .masthead:not(.is-scrolled):not(.nav-open) :is(.nav > a, .nav-group-btn, .nav-toggle):focus-visible { outline-color: #fff; }
.home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav > a[data-nav="donate"] { color: var(--btn-ink); }

.hero-altar {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: clamp(34rem, 100svh, 60rem);
  padding: calc(var(--mast-h, 5rem) + 1.5rem) var(--edge) 2rem;
  background: #2a221d; color: #fff; text-align: center;
  text-shadow: 0 1px 14px rgba(0,0,0,.35);
}
.hero-altar > img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 38%;
}
.hero-altar::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 52%, rgba(18,14,12,.68), rgba(18,14,12,.38) 75%),
    linear-gradient(180deg, rgba(18,14,12,.6), rgba(18,14,12,0) 22%, rgba(18,14,12,0) 70%, rgba(18,14,12,.75));
}
.hero-altar-inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; }
.hero-mark { width: 3.75rem; height: 3.75rem; color: var(--brass); }
.home-v1 .hero-altar h1 {
  margin: 0; max-width: 26ch; color: #fff; font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 1rem + 4.2vw, 4.25rem); line-height: 1.12; letter-spacing: .04em; text-wrap: balance;
}
.hero-pill {
  margin-top: .5rem; display: inline-flex; align-items: center; min-height: 2.9rem; padding: .7rem 1.75rem;
  border: 1px solid rgba(255,255,255,.7); border-radius: 999px; color: #fff; text-decoration: none; text-shadow: none;
  font-size: .95rem; transition: background-color .2s ease, color .2s ease;
}
.hero-pill:hover, .hero-pill:focus-visible { background: #fff; color: var(--ink); }
.hero-pill:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* The address under the hero links to directions */
.hero-address {
  align-self: center; display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: 0 .25rem;
  font-family: var(--display); font-size: clamp(.8rem, .72rem + .3vw, 1rem); letter-spacing: .16em; color: var(--brass-soft);
  text-decoration: underline; text-decoration-color: rgba(232, 211, 173, .45); text-decoration-thickness: 1px; text-underline-offset: .45em;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.hero-address svg { flex: none; width: 1.15em; height: 1.15em; }
.hero-address:hover, .hero-address:focus-visible { color: #fff; text-decoration-color: currentColor; }
.hero-address:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 600px) {
  .hero-altar { min-height: clamp(30rem, 88svh, 42rem); padding-bottom: 1.5rem; }
  .hero-mark { width: 3rem; height: 3rem; }
  .hero-address { letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) {
  .home-v1 .masthead, .hero-pill { transition: none; }
}

/* History: centred, no photo, live counter; Sundays on the same cream as the rest */

/* Hero photo: stack with positive layers so every browser paints it (some skipped the negative z-index) */
.hero-altar > img { z-index: 0; }
.hero-altar::after { z-index: 1; }
.hero-altar-inner, .hero-address { position: relative; z-index: 2; }

/* ===== 18 Nov 2026: church seasons =====
   buttons.js sets data-season on <html> from the date. The accent takes the season's colour,
   as the altar frontal does: violet for Advent, evergreen with the crimson for Christmas, gold for Easter.
   Pentecost is red, which is already the site's own colour. */
[data-season="advent"] { --crimson: #4f2d5c; --crimson-deep: #4f2d5c; --red: #4f2d5c; --band: #45274f; }
[data-season="christmas"] { --band: #1f3d2b; }
[data-season="easter"] { --crimson: #7a5518; --crimson-deep: #7a5518; --red: #7a5518; --band: #2a221d; }

.season-note { display: none; margin: 0; }
[data-season="advent"] .season-note[data-for="advent"],
[data-season="christmas"] .season-note[data-for="christmas"],
[data-season="easter"] .season-note[data-for="easter"],
[data-season="pentecost"] .season-note[data-for="pentecost"] { display: block; }
.season-note a {
  display: inline-flex; align-items: center; gap: .6rem; padding: .35rem 0;
  font-size: clamp(.95rem, .9rem + .2vw, 1.05rem); color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.45); transition: border-color .2s ease;
}
.season-note a:hover, .season-note a:focus-visible { border-bottom-color: var(--brass); }
.season-note a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.season-note svg { width: 1.5rem; height: 1.5rem; flex: none; color: var(--brass); }
@media (prefers-reduced-motion: reduce) { .season-note a { transition: none; } }

/* ===== 18 Nov 2026: Bygone days, old pictures laid out like an album ===== */
.album { columns: 3 17rem; column-gap: clamp(1.25rem, 3vw, 2.5rem); }
.album .gallery-item { margin-bottom: 2rem; break-inside: avoid; }

/* ===== 18 Nov 2026: home page rework ===== */
/* Notice board: one framed board. Pictures from the members area sit on the left
   when there are any; notices on the right */
.notice-board { padding: clamp(3rem, 6vw, 5rem) var(--edge); background: var(--paper); }
.board { max-width: 76rem; margin: 0 auto; text-align: center; background: #fffdf8; border: 1px solid #d9d0c3; }
.board-heading { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.25rem clamp(1.25rem, 3vw, 2.25rem); border-bottom: 1px solid #d9d0c3; }
.board-heading h1 { margin: 0; font-size: clamp(2rem, 3.6vw, 3rem); }
.board-body { display: grid; }
.board-pictures { display: grid; gap: 1.75rem; align-content: start; padding: clamp(1.25rem, 3vw, 2.25rem); border-bottom: 1px solid #d9d0c3; }
.board-pictures[hidden] { display: none; }
.board-notices { min-width: 0; padding: clamp(1.25rem, 3vw, 2.25rem); }
.notice-board .notices { max-width: 40rem; margin: 0 auto; gap: 0; }
.notice-board .notice { padding: 1rem 0; background: none; border: 0; border-top: 1px solid #e6ded2; overflow-wrap: anywhere; }
.notice-board .notice:first-child { padding-top: 0; border-top: 0; }
.notice-board .notice:last-child { padding-bottom: 0; }
.notice-board .notice h3 { font-size: 1.2rem; line-height: 1.25; margin-bottom: .3rem; }
.notice-board .notice p { font-size: .95rem; line-height: 1.6; }
.board-status { margin: 0; color: var(--ink-soft); }
/* Past events on Bygone days: kept notices as quiet rows */
.past-notices { gap: 0; }
.past-notices .notice { padding: 1rem 0; background: none; border: 0; border-top: 1px solid #e6ded2; }
.past-notices .notice h3 { font-size: 1.2rem; line-height: 1.25; }
.past-notices .notice p { font-size: .95rem; line-height: 1.6; }
@media (min-width: 900px) {
  .board-body.has-pictures { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .has-pictures .board-pictures { border-bottom: 0; border-right: 1px solid #d9d0c3; }
}

/* A picture keeps the crop chosen in the page editor: shape, position and size */
.board-picture { margin: 0; }
.board-frame { display: block; overflow: hidden; aspect-ratio: 210 / 297; background: var(--stone); border: 1px solid #d9d0c3; }
[data-shape="square"] > .board-frame { aspect-ratio: 1; }
[data-shape="landscape"] > .board-frame { aspect-ratio: 4 / 3; }
.board-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--x, 50%) var(--y, 50%); transform: scale(var(--zoom, 1)); transform-origin: var(--x, 50%) var(--y, 50%); }
.board-picture figcaption { margin-top: .6rem; font-size: var(--step--1); color: var(--ink-soft); }



/* Find a grave: a plain search on white that goes straight to the churchyard records */
.find-grave { position: relative; overflow: hidden; display: grid; place-items: center; padding: clamp(2rem, 5vw, 3.5rem) var(--edge); text-align: center; background: var(--black); border-top: 6px solid #fff; }
.grave-reel { position: absolute; inset: 0; }
/* Each photo fades in over the one before it, like a slow dissolve, so there are no edges or gaps */
.grave-reel-track { --blend: 12rem; display: flex; width: max-content; height: 100%; margin-left: calc(-1 * var(--blend)); }
.grave-reel img { width: auto; height: 100%; margin-right: calc(-1 * var(--blend)); object-fit: cover; filter: saturate(.3) brightness(.82); -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--blend)); mask-image: linear-gradient(to right, transparent, #000 var(--blend)); }
.find-grave.is-moving .grave-reel-track { animation: grave-reel 160s linear infinite; }
.find-grave.is-paused .grave-reel-track { animation-play-state: paused; }
@keyframes grave-reel { to { transform: translateX(-50%); } }
.grave-card { position: relative; display: grid; justify-items: center; gap: 1rem; box-sizing: border-box; width: 100%; max-width: 38rem; padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 4vw, 2.5rem); border-radius: 1.75rem; background: #fff; box-shadow: var(--shadow-6), 0 12px 40px rgba(0, 0, 0, .18); }
.find-grave .grave-card h2 { color: var(--black); }
.find-grave .grave-card :is(p, a) { color: var(--black); }
.reel-pause { position: absolute; right: 1rem; bottom: 1rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; color: var(--black); background: rgba(255, 255, 255, .9); cursor: pointer; }
.reel-pause[hidden] { display: none; }
.reel-pause svg { width: 1.1rem; height: 1.1rem; }
.reel-pause .i-play, .reel-pause[aria-pressed="true"] .i-pause { display: none; }
.reel-pause[aria-pressed="true"] .i-play { display: inline; }
.reel-pause:focus-visible { outline-color: #fff; }
@media (max-width: 600px) { .find-grave { padding-bottom: 4rem; } .reel-pause { bottom: .6rem; } }
.find-grave h2 { margin: 0 0 .4rem; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.find-grave p { margin: 0 auto; max-width: 34rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--ink-soft); }
/* One rounded field with a dark search button closing off the right-hand end */
.grave-search {
  display: flex; box-sizing: border-box; width: 100%; min-width: 0; max-width: 34rem; height: 3.25rem; margin-top: .25rem; overflow: hidden;
  border: 1px solid #c9c4bd; border-radius: 999px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.grave-search:focus-within { border-color: var(--black); box-shadow: 0 0 0 4px rgba(20, 20, 22, .1); }
.grave-field { position: relative; display: flex; flex: 1; min-width: 0; }
.grave-search input { flex: 1; min-width: 0; padding: 0 1.5rem; border: 0; background: none; font: inherit; font-size: 1.1rem; color: var(--ink); }
.grave-search input:focus { outline: none; }
.grave-search input::-webkit-search-cancel-button { display: none; }
/* Example surnames roll down through the empty field to prompt a search (buttons.js) */
.grave-hint { position: absolute; top: 50%; left: 1.5rem; right: .5rem; overflow: hidden; text-align: left; transform: translateY(-50%); font-size: 1.1rem; color: #77706a; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
.grave-search.typed .grave-hint { visibility: hidden; }
.grave-name { display: inline-block; color: var(--ink-soft); transition: opacity .25s ease, transform .25s ease; }
.grave-name.out { opacity: 0; transform: translateY(.6em); }
.grave-name.prep { opacity: 0; transform: translateY(-.6em); transition: none; }
.grave-search button { display: grid; place-items: center; flex: none; width: 4rem; border: 0; background: var(--black); color: #fff; cursor: pointer; transition: background-color .15s ease; }
.grave-search button:hover, .grave-search button:focus-visible { background: #34343a; }
.grave-search button:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.grave-search button svg { width: 1.3rem; height: 1.3rem; }
@media (prefers-reduced-motion: reduce) { .grave-search, .grave-search button { transition: none; } }

/* Life at St Michael's, in the manner of Farm Africa's "What we do": rows run edge to edge over the organ photo, and
   the heading and all seven rows fit on one laptop screen. On hover a band of clear glass, like the Menu corner,
   rises from the bottom of the row, the name fades and a larger one swings in from the left on a spring, and the
   white arrow button turns black and swells. */
.life { position: relative; overflow: hidden; padding-top: clamp(2.5rem, 4vw, 3.25rem); color: #fff; background: var(--black); }
.life > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; opacity: .5; }
.life::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(17, 17, 19, .7), rgba(17, 17, 19, .15)); }
.life h2 { position: relative; margin: 0 var(--edge) clamp(1.25rem, 2vw, 1.75rem); text-align: center; font-size: clamp(2.4rem, 5vw, 3.75rem); color: var(--brass-soft); }
.life-rows { position: relative; margin: 0; padding: 0; list-style: none; }
.life-rows li { border-top: 1px solid rgba(255, 255, 255, .22); }
.life-rows a { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; }
.life-rows a::before {
  content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 1px rgba(255, 255, 255, .45), inset 0 -1px rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(7px) saturate(180%) brightness(1.08); backdrop-filter: blur(7px) saturate(180%) brightness(1.08);
  translate: 0 101%; transition: translate .2s cubic-bezier(.4, 0, .2, 1);
}
.life-row { --gutter: max(var(--edge), calc((100% - 76rem) / 2)); position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(.9rem, 1.4vw, 1.1rem) var(--gutter); }
.life-label { font-family: var(--display); font-size: clamp(1.2rem, 1.05rem + .6vw, 1.55rem); transition: opacity .15s ease-out; }
.life-big { position: absolute; top: 50%; left: var(--gutter); max-width: calc(100% - 2 * var(--gutter) - 5rem); font-family: var(--display); font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); line-height: 1.1; opacity: 0; translate: calc(-1 * var(--gutter) - 100%) -50%; transition: translate 1.2s var(--spring), opacity .25s ease-out; }
.life-arrow { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: var(--black); background: #fff; transform-origin: 100% 50%; transition: scale 1.2s var(--spring-bounce), color .2s, background-color .2s; }
.life-arrow svg { width: 1.15rem; height: 1.15rem; }
.life-rows a:is(:hover, :focus-visible)::before { translate: 0 0; }
.life-rows a:is(:hover, :focus-visible) .life-label { opacity: 0; }
.life-rows a:is(:hover, :focus-visible) .life-big { opacity: 1; translate: 0 -50%; }
.life-rows a:is(:hover, :focus-visible) .life-arrow { scale: 1.5; color: #fff; background: var(--black); }
.life-rows a:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) {
  .life-rows a::before, .life-big, .life-arrow { transition-duration: .2s; transition-timing-function: ease-out; }
}

/* The age of the church: the counter is the whole point, so it is big */
.age { display: flex; flex-direction: column; align-items: center; padding: clamp(1.25rem, 2.5vw, 1.75rem) var(--edge); text-align: center; color: var(--black); background: #fff; }
.age h2 { max-width: 22ch; margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.7rem); text-wrap: balance; }
.age .counter { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem clamp(1.75rem, 4.5vw, 4rem); width: 100%; max-width: 68rem; margin: clamp(.5rem, 1.5vw, 1rem) 0 0; padding: clamp(.75rem, 1.5vw, 1rem) 0; }
.age .counter div { align-items: center; min-width: 2ch; }
.age .counter strong { font-size: clamp(3rem, 7vw, 6rem); color: inherit; }
.age .counter div > span { margin-top: .5rem; font-size: clamp(.8rem, .7rem + .3vw, 1rem); color: inherit; }
/* Each digit rolls down to the next one (the script in index.html swaps them) */
.counter .digit { display: inline-block; width: .6em; height: 1em; overflow: hidden; text-align: center; vertical-align: top; }
.counter .roll { display: flex; flex-direction: column; }
.counter .roll > span { height: 1em; }
.counter .roll.go { animation: roll-down .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes roll-down { from { transform: translateY(-50%); } }
@media (max-width: 600px) {
  .age .counter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem .5rem; }
  .age .counter div:first-child { grid-column: 1 / -1; }
  .age .counter div:first-child strong { font-size: 6rem; }
  .age .counter strong { font-size: 2.4rem; }
}


/* Asks before Google's map loads, because Google sets cookies. Not a pop-up: it sits at the bottom and doesn't block the page */
.cookie-bar { position: fixed; z-index: 44; left: 1rem; right: 1rem; bottom: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; max-width: 48rem; margin: 0 auto; padding: 1.25rem 1.5rem; color: rgba(255, 255, 255, .85); background: var(--black); border-radius: 8px; box-shadow: 0 10px 30px rgba(17, 17, 19, .3); }
.cookie-bar p { flex: 1 1 18rem; margin: 0; font-size: var(--step--1); }
.cookie-bar a { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); text-underline-offset: .2em; }
.cookie-bar .actions { gap: .75rem; margin: 0; flex-wrap: wrap; }
.cookie-bar .btn-square { min-width: 8.5rem; font-family: var(--display); }
.cookie-bar :focus-visible, .cookie-bar .btn-line:focus-visible { outline-color: #fff; }

/* Your first Sunday: a tab on the right edge of the hero (it scrolls away with the page) that grows into a panel when opened,
   on the same spring as the menu (buttons.js) */
.sunday-tab { position: absolute; z-index: 30; right: 0; top: var(--tab-top, 36rem); display: inline-flex; align-items: center; gap: .7rem; padding: 1.1rem .7rem; border: 0; border-radius: 0 8px 8px 0; color: var(--black); background: #fff; font: 400 .95rem/1 var(--display); letter-spacing: .08em; writing-mode: vertical-rl; transform: rotate(180deg); cursor: pointer; box-shadow: 0 0 0 1px rgba(20, 20, 22, .15), 0 4px 16px rgba(0, 0, 0, .2); transition: opacity .2s ease-out; }
.first-sunday .sunday-tab { font-family: var(--display); }
/* A finger appears, holds still, taps, then fades away: three times as the page loads (done inside
   5 seconds, as the accessibility rules ask), and over and over while the tab is hovered.
   The tab is turned upside down, so the icon is turned back to stay upright. */
.sunday-tab .tap { flex: none; width: 1.35rem; height: 1.35rem; transform: rotate(180deg); overflow: visible; opacity: 0; animation: tap-show 1.3s ease-out .6s 3; }
.tap-hand { transform-origin: 50% 90%; animation: tap-press 1.3s ease-out .6s 3; }
.tap-ring { opacity: 0; transform-origin: 10.5px 4.5px; animation: tap-ring 1.3s ease-out .6s 3; }
.sunday-tab:hover .tap { animation: tap-show-h 1.3s ease-out infinite; }
.sunday-tab:hover .tap-hand { animation: tap-press-h 1.3s ease-out infinite; }
.sunday-tab:hover .tap-ring { animation: tap-ring-h 1.3s ease-out infinite; }
@keyframes tap-show { 0% { opacity: 0; } 15%, 72% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes tap-press { 0%, 40%, 64%, 100% { transform: none; } 52% { transform: translateY(1.5px) scale(.92); } }
@keyframes tap-ring { 0%, 48% { opacity: 0; transform: scale(.3); } 56% { opacity: .9; } 80%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes tap-show-h { 0% { opacity: 0; } 15%, 72% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes tap-press-h { 0%, 40%, 64%, 100% { transform: none; } 52% { transform: translateY(1.5px) scale(.92); } }
@keyframes tap-ring-h { 0%, 48% { opacity: 0; transform: scale(.3); } 56% { opacity: .9; } 80%, 100% { opacity: 0; transform: scale(1.4); } }
.sunday-tab[aria-expanded="true"] { opacity: 0; }
/* While the panel is open the rest of the site dims behind it, header included */
.first-sunday::before { content: ""; position: fixed; z-index: 45; inset: 0; background: rgba(17, 17, 19, .55); opacity: 0; pointer-events: none; transition: opacity .35s ease-out; }
.first-sunday.is-open::before { opacity: 1; pointer-events: auto; }
/* The open panel is mostly the nave photo, with the words on a white card across its top */
.sunday-panel { position: fixed; z-index: 46; right: 0; bottom: var(--panel-bottom, 2rem); box-sizing: border-box; width: min(28rem, calc(100vw - 1.5rem)); height: min(36rem, calc(100dvh - var(--panel-bottom, 2rem) - 5.5rem)); overflow: hidden; border-radius: 12px 0 0 12px; background: #fff; box-shadow: var(--shadow-6); transform-origin: 100% 100%; scale: .25; opacity: 0; transition: scale .7s var(--spring-pop), opacity .2s .2s ease-in; }
.sunday-panel.is-open { scale: 1; opacity: 1; transition: scale .7s var(--spring-pop), opacity .15s ease-out; }
.sunday-panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; }
.sunday-body { position: absolute; top: .75rem; right: .75rem; left: .75rem; max-height: calc(100% - 5rem); overflow: auto; padding: 1.25rem 1.4rem 1.3rem; border-radius: 4px; text-align: left; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.sunday-body h2 { margin: 0 0 .6rem; padding-right: 2.5rem; font-size: clamp(1.6rem, 2.6vw, 1.9rem); }
.sunday-body h2:focus { outline: none; }
.sunday-body p { margin: 0 0 .5rem; font-size: .95rem; line-height: 1.5; }
.sunday-body .text-link { display: inline-block; margin-top: .25rem; font-size: .85rem; }
/* The close cross sits in the top right corner of the white card */
.sunday-close { position: absolute; top: 1.15rem; right: 1.15rem; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid rgba(20, 20, 22, .2); border-radius: 50%; color: var(--black); background: transparent; cursor: pointer; transition: background-color .15s ease-out; }
.sunday-close:hover { background: #f1efea; }
.sunday-close svg { width: 1.1rem; height: 1.1rem; }
@media (prefers-reduced-motion: reduce) {
  .sunday-tab, .sunday-panel, .first-sunday::before { transition: none; }
  .sunday-tab :is(.tap, .tap-hand, .tap-ring), .sunday-tab:hover :is(.tap, .tap-hand, .tap-ring) { animation: none; }
}

/* ===== 20 Nov 2026: Farm Africa-style menu =====
   A black tab hangs from the top of the bar: three lines, with "Menu" on hover. It drops a black panel
   from the top with every page as one big link and the site behind dimmed, and the tab rides down to
   the panel's lower edge, reading "Close". buttons.js opens it and measures the panel. */
.masthead, .home-v1 .masthead { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 1rem; }
.masthead .wordmark { position: relative; z-index: 2; flex: 1 1 auto; min-width: 0; }
.masthead .nav, .home-v1 .masthead .nav { position: relative; z-index: 2; display: flex; flex: 0 0 auto; width: auto; margin: 0; padding: 0; border: 0; overflow: visible; max-height: none; }
.masthead:not(.nav-open) .nav > :not([data-nav="donate"]) { display: none; }
.masthead .nav > a[data-nav="donate"] { width: auto; min-height: 3rem; margin: 0; border-bottom: 0; }

.masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle {
  position: absolute; z-index: 3; top: 0; left: 50%; display: grid; place-items: center; width: 8.5rem; height: 3.4rem; min-height: 0; padding: 0 0 .3rem;
  border: 0; border-radius: 0 0 4.25rem 4.25rem / 0 0 3.4rem 3.4rem; color: #fff; background: var(--black); translate: -50% 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.nav-toggle > * { grid-area: 1 / 1; }
.masthead .nav-toggle-bars, .masthead .nav-toggle-bars::before, .masthead .nav-toggle-bars::after { width: 1.7rem; height: 2px; }
.masthead .nav-toggle-bars::before { top: -7px; }
.masthead .nav-toggle-bars::after { top: 7px; }
.nav-toggle-word { opacity: 0; font-family: var(--display); font-size: .9rem; letter-spacing: .12em; transition: opacity .2s ease-out; }
.nav-toggle:hover .nav-toggle-bars, .nav-toggle:focus-visible .nav-toggle-bars, .masthead.nav-open .nav-toggle-bars { opacity: 0; }
.nav-toggle:hover .nav-toggle-word, .nav-toggle:focus-visible .nav-toggle-word, .masthead.nav-open .nav-toggle-word { opacity: 1; }
.masthead .nav-toggle:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* The panel: every page as one big link in two columns, Donate on the right */
.masthead.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 0; background: rgba(17, 17, 19, .55); }
.masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav {
  position: fixed; top: 0; right: 0; left: 0; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(12rem, .8fr); grid-template-rows: repeat(5, auto); grid-auto-flow: column; align-items: start; gap: .35rem 3rem;
  max-height: calc(100dvh - 4rem); padding: calc(var(--mast-h, 5.5rem) + 1.5rem) max(var(--edge), calc((100% - 76rem) / 2)) 3rem; overflow-y: auto; overscroll-behavior: contain;
  background: var(--black);
}
.masthead.nav-open :is(.nav-group, .nav-menu), .home-v1 .masthead.nav-open :is(.nav-group, .nav-menu) { display: contents; }
.masthead.nav-open .nav-group-btn { display: none; }
.masthead.nav-open .nav-menu small { display: none; }
.masthead.nav-open .nav a, .masthead.nav-open .nav .nav-menu a, .home-v1 .masthead.nav-open .nav > a {
  width: auto; min-height: 0; padding: .3rem 0; border: 0; color: #fff; background: none; box-shadow: none;
  font-family: var(--display); font-size: clamp(1.3rem, 2vw, 1.75rem); letter-spacing: .03em; justify-content: flex-start;
}
.masthead.nav-open .nav a::after { display: none; }
.masthead.nav-open .nav a:is(:hover, :focus-visible), .masthead.nav-open .nav a[aria-current="page"] { color: var(--brass-soft); background: none; }
.masthead.nav-open .nav a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.masthead.nav-open .wordmark :is(.wordmark-name, .wordmark-place) { color: #fff; }

@media (max-width: 700px) {
  .masthead .wordmark { margin-right: 5.5rem; }
  .masthead:not(.nav-open) .nav { display: none; }
  .masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle { right: .75rem; left: auto; width: 5rem; height: 3.1rem; translate: none; border-radius: 0 0 2.5rem 2.5rem / 0 0 3.1rem 3.1rem; }
  .masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; gap: .25rem; }
}
@media (prefers-reduced-motion: reduce) { .masthead.nav-open :is(.nav, .nav-toggle) { animation: none; } .nav-toggle-word { transition: none; } }

/* No bar: the header is just the floating Menu tab and Donate button, on every page */
.masthead, .home-v1 .masthead, .home-v1 .masthead.is-scrolled, .home-v1 .masthead.nav-open {
  position: fixed; top: 0; right: 0; left: 0; justify-content: flex-end; background: transparent; border-bottom-color: transparent; box-shadow: none; pointer-events: none;
}
.masthead > *, .masthead.nav-open { pointer-events: auto; }
.masthead .wordmark { display: none; }

/* Donate buttons carry the giving mark: a hand holding a heart, drawn in the button's text colour */
.btn-give, .nav a[data-nav="donate"] { display: inline-flex; align-items: center; justify-content: center; gap: .6em; }
.btn-give::before, .nav a[data-nav="donate"]::before {
  content: ""; flex: none; width: 1.3em; height: 1.3em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 11.2 9.3 8.7C8.2 7.7 7.7 6.4 8.4 5.2c.8-1.4 2.8-1.5 3.6-.2.8-1.3 2.8-1.2 3.6.2.7 1.2.2 2.5-.9 3.5z'/%3E%3Cpath d='M2 14.2h2.6c.9 0 1.7.2 2.5.6l1.6.8h3.6a1.5 1.5 0 0 1 0 3H9.2'/%3E%3Cpath d='M4.6 20.6h2.7l4.6.9c.8.2 1.6 0 2.3-.4l6.2-3.7a1.5 1.5 0 0 0-1.4-2.6l-4.2 1.9'/%3E%3Cpath d='M2 13.2v8.3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 11.2 9.3 8.7C8.2 7.7 7.7 6.4 8.4 5.2c.8-1.4 2.8-1.5 3.6-.2.8-1.3 2.8-1.2 3.6.2.7 1.2.2 2.5-.9 3.5z'/%3E%3Cpath d='M2 14.2h2.6c.9 0 1.7.2 2.5.6l1.6.8h3.6a1.5 1.5 0 0 1 0 3H9.2'/%3E%3Cpath d='M4.6 20.6h2.7l4.6.9c.8.2 1.6 0 2.3-.4l6.2-3.7a1.5 1.5 0 0 0-1.4-2.6l-4.2 1.9'/%3E%3Cpath d='M2 13.2v8.3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The open menu: nine pages in three tidy columns of three, Donate on its own row beneath */
.masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav {
  grid-template-columns: repeat(3, max-content); grid-template-rows: repeat(3, auto) auto; justify-content: start; gap: 1rem clamp(2.5rem, 5vw, 5rem);
}
.masthead.nav-open .nav a, .masthead.nav-open .nav .nav-menu a, .home-v1 .masthead.nav-open .nav > a { padding: .2rem 0; font-size: clamp(1.25rem, 1.7vw, 1.55rem); }
@media (max-width: 1000px) {
  .masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; gap: .35rem; }
}

/* ===== The menu tab as a subtle, smooth bump =====
   A shallow curve that flows out of the top edge of the screen (Menu) or out of the bottom edge of the
   open panel (Close). Centred on every screen size now that the bar has gone. */
.masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle,
.masthead.nav-open .nav-toggle, .home-v1 .masthead.nav-open .nav-toggle {
  left: 50%; right: auto; width: 15rem; height: 3.375rem; padding: 0 0 .375rem; border-radius: 0; background: none; box-shadow: none; translate: -50% 0;
}
.masthead .nav-toggle::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--black);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 54'%3E%3Cpath d='M0 0C44 0 64 6 80 22C94 36 102 52 120 52C138 52 146 36 160 22C176 6 196 0 240 0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 54'%3E%3Cpath d='M0 0C44 0 64 6 80 22C94 36 102 52 120 52C138 52 146 36 160 22C176 6 196 0 240 0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.masthead .nav-toggle { isolation: isolate; }
.masthead.nav-open .nav-toggle, .home-v1 .masthead.nav-open .nav-toggle { top: calc(var(--menu-h, 22rem) - 1px); }
.masthead .nav-toggle:focus-visible { outline-offset: -2px; }

/* The open menu: nine pages in equal columns (Donate stays floating in the top right corner) */
.masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav {
  grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, auto) auto; grid-auto-flow: column; justify-content: stretch; gap: .9rem 3rem;
  padding-bottom: 3.5rem;
}
.masthead.nav-open .nav a, .masthead.nav-open .nav .nav-menu a, .home-v1 .masthead.nav-open .nav > a { font-size: clamp(1.15rem, 1.5vw, 1.35rem); text-wrap: balance; }
@media (max-width: 1099px) {
  .masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-flow: row; gap: .8rem 2.5rem; }
}
@media (max-width: 760px) {
  .masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
  .masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle,
  .masthead.nav-open .nav-toggle, .home-v1 .masthead.nav-open .nav-toggle { width: 12rem; height: 2.7rem; padding-bottom: .3rem; }
}

/* Donate floats in the top right corner, the same distance from the top and the side, 20% larger than before */
.masthead:not(.nav-open) .nav > a[data-nav="donate"], .home-v1 .masthead:not(.nav-open) .nav > a[data-nav="donate"] {
  position: fixed; top: var(--corner, 1.5rem); right: var(--corner, 1.5rem); min-height: 3.6rem; padding: calc(.7rem + .12em) 1.2rem calc(.7rem - .12em) calc(1.2rem + .05em); font-size: .98rem;
}
@media (max-width: 1000px) { .masthead { --corner: 1rem; } }
/* Inner pages start clear of the Menu corner and the Donate button */
body:not(.home-v1) main { padding-top: 5.75rem; }
@media (max-width: 1000px) { body:not(.home-v1) main { padding-top: 7rem; } }
@media (max-width: 700px) { body:not(.home-v1) main { padding-top: 6.5rem; } }

/* Menu in white: a white bump with black lines and lettering, and a white panel with black links.
   A soft shadow follows the bump's curve so it still shows against white pages. */
.masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle,
.masthead.nav-open .nav-toggle, .home-v1 .masthead.nav-open .nav-toggle { color: var(--black); filter: drop-shadow(0 3px 6px rgba(17, 17, 19, .2)); }
.masthead .nav-toggle:focus-visible { outline-color: var(--black); }
.masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav { background: #fff; }
.masthead.nav-open .nav a, .masthead.nav-open .nav .nav-menu a, .home-v1 .masthead.nav-open .nav > a { color: var(--black); }
.masthead.nav-open .nav a:is(:hover, :focus-visible), .masthead.nav-open .nav a[aria-current="page"] { color: var(--crimson); }
.masthead.nav-open .nav a:focus-visible { outline-color: var(--black); }
.masthead.nav-open .nav > a[data-nav="donate"], .home-v1 .masthead.nav-open .nav > a[data-nav="donate"] { color: #fff; background: var(--crimson); outline-color: rgba(255, 255, 255, .45); }
.masthead.nav-open .nav > a[data-nav="donate"]:is(:hover, :focus-visible) { color: #fff; background: color-mix(in oklch, var(--crimson), #000 20%); }
/* Donate stays exactly where it is, floating in the top right corner, while the menu is open */
.masthead.nav-open .nav > a[data-nav="donate"], .home-v1 .masthead.nav-open .nav > a[data-nav="donate"] {
  position: fixed; top: var(--corner, 1.5rem); right: var(--corner, 1.5rem); width: auto; min-height: 3.6rem; margin: 0;
  padding: calc(.7rem + .12em) 1.2rem calc(.7rem - .12em) calc(1.2rem + .05em); font-size: .98rem; letter-spacing: .12em; justify-content: center;
}
/* Every Donate button is burgundy with white lettering */
.btn-give, .nav a[data-nav="donate"], .nav a[data-nav="donate"][aria-current="page"], .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav > a[data-nav="donate"] { color: #fff; background-color: var(--crimson); box-shadow: none; outline-color: rgba(255, 255, 255, .45); }
.btn-give:is(:hover, :focus-visible), .nav a[data-nav="donate"]:is(:hover, :focus-visible) { color: #fff; background-color: color-mix(in oklch, var(--crimson), #000 20%); }
.home-v1 .masthead:not(.is-scrolled):not(.nav-open) button.nav-toggle { color: var(--black); }
.home-v1 .masthead:not(.is-scrolled):not(.nav-open) button.nav-toggle:focus-visible { outline-color: var(--black); }

/* Springs measured from Farm Africa's own animations, written as CSS curves so no animation library is needed */
:root {
  --spring: linear(0.0000 0%, 0.1386 1.8%, 0.2966 3.6%, 0.4607 5.4%, 0.6200 7.1%, 0.7663 8.9%, 0.8941 10.7%, 1.0000 12.5%, 1.0827 14.3%, 1.1424 16.1%, 1.1808 17.9%, 1.2004 19.6%, 1.2040 21.4%, 1.1951 23.2%, 1.1768 25%, 1.1523 26.8%, 1.1243 28.6%, 1.0953 30.4%, 1.0672 32.1%, 1.0413 33.9%, 1.0187 35.7%, 1.0000 37.5%, 0.9854 39.3%, 0.9748 41.1%, 0.9680 42.9%, 0.9646 44.6%, 0.9639 46.4%, 0.9655 48.2%, 0.9688 50%, 0.9731 51.8%, 0.9780 53.6%, 0.9831 55.4%, 0.9881 57.1%, 0.9927 58.9%, 0.9967 60.7%, 1.0000 62.5%, 1.0026 64.3%, 1.0045 66.1%, 1.0057 67.9%, 1.0063 69.6%, 1.0064 71.4%, 1.0061 73.2%, 1.0055 75%, 1.0048 76.8%, 1.0039 78.6%, 1.0030 80.4%, 1.0021 82.1%, 1.0013 83.9%, 1.0006 85.7%, 1.0000 87.5%, 0.9995 89.3%, 0.9992 91.1%, 0.9990 92.9%, 0.9989 94.6%, 0.9989 96.4%, 0.9989 98.2%, 1.0000 100%);
  --spring-soft: linear(0.0000 0%, 0.1263 1.8%, 0.2540 3.6%, 0.3785 5.4%, 0.4964 7.1%, 0.6052 8.9%, 0.7033 10.7%, 0.7898 12.5%, 0.8643 14.3%, 0.9270 16.1%, 0.9783 17.9%, 1.0192 19.6%, 1.0504 21.4%, 1.0731 23.2%, 1.0884 25%, 1.0974 26.8%, 1.1012 28.6%, 1.1008 30.4%, 1.0971 32.1%, 1.0910 33.9%, 1.0832 35.7%, 1.0743 37.5%, 1.0649 39.3%, 1.0554 41.1%, 1.0462 42.9%, 1.0374 44.6%, 1.0293 46.4%, 1.0221 48.2%, 1.0156 50%, 1.0101 51.8%, 1.0054 53.6%, 1.0016 55.4%, 0.9986 57.1%, 0.9963 58.9%, 0.9946 60.7%, 0.9934 62.5%, 0.9928 64.3%, 0.9925 66.1%, 0.9925 67.9%, 0.9928 69.6%, 0.9932 71.4%, 0.9938 73.2%, 0.9945 75%, 0.9952 76.8%, 0.9959 78.6%, 0.9966 80.4%, 0.9972 82.1%, 0.9978 83.9%, 0.9984 85.7%, 0.9988 87.5%, 0.9993 89.3%, 0.9996 91.1%, 0.9999 92.9%, 1.0001 94.6%, 1.0003 96.4%, 1.0004 98.2%, 1.0000 100%);
  --spring-bounce: linear(0.0000 0%, 0.1123 1.8%, 0.3723 3.6%, 0.6748 5.4%, 0.9417 7.1%, 1.1293 8.9%, 1.2254 10.7%, 1.2412 12.5%, 1.2010 14.3%, 1.1324 16.1%, 1.0596 17.9%, 0.9992 19.6%, 0.9598 21.4%, 0.9423 23.2%, 0.9429 25%, 0.9553 26.8%, 0.9728 28.6%, 0.9900 30.4%, 1.0034 32.1%, 1.0115 33.9%, 1.0144 35.7%, 1.0133 37.5%, 1.0098 39.3%, 1.0054 41.1%, 1.0014 42.9%, 0.9985 44.6%, 0.9969 46.4%, 0.9965 48.2%, 0.9970 50%, 0.9979 51.8%, 0.9990 53.6%, 0.9999 55.4%, 1.0005 57.1%, 1.0008 58.9%, 1.0008 60.7%, 1.0007 62.5%, 1.0004 64.3%, 1.0002 66.1%, 1.0000 67.9%, 0.9998 69.6%, 0.9998 71.4%, 0.9998 73.2%, 0.9998 75%, 0.9999 76.8%, 1.0000 78.6%, 1.0000 80.4%, 1.0000 82.1%, 1.0001 83.9%, 1.0000 85.7%, 1.0000 87.5%, 1.0000 89.3%, 1.0000 91.1%, 1.0000 92.9%, 1.0000 94.6%, 1.0000 96.4%, 1.0000 98.2%, 1.0000 100%);
}

/* ===== Menu tab, after Farm Africa: on hover the lines shrink away on a spring and the word drops in from above ===== */
.masthead .nav-toggle-bars { transition: transform 1s var(--spring), opacity .3s cubic-bezier(.215, .61, .355, 1); }
.nav-toggle:is(:hover, :focus-visible) .nav-toggle-bars, .masthead.nav-open .nav-toggle-bars { transform: scaleX(0); opacity: 0; }
.nav-toggle-word, .masthead .nav-toggle-word { translate: 0 -2.6rem; opacity: 0; transition: translate 1s var(--spring), opacity .3s cubic-bezier(.215, .61, .355, 1); }
.nav-toggle:is(:hover, :focus-visible) .nav-toggle-word, .masthead.nav-open .nav-toggle-word { translate: 0 0; opacity: 1; }

/* ===== Menu open and close, like an app opening on a Mac: the menu grows out of the Menu corner on a spring,
   overshoots a little and settles, and shrinks back into the corner on the same spring as it fades
   (buttons.js adds .is-closing while it does). The first Sunday panel uses the same spring.
   The white of the panel is a layer of its own that does the growing, so Donate (which lives in the menu) stays
   still in its corner; the links pop in with it, and once it has settled the panel itself turns white. ===== */
:root { --spring-pop: linear(0, 0.005 1%, 0.038 3%, 0.099 5%, 0.223 8%, 0.667 17%, 0.797 20%, 0.905 23%, 0.991 26%, 1.054 29%, 1.095 32%, 1.122 36%, 1.123 41%, 1.083 49%, 1.014 61%, 0.987 71%, 0.988 86%, 1); }
.masthead.nav-open .nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; transform-origin: 0 0; animation: menu-pop .7s var(--spring-pop), menu-fade .15s ease-out; }
.masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav { animation: menu-clear .7s; }
.masthead.nav-open .nav a:not([data-nav="donate"]) { transform-origin: 0 0; animation: menu-pop-in .6s .12s var(--spring-pop) backwards; }
.masthead.nav-open.is-closing .nav, .home-v1 .masthead.nav-open.is-closing .nav { background-color: transparent; animation: none; }
.masthead.nav-open.is-closing .nav::before { animation: menu-unpop .7s var(--spring-pop) forwards, menu-out .2s .2s ease-in forwards; }
.masthead.nav-open.is-closing .nav a:not([data-nav="donate"]) { opacity: 0; transition: opacity .1s ease-out; }
@keyframes menu-pop { from { scale: .25; } }
@keyframes menu-unpop { to { scale: .25; } }
@keyframes menu-pop-in { from { opacity: 0; translate: -2rem -1.5rem; scale: .85; } }
@keyframes menu-clear { from, to { background-color: transparent; } }
@keyframes menu-fade { from { opacity: 0; } }
@keyframes menu-out { to { opacity: 0; } }
.masthead.nav-open::after { animation: menu-fade .3s ease-out; }
/* The home page's scroll hint (buttons.js): the page lifts a little to show there is more below and drops back on
   the same spring, bouncing at the top like a phone's scroll, with the dark behind it */
html.hint-down main { animation: hint-down .7s var(--spring-pop) forwards; }
html.hint-up main { animation: hint-up .7s var(--spring-pop); }
html:is(.hint-down, .hint-up) body { background: var(--black); }
@keyframes hint-down { to { translate: 0 -18vh; } }
@keyframes hint-up { from { translate: 0 -18vh; } }
.masthead.nav-open.is-closing::after { opacity: 0; transition: opacity .4s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .masthead .nav-toggle-bars, .nav-toggle-word, .masthead .nav-toggle-word { transition: opacity .2s ease-out; }
  .masthead.nav-open :is(.nav, .nav-toggle, .nav a), .home-v1 .masthead.nav-open :is(.nav, .nav-toggle), .masthead.nav-open::after, .masthead.nav-open .nav::before { animation: none; }
}

/* ===== Pop-ups, after Farm Africa: the backdrop fades in while the box grows from 80% to full size ===== */
.welcome-dialog, .lightbox { opacity: 0; scale: .8; transition: opacity .3s cubic-bezier(.645, .045, .355, 1), scale .3s cubic-bezier(.645, .045, .355, 1), overlay .3s allow-discrete, display .3s allow-discrete; }
.welcome-dialog[open], .lightbox[open] { opacity: 1; scale: 1; }
.welcome-dialog::backdrop, .lightbox::backdrop { opacity: 0; transition: opacity .3s cubic-bezier(.645, .045, .355, 1), overlay .3s allow-discrete, display .3s allow-discrete; }
.welcome-dialog[open]::backdrop, .lightbox[open]::backdrop { opacity: 1; }
@starting-style {
  .welcome-dialog[open], .lightbox[open] { opacity: 0; scale: .8; }
  .welcome-dialog[open]::backdrop, .lightbox[open]::backdrop { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .welcome-dialog, .lightbox, .welcome-dialog::backdrop, .lightbox::backdrop { transition: none; } }

/* ===== Experiment: the closed Menu bump as clear iOS-style glass (a light blur, almost no tint, and a bright edge that catches the light at its shoulders
   along its curve). A shadow filter on the button would stop the glass blurring, so it has none. ===== */
.masthead:not(.nav-open) .nav-toggle, .home-v1 .masthead:not(.nav-open) .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle { filter: none; }
.masthead .nav-toggle::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 54' fill='none'%3E%3Cpath d='M0 0C44 0 64 6 80 22C94 36 102 52 120 52C138 52 146 36 160 22C176 6 196 0 240 0' stroke='%23000' stroke-opacity='.16'/%3E%3Cpath d='M0 0C44 0 64 6 80 22C94 36 102 52 120 52C138 52 146 36 160 22C176 6 196 0 240 0' transform='translate(0 -1.2)' stroke='%23fff' stroke-opacity='.5' stroke-width='1.5'/%3E%3Cpath d='M0 0C44 0 64 6 80 22C94 36 102 52 120 52C138 52 146 36 160 22C176 6 196 0 240 0' transform='translate(0 -1.2)' pathLength='100' stroke-dasharray='0 14 22 28 22 14' stroke='%23fff' stroke-opacity='.55' stroke-width='1.5'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; background-color: rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(7px) saturate(180%) brightness(1.08); backdrop-filter: blur(7px) saturate(180%) brightness(1.08);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .masthead .nav-toggle::before { background-color: rgba(255, 255, 255, .92); } }

/* Like iOS glass, the lines and the word each turn white over dark sections and stay black over light ones
   (buttons.js adds .on-dark to whichever is over a dark part) */
.masthead:not(.nav-open) .nav-toggle .on-dark { color: #fff; }
.masthead .nav-toggle { transition: color .25s ease-out; }
.masthead .nav-toggle-bars, .masthead .nav-toggle-bars::before, .masthead .nav-toggle-bars::after { height: 2px; border-radius: 1px; }

/* The first Sunday tab as a smooth glass bump flowing out of the right edge of the screen, like the Menu bump at the top:
   an S-curve out of the edge, a straight run that holds the words, and an S-curve back. It is drawn at its true size
   (3rem by 24rem, scaled evenly on phones) so the curves are never stretched. The tab is turned upside down for its
   vertical lettering, so its own left side is the screen edge. Its lettering and finger turn white over dark parts
   of the page (buttons.js adds .on-dark) */
.first-sunday .sunday-tab {
  isolation: isolate; justify-content: center; width: 3rem; height: 24rem; padding: 0; border-radius: 0;
  color: var(--black); background: none; box-shadow: none; transition: opacity .2s ease-out, color .25s ease-out;
}
.first-sunday .sunday-tab::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 384' fill='none'%3E%3Cpath d='M0 0C0 50 48 40 48 90V294C48 344 0 334 0 384' stroke='%23000' stroke-opacity='.16'/%3E%3Cpath d='M0 0C0 50 48 40 48 90V294C48 344 0 334 0 384' transform='translate(-1.2 0)' stroke='%23fff' stroke-opacity='.55' stroke-width='1.5'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat, rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(7px) saturate(180%) brightness(1.08); backdrop-filter: blur(7px) saturate(180%) brightness(1.08);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 384'%3E%3Cpath d='M0 0C0 50 48 40 48 90V294C48 344 0 334 0 384Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 384'%3E%3Cpath d='M0 0C0 50 48 40 48 90V294C48 344 0 334 0 384Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.first-sunday .sunday-tab.on-dark { color: #fff; }
/* On hover the glass bump dilates out of the screen edge (the tab is upside down, so its own left is the edge) */
.first-sunday .sunday-tab::before { transform-origin: 0 50%; transition: scale .7s var(--spring-pop); }
.first-sunday .sunday-tab:hover::before { scale: 1.15; }
@media (prefers-reduced-motion: reduce) { .first-sunday .sunday-tab::before { transition: none; } }
.first-sunday .sunday-tab:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .first-sunday .sunday-tab::before { background-color: rgba(255, 255, 255, .92); } }
@media (max-width: 760px) { .first-sunday .sunday-tab { width: 2.75rem; height: 22rem; font-size: .85rem; } }

/* ===== The Menu button in the top left corner, with Donate in the top right (Tobi and Will, 20 Nov) =====
   A clear glass rectangle the same height and corner style as Donate, with the three lines and the word "Menu"
   always showing, so it is plain to older visitors. Open, it fills white, reads "Close" and its lines cross into an X.
   The lettering still turns white over dark parts of the page (buttons.js adds .on-dark). */
.masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle,
.masthead.nav-open .nav-toggle, .home-v1 .masthead.nav-open .nav-toggle {
  position: fixed; top: var(--corner, 1.5rem); left: var(--corner, 1.5rem); right: auto; translate: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem; width: 8.25rem; height: 3.6rem; padding: 0;
  border-radius: 2px; animation: none; transition: color .25s ease-out, scale .15s ease-out;
}
.masthead .nav-toggle > * { grid-area: auto; }
.masthead .nav-toggle::before {
  border-radius: inherit; background: rgba(255, 255, 255, .06); -webkit-mask: none; mask: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 0 0 1px rgba(17, 17, 19, .16);
  outline: 1px solid rgba(255, 255, 255, .35); outline-offset: -5px;
}
.masthead:not(.nav-open) .nav-toggle:hover::before { background-color: rgba(255, 255, 255, .16); }
.masthead .nav-toggle:active { scale: .97; }
.masthead .nav-toggle-word, .masthead.nav-open .nav-toggle-word,
.nav-toggle:is(:hover, :focus-visible) .nav-toggle-word { translate: none; opacity: 1; font-size: .9rem; letter-spacing: .12em; transition: none; }
.masthead .nav-toggle-bars, .nav-toggle:is(:hover, :focus-visible) .nav-toggle-bars { width: 1.4rem; opacity: 1; transform: none; transition: background-color .2s ease-out; }
.masthead .nav-toggle-bars::before, .masthead .nav-toggle-bars::after { width: 1.4rem; transition: transform .35s var(--spring-soft); }
.masthead .nav-toggle-bars::before { top: -6px; }
.masthead .nav-toggle-bars::after { top: 6px; }
.masthead.nav-open .nav-toggle-bars { opacity: 1; transform: none; background: transparent; }
.masthead.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.masthead.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
/* The cross turns back into three lines as soon as the menu starts to close */
.masthead.is-closing .nav-toggle-bars { background-color: currentColor; }
.masthead.is-closing .nav-toggle-bars::before, .masthead.is-closing .nav-toggle-bars::after { transform: none; }
.masthead .nav-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 760px) {
  .masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle,
  .masthead.nav-open .nav-toggle, .home-v1 .masthead.nav-open .nav-toggle { width: 7.25rem; height: 3rem; gap: .6rem; }
  .masthead .nav-toggle-word { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { .masthead .nav-toggle-bars::before, .masthead .nav-toggle-bars::after, .masthead .nav-toggle { transition: none; } }
/* The open menu starts below the Menu (Close) button */
.masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav { padding-top: calc(var(--corner, 1.5rem) + 3.6rem + 2rem); }
@media (max-width: 760px) { .masthead.nav-open .nav, .home-v1 .masthead.nav-open .nav { padding-top: 5.5rem; } }

/* ===== The Menu button as a glass corner: a triangle in the top left whose long edge is smoothed so it flows into
   the top and left edges of the screen. Drawn at its true size (12.5rem, 10rem on phones) so the curves never stretch.
   Only the shape itself can be clicked: the clip sits on the glass layer, not the button, because a clip on the
   button would stop the glass blurring what is behind it. The lines and word sit in the corner; open, it fills
   white and reads "Close". */
.masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle,
.masthead.nav-open .nav-toggle, .home-v1 .masthead.nav-open .nav-toggle {
  top: 0; left: 0; width: 12.5rem; height: 12.5rem; padding: 1.55rem 0 0 1.6rem; border-radius: 0; filter: none;
  flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .6rem; pointer-events: none;
}
.masthead .nav-toggle::before {
  border-radius: 0; box-shadow: none; outline: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none'%3E%3Cpath d='M200 0C150 0 140 20 110 50L50 110C20 140 0 150 0 200' stroke='%23000' stroke-opacity='.16'/%3E%3Cpath d='M200 0C150 0 140 20 110 50L50 110C20 140 0 150 0 200' transform='translate(-1.1 -1.1)' stroke='%23fff' stroke-opacity='.6' stroke-width='1.5'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat, rgba(255, 255, 255, .06);
  pointer-events: auto; clip-path: path("M0 0H200C150 0 140 20 110 50L50 110C20 140 0 150 0 200Z");
}
/* Open, the glass corner melts into the white menu. Closing, it comes back, a little large, and springs into place
   as the menu shrinks into it, with its shadow */
.masthead .nav-toggle::before, .masthead::before { transform-origin: 0 0; transition: opacity .3s ease-out, background-color .3s ease-out, scale .7s var(--spring-pop); }
.masthead.nav-open .nav-toggle::before, .masthead.nav-open::before { scale: 1.15; }
/* On hover the glass corner and its shadow dilate */
.masthead:not(.nav-open) .nav-toggle:hover::before, .masthead:not(.nav-open):has(.nav-toggle:hover)::before { scale: 1.1; }
.masthead.nav-open:not(.is-closing) .nav-toggle::before { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .masthead .nav-toggle::before, .masthead::before { transition: opacity .2s ease-out; }
  .masthead.nav-open .nav-toggle::before, .masthead.nav-open::before, .masthead:not(.nav-open) .nav-toggle:hover::before, .masthead:not(.nav-open):has(.nav-toggle:hover)::before { scale: none; }
}
.masthead .nav-toggle-bars { margin: .4rem 0; }
.masthead .nav-toggle:focus-visible { outline: 0; }
.masthead .nav-toggle:focus-visible::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none'%3E%3Cpath d='M200 0C150 0 140 20 110 50L50 110C20 140 0 150 0 200' transform='translate(-5 -5)' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M200 0C150 0 140 20 110 50L50 110C20 140 0 150 0 200' transform='translate(-5 -5)' stroke='%23111113' stroke-width='2.5'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
@media (max-width: 760px) {
  .masthead .nav-toggle, .home-v1 .masthead .nav-toggle, .home-v1 .masthead:not(.is-scrolled):not(.nav-open) .nav-toggle,
  .masthead.nav-open .nav-toggle, .home-v1 .masthead.nav-open .nav-toggle {
    width: 10rem; height: 10rem; padding: 1.15rem 0 0 1.15rem; gap: .45rem;
  }
  .masthead .nav-toggle::before { clip-path: path("M0 0H160C120 0 112 16 88 40L40 88C16 112 0 120 0 160Z"); }
  .masthead::before { background-size: 10rem; -webkit-mask-size: auto, 10rem; mask-size: auto, 10rem; }
}
/* A soft shadow just outside the corner's curved edge lifts the glass off white pages. It is the corner's shape
   with its shadow, with the shape itself cut away, so nothing sits under the glass. */
.masthead::before {
  content: ""; position: fixed; top: 0; left: 0; width: 15rem; height: 15rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M0 0H200C150 0 140 20 110 50L50 110C20 140 0 150 0 200Z'/%3E%3C/svg%3E") 0 0 / 12.5rem no-repeat; filter: drop-shadow(0 3px 12px rgba(17, 17, 19, .12));
  -webkit-mask: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M0 0H200C150 0 140 20 110 50L50 110C20 140 0 150 0 200Z'/%3E%3C/svg%3E") 0 0 / 12.5rem no-repeat; -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M0 0H200C150 0 140 20 110 50L50 110C20 140 0 150 0 200Z'/%3E%3C/svg%3E") 0 0 / 12.5rem no-repeat; mask-composite: exclude;
}
