/* =========================================
   Experience
========================================= */

.experience {
    height: 600vh;

    position: relative;

    background-color: var(--bg-dark);
    color: var(--text-light);
}

.experience__stage {
    width: 100%;
    height: 100svh;

    position: sticky;
    top: 0;

    background-color: var(--bg-dark);

    overflow: hidden;
}


/* =========================================
   Intro
========================================= */

.experience__intro {
    width: 100%;
    height: 100%;

    padding: 2rem 1rem;

    position: absolute;
    inset: 0;
    z-index: 2;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
}

.experience__eyebrow {
    margin: 0 0 1.5rem;

    font-family: "Manrope", sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--sage);
}

.experience__intro-title {
    max-width: 11ch;

    margin: 0;

    font-family: "Cormorant Garamond", serif;
    font-size: clamp(3.5rem, 12vw, 6.5rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.035em;

    color: var(--text-light);
}

.experience__intro-text {
    max-width: 32rem;

    margin: 1.5rem 0 0;

    font-family: "Manrope", sans-serif;
    font-size: clamp(0.85rem, 2vw, 1rem);
    line-height: 1.65;

    color: rgba(255, 255, 255, 0.58);
}


/* =========================================
   Steps
========================================= */

.experience__steps {
    width: 100%;
    height: 100%;

    position: absolute;
    inset: 0;
}

.experience__step {
    width: 100%;
    height: 100%;

    padding: 5rem 1rem 6rem;

    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 2rem;

    opacity: 0;
    visibility: hidden;
}


/* =========================================
   Copy
========================================= */

.experience__copy {
    width: 100%;
    max-width: 30rem;
}


/* -----------------------------------------
   Chapter Label
----------------------------------------- */

.experience__number,
.experience__chapter {
    display: flex;
    align-items: center;

    width: fit-content;

    margin-bottom: 0.9rem;

    font-family: "Manrope", sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.17em;
    text-transform: uppercase;

    color: var(--sage);
}

.experience__chapter::after {
    content: "";

    width: 2rem;
    height: 1px;

    margin-left: 0.8rem;

    background-color: rgba(169, 182, 172, 0.6);
}


/* -----------------------------------------
   Titles and Body
----------------------------------------- */

.experience__title {
    max-width: 16ch;

    margin: 0 0 1.25rem;

    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.75rem, 10vw, 5rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.03em;

    color: var(--text-light);
}

.experience__text {
    max-width: 28rem;

    margin: 0;

    font-family: "Manrope", sans-serif;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 1.7;

    color: rgba(255, 255, 255, 0.65);
}


/* =========================================
   Album Photographs
========================================= */

.experience__image-wrap {
    width: 70%;
    max-width: 19rem;

    aspect-ratio: 3 / 4;

    margin-left: auto;

    position: relative;

    padding: 0.55rem 0.55rem 1.65rem;

    background-color: #f3efe7;

    box-shadow:
        0 1.5rem 3rem rgba(0, 0, 0, 0.3),
        0 0.25rem 0.75rem rgba(0, 0, 0, 0.18);

    overflow: visible;

    transform-origin: center center;
}

.experience__image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;
}


/* =========================================
   Individual Photo Angles
========================================= */

.experience__step--01 .experience__image-wrap {
    transform: rotate(-2.4deg);
}

.experience__step--02 .experience__image-wrap {
    transform: rotate(1.6deg);
}

.experience__step--03 .experience__image-wrap {
    transform: rotate(-1.2deg);
}

.experience__step--04 .experience__image-wrap {
    transform: rotate(2.2deg);
}


/* =========================================
   Album Mounting Details
========================================= */

.experience__image-wrap::before,
.experience__image-wrap::after {
    content: "";

    width: 1.75rem;
    height: 1.75rem;

    position: absolute;
    z-index: 3;

    pointer-events: none;
}


/* -----------------------------------------
   Photo 01
----------------------------------------- */

.experience__step--01 .experience__image-wrap::before {
    top: -0.4rem;
    left: -0.4rem;

    border-top: 0.4rem solid rgba(169, 182, 172, 0.9);
    border-left: 0.4rem solid rgba(169, 182, 172, 0.9);
}

