/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    position: relative;
    overflow: hidden;
    height: 420px;
    isolation: isolate;
    background: #101828;
}

.hero-carousel::before {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 68%);
}

.hero-carousel::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    height: 34%;
    pointer-events: none;
    content: "";
    background: linear-gradient(to top, rgba(16, 24, 40, 0.72), transparent);
}

@media (min-width: 640px) {
    .hero-carousel { height: 560px; }
}

@media (min-width: 1024px) {
    .hero-carousel { height: 620px; }
}

.hero-carousel-track {
    display: flex;
    transition: transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.hero-carousel-slide {
    flex: 0 0 100%;
    position: relative;
    overflow: hidden;
    opacity: 0.55;
    transition: opacity 650ms ease;
}

.hero-carousel-slide.is-active {
    opacity: 1;
}

.hero-carousel-slide img {
    transform: scale(1.08);
    transition: transform 1800ms cubic-bezier(0.22, 1, 0.36, 1), filter 850ms ease;
    will-change: transform;
    filter: saturate(0.95) contrast(0.96);
}

.hero-carousel-slide.is-active img {
    transform: scale(1);
    filter: saturate(1.06) contrast(1);
}

.hero-carousel-slide::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(115deg, rgba(16, 24, 40, 0.36), transparent 54%),
        linear-gradient(76deg, transparent 54%, rgba(255, 255, 255, 0.13) 55%, transparent 60%),
        radial-gradient(circle at 76% 30%, rgba(255, 255, 255, 0.14), transparent 30%);
    opacity: 0;
    transform: translateX(-8%);
    transition: opacity 900ms ease, transform 1300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-carousel-slide.is-active::after {
    opacity: 1;
    transform: translateX(0);
}

.home-carousel::before {
    opacity: 0.38;
}

.home-carousel {
    aspect-ratio: 21 / 9;
    height: auto;
    max-height: calc(100vh - 5.75rem);
    min-height: 260px;
}

.home-carousel .hero-carousel-slide img {
    object-fit: contain;
    object-position: center;
    background: #101828;
}

.home-carousel::after {
    height: 26%;
    background: linear-gradient(to top, rgba(16, 24, 40, 0.42), transparent);
}

.home-carousel .hero-carousel-slide::after {
    background:
        linear-gradient(115deg, rgba(16, 24, 40, 0.18), transparent 50%),
        linear-gradient(76deg, transparent 58%, rgba(255, 255, 255, 0.08) 59%, transparent 64%);
}

.hero-carousel-slide > .relative {
    padding-left: 4.75rem;
    padding-right: 4.75rem;
    z-index: 6;
}

.hero-carousel h1 {
    max-width: 11.5em;
    font-size: clamp(2.35rem, 5vw, 3.35rem);
    line-height: 1.06;
}

.home-carousel .hero-carousel-slide > .relative {
    align-items: flex-end;
    padding-bottom: 4rem;
}

.home-carousel .hero-carousel-slide > .relative > div {
    max-width: min(48rem, 62vw);
}

.home-carousel h1 {
    max-width: 100%;
    margin-top: 0;
    font-size: clamp(1.8rem, 3.1vw, 2.8rem);
    line-height: 1.08;
}

@media (max-width: 767px) {
    .hero-carousel-slide > .relative {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .hero-carousel h1 {
        max-width: 100%;
        font-size: 2.25rem;
    }

    .home-carousel .hero-carousel-slide > .relative {
        align-items: flex-end;
        padding-bottom: 3.75rem;
    }

    .home-carousel .hero-carousel-slide > .relative > div {
        max-width: 100%;
    }

    .home-carousel h1 {
        font-size: 1.8rem;
    }

    .hero-carousel-arrow {
        display: none;
    }
}

.hero-carousel-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    z-index: 8;
}

.hero-carousel-dot {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.32);
    cursor: pointer;
    transition: background 260ms ease, transform 260ms ease, width 260ms ease;
    border: none;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.hero-carousel-dot::after {
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: inherit;
    background: #fff;
    content: "";
    transition: width 4500ms linear;
}

.hero-carousel-dot.active {
    width: 54px;
    background: rgba(255,255,255,0.42);
    transform: translateY(-1px);
}

.hero-carousel-dot.active::after {
    width: 100%;
}

.hero-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(16, 24, 40, 0.38);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.hero-carousel-arrow:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.42);
    transform: translateY(-50%) scale(1.05);
}

.hero-carousel-arrow.prev {
    left: 1rem;
}

.hero-carousel-arrow.next {
    right: 1rem;
}

@media (min-width: 640px) {
    .hero-carousel-arrow.prev { left: 1.5rem; }
    .hero-carousel-arrow.next { right: 1.5rem; }
}

.hero-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-left: 3px solid #ffd9d4;
    border-radius: 999px;
    background: rgba(16, 24, 40, 0.34);
    padding: 0.55rem 0.85rem;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.hero-carousel-status {
    position: absolute;
    right: 1.25rem;
    bottom: 4.85rem;
    z-index: 9;
    display: none;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    text-transform: uppercase;
}

.hero-carousel-current {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: #ffd9d4;
}

.hero-carousel-rule {
    display: block;
    width: 56px;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
}

.hero-carousel-label {
    min-width: 9.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.hero-carousel-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    height: 4px;
    background: rgba(255, 255, 255, 0.14);
}

.hero-carousel-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #ffd9d4, #ffffff);
    transition: width 4500ms linear;
}

.hero-carousel-progress span.is-running {
    width: 100%;
}

@media (min-width: 768px) {
    .hero-carousel-status {
        display: flex;
    }
}

/* ===== HERO TEXT ANIMATIONS ===== */
.hero-chip,
.hero-title,
.hero-subtitle,
.hero-cta {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity 720ms ease, transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-carousel-slide.is-active .hero-chip,
.hero-carousel-slide.is-active .hero-title,
.hero-carousel-slide.is-active .hero-subtitle,
.hero-carousel-slide.is-active .hero-cta {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.hero-carousel-slide.is-active .hero-chip {
    transition-delay: 80ms;
}

.hero-carousel-slide.is-active .hero-title {
    transition-delay: 160ms;
}

.hero-carousel-slide.is-active .hero-subtitle {
    transition-delay: 260ms;
}

.hero-carousel-slide.is-active .hero-cta {
    transition-delay: 380ms;
}

.hero-animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 800ms ease, transform 800ms ease;
}

.hero-animate.from-below {
    opacity: 0;
    transform: translateY(28px);
}

@media (prefers-reduced-motion: reduce) {
    .hero-carousel-track,
    .hero-carousel-slide,
    .hero-carousel-slide img,
    .hero-carousel-slide::after,
    .hero-chip,
    .hero-title,
    .hero-subtitle,
    .hero-cta,
    .hero-carousel-dot,
    .hero-carousel-dot::after,
    .hero-carousel-progress span {
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
    }
}
