/**
 * Scroll in/out — same motion language as assistant (omforhandla).
 * .reveal starts off-frame; .is-visible brings it in; leaving the viewport
 * sends it out again (down or up depending on scroll direction).
 */

.reveal {
    opacity: 0;
    transform: translateY(36px) scale(0.985);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.reveal.reveal-left {
    transform: translateX(-40px) scale(0.985);
}

.reveal.reveal-right {
    transform: translateX(40px) scale(0.985);
}

/*
 * Mobile: horizontal reveal offsets expand document scrollWidth and cause
 * left/right "wiggle" while scrolling vertically. Keep the fade/scale motion
 * without sliding past the viewport edge.
 */
@media (max-width: 767px) {
    .reveal.reveal-left,
    .reveal.reveal-right {
        transform: translateY(28px) scale(0.985);
    }

    .reveal.reveal-left.reveal--up:not(.is-visible),
    .reveal.reveal-right.reveal--up:not(.is-visible) {
        transform: translateY(-24px) scale(0.985);
    }
}

.reveal.reveal-scale {
    transform: scale(0.94);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.reveal.reveal--up:not(.is-visible) {
    transform: translateY(-36px) scale(0.985);
}

.reveal.reveal-left.reveal--up:not(.is-visible),
.reveal.reveal-right.reveal--up:not(.is-visible) {
    transform: translateY(-28px) scale(0.985);
}

.reveal-delay { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.18s; }
.reveal-delay-3 { transition-delay: 0.26s; }

.reveal.card-hover.is-visible:hover {
    transform: translateY(-4px);
}

.page-hero-photo {
    position: relative;
    border-radius: 1.75rem;
    overflow: hidden;
    box-shadow: 0 30px 70px -25px rgba(15, 23, 42, 0.32);
    border: 1px solid color-mix(in srgb, var(--brand, #d4a017) 18%, #e2e8f0);
    background: #e2e8f0;
}

.text-white .page-hero-photo,
section[style*="--gradient"] .page-hero-photo {
    border-color: color-mix(in srgb, white 35%, transparent);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.35);
}

.dark .page-hero-photo {
    border-color: color-mix(in srgb, var(--brand, #d4a017) 28%, #1e293b);
    background: #0f172a;
}

.page-hero-photo-img {
    display: block;
    width: 100%;
    height: 16rem;
    object-fit: cover;
    object-position: 50% 32%;
}

.page-hero-photo-tint {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--brand, #d4a017) 28%, transparent) 0%, transparent 48%),
        linear-gradient(0deg, color-mix(in srgb, #0f172a 28%, transparent) 0%, transparent 52%);
    mix-blend-mode: multiply;
    pointer-events: none;
}

.page-hero-photo--band .page-hero-photo-img {
    height: 14rem;
}

@media (min-width: 640px) {
    .page-hero-photo-img { height: 20rem; }
    .page-hero-photo--band .page-hero-photo-img { height: 16rem; }
}

@media (min-width: 640px) {
    .page-hero-photo-img { height: 22rem; }
    .page-hero-photo--band .page-hero-photo-img { height: 16rem; }
}

@media (min-width: 1024px) {
    .page-hero-photo-img { height: 26rem; }
    .page-hero-photo--band .page-hero-photo-img { height: 18rem; }
}

.page-photo-split {
    display: grid;
    gap: 1.75rem;
    align-items: center;
    min-width: 0;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    .page-photo-split {
        overflow-x: hidden;
    }
}

@media (min-width: 640px) {
    .page-photo-split {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 2rem;
    }

    .page-photo-split--flip {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }

    .page-photo-split--flip .page-hero-photo {
        order: -1;
    }
}

.page-photo-split--banner {
    align-items: stretch;
}

@media (min-width: 640px) {
    .page-photo-split--banner .page-hero-photo {
        display: flex;
        height: 100%;
        min-height: 20rem;
    }

    .page-photo-split--banner .page-hero-photo-img {
        flex: 1 1 auto;
        width: 100%;
        height: 100%;
        min-height: 20rem;
    }
}

@media (min-width: 1024px) {
    .page-photo-split--banner .page-hero-photo {
        min-height: 24rem;
    }

    .page-photo-split--banner .page-hero-photo-img {
        min-height: 24rem;
    }
}

/* ==================== HEADER & HERO PARALLAX CARD EFFECT ==================== */
.moppsy-site-header {
    background-color: var(--surface, #ffffff) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.dark .moppsy-site-header {
    background-color: #0f172a !important;
    opacity: 1 !important;
}

.moppsy-site-header.is-scrolled {
    border-color: rgba(124, 58, 237, 0.3) !important;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.dark .moppsy-site-header.is-scrolled {
    border-color: rgba(139, 92, 246, 0.35) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(139, 92, 246, 0.25);
}

.landing-hero-wrap,
.hero-card-parallax {
    transform: translateY(var(--hero-parallax-y, 0px)) scale(var(--hero-parallax-scale, 1));
    transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

/* ==================== FOOTER PARALLAX EFFECT & DARK CARD DESIGN ==================== */
.site-main-wrapper {
    position: relative;
    z-index: 10;
    background-color: var(--page-bg, #ffffff);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
    /* Cover the fixed footer on short pages (e.g. a new cleaner profile). */
    min-height: calc(100dvh - 6.5rem);
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    overflow-x: clip;
    max-width: 100%;
}

@supports not (overflow: clip) {
    .site-main-wrapper {
        overflow-x: hidden;
    }
}

.site-footer-parallax-spacer {
    display: block;
    width: 100%;
    height: 0;
    pointer-events: none;
    background: transparent;
}

.dark .site-main-wrapper {
    background-color: var(--page-bg, #0f172a);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.site-footer-outer {
    width: 100%;
    z-index: 0;
    pointer-events: auto;
}

.footer-parallax {
    position: relative;
    z-index: 0;
    overflow: hidden;
    will-change: transform, opacity;
    background-color: #020617 !important;
}

.footer-parallax__inner {
    will-change: transform, opacity;
}

@media (min-width: 768px) {
    .site-footer-outer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
    /* Map is viewport-locked; don't add extra page scroll under it. */
    body:has(.moppsy-map-page) .site-footer-parallax-spacer {
        display: none;
    }
    body:has(.moppsy-map-page) .site-main-wrapper {
        min-height: 0;
    }
    .footer-parallax__inner {
        transform: translateY(var(--footer-y, 0px)) scale(var(--footer-scale, 1));
        opacity: var(--footer-opacity, 1);
        transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.08s ease;
    }
}

@media (max-width: 767px) {
    .site-footer-outer {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
    }
    /* Keep footer clear of the sticky book CTA on cleaner profiles */
    body:has(.cp-sticky) .site-footer-outer {
        padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    }
    /* Keep footer clear of the dashboard bottom menu on phones */
    body.moppsy-dashboard-page .site-footer-outer {
        padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    }
    .footer-parallax__inner {
        transform: translateY(var(--footer-mobile-y, 0px)) scale(var(--footer-mobile-scale, 1));
        opacity: var(--footer-mobile-opacity, 1);
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    body.moppsy-dashboard-page .site-footer-outer {
        bottom: calc(5.35rem + env(safe-area-inset-bottom, 0px));
    }
}

.footer-parallax__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px circle at var(--footer-mouse-x, 50%) var(--footer-mouse-y, 30%), color-mix(in srgb, var(--brand) 28%, transparent), transparent 70%),
        radial-gradient(520px circle at 85% 80%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.reveal-left,
    .reveal.reveal-right,
    .reveal.reveal-scale,
    .reveal.reveal--up:not(.is-visible),
    .footer-parallax__inner {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

}
