/* ==========================================================================
   WEB ANIMATIONS
   CSS Animations, Transitions & Interactive Effects
   ========================================================================== */

/* ==========================================================================
   KEYFRAME ANIMATIONS
   Core @keyframes declarations
   ========================================================================== */

/* Floating animation for hero background element */
@keyframes float {
    0%, 100% { transform: rotate(0deg) translateY(0px); }
    33% { transform: rotate(2deg) translateY(-10px); }
    66% { transform: rotate(-1deg) translateY(5px); }
}

/* Gentle pulsing animation for badges */
@keyframes gentle-pulse {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(0deg) scale(1.02); }
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Certificate shimmer effect */
@keyframes certificate-shimmer {
    0%, 100% { transform: translateX(-20px) rotate(0deg); }
    50% { transform: translateX(20px) rotate(5deg); }
}

/* Certificate floating animation */
@keyframes certificate-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

/* ==========================================================================
   SCROLL ANIMATIONS
   IntersectionObserver triggered animations
   ========================================================================== */

/* Fade in up animation for scroll reveals */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-organic);
}

.fade-in-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   HOVER EFFECTS
   Interactive hover animations
   ========================================================================== */

/* Generic hover lift effect */
.hover-lift {
    transition: transform 0.3s var(--ease-organic);
}

.hover-lift:hover {
    transform: translateY(-3px);
}

/* Logo hover effect */
.logo {
    transform: rotate(0deg);
    transition: transform 0.3s var(--ease-organic);
}

.logo:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Lab icon bubble animation */
@keyframes bubble-float {
    0%, 100% { transform: translateY(0px); opacity: 0.7; }
    50% { transform: translateY(-2px); opacity: 1; }
}

.logo-lab-icon circle:nth-child(4) { animation: bubble-float 2s ease-in-out infinite; }
.logo-lab-icon circle:nth-child(5) { animation: bubble-float 2s ease-in-out infinite 0.7s; }
.logo-lab-icon circle:nth-child(6) { animation: bubble-float 2s ease-in-out infinite 1.4s; }

/* Button hover effects */
.btn-primary {
    transition: all 0.4s var(--ease-organic);
}

.btn-primary:hover {
    transform: translateY(-3px) rotate(0deg);
}

.btn-secondary {
    transition: all 0.4s var(--ease-organic);
}

.btn-secondary:hover {
    transform: translateY(-2px) rotate(0deg);
}

/* Header CTA button with sliding shimmer effect */
.header-cta {
    transition: all 0.3s var(--ease-organic);
    position: relative;
    overflow: hidden;
}

.header-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s var(--ease-organic);
}

.header-cta:hover::before {
    left: 100%;
}

.header-cta:hover {
    transform: translateY(-2px) rotate(0deg);
}

/* ==========================================================================
   CARD ANIMATIONS
   Various card hover effects
   ========================================================================== */

/* Visual card animations */
.visual-card {
    transform: rotate(0deg);
    transition: transform 0.4s var(--ease-organic);
}

.visual-card:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Video container hover */
.video-container {
    transform: rotate(0deg);
    transition: transform 0.4s var(--ease-organic);
}

.video-container:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Video placeholder interactions */
.video-placeholder {
    transition: all 0.3s var(--ease-organic);
}

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

.video-play-button {
    transition: transform 0.3s var(--ease-bounce);
}

.video-placeholder:hover .video-play-button {
    transform: scale(1.1);
}

/* Problem card animations */
.problem-card {
    transition: all 0.4s var(--ease-organic);
    transform: rotate(0deg);
}

.problem-card:nth-child(even) {
    transform: rotate(0deg);
}

.problem-card:hover {
    transform: translateY(-5px) rotate(0deg);
}

/* Timeline content animations */
.timeline-content {
    transform: rotate(0deg);
    transition: all 0.3s var(--ease-organic);
}

.timeline-item:nth-child(even) .timeline-content {
    transform: rotate(0deg);
}

.timeline-content:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Pricing card animations */
.pricing-card {
    transform: rotate(0deg);
    transition: all 0.4s var(--ease-organic);
}

.pricing-card.recommended {
    transform: rotate(0deg) scale(1.05);
}

