
/* =========================================================
   RHINOWELL PRODUCT STORY
   Full-screen Scrolling Product Experience
   Typography: Managed by nav.css
   Responsive: Desktop / 600px / 480px
========================================================= */

.rw-story,
.rw-story * {
    box-sizing: border-box;
}

.rw-story {
    --rw-orange: #f28c18;
    --rw-white: #ffffff;

    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    isolation: isolate;
    overflow: clip;

    background: #101214;
    color: var(--rw-white);
}

/* =========================================================
   BACKGROUND STAGE
========================================================= */

.rw-story__stage {
    grid-area: 1 / 1;
    position: sticky;
    top: 0;
    align-self: start;

    width: 100%;
    height: 100vh;
    height: 100svh;

    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.rw-story__background,
.rw-story__bg-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.rw-story__bg-layer {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    opacity: 0;
    transform: scale(1.035);

    transition:
        opacity 1s ease,
        transform 1.8s cubic-bezier(.2,.65,.3,1);
}

.rw-story__bg-layer.is-active {
    opacity: 1;
    transform: scale(1);
}

.rw-story__bg-video {
    position: absolute;
    inset: 0;

    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    pointer-events: none;
}

/* =========================================================
   OVERLAY
========================================================= */

.rw-story__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(5,8,12,.38) 0%,
            rgba(5,8,12,.25) 35%,
            rgba(5,8,12,.05) 72%,
            rgba(5,8,12,.02) 100%
        ),
        linear-gradient(
            0deg,
            rgba(5,8,12,.15),
            transparent 35%,
            transparent 75%,
            rgba(5,8,12,.05)
        );
}

/* =========================================================
   BRAND
========================================================= */

.rw-story__brand {
    position: absolute;
    top: 42px;
    left: 4.5%;
    z-index: 5;

    color: #fff;
    font-size: 25px;
    font-weight: var(--body-strong-weight);
    letter-spacing: -.8px;

    pointer-events: none;
}

/* =========================================================
   PROGRESS PILLS
========================================================= */

.rw-story__progress {
    grid-area: 1 / 1;

    position: sticky;
    top: 50vh;
    align-self: start;
    justify-self: start;

    width: max-content;
    height: max-content;

    margin-top: 50vh;
    margin-left: 4.5%;

    transform: translateY(-50%);

    display: flex;
    flex-direction: column;
    gap: 17px;

    z-index: 5;
    pointer-events: auto;
}

.rw-story__pill {
    position: relative;
    display: block;

    width: 5px;
    height: 28px;

    padding: 0;
    border: 0;
    border-radius: 20px;

    background: rgba(255,255,255,.30);

    cursor: pointer;
    overflow: hidden;

    transition:
        background .4s ease,
        height .4s ease,
        transform .4s ease;
}

.rw-story__pill::after {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;
    background: var(--rw-orange);

    transform: scaleY(0);
    transform-origin: top;

    transition: transform .75s cubic-bezier(.2,.65,.3,1);
}

.rw-story__pill.is-active {
    height: 42px;
    background: rgba(255,255,255,.18);
}

.rw-story__pill.is-active::after {
    transform: scaleY(1);
}

.rw-story__pill:hover {
    background: rgba(255,255,255,.65);
}

/* =========================================================
   SCROLL HINT
========================================================= */

.rw-story__scroll-hint {
    position: absolute;
    left: 4.5%;
    bottom: 35px;
    z-index: 5;

    width: 28px;
    height: 45px;

    display: flex;
    justify-content: center;

    padding-top: 9px;

    border: 1px solid rgba(255,255,255,.65);
    border-radius: 20px;
}

.rw-story__scroll-hint span {
    width: 2px;
    height: 9px;

    background: #fff;
    border-radius: 5px;

    animation: rwScrollHint 1.8s infinite;
}

