/* ==========================================================================
   Macedonia Baptist Church: shared site stylesheet (hand-authored).
   Every page links this file. It holds the design tokens, base type, layout
   bands, and every shared component: header, menu, reading tools, buttons,
   photo cards, page heroes, and the footer. A page keeps its own CSS file
   only for what is truly unique to it (Events, Games). See CLAUDE.md.

   Mobile first: base rules are the phone layout; min-width queries add the
   tablet (40em, 48em) and desktop (64em) layouts.

   Text size: the reading tools scale the root font size, and everything
   here is sized in rem, so the whole page grows together.
   ========================================================================== */

/* ------------------------------------------------------------ tokens --- */

:root {
  --mbc-plum-950: #1a0833;
  --mbc-plum-900: #260c4a;
  --mbc-plum-800: #35136a;
  --mbc-purple: #5c16bd;
  --mbc-lavender-50: #f5f0fc;
  --mbc-gold: #e0a800;
  --mbc-gold-bright: #f6c445;
  --mbc-gold-ink: #8a6400;
  --mbc-cream: #fdfbf6;
  --mbc-ink: #241436;
  --mbc-ink-soft: #4a3d59;
  --mbc-white: #ffffff;

  --mbc-font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --mbc-font-body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;

  --mbc-gutter: 1.25rem;
  --mbc-max: 72rem;
  --mbc-pad: clamp(3.5rem, 8vw, 6rem);
  --mbc-radius: 16px;
  --mbc-radius-btn: 12px;

  /* Photo card overlay: deep plum, heavy at the bottom where the text sits. */
  --mbc-overlay: linear-gradient(to top, rgba(26, 8, 51, 0.85) 0%, rgba(26, 8, 51, 0.6) 45%, rgba(26, 8, 51, 0.2) 100%);

  /* Focus ring colour; dark bands switch it to bright gold. */
  --mbc-focus: var(--mbc-purple);
}

/* ---------------------------------------------------------- text size --- */

/* A / A+ / A++ live only on the History pages (Gene's call), which carry
   data-textsize on <html>. The head script on every page applies the
   stored class before first paint, but only those pages honour it, so a
   size picked on History never follows a reader to a page with no way to
   change it back. Percentages keep any larger default the reader has set
   in their own browser. */
html { font-size: 100%; }
html[data-textsize].mbc-size-2 { font-size: 125%; }
html[data-textsize].mbc-size-3 { font-size: 150%; }

/* --------------------------------------------------------------- base --- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keeps anchor targets clear of the sticky header. */
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background-color: var(--mbc-cream);
  color: var(--mbc-ink);
  font-family: var(--mbc-font-body);
  font-size: 1.25rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--mbc-font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--mbc-plum-900);
}

/* At the largest text size on a narrow phone, one long word (MACEDONIA in
   capitals) can be wider than the screen; let it break rather than push
   the page sideways. */
h1,
h2,
h3,
h4,
.mbc-eyebrow {
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h3 { font-size: clamp(1.5rem, 3.5vw, 2rem); }

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--mbc-purple);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--mbc-plum-800);
}

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

address {
  font-style: normal;
}

.mbc-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mbc-skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--mbc-gold);
  color: var(--mbc-plum-950);
  font-weight: 700;
  border-radius: var(--mbc-radius-btn);
  text-decoration: none;
}

.mbc-skip:focus {
  top: 1rem;
}

/* ------------------------------------------------------------ layout --- */

.mbc-wrap {
  width: 100%;
  max-width: var(--mbc-max);
  margin-inline: auto;
}

.mbc-band {
  padding: var(--mbc-pad) var(--mbc-gutter);
  position: relative;
}

.mbc-band--cream { background-color: var(--mbc-cream); }
.mbc-band--white { background-color: var(--mbc-white); }
.mbc-band--lavender { background-color: var(--mbc-lavender-50); }

/* Deep bands: white text, gold headings, bright-gold focus rings. */
.mbc-band--plum,
.mbc-band--deep,
.mbc-dark-surface {
  color: var(--mbc-white);
  --mbc-focus: var(--mbc-gold-bright);
}

.mbc-band--plum { background-color: var(--mbc-plum-900); }
.mbc-band--deep { background-color: var(--mbc-plum-950); }

.mbc-band--plum h1,
.mbc-band--deep h1,
.mbc-dark-surface h1 {
  color: var(--mbc-white);
}

.mbc-band--plum h2,
.mbc-band--deep h2,
.mbc-band--plum h3,
.mbc-band--deep h3,
.mbc-dark-surface h2,
.mbc-dark-surface h3 {
  color: var(--mbc-gold);
}

