/* Guardian Orchestration Section */
.guardian-orchestration {
    padding: 8rem 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(71,71,135,0.02) 100%);
    overflow: hidden;
}

.guardian-orchestration h2 {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.orchestration-subtitle {
    text-align: center;
    font-size: 1.375rem;
    color: var(--gray-400);
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Guardian Sequence Container */
.guardian-sequence {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* User Phase Styling */
.user-phase {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.sequence-step {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(71, 71, 135, 0.05);
    border: 1px solid rgba(71, 71, 135, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.user-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary);
}

.user-action i {
    font-size: 1.5rem;
    opacity: 0.8;
}

.user-action span {
    font-size: 1rem;
    font-weight: 500;
}

/* Guardian Flow Styling */
.guardian-flow {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
}

/* Orchestrator Styling */
.orchestrator {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(to bottom right, white, rgba(71, 71, 135, 0.02));
    border: 1px solid rgba(71, 71, 135, 0.15);
    position: relative;
}

.orchestrator::after {
    content: '';
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 3rem;
    background: linear-gradient(to bottom, rgba(71, 71, 135, 0.15), transparent);
}

.orchestrator .guardian-header {
    border-bottom-color: rgba(71, 71, 135, 0.15);
}

.orchestrator .guardian-header i {
    font-size: 1.75rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Specialized Guardians Container */
.specialized-guardians {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
    margin-bottom: 4rem;
}

.specialized-guardians::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(71, 71, 135, 0.1), transparent);
}

.specialized-guardians::after {
    content: '';
    position: absolute;
    bottom: -4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 4rem;
    background: linear-gradient(to bottom, rgba(71, 71, 135, 0.15), transparent);
}

/* Animation Delays - Updated for new structure */
.orchestrator { animation-delay: 1s; }

.specialized-guardians .guardian:nth-child(1) { animation-delay: 1.6s; }
.specialized-guardians .guardian:nth-child(2) { animation-delay: 2s; }
.specialized-guardians .guardian:nth-child(3) { animation-delay: 2.4s; }

/* Orchestrator Action Delays */
.orchestrator .action { animation: slideIn 0.8s ease forwards; }
.orchestrator .action:nth-child(1) { animation-delay: 1.4s; }
.orchestrator .action:nth-child(2) { animation-delay: 1.8s; }
.orchestrator .action:nth-child(3) { animation-delay: 2.2s; }

/* Specialized Guardian Action Delays */
.specialized-guardians .guardian:nth-child(1) .action:nth-child(1) { animation-delay: 2s; }
.specialized-guardians .guardian:nth-child(1) .action:nth-child(2) { animation-delay: 2.4s; }
.specialized-guardians .guardian:nth-child(1) .action:nth-child(3) { animation-delay: 2.8s; }
.specialized-guardians .guardian:nth-child(1) .action:nth-child(4) { animation-delay: 3.2s; }
.specialized-guardians .guardian:nth-child(1) .action:nth-child(5) { animation-delay: 3.6s; }

.specialized-guardians .guardian:nth-child(2) .action:nth-child(1) { animation-delay: 2.6s; }
.specialized-guardians .guardian:nth-child(2) .action:nth-child(2) { animation-delay: 3s; }

.specialized-guardians .guardian:nth-child(3) .action:nth-child(1) { animation-delay: 3.2s; }
.specialized-guardians .guardian:nth-child(3) .action:nth-child(2) { animation-delay: 3.6s; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .specialized-guardians {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .orchestrator {
        margin: 0 1rem;
    }

    .specialized-guardians {
        grid-template-columns: 1fr;
    }

    .orchestrator::after {
        height: 2rem;
        bottom: -2rem;
    }

    .specialized-guardians::before {
        width: 90%;
    }
}

.guardian {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(71, 71, 135, 0.08);
    border: 1px solid rgba(71, 71, 135, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.guardian::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(71, 71, 135, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.guardian.active::before {
    opacity: 1;
}

.guardian:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(71, 71, 135, 0.12);
}

.guardian-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(71, 71, 135, 0.1);
}

.guardian-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.guardian-header span {
    font-weight: 600;
    color: var(--primary);
}

.guardian-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action {
    padding: 0.875rem;
    background: rgba(71, 71, 135, 0.03);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--gray-400);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transform: translateX(-3px);
    transition: all 0.5s ease;
}

.action.active {
    opacity: 1;
    transform: translateX(0);
    padding-left: 1.125rem;
}

.action.active::before {
    opacity: 0.2;
    transform: translateX(0);
}

/* Result Card Styling */
.sequence-result {
    display: flex;
    justify-content: center;
    position: relative;
}

.sequence-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(71, 71, 135, 0.1), transparent);
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(71, 71, 135, 0.08);
    border: 1px solid rgba(71, 71, 135, 0.1);
    display: flex;
    gap: 2rem;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards 4s, completePulse 2s ease-in-out 5s;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(71, 71, 135, 0.05),
        transparent
    );
    animation: shimmer 3s infinite;
}

.result-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.result-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(71, 71, 135, 0.1) 0%,
        transparent 70%
    );
    animation: pulse 3s ease-out infinite;
}

.result-content h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.result-content p {
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.result-meta {
    display: flex;
    gap: 1.5rem;
}

.result-meta span {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

/* Animations */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loop Animation Styles */
.guardian.completed {
    animation: completePulse 2s ease-in-out;
}

@keyframes completePulse {
    0% {
        border-color: rgba(71, 71, 135, 0.1);
        box-shadow: 0 4px 24px rgba(71, 71, 135, 0.08);
    }
    50% {
        border-color: var(--accent);
        box-shadow: 0 4px 24px rgba(71, 71, 135, 0.2);
    }
    100% {
        border-color: rgba(71, 71, 135, 0.1);
        box-shadow: 0 4px 24px rgba(71, 71, 135, 0.08);
    }
}

/* Reset animation styles */
.guardian.reset {
    opacity: 0;
    transform: translateY(20px);
}

.action.reset {
    opacity: 0;
    transform: translateX(-10px);
}

.result-card.reset {
    opacity: 0;
    transform: translateY(20px);
} 