/**
 * Signal Orbit — 3D testimonial carousel (homepage).
 */

.lb-testimonials-orbit {
    position: relative;
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 65% 42% at 50% 0%, rgba(0, 212, 255, 0.08), transparent 58%),
        linear-gradient(180deg, rgba(5, 8, 14, 0.55), rgba(3, 5, 10, 0.98));
}

.lb-testimonials-orbit__inner {
    position: relative;
    z-index: 2;
}

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

.lb-testimonials-orbit__aurora {
    position: absolute;
    inset: -25% -15%;
    background:
        radial-gradient(circle at 20% 35%, rgba(0, 212, 255, 0.1), transparent 42%),
        radial-gradient(circle at 80% 65%, rgba(90, 60, 255, 0.07), transparent 40%);
    filter: blur(32px);
    animation: lbTestimonialAurora 14s ease-in-out infinite alternate;
}

.lb-testimonials-orbit__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 18%, transparent 72%);
    opacity: 0.45;
}

.lb-testimonials-orbit__prism {
    position: absolute;
    left: 50%;
    top: 58%;
    width: min(88vw, 680px);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.35), transparent);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.15);
}

@keyframes lbTestimonialAurora {
    from { transform: translate(0, 0); }
    to { transform: translate(2%, -2%); }
}

/* —— Header —— */
.lb-testimonials-orbit__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto clamp(1.25rem, 3vw, 2rem);
}

.lb-testimonials-orbit__metrics {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.75rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 255, 0.18);
    background: rgba(0, 212, 255, 0.05);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    color: rgba(0, 212, 255, 0.72);
    text-transform: lowercase;
}

.lb-testimonials-orbit__metrics span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lb-testimonials-orbit__metrics-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.45);
}

/* —— Stage wrapper —— */
.lb-testimonials-orbit__stage-wrap {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 clamp(0.25rem, 1.5vw, 0.75rem);
    overflow-x: clip;
}

.lb-testimonials-orbit__orbit-ring {
    position: absolute;
    left: 50%;
    top: 54%;
    width: min(92%, 820px);
    height: clamp(7rem, 14vw, 9rem);
    border: 1px solid rgba(0, 212, 255, 0.14);
    border-radius: 50%;
    transform: translate(-50%, -50%) perspective(900px) rotateX(72deg);
    box-shadow:
        0 0 30px rgba(0, 212, 255, 0.08),
        inset 0 0 24px rgba(0, 212, 255, 0.04);
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

.lb-testimonials-orbit__deck-floor {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 0.35rem;
    height: 38%;
    background: radial-gradient(ellipse 75% 55% at 50% 100%, rgba(0, 212, 255, 0.14), transparent 68%);
    transform: perspective(800px) rotateX(68deg);
    transform-origin: center bottom;
    filter: blur(1px);
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

.lb-testimonials-orbit__stage-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(1.25rem, 4vw, 2.5rem);
    z-index: 6;
    pointer-events: none;
    opacity: 0.65;
}

.lb-testimonials-orbit__stage-wrap:has(.is-coverflow) .lb-testimonials-orbit__stage-fade {
    opacity: 0.35;
    width: clamp(0.75rem, 2.5vw, 1.5rem);
}

.lb-testimonials-orbit__stage-fade--left {
    left: 0;
    background: linear-gradient(90deg, rgba(3, 5, 10, 0.95), transparent);
}

.lb-testimonials-orbit__stage-fade--right {
    right: 0;
    background: linear-gradient(270deg, rgba(3, 5, 10, 0.95), transparent);
}

/* —— 3D stage —— */
.lb-testimonials-orbit__stage {
    position: relative;
    z-index: 2;
    height: clamp(16.5rem, 36vw, 20rem);
    overflow: hidden;
    perspective: 1500px;
    perspective-origin: 50% 40%;
    touch-action: pan-y pinch-zoom;
}

.lb-testimonials-orbit__stage.is-coverflow {
    overflow: visible;
}

.lb-testimonials-orbit__ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

.lb-testimonials-orbit__ring.is-coverflow {
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
}

/* —— Chip card —— */
.lb-testimonial-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(78vw, 480px);
    margin-left: calc(min(78vw, 480px) / -2);
    margin-top: -6.25rem;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    opacity: 0;
    visibility: hidden;
    filter: blur(0.8px) brightness(0.6);
    transition:
        transform 0.78s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.5s ease,
        filter 0.5s ease,
        visibility 0.5s ease;
    pointer-events: none;
    cursor: default;
}