.mbc-band--plum a:not(.mbc-btn):not(.mbc-pcard),
.mbc-band--deep a:not(.mbc-btn):not(.mbc-pcard) {
  color: var(--mbc-gold-bright);
}

.mbc-band__head {
  max-width: 46rem;
  margin: 0 0 clamp(2rem, 5vw, 3rem);
}

.mbc-band__head--center {
  margin-inline: auto;
  text-align: center;
}

.mbc-band__head > :last-child {
  margin-bottom: 0;
}

/* Short gold rule under a section heading. Decorative only. */
.mbc-rule {
  display: block;
  width: 4rem;
  height: 4px;
  margin: 0 0 1.25rem;
  border: 0;
  border-radius: 2px;
  background: var(--mbc-gold);
}

.mbc-band__head--center .mbc-rule {
  margin-inline: auto;
}

.mbc-eyebrow {
  display: block;
  margin: 0 0 0.75rem;
  font-family: var(--mbc-font-body);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mbc-gold-ink);
}

.mbc-band--plum .mbc-eyebrow,
.mbc-band--deep .mbc-eyebrow,
.mbc-dark-surface .mbc-eyebrow {
  color: var(--mbc-gold);
}

.mbc-lead {
  font-size: clamp(1.375rem, 2.6vw, 1.625rem);
  line-height: 1.5;
}

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

/* Two columns on desktop: media beside text. */
.mbc-split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Grid items default to min-width: auto, which stops them shrinking below
   their longest word and pushes a narrow phone sideways. */
.mbc-split > *,
.mbc-follow > *,
.mbc-cards > * {
  min-width: 0;
}

@media (min-width: 48em) {
  .mbc-split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .mbc-split--flip > :first-child {
    order: 2;
  }

  .mbc-split--even {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.mbc-photo {
  width: 100%;
  border-radius: var(--mbc-radius);
  object-fit: cover;
}

/* A framed photo: offset gold block behind the image. */
.mbc-framed {
  position: relative;
  margin: 0 1rem 1rem 0;
}

.mbc-framed::before {
  content: "";
  position: absolute;
  inset: 1rem -1rem -1rem 1rem;
  border-radius: var(--mbc-radius);
  background: var(--mbc-gold);
  z-index: 0;
}

.mbc-framed > img {
  position: relative;
  z-index: 1;
}

.mbc-caption {
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  color: var(--mbc-ink-soft);
}

.mbc-dark-surface .mbc-caption,
.mbc-band--plum .mbc-caption,
.mbc-band--deep .mbc-caption {
  color: rgba(255, 255, 255, 0.85);
}

/* ----------------------------------------------------------- buttons --- */

/* One primary style (gold fill) and one secondary style (outline). */
.mbc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--mbc-radius-btn);
  font-family: var(--mbc-font-body);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mbc-btn--primary {
  background-color: var(--mbc-gold);
  border-color: var(--mbc-gold);
  color: var(--mbc-plum-950);
}

.mbc-btn--primary:hover {
  background-color: var(--mbc-gold-bright);
  border-color: var(--mbc-gold-bright);
  color: var(--mbc-plum-950);
}

.mbc-btn--secondary {
  background-color: transparent;
  border-color: currentColor;
  color: var(--mbc-purple);
}

.mbc-btn--secondary:hover {
  background-color: var(--mbc-purple);
  border-color: var(--mbc-purple);
  color: var(--mbc-white);
}

.mbc-band--plum .mbc-btn--secondary,
.mbc-band--deep .mbc-btn--secondary,
.mbc-dark-surface .mbc-btn--secondary {
  color: var(--mbc-white);
}

.mbc-band--plum .mbc-btn--secondary:hover,
.mbc-band--deep .mbc-btn--secondary:hover,
.mbc-dark-surface .mbc-btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: var(--mbc-white);
  color: var(--mbc-white);
}

.mbc-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

/* On a phone, stacked full-width buttons are the easiest targets. */
@media (max-width: 29.99em) {
  .mbc-btns > .mbc-btn {
    flex: 1 1 100%;
  }
}

/* ------------------------------------------------------------ header --- */

.mbc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--mbc-plum-950);
  border-bottom: 3px solid var(--mbc-gold);
  color: var(--mbc-white);
  --mbc-focus: var(--mbc-gold-bright);
}

.mbc-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  max-width: var(--mbc-max);
  min-height: 4.5rem;
  margin-inline: auto;
  padding: 0.5rem var(--mbc-gutter);
}

