/**
 * Trust Vault — holographic client marquee (index.php only).
 */

.lb-clients-vault {
    position: relative;
    padding: clamp(4rem, 8vw, 6.5rem) 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 212, 255, 0.09), transparent 55%),
        linear-gradient(180deg, rgba(6, 8, 14, 0.4), rgba(4, 6, 12, 0.95));
}

.lb-clients-vault__inner {
    position: relative;
    z-index: 2;
}

/* —— Ambient FX —— */
.lb-clients-vault__fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.lb-clients-vault__aurora {
    position: absolute;
    inset: -30% -20%;
    background:
        radial-gradient(circle at 30% 40%, rgba(0, 212, 255, 0.14), transparent 42%),
        radial-gradient(circle at 70% 60%, rgba(120, 80, 255, 0.1), transparent 38%),
        radial-gradient(circle at 50% 80%, rgba(255, 107, 53, 0.06), transparent 35%);
    filter: blur(40px);
    animation: lbVaultAurora 18s ease-in-out infinite alternate;
}

.lb-clients-vault__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000 20%, transparent 75%);
    opacity: 0.55;
}

.lb-clients-vault__ring {
    position: absolute;
    left: 50%;
    top: 52%;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.12);
    transform: translate(-50%, -50%);
}

.lb-clients-vault__ring--outer {
    width: min(92vw, 920px);
    height: min(52vw, 420px);
    animation: lbVaultRingSpin 48s linear infinite;
}

.lb-clients-vault__ring--inner {
    width: min(72vw, 680px);
    height: min(40vw, 300px);
    border-color: rgba(0, 212, 255, 0.08);
    animation: lbVaultRingSpin 32s linear infinite reverse;
}

.lb-clients-vault__scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 212, 255, 0.015) 3px,
        rgba(0, 212, 255, 0.015) 4px
    );
    opacity: 0.35;
    animation: lbVaultScan 8s linear infinite;
}

@keyframes lbVaultAurora {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(2%, -3%) scale(1.06); }
}

@keyframes lbVaultRingSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes lbVaultScan {
    from { transform: translateY(0); }
    to { transform: translateY(48px); }
}

/* —— Header —— */
.lb-clients-vault__header {
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

/* —— Monolith (above stage, no overlap) —— */
.lb-clients-monolith-row {
    display: flex;
    justify-content: center;
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
    position: relative;
    z-index: 3;
}

.lb-clients-monolith {
    position: relative;
    pointer-events: none;
}

/* —— Stage —— */
.lb-clients-stage {
    position: relative;
    margin: 0 calc(-1 * clamp(0.5rem, 3vw, 2rem));
    padding: 1.25rem 0 1.75rem;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.lb-clients-stage__fade--top {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    height: 2.5rem;
    width: 100%;
    background: linear-gradient(180deg, rgba(4, 6, 12, 0.95), transparent);
    z-index: 4;
}

.lb-clients-stage__fade--bottom {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5rem;
    width: 100%;
    background: linear-gradient(0deg, rgba(4, 6, 12, 0.95), transparent);
    z-index: 4;
}

.lb-clients-stage__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(3rem, 12vw, 8rem);
    z-index: 4;
    pointer-events: none;
}

.lb-clients-stage__fade--left {
    left: 0;
    background: linear-gradient(90deg, rgba(4, 6, 12, 0.98), transparent);
}

.lb-clients-stage__fade--right {
    right: 0;
    background: linear-gradient(270deg, rgba(4, 6, 12, 0.98), transparent);
}

.lb-clients-stage__floor {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 0.5rem;
    height: 40%;
    background:
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0, 212, 255, 0.12), transparent 65%);
    transform: rotateX(72deg) scaleY(0.45);
    transform-origin: center bottom;
    filter: blur(2px);
    opacity: 0.7;
    z-index: 0;
}

/* —— Center monolith stat —— */
.lb-clients-monolith__panel {
    position: relative;
    min-width: 11rem;
    padding: 1.1rem 1.35rem;
    text-align: center;
    border-radius: 18px;
    border: 1px solid rgba(0, 212, 255, 0.35);
    background:
        linear-gradient(160deg, rgba(8, 14, 24, 0.92), rgba(4, 8, 16, 0.88));
    box-shadow:
        0 0 40px rgba(0, 212, 255, 0.15),
        0 24px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.lb-clients-monolith__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(0, 212, 255, 0.12) 50%, transparent 60%);
    animation: lbMonolithSheen 4s ease-in-out infinite;
}

.lb-clients-monolith__label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(0, 212, 255, 0.65);
    margin-bottom: 0.35rem;
}

.lb-clients-monolith__value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 24px rgba(0, 212, 255, 0.45);
}

.lb-clients-monolith__caption {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.lb-clients-monolith__pulse {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 1px solid rgba(0, 212, 255, 0.5);
    animation: lbMonolithPulse 2.8s ease-out infinite;
    opacity: 0;
}

.lb-clients-monolith__panel::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid transparent;
    border-image: linear-gradient(135deg, rgba(0, 212, 255, 0.35), transparent 40%, transparent 60%, rgba(0, 212, 255, 0.2)) 1;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes lbMonolithSheen {
    0%, 100% { transform: translateX(-120%); }
    50% { transform: translateX(120%); }
}

@keyframes lbMonolithPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 0; }
}

