/* ================================================================
   Velora Hero Slideshow
   ================================================================ */

/* ── Tokens ─────────────────────────────────────────────────── */
.vhero {
    --vhero-overlay:    0.55;
    --vhero-volt:       #CCFF02;
    --vhero-volt-glow:  rgba(204,255,2,0.25);
    --vhero-ink:        #0B0C0E;
    --vhero-ink-1:      #101216;
    --vhero-ink-line:   rgba(255,255,255,0.09);
    --vhero-ink-line-2: rgba(255,255,255,0.16);
    --vhero-dfg:        #F4F5F2;
    --vhero-dfg-2:      #A7ADB5;
    --vhero-dfg-3:      #6B7178;
}

/* ── Scene ──────────────────────────────────────────────────── */
.vhero {
    position: relative;
    display: flex;
    align-items: stretch;
    background: var(--vhero-ink);
    color: var(--vhero-dfg);
    min-height: 88vh;
    min-height: 88svh;
    overflow: hidden;
}

/* ── Backgrounds ────────────────────────────────────────────── */
.vhero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.vhero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        105deg,
        rgba(11,12,14, var(--vhero-overlay, 0.55)) 38%,
        rgba(11,12,14, 0.18) 100%
    );
    pointer-events: none;
}

.vhero-slide-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s;
    will-change: opacity;
}

.vhero-slide-img.is-active {
    opacity: 1;
    visibility: visible;
}

/* ── Inner layout ───────────────────────────────────────────── */
.vhero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 56px clamp(20px, 4.5vw, 72px) 120px;
    pointer-events: none;
}

/* ── Copy wrapper ───────────────────────────────────────────── */
.vhero-copy {
    max-width: 620px;
    position: relative;
    pointer-events: auto;
}

/* ── Per-slide copy: crossfade stack ────────────────────────── */
.vhero-slide-copy {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.5s ease, visibility 0.5s;
    pointer-events: none;
}

.vhero-slide-copy.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
    pointer-events: auto;
}

/* ── Badge / tag ────────────────────────────────────────────── */
.vhero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 9999px;
    color: var(--vhero-dfg);
    background: rgba(11,12,14,0.55);
    border: 1px solid var(--vhero-ink-line-2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.vhero-tag::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--vhero-volt);
    box-shadow: 0 0 0 3px var(--vhero-volt-glow);
    flex-shrink: 0;
}

/* ── Title ──────────────────────────────────────────────────── */
.vhero-title {
    font-weight: 800;
    font-stretch: 125%;
    text-transform: uppercase;
    line-height: 0.88;
    letter-spacing: -0.02em;
    font-size: clamp(48px, 7vw, 104px);
    margin: 22px 0 0;
    color: var(--vhero-dfg);
}

.vhero-title .em {
    color: var(--vhero-volt);
}

.vhero-title .outline {
    -webkit-text-stroke: 2px var(--vhero-dfg-3);
    color: transparent;
}

/* ── Subtitle ───────────────────────────────────────────────── */
.vhero-sub {
    color: var(--vhero-dfg-2);
    margin: 22px 0 0;
    font-size: 17px;
    line-height: 1.55;
    max-width: min(460px, 100%);
}

/* ── CTAs ───────────────────────────────────────────────────── */
.vhero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.vhero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 15px 26px;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s, border-color 0.18s;
    line-height: 1;
}

.vhero-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.vhero-btn--primary {
    background: var(--vhero-volt);
    color: var(--vhero-ink);
    border-color: var(--vhero-volt);
}

.vhero-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--vhero-volt-glow);
    color: var(--vhero-ink);
    text-decoration: none;
}

.vhero-btn--ghost {
    background: transparent;
    color: var(--vhero-dfg);
    border-color: var(--vhero-ink-line-2);
}

.vhero-btn--ghost:hover {
    background: var(--vhero-ink-1);
    border-color: var(--vhero-dfg-3);
    color: var(--vhero-dfg);
    text-decoration: none;
}

/* ── Specs ──────────────────────────────────────────────────── */
.vhero-specs {
    display: flex;
    gap: 36px;
    margin-top: 44px;
    padding-top: 26px;
    border-top: 1px solid var(--vhero-ink-line);
}

.vhero-spec {
    display: flex;
    flex-direction: column;
}

.vhero-spec__val {
    font-weight: 800;
    font-stretch: 110%;
    font-size: 30px;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--vhero-dfg);
}

.vhero-spec__val .u {
    color: var(--vhero-volt);
    font-size: 18px;
}

.vhero-spec__label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vhero-dfg-3);
    margin-top: 4px;
}