.experience__step--01 .experience__image-wrap::after {
    right: -0.4rem;
    bottom: -0.4rem;

    border-right: 0.4rem solid rgba(169, 182, 172, 0.9);
    border-bottom: 0.4rem solid rgba(169, 182, 172, 0.9);
}


/* -----------------------------------------
   Photo 02 — Routine
   Both corners restored
----------------------------------------- */

.experience__step--02 .experience__image-wrap::before {
    top: -0.4rem;
    left: -0.4rem;

    border-top: 0.4rem solid rgba(169, 182, 172, 0.86);
    border-left: 0.4rem solid rgba(169, 182, 172, 0.86);
}

.experience__step--02 .experience__image-wrap::after {
    right: -0.4rem;
    bottom: -0.4rem;

    border-right: 0.4rem solid rgba(169, 182, 172, 0.86);
    border-bottom: 0.4rem solid rgba(169, 182, 172, 0.86);
}


/* -----------------------------------------
   Photo 03 — Tape
----------------------------------------- */

.experience__step--03 .experience__image-wrap::before {
    width: 4rem;
    height: 1.15rem;

    top: -0.62rem;
    left: 50%;

    border: 0;

    background-color: rgba(225, 218, 198, 0.76);

    transform: translateX(-50%) rotate(-4deg);

    box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.08);
}

.experience__step--03 .experience__image-wrap::after {
    display: none;
}


/* -----------------------------------------
   Photo 04
----------------------------------------- */

.experience__step--04 .experience__image-wrap::before {
    top: -0.4rem;
    right: -0.4rem;
    left: auto;

    border-top: 0.4rem solid rgba(169, 182, 172, 0.86);
    border-right: 0.4rem solid rgba(169, 182, 172, 0.86);
}

.experience__step--04 .experience__image-wrap::after {
    bottom: -0.4rem;
    left: -0.4rem;
    right: auto;

    border-bottom: 0.4rem solid rgba(169, 182, 172, 0.86);
    border-left: 0.4rem solid rgba(169, 182, 172, 0.86);
}


/* =========================================
   Photo Caption
========================================= */

.experience__photo-caption {
    position: absolute;

    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.45rem;

    font-family: "Manrope", sans-serif;
    font-size: 0.55rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.07em;

    text-align: center;

    color: rgba(20, 20, 21, 1);
}


/* =========================================
   Progress
========================================= */

.experience__progress {
    position: absolute;

    left: 1rem;
    bottom: 1.5rem;
    z-index: 10;

    display: flex;
    align-items: center;
    gap: 1rem;

    font-family: "Manrope", sans-serif;
    font-size: 0.625rem;
    letter-spacing: 0.12em;

    color: rgba(255, 255, 255, 0.6);

    opacity: 0;
}

.experience__progress-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;

    flex-shrink: 0;
}

.experience__current {
    color: var(--text-light);
}

.experience__separator,
.experience__total {
    opacity: 0.5;
}

.experience__progress-track {
    width: clamp(6rem, 15vw, 12rem);
    height: 1px;

    position: relative;

    background-color: rgba(255, 255, 255, 0.2);
}

.experience__progress-fill {
    width: 100%;
    height: 100%;

    position: absolute;
    top: 0;
    left: 0;

    background-color: var(--sage);

    transform: scaleX(0);
    transform-origin: left center;
}


/* =========================================
   Tablet / Desktop
========================================= */

