/**
 * Nexora homepage — live Discord community strip.
 */

.nex-home-discord {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 3.25rem 0 3.5rem;
    background:
        radial-gradient(ellipse 70% 90% at 12% 20%, rgba(88, 101, 242, 0.28), transparent 55%),
        radial-gradient(ellipse 60% 70% at 90% 80%, rgba(109, 40, 217, 0.22), transparent 50%),
        linear-gradient(180deg, #0a1020 0%, #080d19 100%);
    border-block: 1px solid rgba(148, 163, 184, 0.12);
}

.nex-home-discord-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.nex-home-discord-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.15rem;
    justify-items: center;
    text-align: center;
    max-width: 720px;
    margin-inline: auto;
}

.nex-home-discord-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(88, 101, 242, 0.2);
    border: 1px solid rgba(148, 163, 245, 0.35);
    color: #C7D2FE;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nex-home-discord-pill .nex-home-discord-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: nex-d-pulse 1.8s ease-out infinite;
}

.nex-home-discord-inner h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3.4vw, 2.1rem);
    letter-spacing: -0.02em;
    color: #F8FAFC;
    line-height: 1.2;
}

.nex-home-discord-lead {
    margin: 0;
    max-width: 36rem;
    color: #94A3B8;
    font-size: 1.02rem;
    line-height: 1.6;
}

.nex-home-discord-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: min(100%, 380px);
    margin-top: 0.35rem;
}

.nex-home-discord-stat {
    padding: 0.95rem 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.nex-home-discord-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 4vw, 1.9rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.nex-home-discord-stat span {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94A3B8;
}

.nex-home-discord-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-top: 0.35rem;
}

.nex-btn-discord-live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.7rem 1.35rem;
    border-radius: 12px;
    background: #5865F2;
    border: 1px solid #4752C4;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(88, 101, 242, 0.35);
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.nex-btn-discord-live:hover {
    background: #4752C4;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(88, 101, 242, 0.42);
}

.nex-home-discord-status {
    margin: 0;
    min-height: 1.25em;
    font-size: 0.82rem;
    color: #64748B;
}

/* Floating join chips */
.nex-djoin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: min(220px, 70vw);
    padding: 0.28rem 0.55rem 0.28rem 0.28rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.45);
    color: #E2E8F0;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    transform: translate(-50%, -50%) scale(var(--dj-scale, 1));
    opacity: 0;
    animation: nex-d-float var(--dj-dur, 5s) ease-out var(--dj-delay, 0s) forwards;
    will-change: transform, opacity;
}

.nex-djoin-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    background: #5865F2;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.nex-djoin-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nex-djoin-label {
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0.2rem;
}

@keyframes nex-d-float {
    0% {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 18px)) scale(calc(var(--dj-scale, 1) * 0.7));
    }
    12% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--dj-dx, 0px)), calc(-50% + var(--dj-dy, -40px))) scale(var(--dj-scale, 1));
    }
}

@keyframes nex-d-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@media (max-width: 640px) {
    .nex-home-discord {
        padding: 2.5rem 0 2.75rem;
    }

    .nex-home-discord-stats {
        width: 100%;
    }

    .nex-djoin-label {
        max-width: 7.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nex-home-discord-pill .nex-home-discord-dot,
    .nex-djoin {
        animation: none !important;
    }

    .nex-djoin {
        display: none;
    }

    .nex-btn-discord-live:hover {
        transform: none;
    }
}