.mbc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  margin-right: auto;
  color: var(--mbc-white);
  text-decoration: none;
}

.mbc-brand:hover {
  color: var(--mbc-gold-bright);
}

.mbc-logo {
  width: 3rem;
  height: auto;
  flex: none;
}

.mbc-brand__name {
  font-family: var(--mbc-font-head);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.15;
}

.mbc-header__give {
  order: 2;
}

.mbc-header__give .mbc-btn {
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 1.125rem;
}

.mbc-menu-btn {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--mbc-radius-btn);
  background: transparent;
  color: var(--mbc-white);
  cursor: pointer;
}

.mbc-menu-btn:hover {
  border-color: var(--mbc-gold-bright);
  color: var(--mbc-gold-bright);
}

.mbc-menu-btn svg {
  width: 26px;
  height: 26px;
}

.mbc-menu-btn .mbc-icon-close,
.mbc-menu-btn[aria-expanded="true"] .mbc-icon-open {
  display: none;
}

.mbc-menu-btn[aria-expanded="true"] .mbc-icon-close {
  display: block;
}

/* Without JavaScript the menu button does nothing, so hide it and let the
   menu sit open as a plain list across the bottom of the header. */
html:not(.mbc-js) .mbc-menu-btn {
  display: none;
}

/* A very large text size on a narrow phone: drop the name, keep the logo. */
@media (max-width: 29.99em) {
  html[data-textsize].mbc-size-2 .mbc-brand__name,
  html[data-textsize].mbc-size-3 .mbc-brand__name {
    display: none;
  }
}

@media (max-width: 22.49em) {
  .mbc-brand__name {
    display: none;
  }
}

/* -------------------------------------------------------------- menu --- */

.mbc-nav {
  order: 4;
  flex: 1 1 100%;
}

.mbc-nav__list,
.mbc-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mbc-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-left: 6px solid transparent;
  background: none;
  color: var(--mbc-white);
  font-family: var(--mbc-font-body);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mbc-nav__link:hover {
  color: var(--mbc-gold-bright);
  background-color: var(--mbc-plum-800);
}

.mbc-nav__link[aria-current] {
  border-left-color: var(--mbc-gold);
  color: var(--mbc-gold-bright);
}

.mbc-nav__list > li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mbc-nav__sub .mbc-nav__link {
  font-size: 1.25rem;
  padding-left: 2.25rem;
}

.mbc-nav__chev {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  transition: transform 0.2s ease;
}

.mbc-nav__toggle[aria-expanded="true"] .mbc-nav__chev {
  transform: rotate(180deg);
}

.mbc-js .mbc-nav__toggle[aria-expanded="false"] + .mbc-nav__sub {
  display: none;
}

/* Phones and tablets: the menu is a full-width plum panel under the header.
   mbc-site.js sets --mbc-nav-top to the header's bottom edge so the panel
   fills exactly the rest of the screen. */
@media (max-width: 63.99em) {
  .mbc-js .mbc-nav {
    display: none;
  }

  .mbc-js .mbc-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--mbc-nav-top, 5rem));
    height: calc(100dvh - var(--mbc-nav-top, 5rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem var(--mbc-gutter) 3rem;
    background-color: var(--mbc-plum-900);
  }

  .mbc-js .mbc-nav.is-open .mbc-nav__list {
    max-width: 40rem;
    margin-inline: auto;
  }

  html.mbc-menu-open {
    overflow: hidden;
  }
}

/* Desktop: logo left, menu in the middle, Give on the right. About is a
   click-to-open dropdown (keyboard friendly, not hover-only). */
