/* ==========================================================================
   Pleasant Ridge Dunkard Brethren Church — site.css (public pages)
   Palette + shared tokens live in tokens.css, linked before this file.
   Every color reference below uses a variable from there.
   ========================================================================== */

/* ---- Reset ---------------------------------------------------------- */

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

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

/* Deliberate, on-brand focus ring for keyboard navigation, everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

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

body,
h1, h2, h3, h4, p,
ul, ol, li,
figure {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

/* ---- Base ------------------------------------------------------------- */

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Safety net so one long unbroken word/URL in admin-entered content
       (a title, a pasted link) can't force horizontal scroll. */
    overflow-wrap: break-word;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-text);
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.3rem; }

p {
    color: var(--color-text);
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-brick-ink);
    margin-bottom: 0.5rem;
}

.section-heading {
    position: relative;
    padding-bottom: 0.9rem;
    margin-bottom: 1.25rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48px;
    height: 3px;
    background: var(--color-brick);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    z-index: 1000;
    border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
    left: 0;
}

.container {
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

@media (min-width: 900px) {
    .container {
        padding-inline: 2rem;
    }
}

/* ---- Buttons ----------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    transition: background-color 0.15s ease;
}

.btn--accent {
    background: var(--color-accent);
    color: var(--color-accent-contrast);
}

.btn--accent:hover {
    background: var(--color-accent-hover);
}

.btn--brick {
    background: var(--color-brick);
    color: var(--color-accent-contrast);
}

.btn--brick:hover {
    background: var(--color-brick-hover);
}

/* ---- Site header / nav -------------------------------------------------- */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.9rem;
}

.site-logo__text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.2;
}

.site-logo__image {
    display: block;
    height: 56px;
    width: auto;
    /* Caps a ~5:1 wordmark so it can never crowd the nav row on narrow
       screens; height still drives the normal, in-proportion size. */
    max-width: 250px;
    border-radius: 3px;
}

@media (max-width: 479px) {
    .site-logo__image {
        height: 42px;
        max-width: 190px;
    }
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
}

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.site-nav.is-open {
    max-height: 420px;
}

.site-nav__list {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1.25rem;
}

.site-nav__link {
    display: block;
    padding: 0.85rem 0;
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.site-nav__list li:last-child .site-nav__link {
    border-bottom: 0;
}

.site-nav__link.is-active {
    color: var(--color-brick-ink);
}

.site-nav__contact {
    display: block;
    width: calc(100% - 2.5rem);
    margin: 1rem 1.25rem 1.25rem;
    text-align: center;
}

@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        max-height: none;
        overflow: visible;
        border-bottom: 0;
        background: transparent;
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .site-nav__list {
        flex-direction: row;
        align-items: center;
        gap: 1.75rem;
        padding: 0;
    }

    .site-nav__link {
        padding: 0.25rem 0;
        border-bottom: 0;
    }

    .site-nav__link.is-active {
        box-shadow: inset 0 -3px 0 var(--color-brick);
    }

    .site-nav__contact {
        width: auto;
        margin: 0;
    }
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
    background: var(--color-surface-alt);
    border-top: 4px solid var(--color-brick);
    padding-block: 4rem;
}

.hero__inner {
    max-width: 640px;
    margin-inline: auto;
    text-align: center;
}

.hero__heading {
    margin-bottom: 1rem;
}

.hero__subtext {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.75rem;
}

@media (min-width: 900px) {
    .hero {
        padding-block: 6rem;
    }

    .hero__inner {
        /* Relax the narrow left-aligned-era cap so "Pleasant Ridge Dunkard
           Brethren Church" has room to sit on one line — .container's own
           padding-inline still keeps the side gutters. */
        max-width: none;
    }

    .hero__heading {
        /* Scales down on narrower tablet widths so the church-name line
           fits without wrapping or overflowing; grows back toward the
           original 3rem as there's more room on wider desktops. */
        font-size: clamp(1.75rem, 1.1rem + 1.8vw, 3rem);
    }
}

