/* ==========================================================================
   Home hero slider (split layout): slide text on the left, the banner image
   shown in full on the right, controls + thumbnails underneath.
   ========================================================================== */
.hx {
    position: relative;
    overflow: hidden;
    padding: 56px 0 40px;
    background:
        radial-gradient(900px 520px at 85% 0%, rgba(132, 203, 51, 0.16), transparent 65%),
        radial-gradient(700px 480px at 0% 100%, rgba(255, 204, 41, 0.1), transparent 60%),
        linear-gradient(135deg, #1f3a0c 0%, #2c4f12 100%);
    color: var(--ui-cream);
    isolation: isolate;
}

/* faint dot grid */
.hx::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(rgba(255, 250, 234, 0.08) 1px, transparent 1.4px) 0 0 / 26px 26px;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
    mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
    pointer-events: none;
}

.hx__glow {
    position: absolute;
    top: -180px;
    left: 30%;
    z-index: -1;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: rgba(255, 204, 41, 0.07);
    filter: blur(40px);
    animation: hxFloat 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hxFloat {
    50% { transform: translate3d(60px, 40px, 0) scale(1.1); }
}

.hx__swiper {
    overflow: visible;
}

.hx-slide {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 56px;
    align-items: center;
    height: auto;
}

.hx .swiper-wrapper {
    align-items: stretch;
}

/* fade effect: hide inactive slides fully so their text never overlaps */
.hx .swiper-slide:not(.swiper-slide-active) {
    pointer-events: none;
}

/* ---------- text column ---------- */
.hx-slide__text {
    position: relative;
    padding: 28px 0 28px;
}

.hx-slide__num {
    position: absolute;
    top: -40px;
    left: -8px;
    z-index: -1;
    color: transparent;
    font-family: var(--ui-font);
    font-size: clamp(110px, 12vw, 190px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    -webkit-text-stroke: 1.5px rgba(255, 250, 234, 0.16);
    user-select: none;
}

.hx-slide__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* first line is the headline */
.hx-slide__list li:first-child {
    position: relative;
    margin-bottom: 22px;
    padding-top: 22px;
    color: var(--ui-cream);
    font-family: var(--ui-font);
    font-size: clamp(30px, 1.1rem + 2.2vw, 46px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.hx-slide__list li:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--ui-gold), var(--ui-green));
}

/* further lines read as feature chips */
.hx-slide__list li + li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 12px 18px 12px 14px;
    border: 1px solid rgba(255, 250, 234, 0.14);
    border-radius: 16px;
    background: rgba(255, 250, 234, 0.06);
    color: rgba(255, 250, 234, 0.92);
    font-size: clamp(15px, 0.85rem + 0.35vw, 18px);
    font-weight: 600;
    line-height: 1.4;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.hx-slide__list li + li::before {
    content: "";
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ui-gold);
    box-shadow: 0 0 0 5px rgba(255, 204, 41, 0.18);
}

.hx-slide__note {
    display: inline-block;
    margin-top: 16px;
    color: var(--ui-gold);
    font-size: 14px;
    letter-spacing: 0.02em;
}

/* ---------- image column: the banner is always shown in full ---------- */
.hx-slide__media {
    position: relative;
    margin: 0;
}

.hx-slide__media::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    z-index: -1;
    border: 1.5px solid rgba(255, 204, 41, 0.45);
    border-radius: 30px;
}

.hx-slide__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1170 / 574;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.75);
}

/* ---------- controls bar ---------- */
.hx__bar {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top:6px;
}

.hx__count {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: rgba(255, 250, 234, 0.6);
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.hx__count strong {
    color: var(--ui-gold);
    font-size: 26px;
    line-height: 1;
}

.hx__progress {
    position: relative;
    overflow: hidden;
    flex: 0 0 120px;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 250, 234, 0.18);
}

.hx__progress i,
.hx__thumb-bar i {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--ui-gold), var(--ui-green));
    transform: scaleX(0);
    transform-origin: left center;
}

.hx__thumbs {
    display: flex;
    flex: 1;
    gap: 12px;
    justify-content: center;
    min-width: 0;
    scrollbar-width: none;
}

.hx__thumbs::-webkit-scrollbar {
    display: none;
}

.hx__thumb {
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    width: 104px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 14px;
    background: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.35s, border-color 0.35s, transform 0.35s var(--ui-ease);
}

.hx__thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1170 / 574;
    object-fit: cover;
}

