/* Hero Animation Styles - Task Orchestration Visualization - DARK THEME */

.hero-animation {
    position: relative;
    width: 100%;
    max-width: 1120px;  /* 800px * 1.4 = 1120px */
    height: 700px;  /* 500px * 1.4 = 700px */
    margin: var(--spacing-lg) auto 0;
    background: var(--seti-black-dark);
    border: 3px solid var(--color-cyan);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

/* Task Queue - Central source */
.task-queue {
    position: absolute;
    left: 50%;
    top: 56px;  /* 40px * 1.4 = 56px */
    transform: translateX(-50%);
    width: 168px;  /* 120px * 1.4 = 168px */
    height: 168px;  /* 120px * 1.4 = 168px */
    background: var(--seti-black-dark);
    border: 3px solid var(--color-cyan);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(90, 159, 212, 0.4);
}

.task-queue-logo {
    width: 104px;  /* 52px * 2 = 104px (2x larger) */
    height: 104px;
    margin-bottom: 0.35rem;  /* 0.25rem * 1.4 */
    object-fit: contain;
}

.task-queue-title {
    color: var(--seti-white);
    font-size: 0.95rem;  /* 0.6rem * 1.4 * 1.13 (extra enlargement) = ~0.95rem */
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* Agent Panels - Three workers - COLOR-CODED */
.agent-panel {
    position: absolute;
    width: 252px;  /* 180px * 1.4 = 252px */
    height: 280px;  /* 200px * 1.4 = 280px */
    background: var(--seti-black-dark);
    border-radius: var(--radius-sm);
    padding: 1.05rem;  /* 0.75rem * 1.4 = 1.05rem */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Color-coded agent panels - Three shades of blue */
.agent-panel-1 {
    left: 28px;  /* 20px * 1.4 = 28px */
    bottom: 84px;  /* 60px * 1.4 = 84px */
    border: 1px solid #4A90E2;  /* Light blue */
}

.agent-panel-2 {
    left: 50%;
    transform: translateX(-50%);
    bottom: 84px;  /* 60px * 1.4 = 84px */
    border: 1px solid #6366F1;  /* Medium purple-blue (indigo) */
}

.agent-panel-3 {
    right: 28px;  /* 20px * 1.4 = 28px */
    bottom: 84px;  /* 60px * 1.4 = 84px */
    border: 1px solid #0EA5E9;  /* Bright sky blue */
}

.agent-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;  /* 0.5rem * 1.4 = 0.7rem */
    margin-bottom: 0.7rem;  /* 0.5rem * 1.4 = 0.7rem */
    padding: 0.6rem 0.8rem;
    margin: calc(-1.05rem) calc(-1.05rem) 0.7rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* Color-coded headers with transparency - All blue shades */
.agent-panel-1 .agent-header {
    background: rgba(74, 144, 226, 0.15);
    border-bottom: 2px solid #4A90E2;
}

.agent-panel-2 .agent-header {
    background: rgba(99, 102, 241, 0.15);
    border-bottom: 2px solid #6366F1;
}

.agent-panel-3 .agent-header {
    background: rgba(14, 165, 233, 0.15);
    border-bottom: 2px solid #0EA5E9;
}

.agent-icon {
    width: 33.6px;  /* 24px * 1.4 = 33.6px */
    height: 33.6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;  /* 0.75rem * 1.4 = 1.05rem */
    flex-shrink: 0;
    color: var(--seti-black);
    font-weight: 700;
}

.agent-panel-1 .agent-icon {
    background: #4A90E2;
}

.agent-panel-2 .agent-icon {
    background: #6366F1;
}

.agent-panel-3 .agent-icon {
    background: #0EA5E9;
}

.agent-name {
    color: var(--seti-white);
    font-size: 1.05rem;  /* 0.75rem * 1.4 = 1.05rem */
    font-weight: 700;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-status {
    width: 11.2px;  /* 8px * 1.4 = 11.2px */
    height: 11.2px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.agent-panel-1 .agent-status {
    background: #4A90E2;
}

.agent-panel-2 .agent-status {
    background: #6366F1;
}

.agent-panel-3 .agent-status {
    background: #0EA5E9;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.49rem;  /* 0.35rem * 1.4 = 0.49rem */
}

.task-item {
    background: var(--seti-black);
    border: 1px solid var(--seti-grey-dark);
    border-radius: var(--radius-sm);
    padding: 0.56rem;  /* 0.4rem * 1.4 = 0.56rem */
    font-size: 0.91rem;  /* 0.65rem * 1.4 = 0.91rem */
    color: var(--seti-grey-lighter);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.49rem;  /* 0.35rem * 1.4 = 0.49rem */
    transition: all 0.3s;
    position: relative;
}

.task-item.working {
    background: rgba(99, 102, 241, 0.15);  /* Blueish highlight */
    animation: taskWork 1.5s infinite;
}

.agent-panel-1 .task-item.working {
    border-color: #4A90E2;
}

.agent-panel-2 .task-item.working {
    border-color: #6366F1;
}

.agent-panel-3 .task-item.working {
    border-color: #0EA5E9;
}

@keyframes taskWork {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(2px); }
    75% { transform: translateX(-2px); }
}

.task-item.completed {
    border-color: var(--color-green);
    background: rgba(74, 144, 121, 0.15);
    color: var(--color-green);
}

.task-checkbox {
    width: 14px;  /* 10px * 1.4 = 14px */
    height: 14px;
    border: 1px solid var(--seti-grey-lighter);
    border-radius: 2px;
    flex-shrink: 0;
    position: relative;
}

.agent-panel-1 .task-item.working .task-checkbox {
    border-color: #4A90E2;
    background: #4A90E2;
}

.agent-panel-2 .task-item.working .task-checkbox {
    border-color: #6366F1;
    background: #6366F1;
}

.agent-panel-3 .task-item.working .task-checkbox {
    border-color: #0EA5E9;
    background: #0EA5E9;
}

.task-item.completed .task-checkbox {
    border-color: var(--color-green);
    background: var(--color-green);
}

.task-item.completed .task-checkbox::after {
    content: '✓';
    position: absolute;
    top: -3px;
    left: 1px;
    color: var(--seti-black);
    font-size: 0.7rem;
    font-weight: 700;
}

.task-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading bar for working tasks */
.task-loading-bar {
    width: 100%;
    height: 3px;
    background: var(--seti-grey-dark);
    border-radius: 2px;
    overflow: hidden;
    margin-top: -0.2rem;
}

.task-loading-progress {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    /* Animation removed - will be set via JavaScript with unique timing */
}

.agent-panel-1 .task-loading-progress {
    background: linear-gradient(90deg, #4A90E2, #73b3e7);
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.6);
}

.agent-panel-2 .task-loading-progress {
    background: linear-gradient(90deg, #6366F1, #818CF8);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}

.agent-panel-3 .task-loading-progress {
    background: linear-gradient(90deg, #0EA5E9, #38BDF8);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
}

@keyframes loadingBar {
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Pipes - Connection lines - COLOR-CODED */
.pipe {
    position: absolute;
    z-index: 5;
}

/* Pipe 1: Queue bottom-left (476px, 224px) to Agent 1 top-right (280px, 336px) */
.pipe-1 {
    width: 3px;
    height: 223.75px;  /* 225.75px - 2px to stop before agent panel */
    left: 474.5px; /* 476px - 1.5px to center the 3px width */
    top: 224px;  /* 160px * 1.4 = 224px */
    transform: rotate(60.26deg); /* FIXED: positive angle for leftward diagonal */
    transform-origin: top center;
    background: #4A90E2;
}

/* Pipe 2: Queue bottom-center (560px, 224px) to Agent 2 top-center (560px, 336px) - straight vertical */
.pipe-2 {
    width: 3px;
    height: 110px;  /* 112px - 2px to stop before agent panel */
    left: 558.5px; /* 560px - 1.5px to center the 3px width */
    top: 224px;  /* 160px * 1.4 = 224px */
    background: #6366F1;
}

/* Pipe 3: Queue bottom-right (644px, 224px) to Agent 3 top-left (840px, 336px) */
.pipe-3 {
    width: 3px;
    height: 223.75px;  /* 225.75px - 2px to stop before agent panel */
    left: 642.5px; /* 644px - 1.5px to center the 3px width */
    top: 224px;  /* 160px * 1.4 = 224px */
    transform: rotate(-60.26deg); /* FIXED: negative angle for rightward diagonal */
    transform-origin: top center;
    background: #0EA5E9;
}

/* Task shapes moving through pipes - Empty checkboxes (unchecked tasks) */
.task-shape {
    position: absolute;
    width: 16.8px;  /* 12px * 1.4 = 16.8px */
    height: 16.8px;
    border-radius: 2px;
    z-index: 6;
    opacity: 0;
    background: transparent;  /* Empty/hollow */
    /* Animations removed - controlled by JavaScript for precise timing */
}

.task-shape-1, .task-shape-2, .task-shape-3, .task-shape-4 {
    border: 2px solid #4A90E2;
}

.task-shape-5, .task-shape-6, .task-shape-7, .task-shape-8 {
    border: 2px solid #6366F1;
}

.task-shape-9, .task-shape-10, .task-shape-11, .task-shape-12 {
    border: 2px solid #0EA5E9;
}

/* Completed task shapes - Green checked checkboxes returning to queue */
.completed-shape {
    position: absolute;
    width: 16.8px;  /* 12px * 1.4 = 16.8px */
    height: 16.8px;
    background: var(--color-green);
    border: 2px solid #4a9079;
    border-radius: 2px;
    z-index: 6;
    opacity: 0;
    box-shadow: 0 0 8px rgba(74, 144, 121, 0.4);
    /* Animations removed - controlled by JavaScript for precise timing */
}

.completed-shape::after {
    content: '✓';
    position: absolute;
    top: -3px;
    left: 1px;
    color: var(--seti-black);
    font-size: 0.7rem;
    font-weight: 700;
}

/* Animation caption */
.animation-caption {
    position: absolute;
    bottom: 14px;  /* 10px * 1.4 = 14px */
    left: 50%;
    transform: translateX(-50%);
    color: var(--seti-grey-lighter);
    font-size: 1.05rem;  /* 0.75rem * 1.4 = 1.05rem */
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-animation {
        height: 450px;
        max-width: 100%;
        padding: 0.5rem;
    }

    .task-queue {
        top: 30px;
        width: 120px;
        height: 120px;
    }

    .task-queue-logo {
        width: 100px;
        height: 100px;
    }

    .task-queue-title {
        font-size: 0.7rem;
    }

    .agent-panel {
        width: 150px;
        height: 170px;
        padding: 0.5rem;
    }

    .agent-panel-1 {
        left: 5px;
        bottom: 40px;
    }

    .agent-panel-2 {
        bottom: 40px;
    }

    .agent-panel-3 {
        right: 5px;
        bottom: 40px;
    }

    .task-item {
        font-size: 0.65rem;
        padding: 0.35rem;
        gap: 0.3rem;
    }

    .task-text {
        font-size: 0.65rem;
    }

    .task-checkbox {
        width: 12px;
        height: 12px;
    }

    .agent-name {
        font-size: 0.75rem;
    }

    .agent-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .agent-header {
        gap: 0.5rem;
        padding: 0.5rem 0.6rem;
        margin: calc(-0.5rem) calc(-0.5rem) 0.5rem;
    }

    .pipe-1 {
        height: 195px;
        left: calc(50% - 75px - 1.5px);
        top: 150px;
        transform: rotate(75deg);
        transform-origin: top center;
    }

    .pipe-2 {
        height: 70px;
        left: calc(50% - 1.5px);
        top: 150px;
    }

    .pipe-3 {
        height: 195px;
        left: calc(50% + 75px - 1.5px);
        top: 150px;
        transform: rotate(-75deg);
        transform-origin: top center;
    }

    .animation-caption {
        font-size: 0.75rem;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .hero-animation {
        height: 380px;
        padding: 0.25rem;
    }

    .task-queue {
        width: 80px;
        height: 80px;
        top: 20px;
    }

    .task-queue-logo {
        width: 64px;
        height: 64px;
        margin-bottom: 0.1rem;
    }

    .task-queue-title {
        font-size: 0.5rem;
    }

    .agent-panel {
        width: 105px;
        height: 150px;
        padding: 0.4rem;
    }

    .agent-panel-1 {
        left: 2px;
        bottom: 30px;
    }

    .agent-panel-2 {
        bottom: 30px;
    }

    .agent-panel-3 {
        right: 2px;
        bottom: 30px;
    }

    .agent-icon {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .agent-name {
        font-size: 0.65rem;
    }

    .agent-header {
        gap: 0.4rem;
        padding: 0.4rem 0.5rem;
        margin: calc(-0.4rem) calc(-0.4rem) 0.4rem;
    }

    .task-item {
        font-size: 0.55rem;
        padding: 0.28rem;
        gap: 0.25rem;
    }

    .task-text {
        font-size: 0.55rem;
    }

    .task-checkbox {
        width: 10px;
        height: 10px;
    }

    .animation-caption {
        font-size: 0.6rem;
        bottom: 8px;
    }

    .pipe-1 {
        height: 165px;
        left: calc(50% - 52px - 1.5px);
        top: 100px;
        transform: rotate(73deg);
        transform-origin: top center;
    }

    .pipe-2 {
        height: 65px;
        left: calc(50% - 1.5px);
        top: 100px;
    }

    .pipe-3 {
        height: 165px;
        left: calc(50% + 52px - 1.5px);
        top: 100px;
        transform: rotate(-73deg);
        transform-origin: top center;
    }
}