@media (min-width: 64em) {
  .mbc-header__bar {
    flex-wrap: nowrap;
    gap: 1rem;
  }

  .mbc-brand {
    flex: 1 1 0;
    margin-right: 0;
  }

  .mbc-menu-btn {
    display: none;
  }

  .mbc-nav {
    order: 1;
    flex: none;
  }

  .mbc-header__give {
    order: 2;
    flex: 1 1 0;
    display: flex;
    justify-content: flex-end;
  }

  .mbc-nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .mbc-nav__list > li + li {
    border-top: 0;
  }

  .mbc-nav__link {
    width: auto;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border-left: 0;
    border-bottom: 3px solid transparent;
    font-size: 1.125rem;
    white-space: nowrap;
  }

  .mbc-nav__link:hover {
    background: none;
  }

  .mbc-nav__link[aria-current],
  .mbc-nav__group:has([aria-current]) > .mbc-nav__toggle {
    border-bottom-color: var(--mbc-gold);
    color: var(--mbc-white);
  }

  .mbc-nav__chev {
    width: 1rem;
    height: 1rem;
  }

  .mbc-nav__group {
    position: relative;
  }

  .mbc-nav__sub {
    position: absolute;
    top: calc(100% + 0.625rem);
    left: 0;
    min-width: 15rem;
    padding: 0.5rem;
    border-top: 3px solid var(--mbc-gold);
    border-radius: 0 0 var(--mbc-radius-btn) var(--mbc-radius-btn);
    background-color: var(--mbc-plum-900);
    box-shadow: 0 16px 40px rgba(10, 2, 24, 0.45);
  }

  .mbc-nav__sub .mbc-nav__link {
    width: 100%;
    min-height: 3rem;
    padding: 0.625rem 1rem;
    border-bottom: 0;
    border-left: 4px solid transparent;
    font-size: 1.125rem;
  }

  .mbc-nav__sub .mbc-nav__link:hover {
    background-color: var(--mbc-plum-800);
  }

  .mbc-nav__sub .mbc-nav__link[aria-current] {
    border-left-color: var(--mbc-gold);
    color: var(--mbc-gold-bright);
  }

  /* The largest text size makes the menu too wide for the name beside it. */
  html[data-textsize].mbc-size-3 .mbc-brand__name {
    display: none;
  }
}

/* ----------------------------------------------------- reading tools --- */

/* Slim row directly under the header on every page: A / A+ / A++ and
   "Listen to this page". The Listen group ships hidden and mbc-site.js
   reveals it only when the browser can speak. */
.mbc-tools {
  background-color: var(--mbc-plum-900);
  color: var(--mbc-white);
  padding: 0.5rem var(--mbc-gutter);
  --mbc-focus: var(--mbc-gold-bright);
}

.mbc-tools__row {
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: var(--mbc-max);
  margin-inline: auto;
}

.mbc-tools__group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mbc-tools__group[hidden] {
  display: none;
}

.mbc-tools__label {
  margin-right: 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.mbc-sizebtn,
.mbc-listenbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.25rem 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  background: transparent;
  color: var(--mbc-white);
  font-family: var(--mbc-font-body);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.mbc-sizebtn[data-size="1"] { font-size: 1.125rem; }
.mbc-sizebtn[data-size="2"] { font-size: 1.3125rem; }
.mbc-sizebtn[data-size="3"] { font-size: 1.5rem; }

.mbc-sizebtn:hover,
.mbc-listenbtn:hover {
  border-color: var(--mbc-gold-bright);
}

.mbc-sizebtn[aria-pressed="true"] {
  background-color: var(--mbc-gold);
  border-color: var(--mbc-gold);
  color: var(--mbc-plum-950);
}

.mbc-listenbtn {
  font-size: 1.125rem;
}

.mbc-listenbtn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.mbc-listenbtn[hidden],
.mbc-listenbtn__state[hidden],
.mbc-listenbtn__idle[hidden] {
  display: none;
}

@media (max-width: 29.99em) {
  .mbc-tools__label,
  .mbc-tools__more {
    display: none;
  }
}

/* Everywhere but the History pages the text-size buttons are left out and
   only Listen shows, on the right. If the browser cannot speak, that row
   would be empty, so it goes. */
html:not([data-textsize]) .mbc-tools__group--size {
  display: none;
}

html:not([data-textsize]) .mbc-tools__group--listen {
  margin-left: auto;
}

html.mbc-no-listen:not([data-textsize]) .mbc-tools {
  display: none;
}

/* -------------------------------------------------------------- hero --- */

.mbc-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(82vh, 48rem);
  min-height: min(82svh, 48rem);
  padding: 6rem var(--mbc-gutter) clamp(2.5rem, 7vw, 5rem);
  background-color: var(--mbc-plum-950);
  color: var(--mbc-white);
  --mbc-focus: var(--mbc-gold-bright);
}

.mbc-hero__media,
.mbc-hero__media picture {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.mbc-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}

/* Crossfade: photo C sits on top of photo A and slowly fades in and out:
   ten seconds on each photo, a two-second fade between (a 24s loop). The
   Pause button (added by mbc-site.js) freezes it; readers who ask for
   reduced motion never get the second photo at all (the hero's inline
   script leaves it out). */
.mbc-hero__media .mbc-hero__fade {
  z-index: -1;
  opacity: 0;
  animation: mbc-hero-fade 24s ease-in-out infinite;
}

.mbc-hero.is-paused .mbc-hero__fade {
  animation-play-state: paused;
}

@keyframes mbc-hero-fade {
  0%, 41.667% { opacity: 0; }
  50%, 91.667% { opacity: 1; }
  100% { opacity: 0; }
}