@keyframes rwScrollHint {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    75% {
        transform: translateY(12px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 0;
    }
}

/* =========================================================
   SCROLLING CONTENT
========================================================= */

.rw-story__content {
    grid-area: 1 / 1;

    position: relative;
    z-index: 2;

    width: 100%;
    pointer-events: none;
}

.rw-story__scene {
    min-height: 100vh;
    min-height: 100svh;

    display: flex;
    align-items: center;

    padding: 100px 12% 100px 11.7%;

    pointer-events: none;
}

.rw-story__text {
    width: min(100%, 610px);

    pointer-events: auto;

    opacity: .38;
    transform: translateY(25px);

    transition:
        opacity .8s ease,
        transform .8s cubic-bezier(.2,.65,.3,1);
}

.rw-story__scene.is-active .rw-story__text {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   TEXT STYLING
========================================================= */

.rw-story__eyebrow {
    display: block;
    margin-bottom: 23px;

    color: #fff;

    font-size: 14px;
    font-weight: var(--label-weight);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rw-story__text h2 {
    max-width: 650px;
    margin: 0 0 28px;

    color: #fff;

    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.04;
    letter-spacing: -2.5px;
}

.rw-story__text p {
    max-width: 490px;
    margin: 0;

    color: #fff;

    font-size: 16px;
    line-height: 1.8;
    font-weight: var(--body-light-weight);
}

/* =========================================================
   SVG FEATURES
========================================================= */

.rw-story__features {
    display: flex;
    align-items: center;
    gap: 48px;

    margin-top: 42px;
}

.rw-story__feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;

    color: rgba(255,255,255,.85);

    font-size: 13px;
    text-align: center;
}

.rw-story__feature svg {
    width: 43px;
    height: 43px;

    color: #fff;

    transition:
        transform .4s ease,
        color .4s ease;
}

.rw-story__feature:hover svg {
    color: var(--rw-orange);
    transform: translateY(-4px);
}

/* =========================================================
   DETAIL CALLOUT
========================================================= */

.rw-story__callout {
    display: flex;
    align-items: center;
    gap: 17px;

    margin-top: 42px;
}

.rw-story__callout-line {
    display: block;

    width: 48px;
    height: 1px;

    flex-shrink: 0;

    background: var(--rw-orange);
}

.rw-story__callout div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rw-story__callout strong {
    color: #fff;

    font-size: 15px;
    font-weight: var(--body-strong-weight);
}

.rw-story__callout div span {
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

/* =========================================================
   CTA
========================================================= */

.rw-story__link {
    display: inline-flex;
    align-items: center;
    gap: 22px;

    margin-top: 42px;
    padding-bottom: 10px;

    color: #fff;

    font-size: 13px;
    font-weight: var(--button-weight);
    letter-spacing: 1px;

    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.85);

    transition:
        color .3s ease,
        border-color .3s ease;
}

.rw-story__link span {
    font-size: 22px;
    transition: transform .3s ease;
}

.rw-story__link:hover {
    color: var(--rw-orange);
    border-color: var(--rw-orange);
}

.rw-story__link:hover span {
    transform: translateX(6px);
}


/* =========================================================
   RHINOWELL FINISHED CUSTOM FOAM GALLERY
   Desktop: Free Masonry Layout
   Tablet: 2 Columns
   Mobile: Horizontal Uniform Gallery
========================================================= */

.rw-finished,
.rw-finished *,
.rw-finished *::before,
.rw-finished *::after {
    box-sizing: border-box;
}

.rw-finished {
    width: 85%;
    max-width: 1440px;
    padding: 110px 0 90px;
    margin: 0 auto;

    background: #fff;
    color: #242424;
}


/* =========================================================
   HEADER
========================================================= */

.rw-finished__header {
    max-width: 1440px;
    margin: 0 auto 48px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.rw-finished__eyebrow {
    margin: 0 0 40px;

    color: #888;
    font-size: 12px;
    font-weight: var(--label-weight);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rw-finished__header h2 {
    margin-top: 20px;

    font-size: clamp(42px, 4vw, 56px);
    line-height: 1.2;
    letter-spacing: -1px;
}

.rw-finished__subtitle {
    max-width: 390px;
    margin: 0 0 5px;

    color: #777;
    font-size: 14px;
    line-height: 1.8;
}


/* =========================================================
   FREE MASONRY GALLERY
========================================================= */

.rw-finished__gallery {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;

    columns: 3;
    column-gap: 24px;
}


/* =========================================================
   GALLERY ITEM
========================================================= */

.rw-finished__item {
    position: relative;
    display: block;

    width: 100%;
    margin: 0 0 24px;

    overflow: hidden;
    break-inside: avoid;

    color: inherit;
    text-decoration: none;

    background: #f5f5f3;
}


/* =========================================================
   IMAGE
========================================================= */

.rw-finished__item img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: cover;

    transition:
        transform .65s cubic-bezier(.2,.65,.3,1);
}


/* =========================================================
   CAPTION
========================================================= */

.rw-finished__caption {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 65px 24px 22px;

    color: #fff;

    background: linear-gradient(
        to top,
        rgba(0,0,0,.72),
        rgba(0,0,0,0)
    );

    opacity: 0;
    transform: translateY(8px);

    transition:
        opacity .35s ease,
        transform .35s ease;
}

.rw-finished__caption > * {
    position: relative;
}

.rw-finished__caption h3 {
    margin: 0 0 8px;

    font-size: 19px;
    line-height: 1.3;
}

.rw-finished__caption p {
    max-width: 420px;
    margin: 0;

    color: rgba(255,255,255,.85);

    font-size: 13px;
    line-height: 1.6;
}

.rw-finished__caption span {
    display: block;
    margin-bottom: 9px;

    color: rgba(255,255,255,.85);

    font-size: 10px;
    letter-spacing: 1.5px;
}


/* =========================================================
   DESKTOP HOVER
========================================================= */

@media (hover: hover) and (pointer: fine) {

    .rw-finished__item:hover img {
        transform: scale(1.025);
    }

    .rw-finished__item:hover .rw-finished__caption {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

    .rw-finished {
        width: 90%;
        padding: 85px 0 70px;
    }

    .rw-finished__gallery {
        columns: 2;
        column-gap: 18px;
    }

    .rw-finished__item {
        margin-bottom: 18px;
    }

    .rw-finished__header {
        gap: 25px;
    }
}


/* =========================================================
   MOBILE
   Horizontal Uniform Gallery
========================================================= */

@media (max-width: 600px) {

    .rw-finished {
        width: 100%;
        padding: 20px 0 0;
    }

    /* Header */

    .rw-finished__header {
        width: 100%;
        margin: 0 auto 30px;
        padding: 0 20px;
        display: block;
    }

    .rw-finished__eyebrow {
        margin-bottom: 20px;
    }

    .rw-finished__header h2 {
        margin-top: 0;
        font-size: 34px;
        line-height: 1.2;
    }

    .rw-finished__subtitle {
        margin-top: 16px;
        font-size: 13px;
        line-height: 1.7;
    }

    /* Horizontal gallery */

    .rw-finished__gallery {
        display: flex;
        gap: 14px;
        width: 100%;
        margin: 0;
        padding: 0 20px 12px;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        scroll-padding-left: 6%;

        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .rw-finished__gallery::-webkit-scrollbar {
        display: none;
    }

    /* Uniform mobile image cards */

    .rw-finished__item {
        flex: 0 0 84%;
        width: 100%;
        aspect-ratio: 4 / 5;
        margin: 0;
        scroll-snap-align: start;
    }

    .rw-finished__item img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Caption visible on touch screens */

    .rw-finished__caption {
        opacity: 1;
        transform: none;
        padding: 55px 16px 17px;
    }

    .rw-finished__caption h3 {
        font-size: 16px;
    }

    .rw-finished__caption p {
        font-size: 12px;
        line-height: 1.5;
    }

    .rw-finished__caption span {
        font-size: 9px;
    }
}


/* =========================================================
   MOBILE
   max-width: 480px
   Full-screen background + overlapping text
========================================================= */

@media (max-width: 480px) {

    /* Full-screen background */

    .rw-story__stage {
        height: 100vh;
        height: 100svh;
        min-height: 280px;
        max-height: none;
    }

    .rw-story__bg-layer {
        background-position: center center;
    }

    .rw-story__bg-video {
        object-position: center center;
    }

    /* Overlay */

    .rw-story__overlay {
        background:
            linear-gradient(
                90deg,
                rgba(5,8,12,.30),
                rgba(5,8,12,.08)
            ),
            linear-gradient(
                0deg,
                rgba(5,8,12,.18),
                transparent 75%
            );
    }

    /* Brand */

    .rw-story__brand {
        top: 22px;
        left: 20px;
        font-size: 20px;
    }

    /* Progress */

    .rw-story__progress {
        top: 50svh;
        margin-top: 50svh;
        margin-left: 21px;
        gap: 9px;
    }

    .rw-story__pill {
        width: 4px;
        height: 18px;
    }

    .rw-story__pill.is-active {
        height: 29px;
    }

    /* Scene positioning */

    .rw-story__scene {
        min-height: 100vh;
        min-height: 100svh;

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;

        padding:
            clamp(220px, 40svh, 300px)
            20px
            55px
            56px;
    }

    /* Text visibility */

    .rw-story__text {
        position: relative;

        width: 100%;
        max-width: 440px;
        margin: 0;

        opacity: 0;
        visibility: hidden;

        transform: translateY(75px);

        transition:
            opacity .85s ease,
            transform .85s cubic-bezier(.2,.65,.3,1),
            visibility 0s linear .85s;
    }

    .rw-story__scene.is-active .rw-story__text {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);

        transition:
            opacity .85s ease,
            transform .85s cubic-bezier(.2,.65,.3,1),
            visibility 0s linear 0s;
    }

    /* Eyebrow */

    .rw-story__eyebrow {
        margin-bottom: 14px;
        font-size: 10px;
        letter-spacing: 1.4px;
    }

    /* Title */

    .rw-story__text h2 {
        margin-bottom: 16px;

        font-size: clamp(30px, 8vw, 39px);
        line-height: 1.08;
        letter-spacing: -1.2px;
    }

    /* Description */

    .rw-story__text p {
        max-width: 100%;
        font-size: 13px;
        line-height: 1.65;
    }

    /* Features */

    .rw-story__features {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 24px;
        margin-top: 25px;
    }

    .rw-story__feature {
        gap: 8px;
        font-size: 10px;
    }

    .rw-story__feature svg {
        width: 31px;
        height: 31px;
    }

    /* Callout */

    .rw-story__callout {
        gap: 12px;
        margin-top: 25px;
    }

    .rw-story__callout-line {
        width: 32px;
    }

    .rw-story__callout strong {
        font-size: 13px;
    }

    .rw-story__callout div span {
        font-size: 11px;
        line-height: 1.5;
    }

    /* CTA */

    .rw-story__link {
        gap: 15px;
        margin-top: 26px;
        font-size: 11px;
    }

    /* Scroll hint */

    .rw-story__scroll-hint {
        display: none;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .rw-story *,
    .rw-story *::before,
    .rw-story *::after,
    .rw-finished__item img,
    .rw-finished__caption {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
