﻿/* ─── Welcome Home ─────────────────────────────────────────────── */
.welcomehome {
    background: var(--white);
    padding: 3rem 0;
}

.welcomehome__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.welcomehome__title {
    font-weight: 600;
    font-size: clamp(1.5rem, 6vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 1.75rem;
}

.welcomehome__right h2 {
    font-weight: 600;
    font-size: clamp(1rem, 5vw, 1.75rem);
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 1.1rem;
}

    .welcomehome__right h2 em {
        font-style: italic;
    }

.welcomehome__right p {
    font-size: clamp(0.875rem, 4vw, 1rem);
    line-height: 1.75;
    color: #475569;
}

@media (min-width: 900px) {
    .welcomehome {
        padding: 4rem 0;
    }

    .welcomehome__grid {
        grid-template-columns: 1fr 1fr;
        gap: 0rem;
        align-items: start;
    }

    .welcomehome__title {
        max-width: 370px;
    }
}

/* ─── Meet Our Senior Pastor ──────────────────────────────────── */
.pastor {
    background: #EEF2F3;
    padding: 3rem 0;
}

.pastor__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.pastor__img-wrap {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 4.2;
}

    .pastor__img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.pastor__content h2 {
    font-weight: 700;
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.pastor__content p {
    font-size: clamp(14px,4vw, 16px);
    line-height: 1.75;
    color: var(--ink-soft);
    margin-bottom: 1.15rem;
}

.pastor__signature {
    margin: 1.25rem 0 0.35rem;
}

.pastor__name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 0.2rem;
}

.pastor__role {
    font-size: 0.85rem;
    color: var(--grey);
}

@media (min-width: 900px) {
    .pastor {
        padding: 4rem 0;
    }

    .pastor__grid {
        grid-template-columns: 1fr 1.15fr;
        gap: 4rem;
        align-items: start;
    }

    .pastor__img-wrap {
        position: sticky;
        top: 110px;
        height: 100%;
        aspect-ratio: unset;
    }

    .pastor__signature {
        margin-top: 4.25rem;
    }
}

/* ─── What We Believe As A Church ──────────────────────────────── */
.beliefs {
    background: var(--white);
    padding: 3rem 0;
}

.beliefs__title {
    font-weight: 700;
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 3rem;
}

.beliefs__list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.belief-row {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 20px;
    min-height: 300px;
}

.belief-row--connecting {
    background: #2C4BE0;
}

.belief-row--growing {
    background: #3A1E7A;
}

.belief-row--serving {
    background: #14966E;
}

.belief-row__img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: none;
}

.belief-row__fade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    display: none;
}

.belief-row__content {
    position: relative;
    z-index: 2;
    padding: 2.25rem 1.75rem;
    max-width: 380px;
}

    .belief-row__content h3 {
        font-weight: 400;
        font-size: 1.5rem;
        letter-spacing: 0.01em;
        text-transform: uppercase;
        color: var(--white);
        margin-bottom: 0.75rem;
    }

    .belief-row__content p {
        font-size: 0.9rem;
        line-height: 1.6;
        color: rgba(255,255,255,0.88);
        margin-bottom: 1.5rem;
    }

.belief-row__btn {
    display: inline-flex;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.55);
    border-radius: 9999px;
    padding: 0.85rem 1.6rem;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

    .belief-row__btn:hover {
        background: rgba(255,255,255,0.14);
        border-color: rgba(255,255,255,0.8);
    }