/* ── Bottom rail: dots + counter ────────────────────────────── */
.vhero-rail {
    position: absolute;
    z-index: 5;
    left: clamp(20px, 4.5vw, 72px);
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--vhero-dfg);
}

.vhero-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vhero-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
}

.vhero-dot.is-active {
    width: 22px;
    background: #ffffff;
}

.vhero-counter {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--vhero-dfg-2);
}

.vhero-counter b {
    color: var(--vhero-dfg);
    font-weight: 700;
}

/* ── Arrows ─────────────────────────────────────────────────── */
.vhero-arrows {
    position: absolute;
    z-index: 5;
    right: clamp(20px, 4.5vw, 72px);
    bottom: 30px;
    display: flex;
    gap: 8px;
}

.vhero-arrow {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--vhero-ink-1);
    color: var(--vhero-dfg);
    border: 1px solid var(--vhero-ink-line-2);
    cursor: pointer;
    padding: 0;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}

.vhero-arrow:hover {
    background: var(--vhero-volt);
    color: var(--vhero-ink);
    border-color: var(--vhero-volt);
    transform: translateY(-1px);
}

.vhero-arrow svg {
    width: 18px;
    height: 18px;
}

/* ── Dot tap target (min 44px for touch) ────────────────────── */
.vhero-dot {
    position: relative;
}
.vhero-dot::before {
    content: '';
    position: absolute;
    inset: -14px -8px;
}

/* ── Tablet (768px – 1039px) ────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1039px) {
    .vhero-inner {
        padding-top: 48px;
        padding-bottom: 110px;
    }
    .vhero-title   { font-size: clamp(44px, 6.5vw, 80px); }
    .vhero-sub     { font-size: 16px; }
    .vhero-specs   { gap: 24px; margin-top: 32px; }
    .vhero-spec__val { font-size: 26px; }
}

/* ── Mobile (≤ 767px) — Classic layout ──────────────────────── */
@media (max-width: 767px) {

    /* Hide prev/next arrows — swipe & drag handle navigation */
    .vhero:not(.vhero--editorial) .vhero-arrows { display: none; }

    /* Reclaim arrow space; rail sits at bottom: 30px, ~32px tall → 80px clears it */
    .vhero:not(.vhero--editorial) .vhero-inner {
        padding-top: 40px;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        align-items: flex-end;
    }

    /* Rail respects notch/home-bar */
    .vhero-rail {
        bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .vhero-title {
        font-size: clamp(36px, 11vw, 64px);
        margin-top: 14px;
    }

    .vhero-tag { font-size: 10px; padding: 5px 10px; }

    .vhero-sub {
        font-size: 14px;
        line-height: 1.6;
        margin-top: 14px;
    }

    /* CTA row: stack vertically on mobile */
    .vhero-ctas {
        flex-direction: column;
        align-items: stretch;
        margin-top: 22px;
        gap: 10px;
    }
    .vhero-btn {
        justify-content: center;
        padding: 14px 20px;
        font-size: 13px;
    }

    /* Specs: even 3-column grid so items never orphan */
    .vhero-specs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        margin-top: 26px;
        padding-top: 18px;
    }
    .vhero-spec { padding-right: 12px; }
    .vhero-spec:last-child { padding-right: 0; }
    .vhero-spec__val  { font-size: 22px; }
    .vhero-spec__val .u { font-size: 14px; }

    /* Counter: hide on very narrow screens */
    @media (max-width: 374px) {
        .vhero-counter { display: none; }
    }
}

/* ── Mobile (≤ 560px) — shared CTAs stack ───────────────────── */
@media (max-width: 560px) {
    /* specs compress further on tiny phones */
    .vhero-spec__val { font-size: 20px; }
    .vhero-spec__label { font-size: 10px; }
}

/* ── Cursor spotlight (hero-specific) ───────────────────────── */
.vhero.glow-track > .cursor-glow {
    z-index: 2;
    background: radial-gradient(
        600px circle at var(--gx, 50%) var(--gy, 50%),
        rgba(204,255,2,0.13),
        rgba(204,255,2,0.04) 45%,
        transparent 70%
    );
    mix-blend-mode: screen;
}

.vhero.glow-track .vhero-inner,
.vhero.glow-track .vhero-rail,
.vhero.glow-track .vhero-arrows {
    z-index: 3;
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .vhero-slide-img,
    .vhero-slide-copy { transition: none; }
    .vhero-dot        { transition: none; }
}

/* ================================================================
   EDITORIAL preset — filmstrip rail (hero2 design)
   ================================================================ */

