/* ==================== SCROLL ANIMATIONS ==================== */

/* Fade in on scroll - Default state */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
}

/* Elements that should fade in on scroll */
section > .container > *:not(.contact-form-section) {
    animation: fadeInUp 0.3s ease-out forwards;
    animation-delay: 0.04s;
}

section > .container > *:nth-child(2) {
    animation-delay: 0.08s;
}

section > .container > *:nth-child(3) {
    animation-delay: 0.12s;
}

section > .container > *:nth-child(4) {
    animation-delay: 0.16s;
}

/* ==================== FADE IN UP ANIMATION ==================== */

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

/* ==================== FADE IN DOWN ANIMATION ==================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== SCALE UP ANIMATION ==================== */

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== BUTTON ANIMATIONS ==================== */

.btn {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease-out;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.12s, height 0.12s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.8),
                inset 0 0 20px rgba(0, 212, 255, 0.2);
}

.btn-secondary:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6),
                inset 0 0 15px rgba(212, 175, 55, 0.1);
}

/* ==================== LINK HOVER ANIMATIONS ==================== */
/* link-cta styling moved to variables.css for consistency with button styling */

/* ==================== PROCESS STEP ANIMATIONS ==================== */
/* Process step animations handled by GSAP ScrollTrigger in main.js */

/* ==================== FIT CARD ANIMATIONS ==================== */
/* Fit card animations handled by GSAP ScrollTrigger in main.js */

/* ==================== FAQ ANIMATIONS ==================== */
/* FAQ item animations handled by GSAP ScrollTrigger in main.js */

/* FAQ Accordion Animation */
/* Animation handled by JS toggle + CSS transition in style.css */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

/* ==================== TESTIMONIAL ANIMATIONS ==================== */
/* Testimonial animations handled by GSAP ScrollTrigger in main.js */

/* ==================== UNIVERSAL GLOW HOVER EFFECT ==================== */

/* Video hover effect */
.video-wrapper {
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.hero-video:hover .video-wrapper {
    border-color: var(--color-accent-neon);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.6),
                inset 0 0 40px rgba(0, 212, 255, 0.2);
    animation: elementGlow 0.6s ease-out infinite;
}

/* Image placeholders hover effect */
.image-placeholder {
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.image-placeholder:hover {
    border-color: var(--color-accent-neon);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.6),
                inset 0 0 40px rgba(0, 212, 255, 0.2);
    animation: elementGlow 0.6s ease-out infinite;
}

/* Process cards hover effect */
.process-step {
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.process-step:hover {
    border-color: var(--color-accent-neon);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.5),
                inset 0 0 30px rgba(0, 212, 255, 0.15);
    animation: elementGlow 0.6s ease-out infinite;
}

/* Fit cards hover effect */
.fit-card {
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.fit-card:hover {
    border-color: var(--color-accent-neon);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.5),
                inset 0 0 30px rgba(0, 212, 255, 0.15);
    animation: elementGlow 0.6s ease-out infinite;
}

/* Testimonial screenshot hover effect */
.testimonial-screenshot {
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.testimonial-screenshot:hover {
    border-color: var(--color-accent-neon);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.6),
                inset 0 0 40px rgba(0, 212, 255, 0.2);
    animation: elementGlow 0.6s ease-out infinite;
}

/* FAQ items hover effect */
.faq-item {
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.faq-item:hover {
    border-color: var(--color-accent-neon);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.5),
                inset 0 0 30px rgba(0, 212, 255, 0.15);
    animation: elementGlow 0.6s ease-out infinite;
}

/* About section box styling */
.about-content {
    transition: box-shadow 0.3s ease-out;
}

/* Generic glow animation */
@keyframes elementGlow {
    0% {
        box-shadow: 0 0 60px rgba(0, 212, 255, 0.5),
                    inset 0 0 30px rgba(0, 212, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 80px rgba(0, 212, 255, 0.7),
                    inset 0 0 40px rgba(0, 212, 255, 0.2);
    }
    100% {
        box-shadow: 0 0 60px rgba(0, 212, 255, 0.5),
                    inset 0 0 30px rgba(0, 212, 255, 0.1);
    }
}

/* ==================== NEON GLOW EFFECT ==================== */
/* Buttons handled above with smooth glow */

/* ==================== SMOOTH TRANSITIONS ==================== */

* {
    transition-property: color, background-color, border-color, box-shadow, transform;
    transition-timing-function: ease-out;
}

/* Exclude rapid transitions */
.btn, a, button {
    transition-duration: 0.12s;
}

/* ==================== STAGGER ANIMATIONS ==================== */

.about-list li {
    animation: fadeInUp 0.25s ease-out forwards;
}

.about-list li:nth-child(1) {
    animation-delay: 0s;
}

.about-list li:nth-child(2) {
    animation-delay: 0.08s;
}

.about-list li:nth-child(3) {
    animation-delay: 0.16s;
}

.about-list li:nth-child(4) {
    animation-delay: 0.24s;
}

/* ==================== TEXT REVEAL ANIMATION ==================== */

.hero-h1, .hero-h2 {
    animation: fadeInDown 0.3s ease-out;
}

.hero-trust {
    animation: fadeInUp 0.3s ease-out;
    animation-delay: 0.08s;
}

.hero-cta {
    animation: fadeInUp 0.3s ease-out;
    animation-delay: 0.16s;
}

/* ==================== SPINNER ANIMATION ==================== */

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

.spinner {
    animation: spin 0.4s linear infinite;
}

/* ==================== PULSE ANIMATION ==================== */

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

.pulse {
    animation: pulse 0.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==================== BOUNCE ANIMATION ==================== */

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 0.8s ease-in-out infinite;
}

/* ==================== IMAGE LOAD ANIMATION ==================== */

img {
    animation: fadeInUp 0.25s ease-out;
}

/* ==================== LOADING SKELETON ==================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-secondary) 25%,
        var(--color-bg-tertiary) 50%,
        var(--color-bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: loading 0.6s infinite;
}

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

/* ==================== SMOOTH SCROLL BEHAVIOR ==================== */

html {
    scroll-behavior: smooth;
}

/* ==================== REDUCE MOTION ==================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==================== CONFIG INDICATOR ==================== */

.config-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9999;
}

.config-indicator:hover {
    width: 20px;
    height: 20px;
    bottom: 18px;
    right: 18px;
}

.config-indicator.loaded {
    background: #22c55e;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
    animation: configPulse 2s infinite;
}

.config-indicator.loaded:hover::after {
    content: '✓ Config loaded';
    position: absolute;
    bottom: 25px;
    right: 0;
    background: #1f2937;
    color: #22c55e;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid #22c55e;
}

.config-indicator.failed {
    background: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
}

.config-indicator.failed:hover::after {
    content: '⚠️ Using defaults';
    position: absolute;
    bottom: 25px;
    right: 0;
    background: #1f2937;
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid #ef4444;
}

@keyframes configPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ==================== FOCUS VISIBLE ANIMATIONS ==================== */

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--color-accent-neon);
    outline-offset: 2px;
    animation: pulse 0.2s ease-out;
}

/* ==================== MOBILE ANIMATIONS ==================== */

@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    section > .container > * {
        animation-delay: 0s !important;
    }

    .process-step:nth-child(2) {
        animation-delay: 0s !important;
    }

    .process-step:nth-child(3) {
        animation-delay: 0s !important;
    }

    .fit-card:nth-child(2) {
        animation-delay: 0s !important;
    }

    .about-list li:nth-child(n) {
        animation-delay: 0s !important;
    }

    /* Softer transitions on mobile */
    * {
        transition-duration: 0.08s !important;
    }
}
