/* Scroll-led product story for the restaurant solution page. */
.restaurant-solution .restaurant-solution__flow {
    background: #fbfcfe;
    max-width: none;
    padding-inline: max(1rem, calc((100vw - 86rem) / 2));
    width: 100%;
}

.restaurant-solution .restaurant-solution__flow > .restaurant-solution__heading {
    margin-inline: auto;
    max-width: 62rem;
}

.restaurant-solution .restaurant-solution__flow .restaurant-solution__flow-story {
    display: block;
    height: 280svh;
    left: 50%;
    margin-left: -50vw;
    position: relative;
    width: 100vw;
}

.restaurant-solution .restaurant-solution__flow-sticky {
    --restaurant-flow-step-index: 0;
    align-items: center;
    display: grid;
    gap: clamp(1.4rem, 2.8vw, 3.25rem);
    grid-template-columns: minmax(11.5rem, 14rem) minmax(31rem, 1fr) minmax(13rem, 17rem);
    height: 100svh;
    isolation: isolate;
    margin-inline: auto;
    max-width: none;
    min-height: 43rem;
    overflow: visible;
    padding: clamp(5.2rem, 10vh, 7rem) max(1rem, calc((100vw - 86rem) / 2)) clamp(2.5rem, 5vh, 4rem);
    position: sticky;
    top: 0;
    width: 100%;
    contain: layout style;
}

.restaurant-solution .restaurant-solution__flow-drawing {
    height: 100%;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    position: absolute;
    width: 100%;
    z-index: 1;
}

.restaurant-solution .restaurant-solution__flow-drawing-reveal,
.restaurant-solution .restaurant-solution__flow-drawing img {
    height: 100%;
    inset: 0;
    position: absolute;
    width: 100%;
}

.restaurant-solution .restaurant-solution__flow-drawing-reveal {
    backface-visibility: hidden;
    overflow: hidden;
}

.restaurant-solution [data-scroll-story="true"] .restaurant-solution__flow-drawing-reveal {
    clip-path: inset(0 100% 0 0);
    will-change: clip-path;
}

.restaurant-solution .restaurant-solution__flow-drawing-reveal img {
    backface-visibility: hidden;
    object-fit: cover;
}

.restaurant-solution [data-active-step="2"] .restaurant-solution__flow-sticky {
    --restaurant-flow-step-index: 1;
}

.restaurant-solution [data-active-step="3"] .restaurant-solution__flow-sticky {
    --restaurant-flow-step-index: 2;
}

.restaurant-solution [data-active-step="4"] .restaurant-solution__flow-sticky {
    --restaurant-flow-step-index: 3;
}

.restaurant-solution [data-active-step="5"] .restaurant-solution__flow-sticky {
    --restaurant-flow-step-index: 4;
}

.restaurant-solution .restaurant-solution__story-rail-shell {
    align-self: center;
    min-width: 0;
    position: relative;
    z-index: 3;
}

.restaurant-solution .restaurant-solution__story-rail-shell::before {
    background: rgba(30, 74, 112, 0.14);
    border-radius: 999px;
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: 0.28rem;
}

.restaurant-solution .restaurant-solution__story-indicator {
    background: linear-gradient(180deg, #173f75 0%, #0f5f94 52%, #087da8 100%);
    border-radius: 999px;
    height: 3.85rem;
    left: 0;
    position: absolute;
    top: 0;
    transform: translate3d(0, calc(var(--restaurant-flow-step-index) * 4.5rem), 0);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
    width: 0.28rem;
    z-index: 2;
}

.restaurant-solution .restaurant-solution__story-rail {
    display: grid;
    gap: 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.55rem;
}

.restaurant-solution .restaurant-solution__story-rail li {
    align-items: center;
    display: flex;
    height: 3.85rem;
    min-width: 0;
}

.restaurant-solution .restaurant-solution__story-rail button {
    background: transparent;
    border: 0;
    color: rgba(35, 58, 82, 0.34);
    cursor: pointer;
    font: inherit;
    font-size: clamp(0.82rem, 0.82vw, 0.98rem);
    font-weight: 720;
    line-height: 1.28;
    padding: 0;
    text-align: left;
    transition: color 360ms ease;
}

.restaurant-solution .restaurant-solution__story-rail li[data-active="true"] button {
    color: #172f49;
}

.restaurant-solution .restaurant-solution__story-rail button:focus-visible {
    border-radius: 0.35rem;
    outline: 2px solid #087da8;
    outline-offset: 0.35rem;
}

.restaurant-solution .restaurant-solution__flow-stage {
    contain: layout style;
    height: min(68svh, 43rem);
    isolation: isolate;
    min-height: 34rem;
    position: relative;
    width: 100%;
    z-index: 2;
}

.restaurant-solution [data-scroll-story="true"] .restaurant-solution__flow-stage {
    will-change: transform;
}

.restaurant-solution .restaurant-solution__flow-screen {
    align-items: center;
    backface-visibility: hidden;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 1;
    padding: clamp(0.25rem, 1vw, 0.75rem);
    position: absolute;
    transition: opacity 380ms ease, transform 580ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
}

.restaurant-solution .restaurant-solution__flow-screen .restaurant-video video {
    backface-visibility: hidden;
}

.restaurant-solution .restaurant-solution__flow-screen .restaurant-video--fill video {
    transform: scale(1.012);
}

.restaurant-solution .restaurant-solution__flow-screen[aria-hidden="true"] {
    visibility: hidden;
}

.restaurant-solution .restaurant-solution__flow-screen[aria-hidden="false"] {
    visibility: visible;
}

.restaurant-solution [data-scroll-story="true"] .restaurant-solution__flow-screen {
    transition: none;
}

.restaurant-solution [data-restaurant-journey]:not([data-scroll-story="true"]) .restaurant-solution__flow-screen[aria-hidden="true"] {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 1.15rem, 0) scale(0.97);
}

