@import "fonts.css";

:root {
    --viewport-width: 100vw;
    --viewport-height: 100vh;
    --black-text: #2d363b;
    --orange-text: #d37212;
    --light-gray: #f5f5f0;
    --dark-purple: #7a616a;
    --transition-time: 0;
    --main-card-width: 26%;
    --main-card-height: 0;
    --main-card-img-min-width: 0;
    --card-width: 20%;
    --extended-card-img-width: 100%;
    --extended-card-text-height: 90px;
    --extended-card-width: 100%;
}

html {
    font-size: calc(0.01 * var(--viewport-width));
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #efece7;
}

.start-page {
    position: absolute;
    width: var(--viewport-width);
    height: var(--viewport-height);
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    transition: opacity var(--transition-time);
    pointer-events: none;
}

.start-page .scroll-prompt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 50%;
    transform: translateY(-50%);
}

.start-page .start-page-scroll-icon {
    position: relative;
    top: 0;
    height: calc(0.14 * var(--viewport-width));
}

.start-page-text {
    font-family: "Bilo", sans-serif;
    font-size: calc(var(--viewport-height) * 0.04);
    color: #fff;
    padding: 0 3rem;
    margin-top: calc(var(--viewport-height) * 0.01);
    text-align: center;
}

.main-wrapper {
    width: 100%;
    height: var(--viewport-height);
    background: #fbe4ce;
    overflow: hidden;
}

.content-wrapper {
    position: relative;
    height: fit-content;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity var(--transition-time);
}

.title {
    width: fit-content;
    margin: 0 auto;
    display: flex;
    flex-flow: column wrap;
    font-size: 2.3rem;
    line-height: 3.4rem;
    color: var(--orange-text);
}

.title div:first-child {
    align-self: center;
    font-size: 6.2rem;
    color: var(--black-text);
}

.title div:last-child {
    position: relative;
    align-self: flex-end;
    line-height: 6rem;
}

.cards-data {
    display: none;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
}

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: fit-content;
    height: 100%;
    user-select: none;
    opacity: 0;
    transition: opacity var(--transition-time), transform var(--transition-time) ease;
}

.google-ads {
    overflow: clip;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    cursor: pointer;

    &:before {
        content: "ADVERTISEMENT";
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        color: #cacaca;
        text-align: center;
        font-family: 'Helvetica Neue', sans-serif;
        font-size: 10pt;
        line-height: 15pt;
        background-color: #fff;
    }
}

.google-ads > div > iframe {
    pointer-events: none;
}

.card, .main-card {
    position: relative;
}

.main-card {
    width: var(--main-card-width);
    height: auto;
    z-index: 100;
    box-shadow: 2px 2px 10px -5px rgba(75, 75, 75, 1);
    transition: width var(--transition-time), height var(--transition-time), opacity var(--transition-time), transform var(--transition-time);
    overflow: hidden;
    will-change: transform;
}

.main-card .card-item {
    height: 100%;
    background: var(--light-gray);
    padding: calc(var(--main-card-width) * 0.05);
    overflow: hidden;
}

.card {
    width: var(--card-width);
    height: var(--card-width);
    background: var(--light-gray);
    box-shadow: 2px 2px 10px -5px rgba(75, 75, 75, 1);
    transition: width var(--transition-time), height var(--transition-time), transform var(--transition-time);
}

.card .card-item {
    padding: calc(var(--main-card-width) * 0.05);
    overflow: hidden;
}

.card img, .main-card img {
    width: 100%;
    vertical-align: bottom;
    pointer-events: none;
    transition: all var(--transition-time);
    min-width: 0;
    min-height: 0;
}

.main-card img {
    display: block;
    margin: 0 auto;
    min-width: var(--main-card-img-min-width);
    min-height: var(--main-card-img-min-width);
    max-width: var(--extended-card-img-width);
    max-height: var(--extended-card-img-width);
    transition: all var(--transition-time);
    will-change: transform;
}

.card .text {
    position: relative;
    top: calc(var(--main-card-width) * 0.01);
    text-align: center;
    height: 0;
    opacity: 0;
    font-family: "Segoe Script", sans-serif;
    line-height: normal;
    transition: all var(--transition-time), opacity .2s;
}