@media (min-width: 768px) {
    .belief-row {
        flex-direction: row;
        min-height: 306px;
    }

    .belief-row__img {
        top: 0;
        bottom: 0;
        left: auto;
        right: auto;
        width: 58%;
        height: 100%;
        display: block;
    }

    .belief-row__fade {
        display: block;
        width: 58%;
    }

    .belief-row__content {
        padding: 2.75rem 3rem;
        max-width: 420px;
        margin-top: 0;
    }

    /* Image on the right, content on the left */
    .belief-row--imgRight {
        justify-content: flex-start;
    }

        .belief-row--imgRight .belief-row__img,
        .belief-row--imgRight .belief-row__fade {
            right: 0;
            left: auto;
        }

    /* Image on the left, content on the right */
    .belief-row--imgLeft {
        justify-content: flex-end;
    }

        .belief-row--imgLeft .belief-row__img,
        .belief-row--imgLeft .belief-row__fade {
            left: 0;
            right: auto;
        }

    .belief-row--connecting .belief-row__fade {
        background: linear-gradient(to right, #2C4BE0 0%, rgba(44,75,224,0) 42%);
    }

    .belief-row--growing .belief-row__fade {
        background: linear-gradient(to left, #3A1E7A 0%, rgba(58,30,122,0) 42%);
    }

    .belief-row--serving .belief-row__fade {
        background: linear-gradient(to right, #14966E 0%, rgba(20,150,110,0) 42%);
    }
}

@media (min-width: 900px) {
    .beliefs {
        padding: 4rem 0;
    }

    .beliefs__title {
        margin-bottom: 3rem;
    }
}

/* ─── Image Gallery — Curved Monitor / Concave Endless Row ─── */
.gallery {
    --gallery-gap: 1.25rem;
    --gallery-depth: 26deg;
    --gallery-min-scale: 0.86;
    --gallery-max-scale: 1.08;
    --gallery-bend-depth: 110px;
    background: var(--white);
    padding: 4rem 0;
    overflow: hidden;
}


.gallery__stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    perspective: 1400px;
    perspective-origin: 50% 50%;
    -webkit-mask-image: linear-gradient( to right, transparent 0%, black 3%, black 97%, transparent 100% );
    mask-image: linear-gradient( to right, transparent 0%, black 3%, black 97%, transparent 100% );
}

.gallery__track {
    display: flex;
    align-items: center;
    gap: var(--gallery-gap);
    width: max-content;
    padding: 2.5rem 0 3rem;
    transform: translate3d(0, 0, 0);
    animation: galleryScroll 34s linear infinite;
    will-change: transform;
    transform-style: preserve-3d;
}

/* .gallery__track:hover {
      animation-play-state: paused;
    } */

/* Strictly horizontal movement — no rotateX/rotateZ/circular path. */
@keyframes galleryScroll {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

.gallery__item {
    --curve: 0;
    --depth-scale: 1;
    --bend-z: 0px;
    width: 280px;
    height: 360px;
    border-radius: 16px;
    overflow: hidden;
    flex: 0 0 auto;
    position: relative;
    /*
        The cards remain on one straight horizontal line.
        The bend is created by moving the cards through Z space:
        centre = pushed toward the viewer, edges = pushed away.
        rotateY makes the ends face away, like bending a flexible
        sheet backwards at both hands.
      */
    transform: translateZ(var(--bend-z)) rotateY(calc(var(--curve) * var(--gallery-depth))) scale(var(--depth-scale));
    transform-origin: center center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    box-shadow: 0 10px 34px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
    transition: box-shadow 0.25s ease;
    will-change: transform;
}

    .gallery__item:hover {
        box-shadow: 0 18px 46px rgba(0,0,0,0.20), 0 4px 12px rgba(0,0,0,0.10);
        z-index: 3;
    }

    .gallery__item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Slight highlight on the cards nearest the viewer. */
    .gallery__item::after {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient( 100deg, rgba(255,255,255,0.12), transparent 32%, transparent 68%, rgba(0,0,0,0.08) );
        opacity: calc(0.2 + (1 - var(--depth-scale)) * 0.8);
        transition: opacity 0.2s ease;
    }

@media (min-width: 640px) {
    .gallery {
        --gallery-gap: 1.5rem;
    }

    .gallery__item {
        width: 220px;
        height: 320px;
    }
}

@media (min-width: 900px) {
    .gallery {
        --gallery-gap: 1.75rem;
        --gallery-depth: 28deg;
        --gallery-bend-depth: 125px;
        padding: 5.5rem 0;
    }

    .gallery__item {
        width: 260px;
        height: 380px;
    }

    .gallery__track {
        padding-top: 3rem;
        padding-bottom: 3.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery__track {
        animation: none;
    }

    .gallery__item {
        transform: none !important;
    }
}

