/* CSS for Premium Product Ecosystem Scroll Experience */

.ecosystem-scroll-container {
    position: relative;
    height: 700vh; /* expanded scrollable height for 7 products */
    background-color: #ffffff;
    color: var(--color-primary);
    overflow: visible;
    border-top: 1px solid var(--color-border);
}

.ecosystem-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Premium ambient backdrop glow */
.ecosystem-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 600px;
    border-radius: 50%;
    background-color: var(--active-color, var(--color-primary-light));
    filter: blur(160px);
    opacity: 0.22;
    pointer-events: none;
    transition: background-color 0.8s ease;
    z-index: 1;
}

.ecosystem-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Left Column: Storytelling Panels */
.ecosystem-stories {
    width: 45%;
    height: 480px; /* stable fixed layout height */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.story-panel {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateY(30px);
    opacity: 0;
    visibility: hidden;
    max-width: 500px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.story-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateY(0);
    pointer-events: auto;
}

.story-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--active-color, var(--color-accent));
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
    border: 1px solid var(--active-color, var(--color-accent));
    padding: 6px 12px;
    border-radius: var(--radius-full);
    transition: color 0.4s ease, border-color 0.4s ease;
}

.story-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.story-icon-container {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--active-color, #ffffff);
    transition: color 0.4s ease;
}

.story-icon-container svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.story-product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.story-headline {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.story-desc {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.story-flow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--color-accent) !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.story-flow span {
    color: var(--color-accent) !important;
    transition: color 0.4s ease;
}

.flow-arrow {
    width: 14px;
    height: 14px;
    stroke: var(--color-accent) !important;
    stroke-width: 2.5;
    fill: none;
}

.story-cta {
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background-color: var(--active-color, var(--color-accent));
    border: 2px solid transparent;
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 14px rgba(var(--active-color-rgb, 255, 92, 53), 0.2);
}

.story-cta:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent) !important;
    box-shadow: 0 6px 20px rgba(var(--active-color-rgb, 255, 92, 53), 0.4);
}

/* Right Column: Visual Container (Progress Rail + 3D spine) */
.ecosystem-visual-container {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}



/* Product Stage Viewport */
.ecosystem-stage {
    width: 400px;
    height: 480px;
    position: relative;
    perspective: 1200px;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Central horizontal orbit ring base line */
.central-spine {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 480px; /* 2 * radius (240) */
    height: 480px;
    border: 1.5px dashed rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .central-spine {
        width: 360px;
        height: 360px;
    }
}

/* Nodes along spine */
.spine-node {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 480px; /* expanded widescreen width */
    height: 270px; /* expanded 16:9 ratio height */
    margin-left: -240px;
    margin-top: -135px; /* offset vertically to center */
    transform-style: preserve-3d;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: transform, opacity;
}

.node-card {
    width: 320px; /* static width for left side storytelling panel on desktop */
    height: 96px; /* expanded card height for prominent logo branding */
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}

.node-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.node-icon-wrapper {
    width: 50px; /* enlarged wrapper */
    height: 50px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--node-color);
}

.node-icon-wrapper svg {
    width: 26px; /* enlarged vector graphic */
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.node-name-brand {
    font-size: 1.3rem; /* highly prominent typography */
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
    flex-grow: 1;
}

.node-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    flex-grow: 1;
}

.node-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--node-color);
    box-shadow: 0 0 10px var(--node-color);
}

/* Responsive Overrides (Tablet & Mobile) */
@media (max-width: 1024px) {
    .ecosystem-stories {
        width: 48%;
    }
    
    .ecosystem-visual-container {
        width: 48%;
    }
    
    .ecosystem-stage {
        width: 320px;
        height: 300px;
    }
    
    .spine-node {
        width: 260px;
        height: 72px;
        margin-left: -130px;
        margin-top: -36px;
    }
}

@media (max-width: 768px) {
    .ecosystem-scroll-container {
        height: auto; /* Natural layout */
    }
    
    .ecosystem-sticky-wrapper {
        position: relative;
        height: auto;
        padding: 60px 0;
        overflow: visible;
    }
    
    .ecosystem-layout {
        flex-direction: column;
        justify-content: center;
        gap: 40px;
    }
    
    .ecosystem-stories {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 250px;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .story-panel {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) translateY(20px);
        opacity: 0;
        visibility: hidden;
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 480px;
        transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
    }
    
    .story-panel.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translate(-50%, -50%) translateY(0) !important;
        pointer-events: auto !important;
    }
    
    .story-flow {
        justify-content: center;
    }
    
    .ecosystem-visual-container {
        width: 100%;
        height: 220px;
        justify-content: center;
        margin-top: 20px;
    }
    
    .ecosystem-stage {
        width: 100%;
        max-width: 320px;
        height: 120px;
    }
    

    .spine-node {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        width: 100%;
        max-width: 280px;
    }
    
    .spine-node.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .node-card {
        width: 100% !important;
        transform: none !important;
        background: var(--node-color) !important;
        border-color: var(--node-color) !important;
        box-shadow: 0 6px 20px rgba(var(--node-rgb), 0.25) !important;
    }
    
    .node-dot {
        background-color: #ffffff !important;
        box-shadow: 0 0 10px #ffffff !important;
    }
    
    .ecosystem-bg-glow {
        width: 320px;
        height: 320px;
        right: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        filter: blur(90px);
    }
}

/* Premium Video Placeholder Styles inside Ecosystem Stage */
.node-video-container {
    width: 100%;
    height: 100%; /* fill parent spine-node completely */
    margin-top: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.01);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    pointer-events: auto;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.node-video-container:hover {
    border-color: var(--color-accent) !important;
    box-shadow: 0 12px 35px rgba(255, 92, 53, 0.08);
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.video-play-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(var(--node-rgb), 0.06);
    border: 2px solid var(--node-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--node-color);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}

.node-video-container:hover .video-play-btn {
    transform: scale(1.1);
    background: rgba(255, 92, 53, 0.08);
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
}

.video-play-btn svg {
    width: 18px;
    height: 18px;
    margin-left: 3px; /* optical alignment */
}

.video-placeholder-text {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--color-text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .node-video-container {
        height: 150px;
    }
}
/* Card Logo Image Styles */
.node-card.card-has-logo {
    padding: 0 !important;
    overflow: hidden !important;
}

.node-card-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* fit the entire rectangular logo inside the card bounds without cropping */
    object-position: center;
    display: block;
    background-color: #ffffff; /* soft white background to contrast the logo cleanly */
    transform: scale(1.55);
    transform-origin: center;
}

.node-card-logo-img.logo-img-job-nest {
    transform: scale(1.0);
}

/* Explore Product button inactivity bounce animation */
@keyframes ctaJumpPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    20% {
        transform: translateY(-9px) scale(1.03);
    }
    40% {
        transform: translateY(0) scale(0.97);
    }
    60% {
        transform: translateY(-5px) scale(1.01);
    }
    80% {
        transform: translateY(0) scale(1);
    }
}

.story-cta.cta-jump-pulse {
    animation: ctaJumpPulse 1.5s ease infinite !important;
}