.lb-testimonial-chip.is-adjacent {
    opacity: 0.72;
    visibility: visible;
    filter: blur(0.25px) brightness(0.82);
    pointer-events: auto;
    cursor: pointer;
}

.lb-testimonial-chip.is-far {
    opacity: 0.32;
    visibility: visible;
    filter: blur(0.6px) brightness(0.68);
}

.lb-testimonial-chip.is-active {
    opacity: 1;
    visibility: visible;
    filter: none;
    pointer-events: auto;
    z-index: 6;
    cursor: default;
}

.lb-testimonial-chip.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.lb-testimonial-chip__panel {
    position: relative;
    padding: 1rem 1.15rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    background: linear-gradient(155deg, rgba(12, 18, 30, 0.96), rgba(6, 9, 16, 0.92));
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: visible;
}

.lb-testimonial-chip.is-active .lb-testimonial-chip__panel {
    border-color: rgba(0, 212, 255, 0.48);
    box-shadow:
        0 28px 72px rgba(0, 0, 0, 0.48),
        0 0 56px rgba(0, 212, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: lbChipPulse 3s ease-in-out infinite;
}

.lb-testimonial-chip.is-adjacent .lb-testimonial-chip__panel {
    border-color: rgba(0, 212, 255, 0.22);
}

.lb-testimonial-chip.is-adjacent:hover .lb-testimonial-chip__panel {
    border-color: rgba(0, 212, 255, 0.38);
    box-shadow: 0 12px 36px rgba(0, 212, 255, 0.1);
}

.lb-testimonial-chip.is-active .lb-testimonial-chip__panel::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -1.2rem;
    height: 2.5rem;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.12), transparent);
    filter: blur(8px);
    transform: scaleY(0.5);
    pointer-events: none;
    opacity: 0.7;
}

@keyframes lbChipPulse {
    0%, 100% { box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 36px rgba(0, 212, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
    50% { box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 52px rgba(0, 212, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
}

.lb-testimonial-chip__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 42%, rgba(0, 212, 255, 0.08) 50%, transparent 58%);
    pointer-events: none;
    animation: lbChipSheen 5s ease-in-out infinite;
}

.lb-testimonial-chip.is-active .lb-testimonial-chip__panel::before {
    animation: lbChipSheen 3.5s ease-in-out infinite;
}

@keyframes lbChipSheen {
    0%, 100% { opacity: 0.4; transform: translateX(-30%); }
    50% { opacity: 1; transform: translateX(30%); }
}

.lb-testimonial-chip__edge {
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: rgba(0, 212, 255, 0.55);
    border-style: solid;
    z-index: 2;
    pointer-events: none;
}

.lb-testimonial-chip__edge--tl {
    top: 7px;
    left: 7px;
    border-width: 1px 0 0 1px;
}

.lb-testimonial-chip__edge--br {
    right: 7px;
    bottom: 7px;
    border-width: 0 1px 1px 0;
}

.lb-testimonial-chip__glyph {
    position: absolute;
    top: 0.5rem;
    left: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.75rem;
    line-height: 1;
    color: rgba(0, 212, 255, 0.18);
    pointer-events: none;
}

.lb-testimonial-chip__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: center;
    margin-bottom: 0.65rem;
    padding-left: 1.25rem;
}

.lb-testimonial-chip__avatar {
    position: relative;
    width: 46px;
    height: 52px;
    flex-shrink: 0;
}

.lb-testimonial-chip__avatar-hex {
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(160deg, rgba(0, 212, 255, 0.4), rgba(0, 120, 180, 0.22));
}

.lb-testimonial-chip__avatar-hex::before {
    content: "";
    position: absolute;
    inset: 2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(4, 8, 14, 0.95);
}

.lb-testimonial-chip__avatar img,
.lb-testimonial-chip__avatar-initials {
    position: absolute;
    inset: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    object-fit: cover;
    z-index: 1;
}

.lb-testimonial-chip__avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(0, 212, 255, 0.85);
    background: rgba(0, 212, 255, 0.1);
}