.restaurant-solution .restaurant-solution__flow-device {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    max-height: 100%;
    width: 100%;
}

.restaurant-solution .restaurant-solution__flow-device .restaurant-device-video--tablet {
    width: min(100%, 43rem);
}

.restaurant-solution .restaurant-solution__flow-device--kiosk .restaurant-device-video--kiosk {
    height: min(100%, 40rem);
    width: auto;
}

.restaurant-solution .restaurant-solution__flow-device--display .restaurant-device-video--desktop {
    width: min(94%, 39rem);
}

.restaurant-solution .restaurant-solution__flow-device-pair {
    height: 100%;
    position: relative;
    width: 100%;
}

.restaurant-solution .restaurant-solution__flow-device-pair .restaurant-solution__flow-device {
    height: auto;
    position: absolute;
}

.restaurant-solution .restaurant-solution__flow-device--sync-source {
    left: 0;
    top: 9%;
    width: 67%;
}

.restaurant-solution .restaurant-solution__flow-device--sync-target {
    bottom: 8%;
    right: 0;
    width: 57%;
    z-index: 2;
}

.restaurant-solution .restaurant-solution__story-copy {
    align-self: end;
    height: 18rem;
    list-style: none;
    margin: 0 0 clamp(5.5rem, 13vh, 9.5rem);
    padding: 0;
    position: relative;
    z-index: 3;
}

.restaurant-solution .restaurant-solution__story-copy li {
    inset: auto 0 0;
    opacity: 0;
    position: absolute;
    transform: translate3d(0, 1.4rem, 0);
    transition:
        opacity 220ms ease,
        transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 360ms;
    visibility: hidden;
}

.restaurant-solution .restaurant-solution__story-copy li[data-active="true"] {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 40ms;
    visibility: visible;
}

