﻿/* ═══════════════════════════════════════
   Stoling — Hero Slider
   Dynamic banner carousel with Ken Burns, parallax, stagger animations
   ═══════════════════════════════════════ */

/* ─── Container ─── */
.hero-slider-section {
    position: relative;
    width: 92%;
    max-width: 1400px;
    margin: 1rem auto .5rem;
    border-radius: 24px;
    overflow: hidden;
    min-height: 420px;
    background: var(--homepage-bg-start, #0f0a1e);
    border: 1px solid rgba(167, 139, 250, .16);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .05) inset,
        0 24px 60px rgba(15, 11, 40, .55),
        0 0 80px rgba(124, 58, 237, .12);
    outline: none;
}

@media (min-width: 768px) {
    .hero-slider-section {
        min-height: 500px;
    }
}

@media (min-width: 1024px) {
    .hero-slider-section {
        min-height: min(75vh, 680px);
    }
}

/* ─── Slides wrapper ─── */
.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

/* ─── Individual slide ─── */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
    display: flex;
    align-items: center;
    min-height: inherit;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* ─── Background image (Ken Burns) ─── */
.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.hero-slide.is-active .hero-slide-bg {
    animation: heroKenBurns 6s ease-out forwards;
}

@keyframes heroKenBurns {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}

/* ─── Overlay gradients ─── */
.hero-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-slide-overlay--left {
    background: linear-gradient(90deg,
            rgba(10, 8, 24, 0.65) 0%,
            rgba(10, 8, 24, 0.45) 35%,
            rgba(10, 8, 24, 0.12) 60%,
            transparent 100%);
}

.hero-slide-overlay--center {
    background: radial-gradient(ellipse at center,
            rgba(10, 8, 24, 0.20) 0%,
            rgba(10, 8, 24, 0.40) 100%);
}

.hero-slide-overlay--bottom {
    background: linear-gradient(0deg,
            rgba(10, 8, 24, 0.50) 0%,
            rgba(10, 8, 24, 0.20) 40%,
            transparent 100%);
}

/* ─── Foreground image (right side, float + parallax) ─── */
.hero-slide-fg {
    position: absolute;
    right: 3%;
    bottom: 0;
    max-height: 90%;
    max-width: 45%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
    transition: transform 0.15s ease-out;
    animation: heroFgFloat 4s ease-in-out infinite;
}

@keyframes heroFgFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.hero-slide.is-active .hero-slide-fg {
    animation: heroFgEntrance 0.8s ease-out both 0.2s, heroFgFloat 4s ease-in-out infinite 1s;
}

@keyframes heroFgEntrance {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@media (max-width: 767px) {
    .hero-slide-fg {
        max-width: 55%;
        max-height: 60%;
        right: 2%;
        opacity: 0.6;
    }
}

/* ─── Content (text + CTAs) ─── */
.hero-slide-content {
    position: relative;
    z-index: 3;
    padding: 2.5rem 2rem;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

@media (min-width: 768px) {
    .hero-slide-content {
        padding: 3.5rem 3.5rem;
        gap: 1.2rem;
    }
}

@media (min-width: 1024px) {
    .hero-slide-content {
        padding: 4.5rem 5rem;
        max-width: 640px;
        gap: 1.3rem;
    }
}

/* ─── Eyebrow badge ─── */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    padding: .5rem .9rem .5rem .65rem;
    background: rgba(124, 58, 237, .14);
    border: 1px solid rgba(167, 139, 250, .30);
    border-radius: 99px;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .13em;
    color: #c4b5fd;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 22px rgba(124, 58, 237, .18), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.hero-eyebrow-spark {
    color: #a78bfa;
    font-size: .85rem;
    text-shadow: 0 0 12px rgba(167, 139, 250, .7);
    animation: heroSparkPulse 2.4s ease-in-out infinite;
}

@keyframes heroSparkPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }

    50% {
        opacity: .55;
        transform: scale(1.18) rotate(20deg);
    }
}