.lb-testimonial-chip__meta {
    min-width: 0;
}

.lb-testimonial-chip__meta h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-testimonial-chip__role {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-testimonial-chip__signal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}

.lb-testimonial-chip__signal-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    color: rgba(0, 212, 255, 0.55);
    text-transform: uppercase;
}

.lb-testimonial-chip__bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 14px;
}

.lb-testimonial-chip__bars span {
    width: 4px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.lb-testimonial-chip__bars span:nth-child(1) { height: 35%; }
.lb-testimonial-chip__bars span:nth-child(2) { height: 55%; }
.lb-testimonial-chip__bars span:nth-child(3) { height: 75%; }
.lb-testimonial-chip__bars span:nth-child(4) { height: 90%; }
.lb-testimonial-chip__bars span:nth-child(5) { height: 100%; }

.lb-testimonial-chip__bars span.is-lit {
    background: rgba(0, 212, 255, 0.85);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.45);
}

.lb-testimonial-chip__quote {
    margin: 0;
    padding: 0 0.15rem;
    font-size: 0.86rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lb-testimonial-chip__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    flex-wrap: nowrap;
}

.lb-testimonial-chip__verified {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    color: rgba(0, 255, 136, 0.8);
    text-transform: lowercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.lb-testimonial-chip__verified i {
    margin-right: 0.25rem;
    font-size: 0.55rem;
}

.lb-testimonial-chip__index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    color: rgba(0, 212, 255, 0.45);
    white-space: nowrap;
    flex-shrink: 0;
}

/* —— Flat mode (mobile) —— */
.lb-testimonials-orbit__stage.is-flat {
    perspective: none;
    height: auto;
    min-height: 15.5rem;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-testimonials-orbit__stage.is-flat .lb-testimonials-orbit__ring {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    transform: none !important;
}

.lb-testimonials-orbit__stage.is-flat .lb-testimonial-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(100% - 0.5rem);
    max-width: 100%;
    margin: 0;
    transform: translate(-50%, -50%) !important;
    opacity: 0;
    visibility: hidden;
    filter: none;
    pointer-events: none;
    transition: opacity 0.38s ease, transform 0.38s ease, visibility 0.38s ease;
}

.lb-testimonials-orbit__stage.is-flat .lb-testimonial-chip.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    position: relative;
    left: auto;
    top: auto;
    transform: none !important;
}

.lb-testimonials-orbit__stage.is-flat .lb-testimonial-chip.is-adjacent,
.lb-testimonials-orbit__stage.is-flat .lb-testimonial-chip.is-far,
.lb-testimonials-orbit__stage.is-flat .lb-testimonial-chip.is-hidden {
    display: none;
}

.lb-testimonials-orbit__stage.is-flat .lb-testimonial-chip.is-entering {
    animation: lbChipEnter 0.4s ease forwards;
}

.lb-testimonials-orbit__stage.is-flat .lb-testimonial-chip.is-exiting {
    animation: lbChipExit 0.35s ease forwards;
}

@keyframes lbChipEnter {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes lbChipExit {
    from { opacity: 1; }
    to { opacity: 0; transform: translate(-50%, -54%) scale(0.96); }
}

.lb-testimonials-orbit__stage-wrap:has(.is-flat) .lb-testimonials-orbit__stage-fade,
.lb-testimonials-orbit__stage-wrap:has(.is-flat) .lb-testimonials-orbit__deck-floor,
.lb-testimonials-orbit__stage-wrap:has(.is-flat) .lb-testimonials-orbit__orbit-ring {
    display: none;
}

/* —— Overlay nav —— */
.lb-testimonials-orbit__nav--overlay {
    display: none;
    position: absolute;
    top: 50%;
    z-index: 8;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    backdrop-filter: blur(8px);
}

.lb-testimonials-orbit__nav--prev.lb-testimonials-orbit__nav--overlay {
    left: 0.15rem;
}

.lb-testimonials-orbit__nav--next.lb-testimonials-orbit__nav--overlay {
    right: 0.15rem;
}

.lb-testimonials-orbit__stage-wrap:has(.is-coverflow) .lb-testimonials-orbit__nav--overlay {
    display: inline-flex;
}

.lb-testimonials-orbit__nav--mobile {
    display: none;
}

/* —— Controls —— */
.lb-testimonials-orbit__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-top: clamp(0.85rem, 2vw, 1.35rem);
}