.main-card .text {
    position: relative;
    display: flex;
    flex-direction: column;
    align-content: center;
    text-align: center;
    background: var(--light-gray);
    font-family: "Segoe Script", sans-serif;
    font-size: calc(var(--viewport-height) * 0.036);
    line-height: calc(var(--viewport-height) * 0.03);
    transition: all var(--transition-time);
}

.main-card .title-text {
    transition: all var(--transition-time);
    padding: calc(var(--main-card-width) * 0.07) 0 calc(var(--main-card-width) * 0.04) 0;
}

.card .title-text {
    opacity: 0;
}

.carousel .card:nth-child(even) {
    transform: rotate(-5deg); /*later modified by carousel.js*/
}

.carousel .card:nth-child(odd) {
    transform: rotate(8deg); /*later modified by carousel.js*/
}

.carousel .card:first-child {
    transform: rotate(-5deg); /*later modified by carousel.js*/
}

.carousel .card:nth-child(2) {
    transform: rotate(8deg); /*later modified by carousel.js*/
}

.carousel .card:nth-child(4) {
    z-index: 2;
}

.main-card-active-bg {
    position: absolute;
    width: 200%;
    height: calc(var(--viewport-height) + 200%);
    top: -200%;
    right: -100%;
    background: #000;
    opacity: 0;
    transition: opacity var(--transition-time);
    z-index: 10;
    pointer-events: none;
}

.carousel-blur .card {
    filter: blur(0.2rem);
}

.card-item .media {
    position: relative;
}

.card-item .video, .extended-card .video {
    position: absolute;
    width: 30%;
    height: 30%;
    background: url(../images/play-icon.svg) no-repeat center;
    background-size: contain;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0.4rem 0.6rem 0.2rem rgba(0, 0, 0, 0.5));
    z-index: 110;
    pointer-events: none;
    transition: opacity var(--transition-time);
    backdrop-filter: blur(5px);
    border-radius: 50%;
}

.extended-card .video {
   opacity: 0;
}

.card-item video {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--transition-time), width var(--transition-time), height var(--transition-time);
}

.scroll-indicator {
    opacity: 0;
    transition: opacity .1s;
    pointer-events: none;
}

.icon-scroll {
    position: absolute;
    width: calc(0.074 * var(--viewport-width));
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
}

