/* --- hero container --- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    min-height: clamp(360px, 60vh, 720px); /* responsive height */
    isolation: isolate; /* keeps z-index layers contained */
}

/* optional: maintain a 16:9 space on very wide, short viewports */
@supports (aspect-ratio: 16 / 9) {
    .hero { aspect-ratio: auto; } /* let min-height drive height */
}

/* --- slideshow sits behind content --- */
.hero .slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    height: 100%;
}

.hero .slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 800ms ease-in-out;
}

.hero .slide.is-active { opacity: 1; }

.hero .slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* cover the hero area */
    display: block;

    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-size: cover;
}

/* --- scrim to ensure text contrast --- */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,.15) 40%, rgba(0,0,0,0));
    pointer-events: none;
}

/* --- overlay layers --- */
.hero__overlay {
    position: relative;
    z-index: 2;
    height: 50%;
    display: flex;
    align-items: center;        /* vertical centering */
    justify-content: flex-start;/* left align; change to center if desired */
    padding: clamp(1rem, 5vw, 3rem);
}

.hero__overlay_right {
    position: relative;
    z-index: 3;
    height: 50%;
    display: flex;
    align-items: end;
    justify-content: flex-end; /* right align; */
    padding: 0.5rem;
}



/* the floating content stack */
.hero__stack {
    display: flex;
    flex-direction: column;
    gap: clamp(.5rem, 1.5vw, 1rem);
    max-width: min(60ch, 90%);  /* readable line length */
    color: var(--color-accent-contrast);
    text-wrap: balance;
    background: rgba(0,0,0,.55);
    padding: 1rem;
    border-radius: var(--radius-lg);
}

.hero__title {
    margin: 0;
    font-weight: 800;
    font-size: clamp(1.5rem, 5vw, 3rem);
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,1);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
}

.hero__subtitle {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    /*color: var(--color-text);*/
    color: var(--color-accent-contrast);
    /*text-shadow: 0 0px 0px rgba(0,0,0,1);*/
    /*text-shadow: 0 2px 8px var(--color-bg);*/
    opacity: .95;
}

.hero__subtitle a {
    color: var(--color-accent-contrast);
    /*text-shadow: 0 2px 8px rgba(0,0,0,1);*/
    opacity: 1;
}


/* actions (flex row; wrap on mobile) */
.hero__actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .25rem;
}

/* buttons */
.btn {
    display: inline-block;
    padding: .75rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    line-height: 1;
    transition: transform .1s ease, background-color .2s ease, color .2s ease;
    will-change: transform;
}

.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.btn--primary {
    background: var(--color-accent);   /* accessible on dark scrim */
    color: var(--color-accent-contrast);
    /*border: 5px solid rgba(255,255,255,.35);*/
}

.btn--second {
    background: var(--color-accent-complementary);
    color: var(--color-accent-contrast);
    /*border: 5px solid rgba(255,255,255,.35);*/
}

.btn--primary:hover {
    background: var(--color-accent-highlight);
}
.btn--second:hover {
    background: var(--color-accent-highlight);
}

/* reduced motion: keep first slide, no fade transitions */
@media (prefers-reduced-motion: reduce) {
    .hero .slide { transition: none; }
}
