/* ==========================================================================
   Alpenzaun Slider — cinematic hero
   Centered display typography, minimal controls, "next slide" peek edge.
   Brand palette
     --az-black:      #141414
     --az-terracotta: #f04e23
     --az-white:      #f6f5f2
   ========================================================================== */

.az-slider,
.az-slider * {
    box-sizing: border-box;
}

.az-slider {
    --az-black:      #141414;
    --az-terracotta: #f04e23;
    --az-dark-red:   #772008;
    --az-khaki:      #3d403a;
    --az-white:      #f6f5f2;
    --az-steel:      #9c9c95;

    --az-pad-x: clamp(20px, 3vw, 48px);
    --az-pad-y: clamp(36px, 6vh, 80px);
    --az-peek-w: clamp(84px, 8vw, 132px);
    --az-ease: cubic-bezier(.22, .61, .36, 1);

    position: relative;
    width: 100%;
    height: clamp(560px, 86vh, 920px);
    overflow: hidden;
    font-family: 'Instrument Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--az-black);
    color: var(--az-white);
    isolation: isolate;
}

/* --------------------------------------------------------------------------
   Track + slides
   -------------------------------------------------------------------------- */
.az-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.az-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1000ms var(--az-ease), visibility 0s linear 1000ms;
    pointer-events: none;
}

.az-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1000ms var(--az-ease), visibility 0s linear 0s;
    pointer-events: auto;
    z-index: 1;
}

/* Background */
.az-slide__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.az-slide__video,
.az-slide__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
}

/* Slow cinematic settle-in on the active slide's media */
.az-slide.is-active .az-slide__video,
.az-slide.is-active .az-slide__image {
    transform: scale(1);
    transition: transform 10s cubic-bezier(.16, 1, .3, 1);
}

.az-slide__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Cinematic frame: soft darkness top & bottom, like a film still */
.az-slide__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(8,8,8,0.5) 0%, rgba(8,8,8,0) 26%),
        linear-gradient(0deg, rgba(8,8,8,0.62) 0%, rgba(8,8,8,0) 38%);
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Content — centered, editorial
   -------------------------------------------------------------------------- */
.az-slide__content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--az-pad-y) calc(var(--az-pad-x) + var(--az-peek-w)) calc(var(--az-pad-y) + 64px);
}

.az-slide__inner {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    color: var(--az-white);
}

/* Stagger animation */
.az-slide.is-active .az-slide__inner > * {
    animation: az-fadeup 1100ms var(--az-ease) backwards;
}
.az-slide.is-active .az-slide__eyebrow  { animation-delay: 120ms; }
.az-slide.is-active .az-slide__title    { animation-delay: 260ms; }
.az-slide.is-active .az-slide__desc     { animation-delay: 440ms; }
.az-slide.is-active .az-slide__features { animation-delay: 560ms; }
.az-slide.is-active .az-slide__ctas     { animation-delay: 680ms; }

@keyframes az-fadeup {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Eyebrow — plain letterspaced line, no pill */
.az-slide__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-indent: 0.42em; /* optically re-center the tracked text */
    text-transform: uppercase;
    color: rgba(255,255,255,0.72);
    margin-bottom: clamp(14px, 2.4vh, 26px);
    text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}

.az-slide__eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--az-terracotta);
    box-shadow: 0 0 0 4px rgba(240, 78, 35, 0.15);
    animation: az-pulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes az-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(240, 78, 35, 0.15); }
    50%      { box-shadow: 0 0 0 7px rgba(240, 78, 35, 0.03); }
}

/* Title — huge, airy, letterspaced (film-poster style) */
.az-slide__title {
    display: block;
}

.az-slide__title-top,
.az-slide__title-bottom {
    display: block;
    margin: 0;
    text-transform: uppercase;
    color: var(--az-white);
    word-break: keep-all;
    overflow-wrap: normal;
}

.az-slide__title-top {
    font-weight: 300;
    font-size: clamp(1.1rem, 2.2vw, 1.9rem);
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    line-height: 1.3;
    color: rgba(255,255,255,0.82);
    text-shadow: 0 1px 18px rgba(0,0,0,0.45);
    margin-bottom: clamp(4px, 1vh, 12px);
}

.az-slide__title-bottom {
    font-weight: 600;
    font-size: clamp(2.8rem, 9vw, 7.5rem);
    letter-spacing: 0.08em;
    text-indent: 0.08em;
    line-height: 0.95;
    color: rgba(255,255,255,0.97);
    text-shadow: 0 4px 60px rgba(0,0,0,0.45);
}

/* Description */
.az-slide__desc {
    margin: clamp(16px, 2.6vh, 28px) auto 0;
    max-width: 54ch;
    font-size: clamp(0.95rem, 1.1vw, 1.08rem);
    line-height: 1.7;
    color: rgba(255,255,255,0.82);
    font-weight: 400;
    text-shadow: 0 1px 14px rgba(0,0,0,0.4);
}

/* Features — quiet centered row */
.az-slide__features {
    list-style: none;
    margin: clamp(14px, 2.4vh, 24px) 0 0 !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
}