.mbc-hero__pause {
  position: absolute;
  top: 1rem;
  right: var(--mbc-gutter);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.25rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(26, 8, 51, 0.7);
  color: var(--mbc-white);
  font-family: var(--mbc-font-body);
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
}

.mbc-hero__pause:hover {
  border-color: var(--mbc-gold-bright);
}

.mbc-hero__pause svg {
  width: 1.125rem;
  height: 1.125rem;
}

@media (prefers-reduced-motion: reduce) {
  .mbc-hero__media .mbc-hero__fade,
  .mbc-hero__pause {
    display: none;
  }
}

.mbc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(26, 8, 51, 0.95) 0%, rgba(26, 8, 51, 0.82) 38%, rgba(26, 8, 51, 0.5) 58%, rgba(26, 8, 51, 0.3) 78%, rgba(26, 8, 51, 0.4) 100%);
}

@media (min-width: 48em) {
  .mbc-hero::after {
    background:
      linear-gradient(to right, rgba(26, 8, 51, 0.82) 0%, rgba(26, 8, 51, 0.45) 45%, rgba(26, 8, 51, 0) 70%),
      linear-gradient(to top, rgba(26, 8, 51, 0.85) 0%, rgba(26, 8, 51, 0.2) 55%, rgba(26, 8, 51, 0.3) 100%);
  }
}

.mbc-hero__content {
  width: 100%;
  max-width: var(--mbc-max);
  margin-inline: auto;
}

.mbc-hero__text {
  max-width: 38rem;
}

.mbc-hero h1 {
  margin: 0 0 1rem;
  color: var(--mbc-white);
  text-shadow: 0 2px 18px rgba(10, 2, 24, 0.5);
}

.mbc-hero__tagline {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  line-height: 1.45;
}

.mbc-hero__tagline strong {
  color: var(--mbc-gold-bright);
}

/* Inner-page hero: shorter, same overlay treatment. */
.mbc-pagehero {
  min-height: clamp(20rem, 55vw, 30rem);
}

/* Hero A | C preview switch (only with ?preview in the URL). Temporary:
   it goes once Gene picks a hero. */
.mbc-herosw {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.5rem 0.375rem 1rem;
  border: 2px solid var(--mbc-gold);
  border-radius: 999px;
  background: var(--mbc-plum-950);
  color: var(--mbc-white);
  font-size: 1.125rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(10, 2, 24, 0.4);
  --mbc-focus: var(--mbc-gold-bright);
}

.mbc-herosw a {
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  color: var(--mbc-white);
  text-decoration: none;
}

.mbc-herosw a[aria-current] {
  background: var(--mbc-gold);
  color: var(--mbc-plum-950);
}

/* ------------------------------------------------------- photo cards --- */

/* Stacked full width on phones, a grid on tablet and desktop. The whole
   card is one link; the photo is an <img> under a plum overlay. */
.mbc-cards {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40em) {
  .mbc-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .mbc-cards--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

.mbc-pcard {
  /* Lets a photo be positioned in card-width units (cqw), e.g. to pin a
     head to the top edge at every card size. */
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: clamp(15rem, 62vw, 19rem);
  overflow: hidden;
  border-radius: var(--mbc-radius);
  background-color: var(--mbc-plum-900);
  color: var(--mbc-white);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(26, 8, 51, 0.18);
}

.mbc-pcard:hover {
  color: var(--mbc-white);
}

.mbc-pcard__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mbc-pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--mbc-overlay);
}

.mbc-pcard:hover .mbc-pcard__img,
.mbc-pcard:focus-visible .mbc-pcard__img {
  transform: scale(1.05);
}

.mbc-pcard:focus-visible {
  outline: 3px solid var(--mbc-focus);
  outline-offset: 4px;
}

.mbc-pcard__body {
  padding: 1.5rem;
}

.mbc-pcard__body::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 0.875rem;
  border-radius: 2px;
  background: var(--mbc-gold);
}

.mbc-pcard .mbc-pcard__title {
  margin: 0 0 0.25rem;
  color: var(--mbc-white);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  text-transform: none;
  letter-spacing: 0;
}

.mbc-pcard__text {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.4;
}

/* The Give card: solid gold, plum text, no photo. */
.mbc-pcard--gold {
  background-color: var(--mbc-gold);
  color: var(--mbc-plum-950);
  --mbc-focus: var(--mbc-purple);
}

.mbc-pcard--gold::before {
  display: none;
}

.mbc-pcard--gold:hover {
  background-color: var(--mbc-gold-bright);
  color: var(--mbc-plum-950);
}