/* Full-bleed background photo variant. No full-photo darkening overlay —
   the chosen photo is dark enough on its own for the light heading to
   stay legible; see the feathered halo below for a small localized
   readability boost instead. If a lighter photo is ever used, this may
   need a full scrim (or a toggle) added back; see the note left for the
   user. */
.hero--has-image {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* dvh accounts for mobile browser chrome (URL bar) show/hide so the
       hero doesn't jump or overshoot on scroll; vh is a fallback for
       browsers that don't support dvh. ~90% leaves a sliver of the
       features section visible below the fold as a scroll cue. */
    min-height: 90vh;
    min-height: 90dvh;
    background-image: var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    /* Clips the feathered halo below so it can never cause horizontal
       overflow at narrow widths — by the time it would reach this edge
       it's already faded to near-transparent, so clipping it is
       invisible in practice. */
    overflow: hidden;
}

.hero--has-image .hero__heading {
    color: var(--color-accent-contrast);
    /* Small crisp glow that hugs the letters, complementing the halo
       below — edge-free like the halo, just tighter. */
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.hero--has-image .hero__subtext {
    color: var(--color-border);
}

/* Feathered dark halo behind the hero text — a soft radial glow (not a
   boxed overlay) so the heading/subtext/CTA read a little easier without
   reintroducing the full-photo darkening kickoff 13 removed. Sized off
   .hero__inner's own box via inset, so it automatically re-centers and
   grows with the content — including the taller, more-wrapped heading on
   mobile — with no hard edge at any width. .hero__inner is centered and
   bottom-anchored (see kickoff 12), so anchoring the halo to its own
   center naturally lands it bottom-center behind the text, matching the
   actual current layout. */
.hero--has-image .hero__inner {
    position: relative;
    isolation: isolate;
}

.hero--has-image .hero__inner::before {
    content: '';
    position: absolute;
    inset: -2rem -2.5rem;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(20, 18, 15, 0.68) 0%, rgba(20, 18, 15, 0) 70%);
}

/* ---- Fixed hero reveal (Home only, image hero) -----------------------------
   The hero is pinned full-viewport at the back (z-index 0) while the rest
   of the page — home-content and the shared footer, both bumped into their
   own positioned layer at z-index 1 with an opaque background — scrolls up
   and over it. The spacer reserves the scroll distance the hero would have
   occupied in normal flow, kept in sync with .hero--has-image's own
   min-height above (90vh/90dvh) so there's no gap or overlap.
   --nav-height approximates the sticky header's own rendered height so
   that distance lines up with the slice of the hero actually visible below
   the header; a few px of slack is intentional — erring high here means
   content covers a touch early (invisible) rather than a touch late (a
   visible gap), so it only ever biases toward safe. */
:root {
    --nav-height: 76px;
}

.hero--pinned {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
}

.hero-spacer {
    height: calc(90vh - var(--nav-height));
    height: calc(90dvh - var(--nav-height));
}

.home-content {
    position: relative;
    z-index: 1;
    background: var(--color-bg);
}

@media (prefers-reduced-motion: reduce) {
    .hero--pinned {
        position: static;
    }

    .hero-spacer {
        display: none;
    }
}

/* ---- Feature cards --------------------------------------------------------- */