.restaurant-solution .restaurant-solution__story-copy h4 {
    font-size: clamp(1.65rem, 2.2vw, 2.3rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    max-width: 12ch;
}

.restaurant-solution .restaurant-solution__story-copy p {
    color: #607086;
    line-height: 1.55;
    max-width: 24rem;
}

.restaurant-solution .restaurant-solution__story-markers {
    display: grid;
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.restaurant-solution .restaurant-solution__flow-story > .restaurant-solution__story-markers {
    grid-template-rows: repeat(5, 1fr);
}

@media (max-width: 70rem) {
    .restaurant-solution .restaurant-solution__flow .restaurant-solution__flow-story {
        height: auto;
        left: auto;
        margin-inline: 0;
        width: auto;
    }

    .restaurant-solution .restaurant-solution__flow-sticky {
        display: grid;
        gap: 1.5rem;
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 0;
        position: relative;
        width: auto;
    }

    .restaurant-solution .restaurant-solution__story-indicator,
    .restaurant-solution .restaurant-solution__story-rail-shell::before,
    .restaurant-solution .restaurant-solution__flow-drawing,
    .restaurant-solution .restaurant-solution__story-markers {
        display: none;
    }

    .restaurant-solution .restaurant-solution__story-rail-shell {
        display: block;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .restaurant-solution .restaurant-solution__story-rail-shell::-webkit-scrollbar {
        display: none;
    }

    .restaurant-solution .restaurant-solution__story-rail {
        display: flex;
        gap: 0.55rem;
        padding: 0.2rem;
        width: max-content;
    }

    .restaurant-solution .restaurant-solution__story-rail li {
        height: auto;
    }

    .restaurant-solution .restaurant-solution__story-rail button {
        border: 1px solid rgba(18, 60, 112, 0.12);
        border-radius: 999px;
        padding: 0.72rem 1rem;
        white-space: nowrap;
    }

    .restaurant-solution .restaurant-solution__story-rail li[data-active="true"] button {
        background: #087da8;
        border-color: #087da8;
        color: #fff;
    }

    .restaurant-solution .restaurant-solution__flow-stage {
        height: min(68svh, 34rem);
        min-height: 25rem;
        order: 2;
    }

    .restaurant-solution .restaurant-solution__story-copy {
        height: auto;
        margin: 0;
        order: 3;
    }

    .restaurant-solution .restaurant-solution__story-copy li {
        display: none;
        inset: auto;
        position: relative;
    }

    .restaurant-solution .restaurant-solution__story-copy li[data-active="true"] {
        display: block;
    }

    .restaurant-solution .restaurant-solution__story-copy h4 {
        max-width: 18ch;
    }
}

@media (max-width: 40rem) {
    .restaurant-solution .restaurant-solution__flow-stage {
        height: 28rem;
        min-height: 0;
    }

    .restaurant-solution .restaurant-solution__flow-device--sync-source {
        left: 0;
        top: 16%;
        width: 72%;
    }

    .restaurant-solution .restaurant-solution__flow-device--sync-target {
        bottom: 12%;
        right: 0;
        width: 62%;
    }

    .restaurant-solution .restaurant-solution__story-copy h4 {
        font-size: clamp(1.65rem, 8vw, 2.1rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .restaurant-solution .restaurant-solution__flow-drawing-reveal {
        clip-path: none !important;
    }

    .restaurant-solution .restaurant-solution__story-indicator,
    .restaurant-solution .restaurant-solution__story-copy li,
    .restaurant-solution .restaurant-solution__flow-screen {
        transform: none !important;
        transition: none !important;
    }
}

.restaurant-solution__mobile-story-copy {
    display: none;
}

.restaurant-solution .restaurant-solution__flow-screen:not([data-restaurant-journey-screen="1"]):not([aria-hidden="false"]) {
    visibility: hidden;
}

@media (max-width: 47.999rem) {
    .marketing-detail .restaurant-solution [data-restaurant-journey] {
        height: auto;
        margin: 0;
        width: 100%;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .restaurant-solution__flow-sticky {
        contain: none;
        display: block;
        min-height: 0;
        padding: 0;
        position: static;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] :is(.restaurant-solution__story-rail-shell, .restaurant-solution__story-copy) {
        display: none;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .restaurant-solution__flow-stage {
        aspect-ratio: auto;
        contain: none;
        container-type: normal;
        display: grid;
        gap: 1.25rem;
        height: auto;
        max-width: none;
        min-height: 0;
        transform: none;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .restaurant-solution__flow-screen {
        align-items: stretch;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(18, 60, 112, 0.1);
        border-radius: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        height: auto;
        inset: auto;
        min-height: 0;
        opacity: 1;
        padding: 1rem;
        pointer-events: auto;
        position: relative;
        transform: none;
        transition: none;
        visibility: visible;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .restaurant-solution__mobile-story-copy {
        display: grid;
        gap: 0.5rem;
        text-align: left;
    }

    .restaurant-solution__mobile-story-number {
        color: var(--restaurant-accent-dark, #173f75);
        font-size: 0.8rem;
        font-weight: 700;
    }

    .restaurant-solution__mobile-story-copy h4 {
        font-size: 1.4rem;
        line-height: 1.25;
        margin: 0;
    }

    .restaurant-solution__mobile-story-copy p {
        color: var(--restaurant-muted, #607086);
        font-size: 1rem;
        line-height: 1.55;
        margin: 0;
        text-wrap: wrap;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .restaurant-solution__flow-screen :is(.restaurant-solution__flow-device, .restaurant-solution__flow-device-pair, .table-order-solution__scan-stage, .cafe-solution__channel-visual) {
        align-items: center;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        height: auto;
        inset: auto;
        max-height: none;
        min-height: 0;
        padding: 0;
        position: relative;
        width: 100%;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .restaurant-solution__flow-screen :is(.restaurant-device-video, .retail-device-image) {
        filter: none;
        height: auto;
        max-height: none;
        max-width: 100%;
        width: 100%;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .restaurant-solution__flow-screen :is(.restaurant-device-video--phone, .table-order-solution__scan-phone, .delivery-solution__story-media--phone, .services-solution__phone) {
        filter: none;
        height: auto;
        justify-self: center;
        margin-inline: auto;
        max-width: 100%;
        width: 14rem;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .table-order-solution__table-chip {
        inset: auto;
        justify-self: center;
        position: relative;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .cafe-solution__channel-device {
        display: grid;
        max-width: none;
        inset: auto;
        justify-items: center;
        position: relative;
        transform: none;
        width: 100%;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .cafe-solution__channel-device > span {
        bottom: auto;
        position: relative;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .food-court-solution__channel-grid {
        gap: 0.75rem;
        grid-auto-rows: auto;
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        overflow: visible;
        padding: 0;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .food-court-solution__channel-card {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto 11rem;
        min-height: 0;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] :is(.food-court-solution__channel-device, .food-court-solution__channel-image) {
        grid-column: 1 / -1;
        grid-row: 2;
        height: 100%;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .restaurant-solution__flow-screen .food-court-solution__channel-device .restaurant-device-video {
        height: min(100cqh, calc(100cqw / 1.6));
        width: auto;
    }

    .marketing-detail .restaurant-solution [data-restaurant-journey] .delivery-solution__story-media {
        box-shadow: none;
        filter: none;
    }
}