.az-slide__features li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: clamp(0.85rem, 0.95vw, 0.95rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88);
    text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}

.az-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--az-terracotta);
    filter: drop-shadow(0 2px 6px rgba(240, 78, 35, 0.35));
}

/* CTAs — thin elegant outlines */
.az-slide__ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: clamp(24px, 4vh, 40px);
}

.az-slide__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 38px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    text-transform: uppercase;
    border-radius: 0;
    transition: background 260ms var(--az-ease), color 260ms var(--az-ease), border-color 260ms var(--az-ease), transform 260ms var(--az-ease), box-shadow 260ms var(--az-ease);
    cursor: pointer;
}

.az-slide__btn svg {
    width: 15px;
    height: 15px;
    margin-left: -0.22em;
    transition: transform 260ms var(--az-ease);
}

/* Primary — thin white frame, fills white on hover */
.az-slide__btn--primary {
    background: rgba(10,10,10,0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.85);
}

.az-slide__btn--primary:hover,
.az-slide__btn--primary:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--az-black) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
    outline: none;
}

.az-slide__btn--primary:hover span,
.az-slide__btn--primary:hover svg,
.az-slide__btn--primary:focus-visible span,
.az-slide__btn--primary:focus-visible svg {
    color: var(--az-black) !important;
    stroke: var(--az-black);
}

.az-slide__btn--primary:hover svg,
.az-slide__btn--primary:focus-visible svg {
    transform: translateX(4px);
}

/* Ghost — quiet underlined text button */
.az-slide__btn--ghost {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.78);
    padding: 15px 10px;
    position: relative;
}

.az-slide__btn--ghost::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 9px;
    height: 1px;
    background: rgba(255,255,255,0.4);
    transition: background 260ms var(--az-ease);
}

.az-slide__btn--ghost:hover,
.az-slide__btn--ghost:focus-visible {
    color: #fff;
    outline: none;
}

.az-slide__btn--ghost:hover::after,
.az-slide__btn--ghost:focus-visible::after {
    background: var(--az-terracotta);
}

/* --------------------------------------------------------------------------
   Next-slide peek — dark right edge with the next slide's name
   -------------------------------------------------------------------------- */
.az-slider__peek {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--az-peek-w);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: var(--az-pad-y) 0;
    border: none;
    margin: 0;
    cursor: pointer;
    color: var(--az-white);
    font-family: inherit;
    background: linear-gradient(270deg, rgba(8,8,8,0.92) 0%, rgba(8,8,8,0.55) 55%, rgba(8,8,8,0) 100%);
    transition: background 400ms var(--az-ease);
}

.az-slider__peek::before {
    content: '';
    position: absolute;
    top: var(--az-pad-y);
    bottom: var(--az-pad-y);
    right: calc(var(--az-peek-w) / 2 - 1px);
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.14), transparent);
    pointer-events: none;
}

.az-slider__peek-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    transition: color 300ms var(--az-ease);
    position: relative;
    z-index: 1;
}

.az-slider__peek-name {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: clamp(1.3rem, 1.9vw, 1.8rem);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    max-height: 55%;
    overflow: hidden;
    transition: color 300ms var(--az-ease), transform 300ms var(--az-ease);
    position: relative;
    z-index: 1;
}

.az-slider__peek-arrow {
    width: 18px;
    height: 18px;
    color: rgba(255,255,255,0.55);
    transition: color 300ms var(--az-ease), transform 300ms var(--az-ease);
    position: relative;
    z-index: 1;
}

.az-slider__peek:hover,
.az-slider__peek:focus-visible {
    background: linear-gradient(270deg, rgba(8,8,8,0.97) 0%, rgba(8,8,8,0.72) 55%, rgba(8,8,8,0) 100%);
    outline: none;
}

.az-slider__peek:hover .az-slider__peek-name,
.az-slider__peek:focus-visible .az-slider__peek-name {
    color: var(--az-terracotta);
    transform: rotate(180deg) translateY(6px);
}

.az-slider__peek:hover .az-slider__peek-label,
.az-slider__peek:focus-visible .az-slider__peek-label {
    color: rgba(255,255,255,0.7);
}

.az-slider__peek:hover .az-slider__peek-arrow,
.az-slider__peek:focus-visible .az-slider__peek-arrow {
    color: var(--az-terracotta);
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Bottom controls — flat, minimal
   -------------------------------------------------------------------------- */
.az-slider__controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 0 calc(var(--az-pad-x) + var(--az-peek-w)) clamp(22px, 3.6vh, 36px) var(--az-pad-x);
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 26px;
    pointer-events: none;
}

.az-slider__controls > * {
    pointer-events: auto;
}

/* Counter 01 / 03 */
.az-slider__counter {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--az-white);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    font-variant-numeric: tabular-nums;
}

.az-slider__counter-current {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.06em;
}

.az-slider__counter-divider {
    width: 24px;
    height: 1px;
    background: rgba(255,255,255,0.3);
    align-self: center;
}

.az-slider__counter-total {
    color: rgba(255,255,255,0.4);
}

