/* FEATURES SECTION  */

.features {
    width: 100%;
    overflow: hidden;
}

.features__container {
    gap: 32px;
}

.features__content {
    align-items: start;
    gap: 16px;
}

.features-title {
    display: inline-block;
    width: 300px;
}

.features-description {
    color: var(--color-secondary);
    line-height: 130%;
}

@media (min-width: 768px) {
    .features__content {
        align-items: center;
        text-align: center;
    }

    .features-title {
        width: auto;
        max-width: 620px;
    }

    .features-description {
        max-width: 708px;
    }
}

/*  FEATURES CAROUSEL */
.features-carousel {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.features-carousel__viewport {
    position: relative;
    width: 100%;
}

.features-carousel__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.features-carousel__slide {
    position: absolute;
    left: 50%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition:
        width 400ms ease,
        height 400ms ease,
        top 400ms ease,
        transform 400ms ease,
        opacity 400ms ease,
        border-radius 400ms ease;
    will-change: width, height, top, transform, opacity;
}

.feature-spotlight-card,
.feature-spotlight-card__surface {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* MOBILE + TABLET 375 / 744 card size: 343 x 514 */
.features-carousel__viewport {
    max-width: 343px;
    height: 514px;
    overflow: hidden;
    border-radius: 24px;
}

.features-carousel__slide {
    top: 0;
    width: min(343px, calc(100vw - (var(--container-padding) * 2)));
    height: 514px;
    transform: translateX(-50%);
}

.features-carousel__slide.is-active {
    z-index: 3;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%);
}

.features-carousel__slide.is-prev {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(-50% - 96.5%));
}

.features-carousel__slide.is-next {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(-50% + 96.5%));
}

.features-carousel__slide.is-hidden {
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
}

/*  SMALL DESKTOP */
@media (min-width: 1024px) {
    .features-carousel__viewport {
        max-width: 940px;
        height: 532px;
        overflow: visible;
        border-radius: 0;
    }

    .features-carousel__slide {
        transform: translateX(-50%);
    }

    .features-carousel__slide.is-active {
        top: 0;
        width: 360px;
        height: 532px;
        z-index: 3;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%);
    }

    .features-carousel__slide.is-prev {
        top: 73px;
        width: 260px;
        height: 386px;
        z-index: 1;
        opacity: 1;
        pointer-events: none;
        transform: translateX(calc(-50% - 334px));
    }

    .features-carousel__slide.is-next {
        top: 73px;
        width: 260px;
        height: 386px;
        z-index: 1;
        opacity: 1;
        pointer-events: none;
        transform: translateX(calc(-50% + 334px));
    }

    .features-carousel__slide.is-hidden {
        top: 73px;
        width: 260px;
        height: 386px;
        z-index: 0;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%);
    }
}

/*   LARGE DESKTOP 1440+  */
@media (min-width: 1440px) {
    .features-carousel__viewport {
        max-width: 1060px;
        height: 568px;
    }

    .features-carousel__slide.is-active {
        top: 0;
        width: 384px;
        height: 568px;
        transform: translateX(-50%);
    }

    .features-carousel__slide.is-prev {
        top: 61px;
        width: 300px;
        height: 445px;
        transform: translateX(calc(-50% - 374px));
    }

    .features-carousel__slide.is-next {
        top: 61px;
        width: 300px;
        height: 445px;
        transform: translateX(calc(-50% + 374px));
    }

    .features-carousel__slide.is-hidden {
        top: 61px;
        width: 300px;
        height: 445px;
        transform: translateX(-50%);
    }
}

/* SEPARATE CONTROL FOR THIS CAROUSEL */
.features-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.features-carousel__nav {
    position: relative;
    width: 47px;
    height: 47px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition:
        transform 200ms ease,
        opacity 200ms ease,
        background-color 200ms ease;
}

.features-carousel__nav:hover {
    transform: translateY(-1px);
}

.features-carousel__nav:active {
    transform: translateY(0);
}

.features-carousel__nav-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 44px;
    height: 44px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.features-carousel__nav--prev .features-carousel__nav-icon {
    background-image: url("../../images/Slider/circle-left-arrow.svg");
}

.features-carousel__nav--next .features-carousel__nav-icon {
    background-image: url("../../images/Slider/circle-right-arrow.svg");
}

/* FEATURE SPOTLIGHT CARD */
.feature-spotlight-card__surface {
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-spotlight-card__header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
}

.feature-spotlight-card__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 47px;
    border-radius: 100px;
    flex-shrink: 0;
    font-size: 24px;
    line-height: 100%;
    background-color: #FFFFFF;
    color: var(--color-primary);
}

.feature-spotlight-card__copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-spotlight-card__title {
    font-size: 20px;
    line-height: 120%;
}

.feature-spotlight-card__description {
    font-size: 14px;
    line-height: 120%;
    letter-spacing: 0.5px;
}

.feature-spotlight-card__visual {
    width: 100%;
    flex: 1;
}

