/* Wedding Souls.in — The Story Behind the Lens (story.js, scripts/edits/founder_story.py).

   Phones: portrait, then the chapters, each with its year. Wide screens: the
   portrait stays in view beside the chapters and its year badge follows them;
   a thin rule between the columns fills as the story is read. Without script
   or with reduced motion, everything is simply visible. */

/* The template positions each heading's (NN) counter per section; this is the story's. */
.section-heading-wrap.story {
    position: relative;
    width: fit-content;
    padding-right: 3.5rem;
}

.section-counter.story {
    top: 12%;
    right: 0;
}

.story-byline {
    margin: 1rem 0 3rem;
    color: var(--_color---nobel);
    font-size: 1rem;
    letter-spacing: .02em;
}

.story-byline-rule {
    margin: 0 .35rem;
    color: var(--_color---granadier);
}

.story-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
}

.story-portrait {
    position: relative;
    margin: 0;
}

.story-portrait-frame {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: .4rem;
    box-shadow: 0 2rem 4rem -2rem rgba(0, 0, 0, .9), 0 0 0 1px rgba(212, 162, 76, .2);
}

.story-portrait-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

.story-year {
    display: none;
}

.story-rule {
    display: none;
}

.story-chapters {
    display: grid;
    gap: 3.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.story-chapter-year {
    display: block;
    margin-bottom: .75rem;
    color: var(--_color---granadier);
    font-size: .8rem;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.story-chapter-title {
    margin: 0 0 1rem;
    color: var(--_color---white);
    font-family: var(--font-family--display);
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    font-weight: var(--fonts-weight--semi-bold);
    line-height: 1.1;
}

.story-chapter p {
    max-width: 36rem;
    margin: 0 0 1rem;
    color: var(--_color---nobel);
    font-size: 1.1rem;
    line-height: 1.7;
}

.story-closing {
    margin: 6rem auto 0;
    padding: 0;
    border: 0;
    text-align: center;
}

.story-closing-lead {
    max-width: 40rem;
    margin: 0 auto 2.5rem;
    color: var(--_color---nobel);
    font-size: 1.1rem;
    line-height: 1.7;
}

.story-quote {
    max-width: 60rem;
    margin: 0 auto 1.5rem;
    color: var(--_color---white);
    font-family: var(--font-family--display);
    font-size: clamp(2rem, 5.2vw, 4.5rem);
    font-weight: var(--fonts-weight--semi-bold);
    line-height: 1.08;
}

.story-quote > span {
    display: block;
}

.story-quote > span + span {
    color: #d4a24c;
    font-style: italic;
}

.story-signature {
    margin: 0;
    color: var(--_color---nobel);
    font-size: .95rem;
    letter-spacing: .05em;
}

@media screen and (min-width: 992px) {
    .story-layout {
        grid-template-columns: minmax(0, 5fr) 1px minmax(0, 6fr);
        gap: 4.5rem;
        align-items: start;
    }

    .story-portrait {
        position: sticky;
        top: 9vh;
    }

    .story-portrait-frame {
        aspect-ratio: auto;
        height: 80vh;
    }

    .story-year {
        position: absolute;
        left: -1rem;
        bottom: 2rem;
        display: block;
        overflow: hidden;
        padding: .7rem 1.1rem;
        border-radius: .25rem;
        background-color: var(--_color---granadier);
        color: var(--_color---white);
        font-family: var(--font-family--display);
        font-size: 1.75rem;
        line-height: 1;
    }

    .story-year-value {
        display: inline-block;
    }

    .story-rule {
        position: relative;
        display: block;
        align-self: stretch;
        background-color: var(--_color---white-15);
    }

    .story-rule-fill {
        position: absolute;
        inset: 0;
        background-color: var(--_color---granadier);
        transform-origin: top center;
    }

    /* Room for the portrait to stay in view while each chapter is read. */
    .story-chapters {
        gap: 22vh;
        padding: 12vh 0 18vh;
    }

    .story-chapter-year {
        display: none;
    }
}
