/* Base resets and configuration */
html {
    scroll-behavior: smooth;
}

/* Header transition */
.header-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Animations base classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Specific entrance animations */
.fade-in-up {
    transform: translateY(30px);
}

.slide-in-left {
    transform: translateX(-40px);
}

.slide-in-right {
    transform: translateX(40px);
}

.zoom-in {
    transform: scale(0.95);
}

/* Microanimations for icons/elements */
@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.icon-pulse:hover {
    animation: pulse-soft 1s infinite;
}

/* Floating button hover scaling limit */
.floating-btn:hover {
    transform: scale(1.03);
}

/* Input error state */
.input-error {
    border-color: #ef4444 !important;
}
.input-error + .input-icon {
    color: #ef4444 !important;
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-on-scroll {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