.features {
    padding-block: 4rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 700px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.feature-card__banner {
    aspect-ratio: 16 / 9;
    background: var(--color-surface-alt);
}

.feature-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-card__content {
    padding: 1.75rem;
}

.feature-card__title {
    margin-bottom: 0.5rem;
}

.feature-card__body {
    color: var(--color-text-muted);
}

.feature-card__button {
    margin-top: 1.25rem;
}

/* ---- Worship times (image left) -------------------------------------------- */

.worship-times {
    background: var(--color-surface-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding-block: 4rem;
}

.worship-times__inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.worship-times__image {
    width: 100%;
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.worship-times__image--placeholder {
    background: var(--color-surface-alt);
    border: 1px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.worship-times__list {
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.worship-times__list li {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
}

.worship-times__list li span:last-child {
    color: var(--color-accent);
}

@media (min-width: 800px) {
    .worship-times__inner {
        flex-direction: row;
        align-items: center;
    }

    .worship-times__image,
    .worship-times__content {
        flex: 1 1 0;
    }

    .worship-times__image {
        aspect-ratio: 1 / 1;
    }
}

/* ---- Listen Live (slate accent background) ------------------------------- */

.listen-live {
    background: var(--color-accent);
    padding-block: 4rem;
}

.listen-live__inner {
    max-width: 640px;
    text-align: center;
}

.listen-live__heading {
    color: var(--color-accent-contrast);
    margin-bottom: 1.25rem;
}

.listen-live__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    color: var(--color-accent-contrast);
    font-size: 1.05rem;
    line-height: 1.5;
}

.listen-live__list-item--bold {
    font-weight: 700;
}

.listen-live__list a {
    color: var(--color-accent-contrast);
    text-decoration: underline;
    font-weight: 700;
}

.listen-live__list a:hover {
    opacity: 0.85;
}

/* ---- Full-width map block --------------------------------------------------- */

.map-section {
    width: 100%;
}

.map-section__placeholder,
.map-section__frame {
    width: 100%;
    aspect-ratio: 21 / 9;
    max-height: 480px;
    border: 0;
    display: block;
}

.map-section__placeholder {
    background: var(--color-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Admin-toggleable (map_tint setting) — visual only, the map underneath
   stays fully interactive; strength lives once in tokens.css. */
.map-embed--tinted .map-section__frame {
    filter: var(--map-tint-filter);
}

/* ---- Secondary-page hero ------------------------------------------------------ */

.page-hero {
    background: var(--color-surface-alt);
    border-top: 4px solid var(--color-brick);
    padding-block: 3rem;
    text-align: center;
}

.page-hero__heading {
    margin: 0;
}

/* ---- Rich text (sanitized CKEditor output) ------------------------------------ */

.rich-text p {
    margin-bottom: 1rem;
}

.rich-text p:last-child {
    margin-bottom: 0;
}

.rich-text h2,
.rich-text h3 {
    margin: 1.5rem 0 0.75rem;
}

.rich-text h2:first-child,
.rich-text h3:first-child {
    margin-top: 0;
}

.rich-text ul,
.rich-text ol {
    margin: 0 0 1rem 1.25rem;
}

.rich-text li {
    margin-bottom: 0.4rem;
}

.rich-text a {
    color: var(--color-accent);
    text-decoration: underline;
}

.rich-text blockquote {
    border-left: 3px solid var(--color-brick);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ---- What We Believe: alternating image/text sections ------------------------- */

.belief-section {
    padding-block: 4rem;
}

.belief-section + .belief-section {
    border-top: 1px solid var(--color-border);
}

.belief-section__inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.belief-section__image {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
}

.belief-section__content {
    max-width: 640px;
}

@media (min-width: 800px) {
    .belief-section__inner {
        flex-direction: row;
        align-items: center;
    }

    .belief-section__image,
    .belief-section__content {
        flex: 1 1 0;
    }

    .belief-section--reverse .belief-section__inner {
        flex-direction: row-reverse;
    }
}

/* ---- Our Beliefs list ---------------------------------------------------------- */

.beliefs-list {
    padding-block: 4rem;
    border-top: 1px solid var(--color-border);
}

.beliefs-list__items {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.beliefs-list__item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
}

.beliefs-list__title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.beliefs-list__group + .beliefs-list__group {
    margin-top: 3rem;
}

.beliefs-list__category {
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--color-brick);
}

/* ---- Media section: square image + rich text (Ministries, Leadership) --------- */

.media-section {
    background: var(--color-surface);
    padding-block: 3rem;
    border-bottom: 1px solid var(--color-border);
}

.media-section--alt {
    background: var(--color-surface-alt);
}

.media-section__inner {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.media-section__image,
.media-section__image--placeholder {
    width: 100%;
    max-width: 280px;
    margin-inline: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}

.media-section__image--placeholder {
    background: var(--color-surface-alt);
    border: 1px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.media-section__heading {
    margin-bottom: 0.25rem;
}

.media-section__subheading {
    color: var(--color-brick-ink);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

@media (min-width: 700px) {
    .media-section__inner {
        flex-direction: row;
        align-items: center;
        gap: 2.5rem;
    }

    .media-section__image,
    .media-section__image--placeholder {
        flex: 0 0 280px;
        margin-inline: 0;
    }

    .media-section__content {
        flex: 1 1 0;
    }

    .media-section--alt .media-section__inner {
        flex-direction: row;
    }

    /* Per-page opt-in (Our Leadership): pins the photo to the top instead
       of centering it against the full row height, so a bio taller than
       the square photo flows down from there rather than pushing the
       photo down to stay centered. */
    .media-section--top .media-section__inner {
        align-items: flex-start;
    }
}

/* ---- Empty-state note ---------------------------------------------------------- */

.empty-note {
    text-align: center;
    color: var(--color-text-muted);
    padding-block: 3rem;
}

/* ---- Events list ---------------------------------------------------------------- */

.events-list {
    padding-block: 4rem;
}

.events-list__items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.events-list__item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-card);
}

.events-list__title {
    margin-bottom: 0.35rem;
}

.events-list__date {
    color: var(--color-text-muted);
    font-weight: 600;
}

.events-list__more {
    color: var(--color-brick-ink);
    font-weight: 600;
    margin-left: 0.35rem;
}

@media (min-width: 600px) {
    .events-list__item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ---- Event detail ---------------------------------------------------------------- */

.event-detail {
    padding-block: 3rem;
}

.event-detail__inner {
    max-width: 720px;
    margin-inline: auto;
}

.event-detail__dates {
    margin-bottom: 2rem;
    border-top: 1px solid var(--color-border);
}

.event-detail__dates li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--color-border);
}

.event-detail__date {
    font-weight: 700;
}

.event-detail__time {
    color: var(--color-accent);
    font-weight: 600;
}

@media (min-width: 500px) {
    .event-detail__dates li {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }
}

.event-detail__description {
    margin-bottom: 2rem;
}

.event-detail__block {
    margin-bottom: 2rem;
}

.event-detail__block-heading {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.event-detail__line {
    margin-bottom: 0.4rem;
}

.event-detail__line a {
    color: var(--color-accent);
    font-weight: 600;
}

.event-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.event-detail__back {
    display: inline-block;
    font-weight: 700;
    color: var(--color-accent);
}

/* ---- Contact ---------------------------------------------------------------------- */

.contact-section {
    padding-block: 4rem;
}

.contact-section__inner {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.contact-form__field input,
.contact-form__field textarea {
    font: inherit;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    resize: vertical;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
}

.contact-form__field input[aria-invalid="true"],
.contact-form__field textarea[aria-invalid="true"] {
    border-color: var(--color-brick);
}

.contact-form__error {
    color: var(--color-brick-ink);
    font-size: 0.8rem;
    font-weight: 600;
}

.contact-form__honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-message {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-message--success {
    background: #E4EDE6;
    color: #2E5B3B;
}

.form-message--error {
    background: var(--color-brick-tint);
    color: var(--color-brick-ink);
}

.form-message--error div + div {
    margin-top: 0.35rem;
}

.contact-info__blurb {
    margin-bottom: 1.25rem;
    color: var(--color-text-muted);
}

.contact-info__line {
    margin-bottom: 0.6rem;
}

.contact-info__line a {
    color: var(--color-accent);
    font-weight: 600;
}

@media (min-width: 900px) {
    .contact-section__inner {
        flex-direction: row;
        align-items: flex-start;
        gap: 4rem;
    }

    .contact-form-col,
    .contact-info-col {
        flex: 1 1 0;
    }
}

/* ---- Page builder blocks -------------------------------------------------------- */

.block-text {
    padding-block: 3rem;
}

.block-image-text {
    padding-block: 3rem;
}

.block-image-text__inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.block-image-text__image {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
}

.block-image-text__content {
    max-width: 640px;
}

@media (min-width: 800px) {
    .block-image-text__inner {
        flex-direction: row;
        align-items: center;
        gap: 2.5rem;
    }

    .block-image-text__image,
    .block-image-text__content {
        flex: 1 1 0;
    }

    .block-image-text--reverse .block-image-text__inner {
        flex-direction: row-reverse;
    }
}

.block-card-row {
    padding-block: 3rem;
}

.block-card-row__grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 700px) {
    .block-card-row__grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

.block-card-row__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.block-card-row__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: block;
}

.block-card-row__title {
    margin-bottom: 0.5rem;
}

.block-card-row__text {
    color: var(--color-text-muted);
}

.block-full-width-image__figure {
    margin: 0;
}

.block-full-width-image__img {
    width: 100%;
    display: block;
    max-height: 600px;
    object-fit: cover;
}

.block-full-width-image__caption {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
}

/* ---- Stub / 404 pages -------------------------------------------------------- */

.stub-page,
.error-page {
    padding-block: 6rem;
    text-align: center;
}

.stub-page__title,
.error-page__title {
    margin-bottom: 1rem;
}

.stub-page__body,
.error-page__body {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.error-page__code {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-brick);
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* ---- Footer ------------------------------------------------------------------ */

.site-footer {
    /* position + z-index only matter on Home with a pinned hero (see the
       fixed hero reveal rules above) — harmless on every other page since
       there's nothing else positioned nearby to stack against. */
    position: relative;
    z-index: 1;
    background: var(--color-text);
    color: var(--color-bg);
}

.site-footer a {
    color: var(--color-bg);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 3rem;
}

.site-footer__name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.site-footer__logo {
    display: block;
    height: 52px;
    width: auto;
    max-width: 270px;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.site-footer__tagline {
    color: var(--color-border);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.site-footer__social {
    display: flex;
    gap: 1rem;
}

.site-footer__social a {
    font-size: 0.85rem;
    font-weight: 600;
}

.site-footer__social a:hover {
    text-decoration: underline;
}

.site-footer__heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    color: var(--color-border);
}

.site-footer__links li,
.site-footer__worship li {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.site-footer__links a:hover {
    text-decoration: underline;
}

.site-footer__worship li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--color-border);
}

.site-footer__address {
    font-size: 0.95rem;
    color: var(--color-border);
    margin-bottom: 0.75rem;
}

.site-footer__directions {
    display: inline-block;
    font-weight: 700;
    border-bottom: 2px solid var(--color-brick);
    padding-bottom: 2px;
}

.site-footer__bottom {
    border-top: 1px solid rgba(246, 242, 234, 0.15);
    padding-block: 1.25rem;
    font-size: 0.85rem;
    text-align: center;
}

.site-footer__bottom p {
    /* The base p{} reset (color: var(--color-text), a dark brown) directly
       targets these <p> elements and otherwise wins over color set on an
       ancestor, since inheritance only applies when nothing matches the
       element itself — hence targeting the <p> directly here, matching
       the muted tone used elsewhere in the footer (tagline, worship
       times, address). */
    color: var(--color-border);
}

.site-footer__credit {
    margin-top: 0.35rem;
}

.site-footer__credit a:hover {
    text-decoration: underline;
}

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

@media (min-width: 1024px) {
    .site-footer__inner {
        /* Brand, Quick Links, Worship Times, Visit Us, in that DOM order —
           Worship Times gets more room since its label/time rows (e.g.
           "Bible Study | First & Third Wednesday") are the widest content
           in the footer; Quick Links and Visit Us give up some width to
           make room. */
        grid-template-columns: 1fr 0.75fr 1.6fr 0.85fr;
    }
}
