*,
::after,
::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::after,
::before {
    position: absolute;
    display: block;
}

a {
    text-decoration: none;
    color: unset;
}

ul,
ol {
    list-style: none;
}

button:active,
input[type=submit]:active,
input:focus,
textarea:focus {
    outline: 0;
}

html {
    scroll-behavior: smooth;
}

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

input,
textarea {
    -webkit-appearance: none;
    appearance: none;
    -webkit-border-radius: 0;
    border-radius: 0;
    border: none;
}

input,
textarea,
button {
    font-family: unset;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

button {
    border: none;
    cursor: pointer;
    background: none;
    color: unset;
}

input {
    -moz-appearance: textfield;
    appearance: textfield;
}


/* INIT */
:root {
    --text: #111;
    --bg: #F1F1F1;
    --highlight-color: #00F0AE;
    --wux-bezier: cubic-bezier(.72, 0, .28, .99);
    --expand-bezier: cubic-bezier(0.075, 0.82, 0.165, 1);
    --slide-bezier: cubic-bezier(0, 1, .56, .94);
    --forefront-bezier: cubic-bezier(.01, 1.37, .72, 1.33);
    --backwards-bezier: cubic-bezier(.72, -0.66, 1, -0.01);
    --rotation-timing-value: 1.6;
    --rotation-timing: calc(var(--rotation-timing-value) * 1s);
    --slide-timing: calc(var(--rotation-timing-value) * .6s);
    --slide-timing-delay: calc(var(--rotation-timing-value) * .5s);
    --logo-rotation-timing: 1.6s;
}

::selection {
    background: var(--highlight-color);
    /* color: var(--bg); */
}

h1,
h2,
h3,
h4 {
    font-family: "Bruno Ace", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.redirect-logo,
h1 {
    position: fixed;
    top: 10px;
    z-index: 50;
}

h1 {
    color: var(--highlight-color);
    user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.redirect-logo {
    position: fixed;
    left: 10px;
    height: 30px;
    width: auto;
    fill: var(--text);
}

.rotating-star {
    transform-origin: 85% 20%;
    transition: rotate var(--logo-rotation-timing) var(--wux-bezier),
        fill var(--logo-rotation-timing) var(--wux-bezier);
}

.redirect-logo:hover .rotating-star {
    rotate: 720deg;
    fill: var(--highlight-color);
}

h1 {
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 500;
    right: 10px;
}

.animation-btn-ctn {
    display: none;
    position: fixed;
    bottom: 0;
    z-index: 50;
    left: 50%;
    width: 90%;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    translate: -50% 0;
    border-radius: 30px 30px 0 0;
    overflow: hidden;
    transition: translate var(--slide-timing) ease-in-out;
}

.rotation-btn {
    line-height: 50px;
    text-align: center;
    text-transform: uppercase;
    font-size: 14px;
    background: var(--highlight-color);
}

.product-full,
.product-description,
.product-price,
.product-name {
    height: 1lh;
}

.product-btn-ctn {
    height: 46px;
}

.product-name {
    position: absolute;
    bottom: 0;
    left: 50%;
    translate: -50% 100%;
    width: fit-content;
    white-space: nowrap;
    text-align: center;
}

.product-full {
    height: 2lh;
}

.product-full {
    margin-bottom: 12px;
}

.product-description {
    line-height: 1.8;
    height: 5lh;
    overflow: hidden;
    margin: 16px 0;
}

.product-description ul {
    padding-inline-start: 10px;
    list-style-type: "⬩";
}

.product-description li {
    display: list-item;
    padding-left: 8px;
}

.product-description li::marker {
    color: var(--highlight-color);
}

.slideY,
.slideX {
    display: block;
    position: relative;
    translate: 0 100%;
    opacity: 0;
}

.slideY {
    translate: 0 100%;
}

.slideX {
    translate: 10% 0;
}

.product-btn-ctn button.slideY {
    padding: 0 40px;
    border-radius: 30px;
    line-height: 46px;
    border: 1px solid;
    background: hsl (from var(--highlight-color) h s l / 0%);
    text-transform: uppercase;
}

.product-btn-ctn button.slideY:hover {
    background-color: var(--highlight-color);
    box-shadow: inset 0 0 0 1px var(--highlight-color);
}

.slideY,
.slideX {
    transition: translate var(--slide-timing) var(--slide-timing-delay) var(--slide-bezier),
        opacity var(--slide-timing) var(--slide-timing-delay) var(--slide-bezier);
}

.product-btn-ctn button.slideY {
    transition: translate var(--slide-timing) .85s var(--slide-bezier),
        opacity var(--slide-timing) .85s var(--slide-bezier),
        background-color .15s 0s ease-in-out,
        box-shadow .15s 0s ease-in-out;
}

.product-full .slideY,
.product-description .slideX,
.product-price .slideY {
    transition-delay: .1s;
}


.product-name,
.product-full {
    font-size: 28px;
}

.product-full,
.product-price {
    font-size: clamp(20px, 2.4vw, 48px);
}

.product-description {
    font-size: 15px;
}

.product-price {
    margin-bottom: 30px;
}



body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--text);
    font-family: "Sulphur-point", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.showcase-container {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    justify-content: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    perspective: 1000px;
}

.close {
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--slide-timing) ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    translate: 3vw -150%;
    font-size: 50px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
}

.close svg {
    stroke: var(--text);
    stroke-width: 1px;
    stroke-linecap: "round";
    stroke-linejoin: "round";
}

.video-frame {
    position: absolute;
    height: 100%;
    display: flex;
    align-items: center;
    top: 0;
    left: 0;
    perspective: 1000px;
    translate: calc(50vw - 50%) calc(50vh - 50%);
    z-index: 0;
    transform-origin: center;
    transition: translate var(--rotation-timing) var(--expand-bezier),
        width var(--rotation-timing) var(--expand-bezier);
}

.video-item {
    gap: 0;
    height: 100%;
    /* overflow: hidden; */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: width var(--rotation-timing) linear;
}

.video-container {
    aspect-ratio: 8/12;
    display: flex;
    justify-content: center;
    align-items: center;
    /* overflow: hidden; */
    flex-shrink: 0;
    position: relative;
}

.video-frame,
.video-container {
    width: 400px;
}

.video-container::before,
.video-container::after {
    content: '';
    background: var(--bg);
    display: block;
}

.video-container::before {
    height: 100%;
    width: 4px;
    right: 0;
    translate: 50% 0;
}

.video-container::after {
    width: 100%;
    height: 4px;
    bottom: 0;
    left: 0;
    translate: 0 50%;
}

.expand-trigger,
.clockwise,
.anti-clockwise {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.details-block {
    width: 0;
    position: relative;
    height: 0;
    transition: width var(--rotation-timing) var(--expand-bezier),
        padding var(--rotation-timing) var(--expand-bezier);
}

.product-btn-ctn button.slideY,
.product-full .slideY,
.product-description .slideX,
.product-price .slideY {
    transition: translate 0.05s 0s var(--slide-bezier),
        opacity 0.05s 0s var(--slide-bezier);
}


/* POSITIONS AND TRAJECTORIES */
[data-pos="1"],
[data-pos="4"] {
    transition: transform var(--rotation-timing) var(--forefront-bezier),
        translate var(--rotation-timing) linear,
        width var(--rotation-timing) var(--expand-bezier);
}

[data-pos="1"] .video-item,
[data-pos="4"] .video-item {
    translate: 0 0 0;
    transform: translate3d(0, 0, 0);
    transition: transform var(--rotation-timing) var(--forefront-bezier),
        translate var(--rotation-timing) linear;
}


[data-pos="2"] .video-item,
[data-pos="5"] .video-item {
    translate: 65vw 0 0;
    transform: translate3d(0, 0, -60vw);
    transition: transform var(--rotation-timing) var(--backwards-bezier),
        translate var(--rotation-timing) linear;
}

[data-pos="3"] .video-item,
[data-pos="6"] .video-item {
    translate: -80vw 0 0;
    transform: translate3d(0, 0, -100vw);
    transition: transform var(--rotation-timing) var(--backwards-bezier),
        translate var(--rotation-timing) linear;
}

.ctn-antiClockwise[data-pos="3"] .video-item,
.ctn-antiClockwise[data-pos="6"] .video-item {
    transition: transform var(--rotation-timing) var(--forefront-bezier),
        translate var(--rotation-timing) linear;
}




/* ROTATION ITEM SUPERPOSITIONS  */
[data-pos="1"],
[data-pos="4"] {
    z-index: 3;
}

[data-pos="2"],
[data-pos="5"] {
    z-index: 2;
}

[data-pos="3"],
[data-pos="6"] {
    z-index: 1;
}

.ctn-clockwise[data-pos="2"],
.ctn-clockwise[data-pos="5"],
.ctn-antiClockwise[data-pos="3"],
.ctn-antiClockwise[data-pos="6"] {
    z-index: -1;
}

.ctn-clockwise[data-pos="3"],
.ctn-clockwise[data-pos="6"],
.ctn-clockwise[data-pos="1"],
.ctn-clockwise[data-pos="4"],
.ctn-antiClockwise[data-pos="2"],
.ctn-antiClockwise[data-pos="5"],
.ctn-antiClockwise[data-pos="1"],
.ctn-antiClockwise[data-pos="4"] {
    z-index: 5;
}


/* TRIGGERS */

[data-pos="1"] .anti-clockwise,
[data-pos="4"] .anti-clockwise,
[data-pos="1"] .clockwise,
[data-pos="4"] .clockwise {
    visibility: hidden;
}

[data-pos="2"] .expand-trigger,
[data-pos="5"] .expand-trigger,
[data-pos="2"] .anti-clockwise,
[data-pos="5"] .anti-clockwise {
    visibility: hidden;
}

[data-pos="3"] .clockwise,
[data-pos="6"] .clockwise,
[data-pos="3"] .expand-trigger,
[data-pos="6"] .expand-trigger {
    visibility: hidden;
}

.ctn-clockwise .expand-trigger,
.ctn-antiClockwise .expand-trigger {
    visibility: hidden;
}

/* DETAILS EXPANSION*/
.video-frame.expand {
    width: 100%;
    flex-direction: unset;
    background: var(--bg);
}

/* .expand .video-item {
    gap: 5vw;
} */


.expand .product-name {
    opacity: 0;
    width: 0;
    height: 0;
}

.expand .details-block {
    height: unset;
    width: 60vw;
    transition: unset;
    padding: 0 0 0 3vw;
}

.expand .showcase-container {
    flex-direction: unset;
    width: 100%;
    gap: 30px;
    justify-content: unset;
}

.expand .details-block .slideY,
.expand .details-block .slideX {
    translate: 0 0;
    opacity: 1;
    transition: translate var(--slide-timing) var(--slide-bezier),
        opacity var(--slide-timing) var(--slide-bezier);
}

.expand .expand-trigger {
    visibility: hidden;
}

.expand .close {
    visibility: unset;
    opacity: 1;
}

.expand .product-btn-ctn button.slideY {
    transition: translate var(--slide-timing) .85s var(--slide-bezier),
        opacity var(--slide-timing) .85s var(--slide-bezier),
        background-color .15s 0s ease-in-out,
        box-shadow .15s 0s ease-in-out;
}


.expand .product-full .slideY {
    transition-delay: .4s;
}

.expand .product-description .slideX {
    transition-delay: .55s;
}

.expand .product-price .slideY {
    transition-delay: .7s;
}


@media screen and (min-width:1550px) {

    .video-frame,
    .video-container {
        width: 550px;
    }
}

@media screen and (max-width:1200px) {

    [data-pos="2"] .video-item,
    [data-pos="5"] .video-item {
        translate: 70vw 0 0;
        transform: translate3d(0, 0, -80vw);
    }

    [data-pos="3"] .video-item,
    [data-pos="6"] .video-item {
        translate: -90vw 0 0;
        transform: translate3d(0, 0, -140vw);
    }

    .video-frame {
        height: 90%;
    }

    /* .video-frame,
    .video-container {
        width: 400px;
    } */
}

@media screen and (max-width:1024px) {

    [data-pos="3"] .video-item,
    [data-pos="6"] .video-item {
        translate: -110vw 0 0;
        transform: translate3d(0, 0, -220vw);
    }

    [data-pos="2"] .video-item,
    [data-pos="5"] .video-item {
        translate: 90vw 0 0;
        transform: translate3d(0, 0, -160vw);
    }

}

@media screen and (max-width:800px) {
    .video-frame {
        height: 100%;
    }

    .video-frame,
    .video-container {
        width: 300px;
    }

    .product-name {
        font-size: 24px;
    }

    [data-pos="2"] .video-item,
    [data-pos="5"] .video-item {
        translate: 110vw 0 0;
        transform: translate3d(0, -10vw, -300vw);
    }

    [data-pos="3"] .video-item,
    [data-pos="6"] .video-item {
        translate: -130vw 0 0;
        transform: translate3d(0, -15vw, -400vw);
    }

    .video-item {
        flex-direction: column;
        width: 100%;
        transition: width var(--rotation-timing) var(--expand-bezier);
        background: var(--bg);
    }

    .video-container {
        translate: 0 0;
        transition: translate var(--rotation-timing) var(--expand-bezier);
    }

    .expand .video-container {
        translate: 0 -150px;
    }

    .details-block,
    .expand .details-block {
        width: 100%;
        height: 0;
        padding: 0 30px;
        gap: 20px;
        display: grid;
        align-items: flex-end;
        flex-grow: 1;
        grid-template-columns: 1fr auto;
        grid-template-rows: 40px 80px auto;
        grid-template-areas: "close ."
            "name price"
            "features btn";
    }

    .details-block {
        bottom: 0;
        position: absolute;
        transition: height .5s linear;
    }

    .expand .details-block {
        height: 50vh;
    }

    .details-block>* {
        margin: 0;
        height: 100%;
        align-items: flex-end;
    }

    .details-block>.close {
        height: unset;
        position: unset;
        grid-area: close;
        translate: 0 0;
    }

    .product-full {
        grid-area: name;
        height: fit-content;
    }

    .product-description {
        grid-area: features;
    }

    .product-price {
        grid-area: price;
        font-size: 30px;
        height: fit-content;
        text-align: center;
    }

    .product-btn-ctn {
        grid-area: btn;
    }

    .details-block .slideY,
    .details-block .slideX {
        translate: 0 200%;
        /* transition: translate var(--slide-timing) var(--slide-bezier),
            opacity var(--slide-timing) .05s var(--slide-bezier); */
    }

    .product-full .slideY {
        transition: translate var(--slide-timing) .15s var(--slide-bezier),
            opacity calc(var(--slide-timing) / 3) 0s var(--slide-bezier);
    }

    .product-description .slideX {
        transition: translate var(--slide-timing) .2s var(--slide-bezier),
            opacity calc(var(--slide-timing) / 3) 0s var(--slide-bezier);
    }

    .product-price .slideY {
        transition: translate var(--slide-timing) .25s var(--slide-bezier),
            opacity calc(var(--slide-timing) / 3) 0s var(--slide-bezier);
    }

    .product-btn-ctn button.slideY {
        transition: translate var(--slide-timing) .3s var(--slide-bezier),
            opacity calc(var(--slide-timing) / 3) 0s var(--slide-bezier);
    }

    .video-frame.expand {
        transition: width var(--rotation-timing) var(--expand-bezier);
    }

    .video-frame {
        transition: width var(--rotation-timing) .4s var(--expand-bezier);
    }

    /* .expand .video-container {
        opacity: .3;
        transition: width var(--rotation-timing) var(--expand-bezier);
    } */
}

@media screen and (max-width:650px) {
    :root {
        --rotation-timing-value: 1;
    }

    .animation-btn-ctn {
        display: grid;
    }

    .video-frame {
        width: 100%;
    }

    .video-container {
        width: 250px;
    }

    [data-pos="2"] .video-item,
    [data-pos="5"] .video-item {
        translate: 110vw 0 0;
        transform: translate3d(0, -10vw, -100vw);
    }

    [data-pos="3"] .video-item,
    [data-pos="6"] .video-item {
        translate: -110vw 0 0;
        transform: translate3d(0, -10vw, -100vw);
    }

    [data-pos="3"].ctn-antiClockwise,
    [data-pos="6"].ctn-antiClockwise,
    [data-pos="2"].ctn-clockwise,
    [data-pos="5"].ctn-clockwise {
        opacity: 0;
    }

    .details-block {
        bottom: unset;
    }

    .expand .video-container {
        translate: 100px 0;
        filter: blur(8px);
        opacity: .5;
    }

    .details-block,
    .expand .details-block {
        grid-template-columns: 1fr;
        gap: 10px;
        grid-template-rows: repeat(2, auto) 130px repeat(2, auto);
        grid-template-areas: "close"
            "name"
            "features"
            "price"
            " btn";
    }

    .product-price {
        text-align: unset;
    }

    .expand .details-block {
        height: 80vh;
    }

    .animation-btn-ctn.slideY {
        position: fixed;
        translate: -50% 150%;
        opacity: 0;
        transition: translate var(--slide-timing) ease-in-out,
            opacity var(--slide-timing) ease-in-out;
    }

}