/* Shared User Animations masonry — Uniify Space landing + /presets */

.gallery-motion {
    --lp-lime: #e0f782;
    --accent-primary: #e0f782;
    --landing-chrome-btn-height: 44px;
    margin-top: clamp(48px, 7vw, 72px);
}

.gallery-motion__title {
    margin: 0 0 clamp(20px, 3vw, 28px);
    color: var(--lp-lime);
    font-size: 48px;
    font-weight: 500;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .gallery-motion__title {
        font-size: 36px;
    }

    .gallery-motion-masonry {
        height: auto !important;
    }

    .gallery-motion .gallery-card--motion {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 0 16px !important;
    }
}

.gallery-motion-masonry {
    position: relative;
    display: block;
    width: 100%;
    min-height: 1px;
}

.gallery-motion-masonry.is-skeleton {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    height: auto !important;
}

.gallery-motion-masonry.is-skeleton .gallery-card--motion {
    position: static !important;
    width: auto !important;
    left: auto !important;
    top: auto !important;
    margin: 0;
}

.gallery-motion-masonry.is-skeleton .gallery-card--motion-wide {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .gallery-motion-masonry.is-skeleton {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .gallery-motion-masonry.is-skeleton {
        grid-template-columns: 1fr;
    }

    .gallery-motion-masonry.is-skeleton .gallery-card--motion-wide {
        grid-column: auto;
    }
}

.gallery-motion .gallery-card--motion {
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    margin: 0;
    cursor: pointer;
    min-width: 0;
    box-sizing: border-box;
    gap: 8px;
    overflow: hidden;
    border: 8px solid color-mix(in srgb, #ffffff 12%, #0e1013);
    border-radius: 32px;
    background: color-mix(in srgb, #ffffff 12%, #0e1013);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    transform: none;
}

.gallery-motion .gallery-card--motion:hover {
    transform: none;
    border-color: color-mix(in srgb, #ffffff 12%, #0e1013);
}

.gallery-motion .gallery-card__image--motion {
    position: relative;
    overflow: hidden;
    background: #0e1013;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    border-radius: 24px;
}

.gallery-motion .gallery-card--motion-wide .gallery-card__image--motion {
    aspect-ratio: 16 / 9;
}

.gallery-motion .gallery-card--motion-tall .gallery-card__image--motion {
    aspect-ratio: 9 / 16;
}

.gallery-motion .gallery-card--motion .gallery-card__body {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 20px 24px 24px;
    border-radius: 24px 24px 0 0;
    background: #0e1013;
}

.gallery-motion .gallery-card__badge {
    display: inline-block;
    width: fit-content;
    padding: 6px 14px;
    background: var(--lp-lime);
    border-radius: 100px;
    color: #000;
    font-size: 14px;
    font-weight: 500;
}

.gallery-motion .gallery-card__title {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.gallery-motion .gallery-card__image--motion::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(14, 16, 19, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1;
}

.gallery-motion .gallery-card--motion:hover .gallery-card__image--motion::after,
.gallery-motion .gallery-card--motion:focus-within .gallery-card__image--motion::after {
    opacity: 1;
}

.gallery-motion .gallery-card__image--motion video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #0e1013;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.gallery-motion .gallery-card__image--motion video.is-media-ready {
    opacity: 1;
}

.gallery-motion .gallery-card--appear {
    animation: galleryMotionCardIn 0.45s ease both;
}

@keyframes galleryMotionCardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.gallery-motion .gallery-card--skeleton {
    pointer-events: none;
    cursor: default;
}

.gallery-motion .gallery-card__skeleton-media {
    background: linear-gradient(
        90deg,
        #16181c 0%,
        #22252b 45%,
        #16181c 90%
    );
    background-size: 200% 100%;
    animation: galleryMotionShimmer 1.2s ease infinite;
}

.gallery-motion .gallery-card__skeleton-line {
    display: block;
    height: 14px;
    border-radius: 100px;
    background: #22252b;
}

.gallery-motion .gallery-card__skeleton-line--badge {
    width: 42%;
    height: 28px;
}

.gallery-motion .gallery-card__skeleton-line--title {
    width: 72%;
    height: 24px;
    margin-top: 4px;
}

@keyframes galleryMotionShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.gallery-motion .gallery-card__motion-cta {
    --motion-cta-h: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    height: var(--motion-cta-h);
    min-height: var(--motion-cta-h);
    line-height: 1;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: none;
    overflow: hidden;
    border: none;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    background: var(--accent-primary);
    color: #000;
}

.gallery-motion .gallery-card__motion-cta .btn-black__text {
    display: block;
    height: var(--motion-cta-h);
    line-height: var(--motion-cta-h);
    transition: transform 0.15s ease;
}

.gallery-motion .gallery-card__motion-cta .btn-black__text span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--motion-cta-h);
    line-height: var(--motion-cta-h);
    font-size: 14px;
    color: #000;
}

.gallery-motion .gallery-card__motion-cta:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: none;
}

.gallery-motion .gallery-card__motion-cta:hover .btn-black__text {
    transform: translateY(calc(-1 * var(--motion-cta-h)));
}

.gallery-motion .gallery-card--motion:hover .gallery-card__motion-cta,
.gallery-motion .gallery-card--motion:focus-within .gallery-card__motion-cta {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.gallery-motion .gallery-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: clamp(28px, 4vw, 40px);
}

.gallery-motion .gallery-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 100px;
    background: transparent;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gallery-motion .gallery-more:hover,
.gallery-motion .gallery-more:focus-visible {
    background: var(--lp-lime);
    border-color: var(--lp-lime);
    color: #000;
    outline: none;
}

.gallery-motion .gallery-more__arrow {
    display: block;
    flex: 0 0 auto;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
}

.gallery-motion .gallery-more:hover .gallery-more__arrow,
.gallery-motion .gallery-more:focus-visible .gallery-more__arrow {
    transform: rotate(90deg);
}