/* Eye tracking */
.feature-spotlight-card--eye .feature-spotlight-card__surface {
    border: 1px solid #DDE1E6;
    background:
        linear-gradient(
            179.91deg,
            rgba(209, 217, 254, 0.2) 22.51%,
            rgba(209, 217, 254, 0) 38.13%
        ),
        #FFFFFF;
}

.feature-spotlight-card--eye .feature-spotlight-card__copy {
    width: 265px;
}

.feature-spotlight-card--eye .feature-spotlight-card__visual--eye {
    background: url("../../images/Mobile/relation.png") no-repeat center bottom 25px;
    background-size: 340px 250px;
}

/* Smart alarm */
.feature-spotlight-card--alarm .feature-spotlight-card__surface {
    background-color: #120F33;
}

.feature-spotlight-card--alarm .feature-spotlight-card__copy {
    width: 240px;
}

.feature-spotlight-card--alarm .feature-spotlight-card__title,
.feature-spotlight-card--alarm .feature-spotlight-card__description {
    color: #FFFFFF;
}

.feature-spotlight-card--alarm .feature-spotlight-card__description {
    letter-spacing: 0.5px;
}

.feature-spotlight-card__visual--alarm {
    display: flex;
    align-items: flex-end;
}

.feature-spotlight-card__image {
    display: block;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

/* Chronotype */
.feature-spotlight-card--chronotype .feature-spotlight-card__surface {
    border: 1px solid #DDE1E6;
    background:
    linear-gradient(
    179.91deg,
    rgba(209, 217, 254, 0.2) 22.51%,
    rgba(209, 217, 254, 0) 38.13%
    ),
    #FFFFFF;
}

.feature-spotlight-card--chronotype .feature-spotlight-card__copy {
    width: 260px;
}

.feature-spotlight-card--chronotype .feature-spotlight-card__visual--chronotype {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px;
    background: url("../../images/Mobile/chronotype.png") no-repeat center;
    background-size: 256px auto;
}
    
/* desktop: fullscreen 1024 */
@media (min-width: 1024px) {
    .features-carousel__slide.is-prev .feature-spotlight-card__surface,
    .features-carousel__slide.is-next .feature-spotlight-card__surface {
        border-radius: 19px;
    }

    .features-carousel__slide.is-prev .feature-spotlight-card__header,
    .features-carousel__slide.is-next .feature-spotlight-card__header {
        gap: 12px;
        padding: 12px;
    }

    .features-carousel__slide.is-prev .feature-spotlight-card__badge,
    .features-carousel__slide.is-next .feature-spotlight-card__badge {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .features-carousel__slide.is-prev .feature-spotlight-card__title,
    .features-carousel__slide.is-next .feature-spotlight-card__title {
        font-size: 18px;
    }

    .features-carousel__slide.is-prev .feature-spotlight-card__description,
    .features-carousel__slide.is-next .feature-spotlight-card__description {
        font-size: 12px;
    }

    .features-carousel__slide.is-prev .feature-spotlight-card--eye .feature-spotlight-card__copy,
    .features-carousel__slide.is-next .feature-spotlight-card--eye .feature-spotlight-card__copy,
    .features-carousel__slide.is-prev .feature-spotlight-card--alarm .feature-spotlight-card__copy,
    .features-carousel__slide.is-next .feature-spotlight-card--alarm .feature-spotlight-card__copy,
    .features-carousel__slide.is-prev .feature-spotlight-card--chronotype .feature-spotlight-card__copy,
    .features-carousel__slide.is-next .feature-spotlight-card--chronotype .feature-spotlight-card__copy {
        width: 188px;
    }

    .features-carousel__slide.is-prev .feature-spotlight-card--eye .feature-spotlight-card__visual--eye,
    .features-carousel__slide.is-next .feature-spotlight-card--eye .feature-spotlight-card__visual--eye {
        background-size: 290px 214px;
        background-position: center bottom 16px;
    }

    .features-carousel__slide.is-prev .feature-spotlight-card--chronotype .feature-spotlight-card__visual--chronotype,
    .features-carousel__slide.is-next .feature-spotlight-card--chronotype .feature-spotlight-card__visual--chronotype {
        padding: 32px;
        background-size: 220px auto;
    }
    
    .features-title {
        width: auto;
        max-width: 800px;
    }
}

/* desktop: fullscreen 1440 */
@media (min-width: 1440px) {
    .features-carousel__slide.is-prev .feature-spotlight-card__surface,
    .features-carousel__slide.is-next .feature-spotlight-card__surface {
        border-radius: 18.8px;
    }

    .features-carousel__slide.is-prev .feature-spotlight-card--eye .feature-spotlight-card__surface,
    .features-carousel__slide.is-next .feature-spotlight-card--eye .feature-spotlight-card__surface,
    .features-carousel__slide.is-prev .feature-spotlight-card--chronotype .feature-spotlight-card__surface,
    .features-carousel__slide.is-next .feature-spotlight-card--chronotype .feature-spotlight-card__surface {
        border-width: 0.78px;
    }
    
    .features__container {
        gap: 60px;
    }
    
    .features-description {
        max-width: 820px;
    }
    
    .feature-spotlight-card__description {
        font-size: 16px;
    }
}