/* ─── Title ─── */
.hero-title {
    font-size: clamp(2.4rem, 6.5vw, 4.2rem);
    font-weight: 800;
    color: #f9fafb;
    margin: 0;
    line-height: 1.05;
    letter-spacing: -.03em;
    text-shadow: 0 2px 32px rgba(0, 0, 0, .4);
}

.hero-title-accent {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 40%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Subtitle / description ─── */
.hero-sub {
    font-size: clamp(.9rem, 1.4vw, 1.15rem);
    color: rgba(249, 250, 251, .8);
    line-height: 1.6;
    margin: 0;
    max-width: 480px;
}

/* ─── CTAs ─── */
.hero-ctas {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .4rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.6rem;
    border-radius: 12px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
    cursor: pointer;
}

.hero-cta--primary {
    background: rgba(124, 58, 237, 0.75);
    color: #fff;
    border: 1px solid rgba(167, 139, 250, .4);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 30px rgba(124, 58, 237, .25);
}

.hero-cta--primary:hover {
    background: rgba(124, 58, 237, 0.9);
    box-shadow: 0 0 50px rgba(124, 58, 237, .5);
    transform: translateY(-2px);
}

.hero-cta--secondary {
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(12px);
}

.hero-cta--secondary:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .3);
    transform: translateY(-2px);
}

.hero-cta-icon {
    font-size: .9rem;
}

.hero-cta-svg {
    width: 16px;
    height: 16px;
}

/* ─── Stagger entrance animations ─── */
.hero-slide.is-active .hero-eyebrow {
    animation: heroFadeInUp .6s ease both 0s;
}

.hero-slide.is-active .hero-title {
    animation: heroFadeInUp .6s ease both .1s;
}

.hero-slide.is-active .hero-sub {
    animation: heroFadeInUp .6s ease both .2s;
}

.hero-slide.is-active .hero-ctas {
    animation: heroFadeInUp .6s ease both .3s;
}

@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Navigation Arrows ─── */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(10, 8, 24, .5);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s, background .2s, transform .2s;
}

.hero-slider-section:hover .hero-arrow {
    opacity: 1;
}

.hero-arrow:hover {
    background: rgba(124, 58, 237, .5);
    transform: translateY(-50%) scale(1.08);
}

.hero-arrow svg {
    width: 20px;
    height: 20px;
}

.hero-arrow--prev {
    left: 1rem;
}

.hero-arrow--next {
    right: 1rem;
}

@media (max-width: 767px) {
    .hero-arrow {
        width: 36px;
        height: 36px;
        opacity: .7;
    }

    .hero-arrow svg {
        width: 16px;
        height: 16px;
    }
}

/* ─── Dots ─── */
.hero-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: .5rem;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .4);
    background: transparent;
    cursor: pointer;
    transition: all .3s ease;
    padding: 0;
}

.hero-dot.is-active {
    background: #a78bfa;
    border-color: #a78bfa;
    box-shadow: 0 0 12px rgba(167, 139, 250, .6);
    transform: scale(1.2);
}

.hero-dot:hover:not(.is-active) {
    border-color: rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .2);
}

/* ─── Progress Bar ─── */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, .08);
    z-index: 10;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

.hero-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7c3aed, #ec4899);
    border-radius: 0 0 24px 24px;
}

/* ─── Responsive adjustments ─── */
@media (max-width: 639px) {
    .hero-slider-section {
        width: 95%;
        margin: .5rem auto .35rem;
        border-radius: 16px;
        min-height: 360px;
    }

    .hero-slide-content {
        padding: 1.5rem 1.25rem;
        gap: .7rem;
    }

    .hero-dots {
        bottom: 1rem;
    }

    .hero-progress {
        border-radius: 0 0 16px 16px;
    }

    .hero-progress-fill {
        border-radius: 0 0 16px 16px;
    }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    .hero-slide-bg {
        animation: none !important;
    }

    .hero-slide-fg {
        animation: none !important;
    }

    .hero-slide.is-active .hero-eyebrow,
    .hero-slide.is-active .hero-title,
    .hero-slide.is-active .hero-sub,
    .hero-slide.is-active .hero-ctas {
        animation: none !important;
        opacity: 1;
    }

    .hero-eyebrow-spark {
        animation: none !important;
    }
}