/* ══════════════════════════════════════════════════════════════════
   ANIMATIONS & MOTION  (Social Hub 1.1)
   GPU-safe: only transform + opacity animated.
   Respect prefers-reduced-motion — see bottom guard.
   ══════════════════════════════════════════════════════════════════ */

@keyframes sh-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sh-ken-burns {
    from {
        transform: scale(1) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.09) translate3d(-1.5%, -0.75%, 0);
    }
}

@keyframes sh-cta-glow {

    0%,
    100% {
        box-shadow: 0 4px 18px rgba(var(--sh-color-primary-rgb), 0.38);
    }

    50% {
        box-shadow: 0 6px 32px rgba(var(--sh-color-primary-rgb), 0.65),
            0 0 0 5px rgba(var(--sh-color-primary-rgb), 0.14);
    }
}

/* ── Scroll reveal: fade + slide (headings, sections, columns) */
.sh-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1) var(--sh-delay, 0ms),
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) var(--sh-delay, 0ms);
}

.sh-reveal.sh-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Scroll reveal: fade-only (interactive cards — keeps hover transform clean) */
.sh-fade {
    opacity: 0;
    transition: opacity var(--sh-transition-smooth) var(--sh-delay, 0ms);
}

.sh-fade.sh-visible {
    opacity: 1;
}

/* ── Section heading: gradient underline that draws in on reveal */
h2.wp-block-heading.sh-reveal::after,
h3.wp-block-heading.sh-reveal::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--sh-color-primary);
    border-radius: 2px;
    margin: 10px 0 0;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--sh-delay, 0ms) + 200ms);
}

h2.wp-block-heading.has-text-align-center.sh-reveal::after,
h3.wp-block-heading.has-text-align-center.sh-reveal::after {
    margin: 10px auto 0;
}

h2.wp-block-heading.sh-reveal.sh-visible::after,
h3.wp-block-heading.sh-reveal.sh-visible::after {
    width: 52px;
}

/* ── prefers-reduced-motion: disable everything ───────────────── */
@media (prefers-reduced-motion: reduce) {

    .sh-reveal,
    .sh-fade {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    h2.wp-block-heading.sh-reveal::after,
    h3.wp-block-heading.sh-reveal::after {
        width: 52px !important;
        transition: none !important;
    }

    .sh-hero .wp-block-column:first-child>*,
    .sh-hero__cards-col>.wp-block-cover,
    .sh-hero__cards-col .wp-block-cover__inner-container>*,
    .sh-hero .wp-block-buttons>.wp-block-button:first-child .wp-block-button__link,
    .sh-photo-card .wp-block-cover__image-background {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .sh-squiggle__svg path {
        animation: none !important;
        stroke-dashoffset: 0 !important;
    }

    .sh-testimonials-track { transition: none; }
    .sh-members-track { transition: none; }
    .sh-moments__slide { transition: none; }
    .sh-carousel-track { transition: none; }
    .sh-gallery-item,
    .sh-gallery-photo img,
    .sh-gallery-caption { transition: none; }
}
