﻿:root {
    --header-offset: 0px;
}

#photo-story-article > section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    --t: 0;
    --cap-shift: 120px;
}

#photo-story-article figure.media {
    position: fixed !important;
    inset: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease, visibility .6s ease;
    z-index: 0;
}

    #photo-story-article figure.media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

#photo-story-article > section.is-active > figure.media {
    opacity: 1;
    visibility: visible;
    background: rgb(25 25 25 / 0.7);
}

#photo-story-article .scroll-text {
    transition: none;
    transform: translate3d(0, calc(var(--cap-shift) * (1 - var(--t))), 0);
    will-change: transform;
}

#photo-story-article::after {
    content: "";
    position: fixed;
    inset: auto 0 0 0;
    height: 40vh;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 80%, rgba(0,0,0,.8) 100%);
}

#photo-story-article:not(.ps-active)::after {
    display: none;
}

#photo-story-article > section:first-of-type {
    position: relative;
}

    #photo-story-article > section:first-of-type .scroll-text {
        transform: translate3d(0%, calc(-50% + var(--cap-shift) * (1 - var(--t))), 0);
    }

    #photo-story-article > section:first-of-type .story-text.title {
        font-size: clamp(28px, 3.2vw, 48px);
        line-height: 1.2;
        font-weight: 800;
    }

    #photo-story-article > section:first-of-type .story-text.summary {
        margin-top: 12px;
        font-size: clamp(16px, 1.6vw, 22px);
        font-weight: 500;
    }

    #photo-story-article > section:first-of-type .story-text.datecreate {
        margin-top: 12px;
        font-size: 14px;
        opacity: .9;
    }

    #photo-story-article .scroll-text, #photo-story-article > section:first-of-type .scroll-text {
        opacity: 1 !important;
        transition: transform .15s linear;
        color: rgb(255 255 255);
        text-align: center;
    }

#photo-story-article > section:not(:first-of-type) .scroll-text {
    opacity: 1 !important;
    background-color: rgb(25 25 25 / 0.7);
    transition: transform .15s linear;
    color: rgb(255 255 255);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
}
#photo-story-article .scroll-text time {
    display: none;
}
@media (min-width: 0) {
    #photo-story-article > section {
        scroll-margin-top: var(--header-offset);
    }
}