.mbc-pcard--gold .mbc-pcard__title {
  color: var(--mbc-plum-950);
}

.mbc-pcard--gold .mbc-pcard__body::before {
  background: var(--mbc-plum-950);
}

.mbc-pcard__icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 4.5rem;
  height: 4.5rem;
  color: var(--mbc-plum-950);
  opacity: 0.85;
}

/* Portrait cards (ministers): 4:5 photo above the name. */
.mbc-person {
  margin: 0;
}

.mbc-person img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--mbc-radius);
}

.mbc-person figcaption {
  margin-top: 1rem;
}

.mbc-person__name {
  display: block;
  font-family: var(--mbc-font-head);
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.mbc-person__title {
  display: block;
  color: var(--mbc-ink-soft);
}

/* Text-only info card on a light band. */
.mbc-info {
  height: 100%;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-top: 4px solid var(--mbc-gold);
  border-radius: var(--mbc-radius);
  background-color: var(--mbc-white);
  box-shadow: 0 10px 28px rgba(26, 8, 51, 0.08);
}

.mbc-info > :last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------- home: tiles --- */

/* "This Week at Macedonia": five cards. Desktop puts the first two side by
   side on top and the other three below. */
@media (min-width: 40em) {
  .mbc-cards--week > :first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64em) {
  .mbc-cards--week {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mbc-cards--week > :first-child {
    grid-column: auto;
  }

  .mbc-cards--week > :nth-child(-n + 2) {
    grid-column: span 3;
  }

  .mbc-cards--week > :nth-child(n + 3) {
    grid-column: span 2;
  }

  .mbc-cards--week > :nth-child(-n + 2) .mbc-pcard {
    min-height: 22rem;
  }
}

/* ---------------------------------------------------- home: sections --- */

/* The Pastor and First Lady portrait exists only as a 975 x 1459 file, so
   it never shows wider than 480 CSS px, even at the largest text size. */
.mbc-welcome__photo {
  max-width: min(26rem, 480px);
  margin-inline: auto;
}

.mbc-welcome__photo img {
  aspect-ratio: 4 / 5;
  object-position: 50% 15%;
}

.mbc-signature {
  margin: 1.5rem 0 0;
  padding-left: 1rem;
  border-left: 4px solid var(--mbc-gold);
  line-height: 1.4;
}

.mbc-signature strong {
  display: block;
  font-family: var(--mbc-font-head);
  font-size: 1.5rem;
  color: var(--mbc-plum-900);
}

/* Deep band with the purple-light texture faintly behind it. */
.mbc-texture {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  pointer-events: none;
}

.mbc-band > .mbc-wrap {
  position: relative;
  z-index: 1;
}

.mbc-since h2 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  text-transform: none;
  letter-spacing: 0;
}

/* ------------------------------------------------- home: follow along --- */

/* Latest YouTube service as a click-to-load card: nothing from YouTube
   loads until someone presses play (mbc-site.js swaps in the player).
   Without JavaScript the card is a plain link to the channel. */
.mbc-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--mbc-radius);
  background-color: var(--mbc-plum-950);
  box-shadow: 0 10px 28px rgba(26, 8, 51, 0.18);
}

.mbc-video__facade {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 0;
  background: none;
  color: var(--mbc-white);
  font-family: var(--mbc-font-body);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  --mbc-focus: var(--mbc-gold-bright);
}

.mbc-video__facade:hover {
  color: var(--mbc-white);
}

.mbc-video__facade:focus-visible {
  outline-offset: -6px;
}

.mbc-video__facade img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mbc-video__facade::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(26, 8, 51, 0.55);
}

.mbc-video__play {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: var(--mbc-gold);
  color: var(--mbc-plum-950);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.mbc-video__play svg {
  width: 2.25rem;
  height: 2.25rem;
  margin-left: 0.25rem;
}

.mbc-video__facade:hover .mbc-video__play,
.mbc-video__facade:focus-visible .mbc-video__play {
  background-color: var(--mbc-gold-bright);
  transform: scale(1.06);
}

.mbc-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* An icon inside a button. */
.mbc-btn svg {
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
}

/* The "stage": a deep plum panel with the purple-light texture and a gold
   glow, holding the live tag and the video card. */
.mbc-follow__stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.25rem, 3.5vw, 2rem);
  border-radius: 24px;
  background-color: var(--mbc-plum-950);
  box-shadow: 0 24px 60px rgba(26, 8, 51, 0.28);
  color: var(--mbc-white);
  --mbc-focus: var(--mbc-gold-bright);
}