.blur-scroll-icon {
    position: absolute;
    width: calc(0.056 * var(--viewport-width));
    height: calc(0.056 * var(--viewport-width));
    backdrop-filter: blur(5px);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.icon-scroll img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.extended-card {
    min-height: 18rem;
    overflow: hidden;
}

.extended-card .media {
    overflow: hidden;
}

.extended-card .video-media {
    height: 100%;
}

.extended-card .video-media img {
    opacity: 0;
    transition: opacity var(--transition-time);
}

.card-item video.video-half-card {
    max-width: var(--extended-card-img-width);
}

.main-card .video-half-wrapper video {
    left: 50%;
    transform: translateX(-50%);
}

.extended-card img {
    display: block;
    min-width: var(--extended-card-img-width);
    min-height: var(--extended-card-img-width);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    vertical-align: bottom;
    object-fit: cover;
}

.extended-card .card-item {
    padding: calc(var(--main-card-width) * 0.05);
    overflow: hidden;
    transition: all var(--transition-time);
}

.extended-card .title-text, .main-card .title-text {
    margin: 0 auto;
    font-size: 2.0rem;
    line-height: 1.6rem;
    opacity: 0;
}

.extended-card .text {
    height: auto;
    max-height: 48%;
    margin: 0 auto;
    text-align: center;
    transition: all 0s;
}

.extended-card .text .copy-text {
    height: auto !important;
    font-family: "Bilo", sans-serif;
    font-size: calc(var(--viewport-height) * 0.029);
    line-height: normal;
    color: var(--black-text);
    opacity: 1 !important;
}

.main-card .text .copy-text {
    height: 0;
    font-family: "Bilo", sans-serif;
    opacity: 0;
    scale: 0;
}

.extended-card video {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    z-index: 100;
    opacity: 1;
    transition: opacity var(--transition-time), width var(--transition-time), height var(--transition-time);
}

.extended-card .video-half-wrapper {
    position: absolute;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.extended-card .video-half-wrapper video {
    position: relative;
    aspect-ratio: 1 / 1;
}

.nav-indicators {
    position: absolute;
    bottom: calc(var(--viewport-height) * 0.04);
    width: fit-content;
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity var(--transition-time);
}

.indicator {
    width: 1rem;
    height: 1rem;
    background: #fff;
    border-radius: 50%;
    opacity: 0.5;
    z-index: 1000;
    transition: opacity var(--transition-time);
    cursor: pointer;
    pointer-events: none;
}

.indicator-active {
    opacity: 1;
}

.final-screen {
    position: absolute;
    width: var(--viewport-width);
    height: var(--viewport-height);
    top: 0;
    opacity: 0;
    transition: opacity var(--transition-time);
    z-index: -1;
    user-select: none;
}

.final-screen-icon {
    height: 25%;
    width: auto;
    aspect-ratio: 1 /1;
    margin: calc(var(--viewport-height) * 0.26) auto 0 auto;
    background: url("../images/final-screen-icon.svg") no-repeat;
    background-size: contain;
}

.final-screen-text {
    width: fit-content;
    margin: calc(var(--viewport-height) * 0.04) auto 0 auto;
    font-family: "Raleway", sans-serif;
    color: #fff;
    font-size: 1.14rem;
    font-weight: 400;
    text-align: center;
}

.final-screen-text div:first-child {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: calc(var(--viewport-height) * 0.014);
}

.final-screen-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    margin: calc(var(--viewport-height) * 0.15) auto 0 auto;
    background: #fff;
    border-radius: 8rem;
    font-family: "Raleway", sans-serif;
    font-size: 1.14rem;
    color: var(--dark-purple);
    padding: calc(var(--viewport-height) * 0.026) calc(var(--viewport-width) * 0.076);
    cursor: pointer;
}

@media only screen and (orientation: landscape) {
    .main-wrapper {
        background: url("../images/bg-landscape.svg");
        background-size: cover;
    }

    .extended-card .includes-video .text, .main-card .includes-video .text {
        opacity: 0;
    }

    .card-item .video-media {
        height: calc(var(--card-width) - var(--main-card-width) * 0.1);
        transition: height var(--transition-time);
    }

    .extended-card .video-media {
        height: calc(var(--extended-card-width) - var(--main-card-width) * 0.1);
        transition: height var(--transition-time);
    }

    .card-item .video-media img {
        width: 100%;
        height: 100%;
        min-height: 0;
        min-width: 0;
        object-fit: cover;
    }

    .extended-card .video-media img, .main-card .video-media img {
        max-width: 10000px;
        max-height: 10000px;
    }

    .start-page .blur-scroll-icon {
        width: calc(0.105 * var(--viewport-width));
        height: calc(0.105 * var(--viewport-width));
    }

    .start-page .icon-scroll {
        width: calc(0.14 * var(--viewport-width));
    }
}

@media only screen and (orientation: portrait) {
    .main-wrapper {
        background: url("../images/bg-portrait.svg");
        background-size: cover;
    }

    .title {
        width: 76%;
        padding-bottom: 8rem;
        line-height: 10rem;
    }

    .title div:first-child {
        font-size: 12rem;
    }

    .title div:last-child {
        font-size: 5.8rem;
        line-height: 12rem;
        align-self: center;
    }

    .card-item .video {
        width: 33%;
        height: 33%;
    }

    .main-card .text {
        transition: all var(--transition-time);
    }

    .main-card .text {
        user-select: none;
    }

    .main-card .title-text {
        padding-top: calc(var(--main-card-width) * 0.06);
    }

    .main-card img {
        object-fit: cover;
    }

    .extended-card .card-item {
        height: 100%;
    }

    .extended-card .title-text, .main-card .title-text {
        font-size: calc(var(--viewport-height) * 0.028);
        line-height: calc(var(--viewport-height) * 0.034);
    }

    .extended-card .text .copy-text {
        font-size: calc(var(--viewport-height) * 0.029);
        line-height: calc(var(--viewport-height) * 0.032);
    }

    .extended-card video.video-full-card, .extended-card .video-media {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .icon-scroll {
        height: calc(0.16 * var(--viewport-height));
        width: auto;
    }

    .blur-scroll-icon {
        width: calc(0.13 * var(--viewport-height));
        height: calc(0.13 * var(--viewport-height));
    }

    .card-item .video-media {
        width: 100%;
    }

    .extended-card img {
        min-width: 0;
        min-height: 0;
    }

    .extended-card .video-media {
        width: 100%;
        margin: 0 auto;
    }

    .extended-card .video-media img, .main-card .video-media img {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        min-width: 0;
        min-height: 0;
    }

    .nav-indicators {
        gap: 1.8rem;
    }

    .indicator {
        width: 3rem;
        height: 3rem;
    }

    .final-screen-icon {
        height: 24%;
    }

    .final-screen-text {
        margin: calc(var(--viewport-height) * 0.03) auto 0 auto;
        font-size: calc(var(--viewport-height) * 0.017);
    }

    .final-screen-text div:first-child {
        font-size: calc(var(--viewport-height) * 0.036);
        margin-bottom: calc(var(--viewport-height) * 0.014);
    }

    .final-screen-button {
        justify-content: center;
        gap: 1rem;
        width: 80%;
        margin: calc(var(--viewport-height) * 0.19) auto 0 auto;
        border-radius: 8rem;
        font-size: calc(var(--viewport-height) * 0.019);
        color: var(--dark-purple);
        padding: calc(var(--viewport-height) * 0.026) 0;
    }

    .start-page .start-page-scroll-icon {
        height: calc(0.13 * var(--viewport-height));
    }

    .start-page .icon-scroll {
        width: calc(0.16 * var(--viewport-height));
    }
}

@media only screen and (orientation: portrait) and (min-aspect-ratio: 2/3) {
    .title {
        padding-top: 4%;
        padding-bottom: 2%;
        line-height: 6rem;
    }

    .main-card .title-text {
        padding-top: calc(var(--main-card-width) * 0.03);
    }

    .title div:first-child {
        font-size: 9rem;
    }

    .title div:last-child {
        font-size: 6rem;
        line-height: 10rem
    }
}

@media only screen and (orientation: portrait) and (min-aspect-ratio: 7/10) {
    .extended-card .title-text, .main-card .title-text {
        font-size: calc(var(--viewport-height) * 0.028);
        line-height: calc(var(--viewport-height) * 0.028);
    }

    .main-card .title-text {
        padding-top: calc(var(--main-card-width) * 0.04);
    }

    .extended-card .text .copy-text {
        font-size: calc(var(--viewport-height) * 0.026);
        line-height: calc(var(--viewport-height) * 0.028);
    }
}

@media only screen and (orientation: portrait) and (max-aspect-ratio: 9/16) {
    .extended-card .title-text, .main-card .title-text {
        font-size: calc(var(--viewport-height) * 0.029);
        line-height: calc(var(--viewport-height) * 0.033);
    }
}

@media only screen and (orientation: portrait) and (max-aspect-ratio: 1/2) {
    .extended-card .title-text, .main-card .title-text {
        font-size: calc(var(--viewport-height) * 0.027);
        line-height: calc(var(--viewport-height) * 0.031);
    }
}

@media (pointer:coarse) {
    .non-touch-screen {
        display: none;
    }
}

@media (pointer:fine) {
    .touch-screen {
        display: none;
    }

    .icon-scroll img {
        transform: rotate(90deg);
    }

    .nav-indicators {
        z-index: 1001;
    }

    .dots-prompt {
        position: absolute;
        bottom: calc(var(--viewport-height) * 0.08);
        left: 50%;
        transform: translateX(-50%);
        font-family: "Bilo", sans-serif;
        font-size: calc(var(--viewport-height) * 0.026);
        color: #fff;
        padding: 0 3rem;
        text-align: center;
    }
}