/*==================================================
    BDU CUSTOMERS SHOWCASE — hero bubble network
    Business Development Unit • Palakkad Division
    Southern Railway • Indian Railways

    Extends customers.css:
    - Hero title pinned top-left
    - Physics-driven customer bubbles (logos) inside the hero
    - Canvas connection lines, drag, click-to-focus + info panel
===================================================*/

/*------------------------------
HERO — title top-left
------------------------------*/

.showcase-hero__inner {
    position: absolute;
    inset: 0;
    z-index: 3;
    max-width: none;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 140px 56px 110px;
    pointer-events: none;
}

.showcase-hero__content {
    max-width: 560px;
    text-align: left;
    pointer-events: auto;
}

/*------------------------------
HERO SCROLL PARALLAX — positioning guard
(the scroll parallax tween applies transforms, so
layout must not rely on transforms for placement)
------------------------------*/

.showcase-hero__content {
    transform: none;
}

/*------------------------------
NETWORK LAYERS (inside hero)
------------------------------*/

#networkCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.net-field {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* Focus vignette — center stays clear so the focused bubble reads */
#focusOverlay {
    position: fixed;
    inset: 0;
    z-index: 9;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#focusOverlay.active {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

/*------------------------------
CUSTOMER BUBBLES (physics nodes)
------------------------------*/

.net-node {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    background: var(--cust-white);
    border: 1px solid rgba(0, 59, 115, 0.22);
    box-shadow:
        0 10px 26px rgba(0, 59, 115, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    transform: translate3d(var(--node-x, 0px), var(--node-y, 0px), 0) translate(-50%, -50%) scale(var(--node-scale, 1));
    will-change: transform;
    padding: 10px;
    gap: 3px;
    z-index: 1;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.net-node:active {
    cursor: grabbing;
}

.net-node:focus-visible {
    outline: 3px solid var(--cust-gold);
    outline-offset: 3px;
}

.net-node:hover,
.net-node.focused {
    border-color: rgba(212, 167, 44, 0.9);
    box-shadow:
        0 18px 40px rgba(0, 59, 115, 0.22),
        0 0 0 4px rgba(212, 167, 44, 0.22),
        0 0 26px rgba(212, 167, 44, 0.4);
    background: var(--cust-white);
}

.net-node.focused {
    z-index: 100 !important;
}

.net-node.dimmed {
    opacity: 0.2;
    filter: blur(2px);
    pointer-events: none;
}

.net-node--t1 .bubble-name { font-size: 12px; }
.net-node--t2 .bubble-name { font-size: 10.5px; }
.net-node--t3 .bubble-name { font-size: 9px; }

.net-node--t3 .bubble-cat { display: none; }

/*------------------------------
INFO PANEL (focus mode)
------------------------------*/

.net-panel {
    position: fixed;
    bottom: -160px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
    background: rgba(6, 26, 47, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    padding: 20px 36px;
    min-width: 300px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.net-panel.active {
    bottom: 40px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.net-panel__close {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.net-panel__close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.net-panel__close:focus-visible {
    outline: 2px solid var(--cust-gold);
    outline-offset: 2px;
}

.net-panel__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    background: linear-gradient(90deg, #fff, rgba(212, 167, 44, 0.9));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: -0.01em;
}

.net-panel__desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.net-panel__industry {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cust-gold);
    margin: 8px 0 0 0;
}

/*------------------------------
HERO — compact text
------------------------------*/

.showcase-hero__content .cust-hero__eyebrow {
    font-size: 10px;
    padding-left: 13px;
    margin-bottom: 16px;
}

.showcase-hero__content .cust-hero__title {
    margin-bottom: 18px;
}

.showcase-hero__content .cust-hero__title-line {
    font-size: clamp(1.9rem, 4.5vw, 3.4rem);
}

.showcase-hero__content .cust-hero__desc {
    font-size: clamp(0.88rem, 1.5vw, 1.05rem);
    max-width: 440px;
    margin-bottom: 26px;
    line-height: 1.55;
}

.showcase-hero__content .cust-hero__actions {
    gap: 10px;
}

.showcase-hero__content .cust-btn {
    padding: 10px 20px;
    font-size: 13px;
}

.showcase-hero__content .cust-btn i {
    font-size: 11px;
}

/*------------------------------
RESPONSIVE
------------------------------*/

@media (max-width: 1023px) {
    .showcase-hero__inner {
        padding: 120px 32px 100px;
    }
}

@media (max-width: 768px) {
    .showcase-hero__inner {
        padding: 110px 22px 90px;
    }

    .showcase-hero__content {
        max-width: 100%;
        transform: none;
    }

    .net-panel {
        padding: 16px 24px;
        min-width: 0;
        width: 88vw;
    }

    .net-panel.active {
        bottom: 20px;
    }
}

/*------------------------------
FLOATING ORBS — ambient glow drift
(reference: Superdesign floating-hand drift,
adapted to soft gold/blue light blobs)
------------------------------*/

.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(42px);
    will-change: transform;
}

.hero-orb--gold {
    top: -12%;
    left: -14%;
    width: 46vw;
    max-width: 640px;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(212, 167, 44, 0.2), transparent 65%);
    animation: orbDriftA 13s ease-in-out infinite;
}

.hero-orb--blue {
    bottom: -16%;
    right: -12%;
    width: 42vw;
    max-width: 580px;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(0, 86, 166, 0.32), transparent 65%);
    animation: orbDriftB 17s ease-in-out infinite;
}

@keyframes orbDriftA {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(4vw, 6vh) rotate(4deg); }
}

@keyframes orbDriftB {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-4vw, -6vh) rotate(-4deg); }
}

@media (max-width: 768px) {
    .hero-orb--gold { width: 72vw; left: -26vw; }
    .hero-orb--blue { width: 66vw; right: -24vw; }
    .hero-orb { filter: blur(34px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-orb {
        animation: none;
    }

    .net-node {
        transition: none;
    }

    /* Parallax is not applied in JS when reduced motion is preferred;
       keep the guard from fighting the layout either way */
    .showcase-hero__content {
        transform: none !important;
    }
}