@media only screen and (min-width: 48rem) {

    .experience__intro {
        padding: 4rem;
    }

    .experience__step {
        padding: 4rem clamp(3rem, 7vw, 8rem);

        display: grid;

        grid-template-columns:
            minmax(18rem, 0.8fr)
            minmax(20rem, 0.65fr);

        align-items: center;

        gap: clamp(4rem, 10vw, 10rem);
    }


    /* -----------------------------------------
       Copy
    ----------------------------------------- */

    .experience__copy {
        justify-self: end;
    }

    .experience__number,
    .experience__chapter {
        margin-bottom: 1rem;

        font-size: 0.68rem;
    }

    .experience__chapter::after {
        width: 2.5rem;
    }


    /* -----------------------------------------
       Album Photographs
    ----------------------------------------- */

    .experience__image-wrap {
        width: 100%;
        max-width: 27rem;

        margin: 0;

        padding: 0.75rem 0.75rem 2rem;
    }

    .experience__photo-caption {
        bottom: 0.6rem;

        font-size: 0.6rem;
    }


    /* -----------------------------------------
       Larger Mounting Details
    ----------------------------------------- */

    .experience__step--01 .experience__image-wrap::before,
    .experience__step--01 .experience__image-wrap::after,
    .experience__step--02 .experience__image-wrap::before,
    .experience__step--02 .experience__image-wrap::after,
    .experience__step--04 .experience__image-wrap::before,
    .experience__step--04 .experience__image-wrap::after {
        width: 2.1rem;
        height: 2.1rem;
    }

    .experience__step--03 .experience__image-wrap::before {
        width: 4.5rem;
        height: 1.25rem;

        top: -0.7rem;
    }


    /* -----------------------------------------
       Reverse Steps
    ----------------------------------------- */

    .experience__step--reverse .experience__copy {
        grid-column: 2;
        grid-row: 1;

        justify-self: start;
    }

    .experience__step--reverse .experience__image-wrap {
        grid-column: 1;
        grid-row: 1;

        justify-self: end;
    }


    /* -----------------------------------------
       Progress
    ----------------------------------------- */

    .experience__progress {
        left: clamp(3rem, 7vw, 8rem);
        bottom: 2.5rem;
    }
}


/* =========================================
   Short / Landscape Experience
========================================= */

@media only screen
    and (max-height: 31rem)
    and (orientation: landscape) {

    .experience__step {
        display: grid;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(10rem, 0.55fr);

        align-items: center;

        gap: clamp(2rem, 5vw, 4rem);

        padding:
            2rem
            clamp(3rem, 7vw, 5rem);
    }


    /* -----------------------------------------
       Copy
    ----------------------------------------- */

    .experience__copy,
    .experience__step--reverse .experience__copy {
        grid-column: 1;
        grid-row: 1;

        width: 100%;
        max-width: 28rem;

        justify-self: end;
        align-self: center;
    }

    .experience__number,
    .experience__chapter {
        margin-bottom: 0.45rem;

        font-size: 0.5rem;
        letter-spacing: 0.12em;
    }

    .experience__chapter::after {
        width: 1.4rem;

        margin-left: 0.6rem;
    }

    .experience__title {
        margin-bottom: 0.65rem;

        font-size: clamp(2rem, 10vh, 2.75rem);
        line-height: 0.95;
    }

    .experience__text {
        font-size: clamp(0.7rem, 3vh, 0.85rem);
        line-height: 1.45;
    }


    /* -----------------------------------------
       Album Photograph
    ----------------------------------------- */

    .experience__image-wrap,
    .experience__step--reverse .experience__image-wrap {
        grid-column: 2;
        grid-row: 1;

        width: auto;
        max-width: 13rem;
        height: min(68vh, 17rem);

        margin: 0;

        padding: 0.45rem 0.45rem 1.35rem;

        justify-self: start;
        align-self: center;
    }

    .experience__image {
        width: 100%;
        height: 100%;

        object-fit: cover;
    }

    .experience__photo-caption {
        bottom: 0.35rem;

        font-size: 0.48rem;
    }


    /* -----------------------------------------
       Album Details
    ----------------------------------------- */

    .experience__step--01 .experience__image-wrap::before,
    .experience__step--01 .experience__image-wrap::after,
    .experience__step--02 .experience__image-wrap::before,
    .experience__step--02 .experience__image-wrap::after,
    .experience__step--04 .experience__image-wrap::before,
    .experience__step--04 .experience__image-wrap::after {
        width: 1.5rem;
        height: 1.5rem;
    }

    .experience__step--03 .experience__image-wrap::before {
        width: 3.25rem;
        height: 0.9rem;

        top: -0.5rem;
    }


    /* -----------------------------------------
       Restrained Photo Angles
    ----------------------------------------- */

    .experience__step--01 .experience__image-wrap {
        transform: rotate(-1.5deg);
    }

    .experience__step--02 .experience__image-wrap {
        transform: rotate(1.25deg);
    }

    .experience__step--03 .experience__image-wrap {
        transform: rotate(-1deg);
    }

    .experience__step--04 .experience__image-wrap {
        transform: rotate(1.5deg);
    }


    /* -----------------------------------------
       Progress
    ----------------------------------------- */

    .experience__progress {
        left: 2rem;
        bottom: 1rem;
    }
}