/**
 * Hero background carousel (index #hero only).
 * Layers: slides (z-index 0) → overlay from components .hero::before (z-index 1) → copy (z-index 2).
 */

/* Drop the static JPEG from components.css; keep solid fallback while images load */
#hero.hero {
    background-image: none;
}

/* Full-bleed stack behind hero copy */
.hero__carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* One image per layer; only .hero__slide--active is fully opaque */
.hero__slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.15s ease-in-out;
}

.hero__slide--active {
    z-index: 1;
    opacity: 1;
}

.hero__slide:nth-child(1) {
    background-image: url('../assets/images/home1.png');
}

.hero__slide:nth-child(2) {
    background-image: url('../assets/images/home2.jpg');
}

.hero__slide:nth-child(3) {
    background-image: url('../assets/images/home3.jpg');
}

.hero__slide:nth-child(4) {
    background-image: url('../assets/images/home4.jpg');
}

.hero__slide:nth-child(5) {
    background-image: url('../assets/images/home5.jpg');
}

/* Overlay from variables.css stays on .hero::before; sit it above slides, below copy */
#hero.hero::before {
    z-index: 1;
}

#hero .hero__content {
    position: relative;
    z-index: 2;
    max-width: 64rem;
}

#hero .hero__headline {
    max-width: 20ch;
    margin-left: auto;
    margin-right: auto;
}

.hero__headline-main,
.hero__headline-accent {
    display: block;
}

.hero__headline-main {
    color: var(--color-white);
}

.hero__headline-accent {
    color: #facc15;
    text-shadow: 0 2px 14px rgba(250, 204, 21, 0.24);
}

.hero-subtext {
    width: min(100%, 60rem);
    margin: clamp(1.2rem, 2.4vw, 1.8rem) auto clamp(2rem, 4vw, 2.8rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.58rem, 1.3vw, 0.8rem);
    text-align: center;
}

.hero-subtext__divider {
    width: min(100%, 46rem);
    height: 1px;
    display: block;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.55) 18%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(255, 255, 255, 0.55) 82%,
        rgba(255, 255, 255, 0) 100%
    );
}

.hero-subtext__line {
    margin: 0;
    font-size: clamp(0.85rem, 1.25vw, 1rem);
    line-height: 1.45;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-white);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
    text-wrap: pretty;
}

.hero-subtext__micro {
    margin: clamp(0.25rem, 0.8vw, 0.45rem) 0 0;
    font-size: clamp(0.75rem, 1.04vw, 0.84rem);
    line-height: 1.45;
    font-weight: var(--font-weight-normal);
    letter-spacing: 0.045em;
    color: var(--color-white);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.42);
    text-transform: none;
}

@media (max-width: 1023px) {
    .hero-subtext {
        width: min(100%, 44rem);
        margin-top: clamp(1.05rem, 2.2vw, 1.5rem);
    }

    .hero-subtext__line {
        font-size: clamp(0.8rem, 1.85vw, 0.94rem);
    }
}

@media (max-width: 767px) {
    #hero .hero__content {
        max-width: 100%;
    }

    .hero-subtext {
        width: min(100%, 34rem);
        gap: 0.65rem;
        margin: 1rem auto 1.85rem;
    }

    .hero-subtext__divider {
        width: min(100%, 21rem);
    }

    .hero-subtext__line {
        letter-spacing: 0.045em;
    }

    .hero-subtext__micro {
        margin-top: 0.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__slide {
        transition: none;
    }
}
