/* About Page Styles
 *
 * Page-specific layout only. Build on the tokens and shared classes in
 * global.css (.container, .section, .button, ...) and write mobile-first
 * min-width queries at 48rem / 64rem.
 */

/* Width of the centered text columns; grows on wider screens so the text uses
   more of the page instead of leaving wide empty margins. */
:root {
    --about-text-width: 75ch;
}

@media (min-width: 64rem) {
    :root {
        --about-text-width: 90ch;
    }
}

@media (min-width: 90rem) {
    :root {
        --about-text-width: 105ch;
    }
}

/* ---------- Church introduction (Who We Are / What Kind of a Church Are We?) ---------- */

.about-intro__title,
.leaders__title {
    margin-bottom: var(--space-xl);
    text-align: center;
}

/* Short, thin divider under the heading (decorative, so a pseudo-element) */
.about-intro__title::after,
.leaders__title::after {
    content: "";
    display: block;
    width: 4rem;
    height: 2px;
    margin: var(--space-md) auto 0;
    background-color: var(--color-accent);
}

/* Centered column; the text inside stays left-aligned */
.about-intro__body {
    max-width: var(--about-text-width);
    margin-inline: auto;
    font-size: clamp(var(--font-size-base), 0.95rem + 0.4vw, 1.125rem);
    line-height: 1.75;
    text-align: left;
}

.about-intro__body p {
    margin-bottom: var(--space-lg);
}

.about-intro__body p:last-child {
    margin-bottom: 0;
}

/* Tighten the gap between the two intro sections by 30%: each side of the
   seam keeps 70% of the normal section padding. */
#who-we-are.about-intro {
    padding-bottom: calc(var(--section-space) * 0.7);
}

#what-kind-of-church.about-intro {
    padding-top: calc(var(--section-space) * 0.7);
}

/* ---------- Scripture band (leadership qualifications) ---------- */

/* Darker band than the sections around it, with cream text in both themes.
   The wave transition below it is drawn by the next section (.wave-top), in
   that section's own color. */
.about-scripture {
    --color-text: var(--palette-cream);
    --color-text-muted: var(--palette-cream-muted);

    background-color: var(--palette-steel-deep);
    color: var(--color-text);
}

/* Each quote is a centered column; the text is centered and the reference
   sits flush right against the edge of the quote block. */
.about-scripture__quote {
    max-width: var(--about-text-width);
    margin-inline: auto;
}

.about-scripture__quote + .about-scripture__quote {
    margin-top: var(--space-2xl);
}

.about-scripture__quote blockquote {
    font-size: clamp(var(--font-size-base), 0.95rem + 0.4vw, 1.125rem);
    font-style: italic;
    line-height: 1.75;
    text-align: center;
}

.about-scripture__quote blockquote p {
    margin-bottom: var(--space-md);
}

.about-scripture__quote blockquote p:last-child {
    margin-bottom: 0;
}

.about-scripture__reference {
    margin-top: var(--space-md);
    color: var(--color-text-muted);
    font-weight: 700;
    text-align: right;
}

/* ---------- Our Elders / Our Deacons ---------- */

/* The space below each intro lives on the header: the global p:last-child rule
   zeroes a last paragraph's bottom margin, which would put the photos right
   against the text. */
.leaders__header {
    margin-bottom: var(--space-3xl);
}

.leaders__intro {
    max-width: min(100%, 75ch);
    margin-inline: auto;
    font-size: clamp(var(--font-size-base), 0.95rem + 0.4vw, 1.125rem);
    line-height: 1.75;
    text-align: center;
}

/* Line between the elders and the deacons */
.leaders__rule {
    height: 0;
    margin-block: var(--space-3xl);
    border: 0;
    border-top: 2px solid var(--color-border);
}

/* Profiles wrap and stay centered, so a short last row (five deacons in three
   columns) sits in the middle instead of hugging the left edge. 1 column on
   mobile, 2 from tablet, 3 for deacons on desktop. */
.leaders__list {
    --leaders-columns: 1;
    --leaders-gap: var(--space-2xl);

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2xl) var(--leaders-gap);
    max-width: 62rem;
    margin-inline: auto;
    list-style: none;
}

@media (min-width: 48rem) {
    .leaders__list {
        --leaders-columns: 2;
        --leaders-gap: var(--space-3xl);
    }
}

@media (min-width: 64rem) {
    .leaders__list--deacons {
        --leaders-columns: 3;
    }
}

.leader {
    flex: 0 1 calc((100% - (var(--leaders-columns) - 1) * var(--leaders-gap)) / var(--leaders-columns));
    min-width: 0;
}

/* Sized from each image's width/height attributes, so the photos (square for
   the elders, 3:4 portraits for the deacons) are never stretched or cropped */
.leader__photo {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: var(--space-md);
}

.leader__names {
    margin-bottom: var(--space-2xs);
    color: var(--color-heading);
    font-family: var(--font-serif);
    font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
    line-height: 1.25;
}

.leader__role {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Reference links in the scripture band take the band's text color */
.about-scripture .bible-link {
    color: inherit;
}
