/* 
   HYPER-VISUALS
   The Living Data Ecosystem
   Replaces static lists with a flowing, holographic pipeline
*/

:root {
    --hyper-green: #10b981;
    --hyper-dim: rgba(16, 185, 129, 0.1);
    --hyper-glow: rgba(16, 185, 129, 0.4);
    --void-bg: #0a0a0a;
}

/* CONTAINER OVERRIDES */
.alien-compute-section.designer {
    overflow: visible !important; /* Allow particles to flow */
    background: linear-gradient(to bottom, #fff 0%, #fafaf9 100%);
    position: relative;
}

/* PIPELINE GRID */
.pipeline-container {
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    align-items: center;
}

/* LEFT COLUMN: DEMAND (Jobs) */
.pipeline-demand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    perspective: 1000px;
    align-items: flex-end;
}

.job-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    width: 280px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.job-card:hover {
    transform: translateX(-10px) scale(1.02);
    border-color: var(--hyper-green);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}

.job-card::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid var(--hyper-green);
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    transition: transform 0.3s;
}

.job-card.processing::after {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 10px var(--hyper-green);
}

.job-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #000;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.job-meta {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
}

/* CENTER COLUMN: CORE (Orchestration) */
.pipeline-core {
    position: relative;
    width: 120px;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.core-reactor {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    z-index: 10;
}

.core-ring {
    position: absolute;
    border: 1px solid var(--hyper-green);
    border-radius: 50%;
    opacity: 0.3;
    animation: spin 10s linear infinite;
}

.ring-1 { width: 100%; height: 100%; border-style: dashed; animation-duration: 20s; }
.ring-2 { width: 140%; height: 140%; border-width: 1px; animation-direction: reverse; opacity: 0.1; }
.ring-3 { width: 60%; height: 60%; border-width: 2px; }

.core-logo {
    font-family: 'Instrument Serif', serif;
    font-weight: bold;
    font-size: 24px;
}

/* RIGHT COLUMN: SUPPLY (Compute) */
.pipeline-supply {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    perspective: 1000px;
}

.node-card {
    background: #0a0a0a;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    width: 280px;
    position: relative;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.node-card::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 50%;
    transform: translateY(-50%);
    transition: all 0.3s;
}

.node-card.active {
    border-color: var(--hyper-green);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.node-card.active::before {
    background: var(--hyper-green);
    border-color: var(--hyper-green);
    box-shadow: 0 0 15px var(--hyper-green);
}

.node-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    opacity: 0.6;
}

.node-name {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 16px;
}

/* DATA PACKETS (Canvas Overlay) */
#pipeline-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .pipeline-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .pipeline-demand { align-items: center; }
    
    .pipeline-core {
        height: 120px;
        flex-direction: row;
        width: 100%;
    }
    
    .job-card, .node-card { width: 100%; max-width: 340px; }
    
    .job-card:hover { transform: scale(1.02); }
    
    /* Adjust connectors for vertical layout */
    .job-card::after {
        right: auto; bottom: -6px;
        left: 50%; transform: translateX(-50%) scale(0);
    }
    
    .job-card.processing::after {
        transform: translateX(-50%) scale(1);
    }
    
    .node-card::before {
        left: auto; top: -6px;
        right: 50%; transform: translateX(50%);
    }
}

/* --- NEW: ECOSYSTEM ROLES VISUALIZATION --- */
.ecosystem-roles-section {
    padding: 6rem 2rem;
    background: var(--void-bg);
    color: white;
    position: relative;
    overflow: hidden;
}

.roles-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.role-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.role-card:hover {
    border-color: var(--hyper-green);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.role-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1.5rem;
}

.role-title {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.role-step {
    display: flex;
    gap: 1.5rem;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.role-step.active {
    opacity: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--hyper-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    color: var(--hyper-green);
    font-weight: bold;
    position: relative;
}

.step-icon.pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--hyper-green);
    opacity: 0;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.step-content {
    flex: 1;
}

.step-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #fff;
}

.step-desc {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.4;
}

/* Canvas for specific animations inside cards */
.role-canvas {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    mask-image: linear-gradient(to left, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 50%, transparent 100%);
    opacity: 0.3;
}

/* Particles container for Earn effect */
.earn-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle-gold {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 0 10px #fbbf24;
}

@media (max-width: 900px) {
    .roles-container {
        grid-template-columns: 1fr;
    }
}