/* ── Category label (above title, editorial) ─────────────────── */
.vhero-cat {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--vhero-volt);
    margin-bottom: 14px;
}

/* ── Scrim (editorial-specific two-axis gradient) ────────────── */
.vhero--editorial .vhero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(11,12,14,.55) 0%, rgba(11,12,14,.10) 32%, rgba(11,12,14,.55) 72%, rgba(11,12,14,.94) 100%),
        linear-gradient(90deg,  rgba(11,12,14,.85) 0%, rgba(11,12,14,.30) 46%, rgba(11,12,14,0)   70%);
}

/* override the default single-axis overlay in editorial */
.vhero--editorial .vhero-bg::after { display: none; }

/* ── Top bar: counter ────────────────────────────────────────── */
.vhero-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: calc(26px + env(safe-area-inset-top, 0px)) clamp(20px, 4.5vw, 72px) 26px;
    pointer-events: none;
}

/* ── Inner: copy left + filmstrip right ──────────────────────── */
.vhero--editorial .vhero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: end;
    padding-bottom: 40px;
    padding-top: 80px;
}

/* ── Filmstrip ───────────────────────────────────────────────── */
.vhero-strip {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 270px;
    pointer-events: auto;
}

.vhero-thumb {
    position: relative;
    cursor: pointer;
    text-align: left;
    background: rgba(11,12,14,.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--vhero-ink-line);
    border-radius: 12px;
    padding: 14px 16px 16px;
    color: var(--vhero-dfg-2);
    overflow: hidden;
    transition: border-color .2s, background .2s, transform .2s;
    width: 100%;
}

.vhero-thumb:hover {
    border-color: var(--vhero-ink-line-2);
    color: var(--vhero-dfg);
    transform: translateX(-4px);
}

.vhero-thumb.is-active {
    background: rgba(11,12,14,.66);
    border-color: var(--vhero-volt);
    color: var(--vhero-dfg);
}

.vhero-th-idx {
    font-size: 11px;
    letter-spacing: .14em;
    color: var(--vhero-dfg-3);
    display: block;
}

.vhero-thumb.is-active .vhero-th-idx { color: var(--vhero-volt); }

.vhero-th-name {
    display: block;
    font-weight: 800;
    font-stretch: 110%;
    text-transform: uppercase;
    font-size: 18px;
    letter-spacing: -.01em;
    margin-top: 4px;
    color: inherit;
}

.vhero-th-cat {
    display: block;
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--vhero-dfg-3);
    margin-top: 3px;
}

.vhero-th-bar {
    display: block;
    height: 3px;
    border-radius: 999px;
    background: var(--vhero-ink-line);
    margin-top: 13px;
    overflow: hidden;
}

.vhero-th-fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--vhero-volt);
    border-radius: 999px;
}

/* ── Side arrows (editorial: vertical stack, right of content) ── */
.vhero--editorial .vhero-arrows {
    position: absolute;
    right: clamp(20px, 4.5vw, 72px);
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    flex-direction: column;
    gap: 10px;
}

/* ── Editorial: tablet & below (≤ 940px) ────────────────────── */
@media (max-width: 940px) {
    .vhero--editorial .vhero-inner {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-top: calc(72px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    }

    /* filmstrip becomes a horizontal scroll rail */
    .vhero-strip {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* scroll snap for clean thumb stops */
        scroll-snap-type: x mandatory;
    }
    .vhero-strip::-webkit-scrollbar { display: none; }

    .vhero-thumb {
        flex: 1 0 160px;
        scroll-snap-align: start;
    }
    /* no translateX on touch — causes layout glitch */
    .vhero-thumb:hover { transform: none; }

    .vhero--editorial .vhero-arrows { display: none; }

    /* counter topbar reduced padding on tablet */
    .vhero-topbar { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
}

/* ── Editorial: mobile (≤ 560px) ────────────────────────────── */
@media (max-width: 560px) {
    .vhero--editorial { min-height: 100svh; }

    .vhero--editorial .vhero-inner {
        gap: 18px;
        padding-top: calc(60px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    /* CTA buttons stack full-width in editorial too */
    .vhero--editorial .vhero-ctas {
        flex-direction: column;
        align-items: stretch;
    }
    .vhero--editorial .vhero-btn { justify-content: center; }

    /* compact thumbnails */
    .vhero-thumb {
        flex: 1 0 140px;
        padding: 10px 12px 12px;
    }
    .vhero-th-name { font-size: 15px; }
    .vhero-th-cat  { font-size: 10px; }
    .vhero-th-bar  { margin-top: 10px; }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .vhero-thumb { transition: none; }
    .vhero-th-fill { transition: none !important; }
}