.hx__thumb:hover,
.hx__thumb:focus-visible {
    opacity: 0.85;
    transform: translateY(-2px);
}

.hx__thumb.is-active {
    border-color: var(--ui-gold);
    opacity: 1;
}

.hx__thumb-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(23, 40, 10, 0.55);
}

.hx__arrows {
    display: flex;
    gap: 10px;
}

.hx__nav {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 250, 234, 0.28);
    border-radius: 50%;
    background: transparent;
    color: var(--ui-cream);
    cursor: pointer;
    transition: background-color 0.3s var(--ui-ease), color 0.3s, border-color 0.3s, transform 0.3s var(--ui-ease);
}

.hx__nav:hover,
.hx__nav:focus-visible {
    border-color: var(--ui-gold);
    background: var(--ui-gold);
    color: var(--ui-ink);
    transform: scale(1.06);
}

.hx__nav i {
    transition: transform 0.3s var(--ui-ease);
}

.hx__nav[data-hero-prev]:hover i {
    transform: translateX(-3px);
}

.hx__nav[data-hero-next]:hover i {
    transform: translateX(3px);
}

/* ---------- entrance animation (replayed on every slide) ---------- */
@keyframes hxReveal {
    from { clip-path: inset(0 0 0 100% round 28px); transform: scale(1.06); }
    to { clip-path: inset(0 0 0 0 round 28px); transform: scale(1); }
}

@keyframes hxFrame {
    from { opacity: 0; transform: translate(-14px, -14px); }
    to { opacity: 1; transform: none; }
}

@keyframes hxRise {
    from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes hxNum {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: none; }
}

.hx-slide.is-entered .hx-slide__media img {
    animation: hxReveal 1.25s cubic-bezier(0.7, 0, 0.2, 1) both;
}

.hx-slide.is-entered .hx-slide__media::before {
    animation: hxFrame 1s 0.55s var(--ui-ease) both;
}

.hx-slide.is-entered .hx-slide__num {
    animation: hxNum 1s 0.1s var(--ui-ease) both;
}

.hx-slide.is-entered .hx-slide__list li,
.hx-slide.is-entered .hx-slide__note {
    animation: hxRise 0.8s var(--ui-ease) both;
}

.hx-slide.is-entered .hx-slide__list li:nth-child(1) { animation-delay: 0.25s; }
.hx-slide.is-entered .hx-slide__list li:nth-child(2) { animation-delay: 0.42s; }
.hx-slide.is-entered .hx-slide__list li:nth-child(3) { animation-delay: 0.56s; }
.hx-slide.is-entered .hx-slide__list li:nth-child(4) { animation-delay: 0.7s; }
.hx-slide.is-entered .hx-slide__note { animation-delay: 0.85s; }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
    .hx-slide {
        gap: 40px;
    }

    .hx__thumb {
        width: 86px;
    }
}

@media (max-width: 991.98px) {
    .hx {
        padding: 32px 0 28px;
    }

    .hx-slide {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    /* picture first, text below */
    .hx-slide__media {
        order: -1;
    }

    .hx-slide__media::before {
        inset: 12px -10px -10px 12px;
    }

    .hx-slide__text {
        padding: 0;
    }

    .hx-slide__num {
        top: -18px;
        right: 0;
        left: auto;
        font-size: 96px;
    }

    .hx__bar {
        flex-wrap: wrap;
        gap: 16px;
        margin-top:6px;
    }

    .hx__thumbs {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .hx__arrows {
        margin-left: auto;
    }
}

@media (max-width: 575.98px) {
    .hx-slide__media img,
    .hx-slide.is-entered .hx-slide__media img {
        border-radius: 18px;
    }

    .hx-slide__media::before {
        border-radius: 20px;
    }

    .hx-slide__list li:first-child {
        margin-bottom: 16px;
        padding-top: 18px;
    }

    .hx-slide__list li + li {
        margin-top: 8px;
        padding: 10px 14px 10px 12px;
    }

    .hx__progress {
        flex-basis: 72px;
    }

    .hx__nav {
        width: 44px;
        height: 44px;
    }

    .hx__thumb {
        width: 78px;
        border-radius: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hx__glow,
    .hx-slide.is-entered .hx-slide__media img,
    .hx-slide.is-entered .hx-slide__media::before,
    .hx-slide.is-entered .hx-slide__num,
    .hx-slide.is-entered .hx-slide__list li,
    .hx-slide.is-entered .hx-slide__note {
        animation: none;
    }
}
