/* assets/styles/front/12-home-carousel.css */

.home-carousel {
    position: relative;
    width: 100%;
    border-bottom: 1px solid rgb(242 59 210 / 48%);
    background: #120a26;
}

.home-carousel__viewport {
    position: relative;
    width: min(100%, 1920px);
    min-height: clamp(
        34rem,
        calc(100svh - 70px),
        42.5rem
    );
    margin: 0 auto;
    overflow: hidden;
    isolation: isolate;
    background: #120a26;
}

.home-carousel__viewport::before,
.home-carousel__viewport::after {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    content: "";
}

.home-carousel__viewport::before {
    top: 3rem;
    left: -9rem;
    width: 21rem;
    height: 21rem;
    border: 1px solid rgb(242 59 210 / 18%);
    border-radius: 50%;
    box-shadow:
        0 0 0 2.4rem rgb(66 245 230 / 2.5%),
        0 0 0 5.6rem rgb(242 59 210 / 2.5%);
}

.home-carousel__viewport::after {
    right: 0;
    bottom: 0;
    left: 0;
    height: 7rem;
    background: linear-gradient(
        transparent,
        var(--codex-ink)
    );
}

.home-carousel__track {
    display: flex;
    min-height: inherit;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
}

.home-carousel__track::-webkit-scrollbar {
    display: none;
}

.home-carousel__track:focus-visible {
    outline: 2px solid var(--codex-cyan);
    outline-offset: -2px;
}

.home-carousel__slide {
    position: relative;
    display: flex;
    min-width: 100%;
    min-height: inherit;
    flex: 0 0 100%;
    align-items: center;
    scroll-margin-block-start: 78px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.home-carousel__slide--athena {
    --carousel-image:
        url(
            "https://placehold.co/1920x1080/120a26/42f5e6/webp?text=ATHENA"
        );
    --carousel-main-size:
        clamp(4.5rem, 21vw, 9rem);
    --carousel-subtitle-size:
        clamp(3.4rem, 17vw, 7.6rem);
    --carousel-subtitle-width: 10ch;
}

.home-carousel__slide--aphrodite {
    --carousel-image:
        url(
            "https://placehold.co/1920x1080/170a25/f4c95d/webp?text=PISCES+APHRODITE"
        );
    --carousel-main-size:
        clamp(3.2rem, 15vw, 7.25rem);
    --carousel-subtitle-size:
        clamp(3rem, 14vw, 6.75rem);
    --carousel-subtitle-width: 11ch;
}

.home-carousel__slide--cosmos {
    --carousel-image:
        url(
            "https://placehold.co/1920x1080/071923/42f5e6/webp?text=COMPOSITION+DIVINE"
        );
    --carousel-main-size:
        clamp(3rem, 14vw, 6.8rem);
    --carousel-subtitle-size:
        clamp(2.8rem, 13vw, 6.25rem);
    --carousel-subtitle-width: 10ch;
}

.home-carousel__visual {
    position: absolute;
    z-index: 0;
    inset: 0;
    background-color: #120a26;
    background-image:
        linear-gradient(
            180deg,
            rgb(8 5 20 / 10%) 0%,
            rgb(8 5 20 / 25%) 55%,
            rgb(8 5 20 / 88%) 100%
        ),
        linear-gradient(
            90deg,
            rgb(8 5 20 / 98%) 0%,
            rgb(8 5 20 / 82%) 35%,
            rgb(8 5 20 / 28%) 74%,
            rgb(8 5 20 / 46%) 100%
        ),
        var(--carousel-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.015);
}

.home-carousel__glow {
    position: absolute;
    z-index: 1;
    right: -15%;
    bottom: 5%;
    width: min(80vw, 42rem);
    height: min(80vw, 42rem);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgb(66 245 230 / 16%),
        rgb(242 59 210 / 7%) 38%,
        transparent 68%
    );
    filter: blur(14px);
    pointer-events: none;
}

.home-carousel__content {
    position: relative;
    z-index: 3;
    display: flex;
    width: min(100%, 58rem);
    padding:
        clamp(4rem, 12vw, 6rem)
        1.9rem
        7rem;
    flex-direction: column;
    align-items: flex-start;
}

