232 lines
3.6 KiB
CSS
232 lines
3.6 KiB
CSS
/* Keyframe animations */
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes wave {
|
|
0%, 100% {
|
|
transform: rotate(0deg);
|
|
}
|
|
25% {
|
|
transform: rotate(-10deg);
|
|
}
|
|
75% {
|
|
transform: rotate(10deg);
|
|
}
|
|
}
|
|
|
|
@keyframes float {
|
|
0%, 100% {
|
|
transform: translateY(0px);
|
|
}
|
|
50% {
|
|
transform: translateY(8px);
|
|
}
|
|
}
|
|
|
|
@keyframes slideInLeft {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateX(-50px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
|
|
@keyframes slideInRight {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateX(50px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
|
|
@keyframes scaleIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale(0.9);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
/* Animation classes */
|
|
.animate-fade-in-up {
|
|
animation: fadeInUp 0.8s ease-out forwards;
|
|
}
|
|
|
|
.animate-fade-in {
|
|
animation: fadeIn 0.6s ease-out forwards;
|
|
}
|
|
|
|
.animate-wave {
|
|
animation: wave 2s ease-in-out infinite;
|
|
transform-origin: 70% 70%;
|
|
}
|
|
|
|
.animate-float {
|
|
animation: float 3s ease-in-out infinite;
|
|
}
|
|
|
|
.animate-slide-in-left {
|
|
animation: slideInLeft 0.8s ease-out forwards;
|
|
}
|
|
|
|
.animate-slide-in-right {
|
|
animation: slideInRight 0.8s ease-out forwards;
|
|
}
|
|
|
|
.animate-scale-in {
|
|
animation: scaleIn 0.6s ease-out forwards;
|
|
}
|
|
|
|
/* Delay classes for staggered animations */
|
|
.delay-100 {
|
|
animation-delay: 0.1s;
|
|
}
|
|
|
|
.delay-200 {
|
|
animation-delay: 0.2s;
|
|
}
|
|
|
|
.delay-300 {
|
|
animation-delay: 0.3s;
|
|
}
|
|
|
|
.delay-400 {
|
|
animation-delay: 0.4s;
|
|
}
|
|
|
|
.delay-500 {
|
|
animation-delay: 0.5s;
|
|
}
|
|
|
|
.delay-600 {
|
|
animation-delay: 0.6s;
|
|
}
|
|
|
|
/* Initial state for animated elements */
|
|
.animate-fade-in-up,
|
|
.animate-fade-in,
|
|
.animate-slide-in-left,
|
|
.animate-slide-in-right,
|
|
.animate-scale-in {
|
|
opacity: 0;
|
|
}
|
|
|
|
/* Viewport-triggered animations */
|
|
.animate-on-scroll {
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
transition: opacity 0.8s ease-out, transform 0.8s ease-out;
|
|
}
|
|
|
|
.animate-on-scroll.animate-in-view {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.animate-on-scroll-left {
|
|
opacity: 0;
|
|
transform: translateX(-50px);
|
|
transition: opacity 0.8s ease-out, transform 0.8s ease-out;
|
|
}
|
|
|
|
.animate-on-scroll-left.animate-in-view {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.animate-on-scroll-right {
|
|
opacity: 0;
|
|
transform: translateX(50px);
|
|
transition: opacity 0.8s ease-out, transform 0.8s ease-out;
|
|
}
|
|
|
|
.animate-on-scroll-right.animate-in-view {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.animate-on-scroll-scale {
|
|
opacity: 0;
|
|
transform: scale(0.9);
|
|
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
|
|
}
|
|
|
|
.animate-on-scroll-scale.animate-in-view {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
|
|
.animate-slide-up {
|
|
opacity: 0;
|
|
transform: translateY(100px);
|
|
transition: opacity 1s ease-out, transform 1s ease-out;
|
|
}
|
|
|
|
.animate-slide-up.animate-in-view {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.parallax-element {
|
|
will-change: transform;
|
|
}
|
|
|
|
/* Alternative: Simple CSS-based parallax using transform3d for better performance */
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
.parallax-slow {
|
|
transform: translateZ(0);
|
|
animation: parallaxFloat 20s ease-in-out infinite;
|
|
}
|
|
}
|
|
|
|
@keyframes parallaxFloat {
|
|
0% {
|
|
transform: translateY(0px);
|
|
}
|
|
50% {
|
|
transform: translateY(-30px);
|
|
}
|
|
100% {
|
|
transform: translateY(0px);
|
|
}
|
|
}
|
|
|
|
/* Simple test animation */
|
|
.test-animation {
|
|
animation: testPulse 2s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes testPulse {
|
|
0%, 100% {
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
transform: scale(1.1);
|
|
}
|
|
} |