/* Progress bar — follows the video */
.az-slider__progress {
    position: relative;
    height: 2px;
    background: rgba(255,255,255,0.14);
    overflow: hidden;
}

.az-slider__progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: var(--az-terracotta);
    transition: width 80ms linear;
}

/* Arrows — bare chevrons */
.az-slider__arrows {
    display: flex;
    gap: 6px;
}

.az-slider__nav {
    width: 42px;
    height: 42px;
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 240ms var(--az-ease), border-color 240ms var(--az-ease), color 240ms var(--az-ease);
}

.az-slider__nav:hover,
.az-slider__nav:focus-visible {
    background: var(--az-white);
    border-color: var(--az-white);
    color: var(--az-black);
    outline: none;
}

.az-slider__nav:active {
    transform: scale(0.95);
}

.az-slider__nav svg {
    width: 17px;
    height: 17px;
}

/* Dots — thin ticks */
.az-slider__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.az-slider__dot {
    width: 18px;
    height: 2px;
    border-radius: 0;
    border: none;
    background: rgba(255,255,255,0.25);
    cursor: pointer;
    padding: 0;
    transition: background 300ms var(--az-ease), width 300ms var(--az-ease);
}

.az-slider__dot:hover {
    background: rgba(255,255,255,0.55);
}

.az-slider__dot.is-active {
    background: var(--az-terracotta);
    width: 34px;
}

/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .az-slider {
        --az-peek-w: 76px;
        height: clamp(560px, 80vh, 760px);
    }

    .az-slide__inner {
        max-width: 92%;
    }
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .az-slider {
        height: 92vh;
        min-height: 600px;
        max-height: 820px;
        --az-pad-x: 22px;
        --az-pad-y: 26px;
        --az-peek-w: 56px;
    }

    .az-slide__content {
        padding: var(--az-pad-y) calc(var(--az-pad-x) + var(--az-peek-w)) 150px var(--az-pad-x);
    }

    .az-slide__inner {
        max-width: 100%;
    }

    .az-slide__eyebrow {
        font-size: 9px;
        letter-spacing: 0.32em;
        text-indent: 0.32em;
        margin-bottom: 14px;
    }

    .az-slide__title-top {
        font-size: 0.95rem;
        letter-spacing: 0.42em;
        text-indent: 0.42em;
    }

    .az-slide__title-bottom {
        font-size: clamp(2.4rem, 12.5vw, 3.6rem);
        letter-spacing: 0.05em;
        text-indent: 0.05em;
        line-height: 0.96;
    }

    .az-slide__desc {
        font-size: 0.92rem;
        line-height: 1.6;
        margin-top: 14px;
    }

    .az-slide__features {
        gap: 8px 18px;
        margin-top: 16px;
    }

    .az-slide__features li {
        font-size: 0.74rem;
        letter-spacing: 0.05em;
        gap: 7px;
    }

    .az-check {
        width: 15px;
        height: 15px;
    }

    .az-slide__ctas {
        gap: 8px;
        margin-top: 22px;
        flex-direction: column;
        width: 100%;
    }

    .az-slide__btn {
        padding: 14px 24px;
        font-size: 0.74rem;
        width: 100%;
    }

    .az-slide__btn--ghost { width: auto; }

    /* Peek — slimmer, name only */
    .az-slider__peek {
        gap: 14px;
    }

    .az-slider__peek-label {
        font-size: 8px;
        letter-spacing: 0.3em;
    }

    .az-slider__peek-name {
        font-size: 1rem;
        letter-spacing: 0.14em;
    }

    .az-slider__peek-arrow {
        width: 15px;
        height: 15px;
    }

    .az-slider__peek::before { display: none; }

    /* Stronger gradient for mobile legibility */
    .az-slide__overlay {
        background: linear-gradient(180deg, rgba(20,20,20,0.12) 0%, rgba(20,20,20,0.42) 50%, rgba(20,20,20,0.75) 100%) !important;
    }
    .az-slide__overlay--side {
        display: none;
    }

    /* Controls stack */
    .az-slider__controls {
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        gap: 14px 16px;
        padding-bottom: 20px;
        padding-right: calc(var(--az-pad-x) + var(--az-peek-w));
    }

    .az-slider__counter {
        grid-column: 1;
        grid-row: 1;
        font-size: 10px;
    }

    .az-slider__counter-current {
        font-size: 13px;
    }

    .az-slider__progress {
        grid-column: 2;
        grid-row: 1;
    }

    .az-slider__dots {
        grid-column: 3;
        grid-row: 1;
    }

    .az-slider__arrows {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        gap: 8px;
    }

    .az-slider__nav {
        width: 38px;
        height: 38px;
    }

    .az-slider__dot { width: 12px; }
    .az-slider__dot.is-active { width: 22px; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .az-slide.is-active .az-slide__inner > * {
        animation: none;
    }
    .az-slide {
        transition: opacity 200ms linear;
    }
    .az-slide__eyebrow-dot {
        animation: none;
    }
    .az-slide__video,
    .az-slide__image,
    .az-slide.is-active .az-slide__video,
    .az-slide.is-active .az-slide__image {
        transform: none;
        transition: none;
    }
}