.home-carousel__eyebrow {
    display: inline-flex;
    margin: 0 0 1.1rem;
    align-items: center;
    gap: 0.55rem;
    color: var(--codex-magenta);
    font-family: var(--codex-font-display);
    font-size: 0.92rem;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-carousel__eyebrow::after {
    width: 2.9rem;
    height: 1px;
    background: linear-gradient(
        90deg,
        var(--codex-magenta),
        transparent
    );
    content: "";
}

.home-carousel__title {
    display: grid;
    margin: 0;
    font-family: var(--codex-font-display);
    font-style: italic;
    text-transform: uppercase;
    text-shadow: 0 0.3rem 1.8rem rgb(8 5 20 / 82%);
}

.home-carousel__title-main {
    max-width: 12ch;
    color: var(--codex-paper);
    font-size: var(--carousel-main-size);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 0.78;
    text-wrap: balance;
}

.home-carousel__title-subtitle {
    max-width: var(--carousel-subtitle-width);
    margin-top: 0.75rem;
    color: transparent;
    font-size: var(--carousel-subtitle-size);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 0.82;
    paint-order: stroke fill;
    text-wrap: balance;
    -webkit-text-stroke: 1px rgb(247 244 255 / 82%);
}

.home-carousel__countdown {
    display: flex;
    margin: 1.6rem 0 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    color: var(--codex-muted);
    font-family: var(--codex-font-body);
    font-size: 0.88rem;
}

.home-carousel__countdown-icon {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: 0.15rem;
    border: 1px solid rgb(66 245 230 / 34%);
    border-radius: 50%;
    color: var(--codex-cyan);
    font-size: 1.05rem;
    line-height: 1;
    place-items: center;
}

.home-carousel__countdown-prefix {
    margin-right: 0.15rem;
    color: var(--codex-muted);
}

.home-carousel__countdown-unit {
    display: inline-flex;
    align-items: baseline;
    gap: 0.16rem;
    white-space: nowrap;
}

.home-carousel__countdown-unit strong {
    color: var(--codex-cyan);
    font-family: var(--codex-font-body);
    font-size: 0.95rem;
    font-weight: 700;
}

.home-carousel__countdown-unit small {
    color: var(--codex-paper);
    font-family: var(--codex-font-body);
    font-size: 0.72rem;
    font-weight: 500;
}

.home-carousel__cta {
    position: relative;
    display: inline-flex;
    width: min(100%, 300px);
    min-height: 54px;
    margin-top: 24px;
    padding: 0 24px;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    clip-path: polygon(
        14px 0,
        calc(100% - 14px) 0,
        100% 50%,
        calc(100% - 14px) 100%,
        14px 100%,
        0 50%
    );
    background: linear-gradient(
        110deg,
        #d49a2d,
        #ffe281 52%,
        #d99b29
    );
    box-shadow: 0 0 28px rgb(244 201 93 / 28%);
    color: #151019;
    font-family: var(--codex-font-display);
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.home-carousel__cta::before {
    position: absolute;
    top: -80%;
    left: -30%;
    width: 25%;
    height: 250%;
    background: rgb(255 255 255 / 46%);
    content: "";
    pointer-events: none;
    transform: rotate(24deg);
    transition: transform 550ms ease;
}

.home-carousel__cta:hover {
    color: #151019;
}

.home-carousel__cta:hover::before {
    transform: translateX(430%) rotate(24deg);
}

.home-carousel__cta:focus-visible {
    outline: 2px solid var(--codex-paper);
    outline-offset: 4px;
    color: #151019;
}

.home-carousel__cta > span {
    position: relative;
    z-index: 1;
}

.home-carousel__cta-arrow {
    display: inline;
    width: auto;
    height: auto;
    border: 0;
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1;
}

.home-carousel__index {
    position: absolute;
    z-index: 5;
    right: 1.25rem;
    bottom: 1.7rem;
    display: grid;
    grid-template-columns: repeat(3, auto);
    align-items: center;
    gap: 0.8rem;
}

.home-carousel__index::before {
    position: absolute;
    z-index: -1;
    right: 0;
    left: 0;
    height: 1px;
    background: rgb(167 157 191 / 35%);
    content: "";
}

.home-carousel__index-link {
    min-width: 2rem;
    padding: 0.2rem 0.4rem;
    background: var(--codex-ink);
    color: var(--codex-muted);
    font-family: var(--codex-font-display);
    font-size: 0.76rem;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-decoration: none;
}

.home-carousel__index-link:hover,
.home-carousel__index-link:focus-visible {
    color: var(--codex-cyan);
}

.home-carousel__index-link--1 {
    color: var(--codex-cyan);
}

.home-carousel:has(
    #home-carousel-slide-2:target
) .home-carousel__index-link--1,
.home-carousel:has(
    #home-carousel-slide-3:target
) .home-carousel__index-link--1 {
    color: var(--codex-muted);
}

.home-carousel:has(
    #home-carousel-slide-2:target
) .home-carousel__index-link--2,
.home-carousel:has(
    #home-carousel-slide-3:target
) .home-carousel__index-link--3 {
    color: var(--codex-cyan);
}

@supports not (-webkit-text-stroke: 1px white) {
    .home-carousel__title-subtitle {
        color: rgb(247 244 255 / 28%);
    }
}

@media (min-width: 48rem) {
    .home-carousel__viewport {
        min-height: clamp(
            38rem,
            calc(100svh - 78px),
            42.5rem
        );
    }

    .home-carousel__viewport::before {
        top: 3.25rem;
        left: -8rem;
    }

    .home-carousel__content {
        width: min(100%, 60rem);
        padding:
            clamp(4.5rem, 8vw, 7rem)
            clamp(2.75rem, 6vw, 7rem)
            6.5rem;
    }

    .home-carousel__eyebrow {
        font-size: 1rem;
    }

    .home-carousel__countdown {
        margin-top: 1.8rem;
        font-size: 0.95rem;
    }

    .home-carousel__countdown-unit strong {
        font-size: 1rem;
    }

    .home-carousel__countdown-unit small {
        font-size: 0.76rem;
    }

    .home-carousel__index {
        right: clamp(2.75rem, 6vw, 7rem);
        bottom: 2.3rem;
    }
}

@media (min-width: 75rem) {
    .home-carousel__content {
        padding-left: clamp(5rem, 8vw, 9.5rem);
    }

    .home-carousel__index {
        right: clamp(5rem, 8vw, 9.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-carousel__track {
        scroll-behavior: auto;
    }

    .home-carousel__cta::before {
        transition: none;
    }
}