/* Playing: a thin frame, so nearly all of it is picture. */
.is-playing .mbc-follow__stage {
  padding: 0.75rem;
}

@media (min-width: 48em) {
  .is-playing .mbc-follow__stage {
    padding: 1rem 1.25rem 1.25rem;
  }
}

/* Phones, once playing: the panel runs edge to edge, so the video is as
   wide as the screen allows. */
@media (max-width: 39.99em) {
  .is-playing .mbc-follow__stage {
    margin-inline: calc(var(--mbc-gutter) * -1);
    border-radius: 0;
  }
}

.mbc-follow__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 110%, rgba(224, 168, 0, 0.38), rgba(224, 168, 0, 0) 55%),
    radial-gradient(circle at 0% 0%, rgba(92, 22, 189, 0.55), rgba(92, 22, 189, 0) 60%);
}

.mbc-follow__stage > .mbc-texture {
  z-index: -2;
  opacity: 0.35;
}

.mbc-follow__stage .mbc-video {
  border: 2px solid rgba(246, 196, 69, 0.55);
  box-shadow: 0 16px 40px rgba(10, 2, 24, 0.5);
}

.mbc-live {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.625rem;
  margin: 0.25rem 0.25rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mbc-gold-bright);
}

@media (max-width: 29.99em) {
  .mbc-follow__stage .mbc-video .mbc-video__play {
    width: 4rem;
    height: 4rem;
    box-shadow: 0 0 0 8px rgba(224, 168, 0, 0.25);
  }

  .mbc-video__sub {
    display: none;
  }

  .mbc-live {
    letter-spacing: 0.05em;
  }
}

/* Red "on air" dot: decorative, the text says the same thing. */
.mbc-live__dot {
  width: 0.75rem;
  height: 0.75rem;
  flex: none;
  border-radius: 50%;
  background-color: #ff4d5e;
  box-shadow: 0 0 0 4px rgba(255, 77, 94, 0.25);
}

/* The smallest phones: the play button alone; the label stays for screen
   readers (it is the link's name). */
@media (max-width: 22.49em) {
  .mbc-video__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.mbc-video__sub {
  display: block;
  font-size: 1.125rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}

/* Bigger play button with a soft gold halo on the stage. */
.mbc-follow__stage .mbc-video__play {
  width: 5.5rem;
  height: 5.5rem;
  box-shadow: 0 0 0 10px rgba(224, 168, 0, 0.25), 0 0 0 22px rgba(224, 168, 0, 0.1);
}

/* Social tiles: one large tap target per platform, monochrome icons in a
   plum badge, the platform name, what you'll find there, and an arrow. */
.mbc-stiles {
  display: grid;
  gap: 0.875rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

/* Follow Along layout. Before play: the video beside the heading and the
   social tiles. Once someone presses play (mbc-site.js adds .is-playing to
   the section), the video grows to the full content width in place, and
   the heading and tiles move below it, for members with low vision. */
.mbc-follow {
  display: grid;
  gap: 2rem;
}

.mbc-follow > .mbc-band__head {
  margin-bottom: 0;
}

.mbc-follow > .mbc-stiles {
  margin-top: 0;
}

@media (min-width: 48em) {
  .mbc-follow {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas:
      "stage head"
      "stage tiles";
    column-gap: clamp(2rem, 5vw, 4rem);
    row-gap: 2rem;
  }

  .mbc-follow > .mbc-band__head {
    grid-area: head;
    align-self: end;
  }

  .mbc-follow > .mbc-follow__stage {
    grid-area: stage;
    align-self: center;
  }

  .mbc-follow > .mbc-stiles {
    grid-area: tiles;
    align-self: start;
  }

  .is-playing .mbc-follow {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "stage stage"
      "head tiles";
    row-gap: 2.5rem;
  }

  .is-playing .mbc-follow > .mbc-band__head {
    align-self: start;
  }
}

.mbc-stile {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
  padding: 0.875rem 1.25rem 0.875rem 0.875rem;
  border: 2px solid rgba(38, 12, 74, 0.1);
  border-radius: var(--mbc-radius);
  background-color: var(--mbc-white);
  color: var(--mbc-ink);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(26, 8, 51, 0.07);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mbc-stile:hover {
  border-color: var(--mbc-gold);
  color: var(--mbc-ink);
  box-shadow: 0 12px 28px rgba(26, 8, 51, 0.14);
  transform: translateY(-2px);
}

.mbc-stile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
  border-radius: 14px;
  background-color: var(--mbc-plum-900);
  color: var(--mbc-gold-bright);
  transition: background-color 0.2s ease;
}

.mbc-stile:hover .mbc-stile__icon {
  background-color: var(--mbc-purple);
}

.mbc-stile__icon svg {
  width: 1.625rem;
  height: 1.625rem;
}

.mbc-stile__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.3;
}

.mbc-stile__text strong {
  font-family: var(--mbc-font-head);
  font-size: 1.375rem;
  color: var(--mbc-plum-900);
}

.mbc-stile__text span {
  font-size: 1.125rem;
  color: var(--mbc-ink-soft);
}

/* A long web address (the YouTube handle) must wrap on a narrow phone. */
.mbc-stile__text strong,
.mbc-stile__text span {
  overflow-wrap: anywhere;
}

.mbc-stile__go {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  color: var(--mbc-purple);
  transition: transform 0.2s ease;
}

.mbc-stile:hover .mbc-stile__go {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .mbc-stile:hover,
  .mbc-stile:hover .mbc-stile__go {
    transform: none;
  }
}

/* ------------------------------------------------------------ footer --- */

.mbc-footer {
  background-color: var(--mbc-plum-950);
  color: rgba(255, 255, 255, 0.92);
  border-top: 3px solid var(--mbc-gold);
  --mbc-focus: var(--mbc-gold-bright);
}

.mbc-footer a {
  color: var(--mbc-white);
}

.mbc-footer a:hover {
  color: var(--mbc-gold-bright);
}

.mbc-footer__inner {
  display: grid;
  gap: 2.5rem;
  max-width: var(--mbc-max);
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 4.5rem) var(--mbc-gutter) 2.5rem;
}