.pricing-card:hover {
    transform: rotate(0deg) scale(1.03);
}

.pricing-badge {
    transform: rotate(-2deg);
}

.pricing-card.recommended .pricing-badge {
    transform: rotate(0deg);
}

/* Expert card animations */
.expert-card {
    transform: rotate(0deg);
    transition: transform 0.4s var(--ease-organic);
}

.expert-card:hover {
    transform: rotate(0deg) scale(1.02);
}

/* FAQ animations */
.faq-item {
    transition: all 0.3s var(--ease-organic);
    transform: rotate(0.2deg);
}

.faq-item:nth-child(even) {
    transform: rotate(0deg);
}

.faq-item:hover {
    transform: rotate(0deg);
}

.faq-question {
    transition: color 0.3s var(--ease-organic);
}

.faq-question:hover {
    color: var(--warmth-primary);
}

.faq-icon {
    transform: rotate(0deg);
    transition: transform 0.3s var(--ease-organic);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s var(--ease-organic);
}

.faq-item.open .faq-answer {
    max-height: 200px;
}

/* ==========================================================================
   CERTIFICATE ANIMATIONS
   Special animations for certificate cards
   ========================================================================== */

.certificate-card {
    transition: all 0.4s var(--ease-organic);
    transform: rotate(0deg);
}

.certificate-card.caiba {
    transform: rotate(0deg);
}

.certificate-card:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Certificate header with shimmer animation */
.certificate-header {
    position: relative;
    overflow: hidden;
}

.certificate-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    /* animation: certificate-shimmer 4s ease-in-out infinite; */
}

/* Certificate image floating animation - disabled to prevent text overlap */
.certificate-image img {
    /* animation: certificate-float 3s ease-in-out infinite; */
}

/* Benefit card animations */
.benefit-card {
    transition: all 0.4s var(--ease-organic);
    transform: rotate(0deg);
}

.benefit-card.value-card {
    transform: rotate(0deg);
}

.benefit-card:hover {
    transform: rotate(0deg) scale(1.02);
}

/* ==========================================================================
   HERO ANIMATIONS
   Special hero section animations
   ========================================================================== */

/* Hero background floating animation */
.hero::before {
    animation: float 20s ease-in-out infinite;
}

/* Hero badge pulsing */
.hero-badge {
    transform: rotate(0deg);
    animation: gentle-pulse 3s ease-in-out infinite;
}

/* ==========================================================================
   HEADER ANIMATIONS
   Header scroll behavior and transitions
   ========================================================================== */

header {
    transform: translateY(0);
    transition: transform 0.4s var(--ease-organic);
}

/* Scrollbar animations */
::-webkit-scrollbar-thumb:hover {
    background: var(--warmth-accent);
}

/* ==========================================================================
   FOOTER ANIMATIONS
   Footer link hover effects
   ========================================================================== */

.footer-brand h3 {
    transform: rotate(0deg);
}

.footer-nav a {
    transition: color 0.3s var(--ease-organic);
}

.footer-nav a:hover {
    color: var(--warmth-secondary);
}

.credits a:hover {
    color: var(--warmth-gold);
}

/* ==========================================================================
   LOADING STATES
   Loading animations and states
   ========================================================================== */

.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--warmth-secondary);
    border-top: 2px solid var(--warmth-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   Animation adjustments for mobile devices
   ========================================================================== */

@media (max-width: 768px) {
    /* Reset rotations on mobile for better performance */
    .visual-card {
        transform: rotate(0deg);
    }
    
    .certificate-card {
        transform: rotate(0deg);
    }
    
    .benefit-card {
        transform: rotate(0deg);
    }
    
    /* Reduce animation complexity on mobile */
    .fade-in-up {
        transition: all 0.6s var(--ease-organic);
    }
}

/* ==========================================================================
   REDUCED MOTION PREFERENCES
   Respect user's motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    /* Disable animations for users who prefer reduced motion */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove parallax effects */
    .hero::before {
        animation: none;
    }
    
    .hero-badge {
        animation: none;
    }
    
    .certificate-header::before {
        animation: none;
    }
    
    .certificate-image img {
        animation: none;
    }
}