/* —— Marquee lanes —— */
.lb-clients-marquee {
    position: relative;
    z-index: 1;
    margin: 0.5rem 0;
    overflow: hidden;
    transform: rotateX(4deg);
    transform-origin: center center;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.lb-clients-marquee--rev .lb-clients-marquee__track {
    animation-direction: reverse;
}

.lb-clients-marquee--slow .lb-clients-marquee__track {
    animation-duration: calc(var(--lb-marquee-duration, 72s) * 1.15);
}

.lb-clients-marquee__track {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: max-content;
    padding: 0.35rem 0;
    animation: lbClientsMarquee var(--lb-marquee-duration, 50s) linear infinite;
    will-change: transform;
}

.lb-clients-stage:hover .lb-clients-marquee__track,
.lb-clients-stage:focus-within .lb-clients-marquee__track {
    animation-play-state: paused;
}

@keyframes lbClientsMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* —— Holographic logo cell —— */
.lb-client-holo {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

.lb-client-holo__cell {
    position: relative;
    width: clamp(7rem, 10vw, 8.75rem);
    height: clamp(3.25rem, 5vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.35s ease;
}

.lb-client-holo__cell::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(0, 212, 255, 0.5) 60deg,
        transparent 120deg,
        rgba(120, 200, 255, 0.35) 200deg,
        transparent 280deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    animation: lbHoloBorderSpin 6s linear infinite paused;
}

.lb-client-holo:hover .lb-client-holo__cell::before,
.lb-client-holo:focus-within .lb-client-holo__cell::before {
    opacity: 1;
    animation-play-state: running;
}

.lb-client-holo:hover .lb-client-holo__cell {
    transform: translateY(-6px) scale(1.04);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow:
        0 16px 40px rgba(0, 212, 255, 0.18),
        0 0 32px rgba(0, 212, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@keyframes lbHoloBorderSpin {
    to { transform: rotate(360deg); }
}

.lb-client-holo__edge {
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: rgba(0, 212, 255, 0.55);
    border-style: solid;
    opacity: 0.8;
}

.lb-client-holo__edge--tl {
    top: 5px;
    left: 5px;
    border-width: 1px 0 0 1px;
}

.lb-client-holo__edge--br {
    right: 5px;
    bottom: 5px;
    border-width: 0 1px 1px 0;
}

.lb-client-holo__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 120%, rgba(0, 212, 255, 0.2), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lb-client-holo:hover .lb-client-holo__glow {
    opacity: 1;
}

.lb-client-holo__cell img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0.7) brightness(1.2) contrast(0.95);
    opacity: 0.85;
    transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}

.lb-client-holo:hover img {
    filter: none;
    opacity: 1;
    transform: scale(1.06);
}

.lb-client-holo__cell--text,
.lb-client-holo__fallback {
    position: relative;
    z-index: 1;
    font-size: 0.62rem;
    line-height: 1.25;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

.lb-clients-empty {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    border: 1px dashed rgba(0, 212, 255, 0.2);
    color: rgba(255, 255, 255, 0.55);
}

/* Hide legacy slider chrome if any leaks in */
.lb-clients-vault .clients-slider-wrapper,
.lb-clients-vault .clients-nav-btn {
    display: none !important;
}

/* —— Responsive —— */
@media (max-width: 992px) {
    .lb-clients-monolith__panel {
        min-width: 9rem;
        padding: 0.85rem 1rem;
    }

    .lb-clients-monolith__value {
        font-size: 2rem;
    }

    .lb-clients-marquee {
        transform: rotateX(3deg);
    }
}

@media (max-width: 640px) {
    .lb-clients-vault {
        padding: 3.5rem 0;
    }

    .lb-clients-monolith-row {
        margin-bottom: 1rem;
    }

    .lb-clients-stage {
        margin: 0 -0.5rem;
        padding: 1rem 0 0.75rem;
    }

    .lb-clients-marquee {
        transform: none;
        margin: 0.4rem 0;
    }

    .lb-client-holo__cell {
        width: 6.75rem;
        height: 3rem;
    }

    .lb-clients-vault__ring {
        display: none;
    }

    .lb-clients-monolith__panel {
        min-width: 8.5rem;
        padding: 0.75rem 1rem;
    }

    .lb-clients-monolith__value {
        font-size: 1.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lb-clients-vault__aurora,
    .lb-clients-vault__ring,
    .lb-clients-vault__scanline,
    .lb-clients-monolith__panel::before,
    .lb-clients-monolith__pulse {
        animation: none;
    }

    .lb-clients-marquee__track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 0.65rem;
    }

    .lb-clients-marquee {
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .lb-client-holo__cell::before {
        animation: none;
        opacity: 0.35;
    }
}