@media (min-width: 40em) {
  .mbc-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .mbc-footer__inner {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
  }
}

.mbc-footer .mbc-brand {
  margin: 0 0 1rem;
}

.mbc-footer .mbc-logo {
  width: 4.5rem;
}

.mbc-footer .mbc-brand__name {
  font-size: 1.375rem;
  display: inline;
}

.mbc-footer__h {
  margin: 0 0 0.875rem;
  font-family: var(--mbc-font-body);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mbc-gold);
}

.mbc-footer p,
.mbc-footer address {
  margin: 0 0 0.75rem;
}

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

.mbc-footer__list a,
.mbc-footer p a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}

.mbc-social {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.mbc-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: var(--mbc-white);
}

.mbc-social a:hover {
  border-color: var(--mbc-gold-bright);
  color: var(--mbc-gold-bright);
}

.mbc-social svg {
  width: 22px;
  height: 22px;
}

.mbc-footer__base {
  max-width: var(--mbc-max);
  margin-inline: auto;
  padding: 1.5rem var(--mbc-gutter) 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
}

.mbc-footer__base p {
  margin: 0;
}

/* ------------------------------------------------- page components --- */

/* Centres the button row under a centred band heading (.mbc-btns is a
   flex row, so text-align alone does not move it). */
.mbc-band__head--center .mbc-btns {
  justify-content: center;
}

/* History story pages: the church's own history, word for word. The
   reading column keeps lines to roughly 65 to 70 characters. */
.mbc-story {
  max-width: 42rem;
}

.mbc-story-h {
  font-family: var(--mbc-font-head);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--mbc-gold);
  color: var(--mbc-plum-900);
}

.mbc-story-h:first-child {
  margin-top: 0;
}

.mbc-story-p {
  font-size: 1.25rem;
  line-height: 1.7;
  margin: 0 0 1.25rem;
  color: var(--mbc-ink);
}

.mbc-story-list {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
  color: var(--mbc-ink);
}

.mbc-story-list li {
  margin-bottom: 0.4rem;
}

/* Previous / next era links at the foot of a story page. */
.mbc-storynav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: space-between;
}

.mbc-storynav .mbc-btn {
  flex: 1 1 auto;
}

/* Give: icon badge above the heading of each way-to-give card (the badge
   itself reuses .mbc-stile__icon). */
.mbc-give-card__icon {
  margin-bottom: 1rem;
}

/* Volunteer: the one ministry with a real photo (Choir) is a wide
   photo-and-text row; the text-only ministries sit in an even row below. */
.mbc-volunteer__feature {
  margin-bottom: 2rem;
}

.mbc-volunteer__feature .mbc-photo {
  aspect-ratio: 3 / 2;
}

.mbc-volunteer__close {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
}

/* ---------------------------------------------------- reduced motion --- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .mbc-pcard:hover .mbc-pcard__img,
  .mbc-pcard:focus-visible .mbc-pcard__img {
    transform: none;
  }
}