.lb-testimonials-orbit__controls--compact {
    gap: 0.65rem;
    margin-top: 0.65rem;
}

.lb-testimonials-orbit__nav {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid rgba(0, 212, 255, 0.28);
    background: rgba(0, 212, 255, 0.08);
    color: var(--lb-primary, #00d4ff);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.lb-testimonials-orbit__nav:hover {
    background: rgba(0, 212, 255, 0.18);
    transform: scale(1.06);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.2);
}

.lb-testimonials-orbit__nav:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
}

.lb-testimonials-orbit__rail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: min(50vw, 220px);
    justify-content: center;
}

.lb-testimonials-orbit__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.lb-testimonials-orbit__dot.is-active {
    background: rgba(0, 212, 255, 0.9);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.55);
    transform: scale(1.4);
}

.lb-testimonials-orbit__beam-node {
    position: absolute;
    left: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    background: #00d4ff;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
    transform: translateX(var(--beam-x, 0));
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.lb-testimonials-orbit__track {
    position: relative;
    max-width: 200px;
    height: 2px;
    margin: 0.5rem auto 0;
    background: rgba(0, 212, 255, 0.15);
    border-radius: 2px;
    overflow: visible;
}

/* —— Responsive —— */
@media (max-width: 992px) {
    .lb-testimonials-orbit__stage-fade {
        width: clamp(1.5rem, 5vw, 3rem);
    }
}

@media (max-width: 767px) {
    .lb-testimonials-orbit__nav--overlay {
        display: none !important;
    }

    .lb-testimonials-orbit__nav--mobile {
        display: inline-flex;
        width: 36px;
        height: 36px;
    }

    .lb-testimonials-orbit__controls--compact {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .lb-testimonials-orbit {
        padding: 3rem 0 3.5rem;
    }

    .lb-testimonials-orbit__stage-wrap {
        padding: 0 0.65rem;
    }

    .lb-testimonial-chip__panel {
        padding: 0.9rem 0.95rem 0.85rem;
    }

    .lb-testimonial-chip__head {
        padding-left: 1rem;
        gap: 0.55rem;
    }

    .lb-testimonial-chip__quote {
        font-size: 0.84rem;
        -webkit-line-clamp: 4;
    }

    .lb-testimonial-chip__glyph {
        font-size: 1.45rem;
    }

    .lb-testimonial-chip__meta h3 {
        font-size: 0.88rem;
        white-space: normal;
    }

    .lb-testimonial-chip__role {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .lb-testimonials-orbit__metrics {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 0.75rem;
    }

    .lb-testimonials-orbit__nav {
        width: 36px;
        height: 36px;
    }

    .lb-testimonials-orbit__stage.is-flat {
        min-height: 17rem;
    }
}

@media (min-width: 768px) {
    .lb-testimonial-chip.is-adjacent .lb-testimonial-chip__quote {
        -webkit-line-clamp: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lb-testimonials-orbit__aurora,
    .lb-testimonial-chip.is-active .lb-testimonial-chip__panel,
    .lb-testimonial-chip__panel::before {
        animation: none;
    }

    .lb-testimonials-orbit__ring {
        transition: none;
    }

    .lb-testimonials-orbit__stage {
        height: auto;
        min-height: 14rem;
        perspective: none;
        overflow: visible;
    }

    .lb-testimonials-orbit__ring {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: auto;
        transform: none !important;
    }

    .lb-testimonial-chip {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
        transform: none !important;
        display: none;
        opacity: 1;
        visibility: visible;
        filter: none;
        pointer-events: auto;
    }

    .lb-testimonial-chip.is-active {
        display: block;
    }

    .lb-testimonials-orbit__stage-fade,
    .lb-testimonials-orbit__deck-floor {
        display: none;
    }

    .lb-testimonials-orbit__controls .lb-testimonials-orbit__nav {
        display: inline-flex;
    }
}
