/* Tensor Production - Animations */

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(37, 85, 160, 0.7); 
    }
    70% { 
        box-shadow: 0 0 0 8px rgba(37, 85, 160, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(37, 85, 160, 0); 
    }
}

@keyframes pulseScale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -8px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0,-1px,0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse-slow {
    animation: pulseScale 3s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce 2s infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Timeline Node Animation */
@keyframes nodeActivate {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(37, 85, 160, 0.7);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(37, 85, 160, 0.3);
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 0 0 0 rgba(37, 85, 160, 0);
        opacity: 1;
    }
}

@keyframes nodePulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(37, 85, 160, 0.7); 
    }
    70% { 
        box-shadow: 0 0 0 15px rgba(37, 85, 160, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(37, 85, 160, 0); 
    }
}

.timeline-step.active .timeline-node {
    animation: nodeActivate 0.6s ease-out forwards, nodePulse 2s infinite 0.6s;
}

/* Simple Timeline Card Animation */
@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Timeline Node Base Styles */
.timeline-node {
    transform: scale(0.8);
    opacity: 0.7;
    transition: all 0.3s ease-out;
}

/* Timeline Card Base Styles */
.timeline-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-out;
}

/* Active Timeline Card - delayed after node animation */
.timeline-step.active .timeline-card {
    opacity: 1;
    transform: translateY(0);
    animation: cardFadeInUp 0.6s ease-out 0.4s both;
}

/* Simple Hover Effect */
.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(37, 85, 160, 0.15);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .timeline-card,
    .timeline-step.active .timeline-card {
        animation: none !important;
        transition: opacity 0.3s ease;
    }
    
    .timeline-step.active .timeline-card {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Animations */

/* Modal Animations */
#video-modal,
#photo-modal {
    transition: opacity 0.3s ease-in-out;
}

#video-modal.hidden,
#photo-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#video-modal:not(.hidden),
#photo-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Content Animation */
#video-modal .relative,
#photo-modal .relative {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Photo Gallery Navigation */
#photo-prev:disabled,
#photo-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#photo-thumbnails img {
    transition: opacity 0.2s ease;
}

#photo-thumbnails img:hover {
    opacity: 0.8;
}

/* Project Card Hover Effects */
[data-project-id] {
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-project-id]:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Loading Animation */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Loading Animations */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--brand-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll Animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.animate > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animate > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animate > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animate > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animate > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animate > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.animate > * {
    opacity: 1;
    transform: translateY(0);
}

/* Form Animations */
.form-field {
    position: relative;
}

.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.75);
    color: var(--brand-blue);
}

.form-field label {
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    color: #6b7280;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Success/Error Animations */
.success-bounce {
    animation: bounce 0.6s ease-in-out;
}

.error-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
} 