/* ==========================================================================
   OcomStudio - Animations Stylesheet
   ========================================================================== */

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) rotate(1deg);
    }

    50% {
        transform: translateY(-5px) rotate(0deg);
    }

    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

.floating {
    animation: float 8s ease-in-out infinite;
}

.floating-icon {
    animation: float 4s ease-in-out infinite;
}

/* Bounce Animation */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

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

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

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

/* Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-spin-slow {
    animation: spin 8s linear infinite;
}

/* Dance Animation */
@keyframes dance {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    25% {
        transform: translateY(-10px) scale(1.03) rotate(2deg);
    }

    50% {
        transform: translateY(0) scale(1);
    }

    75% {
        transform: translateY(-10px) scale(1.03) rotate(-2deg);
    }
}

.dancing {
    animation: dance 6s ease-in-out infinite;
}

/* Wave Animation */
@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-8deg);
    }
}

.wave-arm {
    animation: wave 4s ease-in-out infinite;
    transform-origin: 20% 60%;
}

/* Bounce Effect */
@keyframes bounce-effect {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.1);
    }

    60% {
        transform: scale(0.9);
    }

    80% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.bounce-effect {
    animation: bounce-effect 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Pulse Effect */
@keyframes pulse-effect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.pulse-effect {
    animation: pulse-effect 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Ripple Effect */
@keyframes ripple-effect {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(0, 102, 255, 0.2);
    transform: scale(0);
    animation: ripple-effect 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 3;
}

.dark .ripple {
    background-color: rgba(93, 92, 222, 0.2);
}

/* Twinkle Animation */
@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0;
    z-index: 10;
    box-shadow: 0 0 10px 2px rgba(0, 150, 255, 0.5);
    pointer-events: none;
}

.dark .sparkle {
    box-shadow: 0 0 10px 2px rgba(93, 92, 222, 0.5);
}

/* Glowing Dots */
@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 102, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
    }
}

.glowing-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(0, 102, 255, 0.7);
    animation: glow-pulse 2s infinite;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
    background-size: 1000px 100%;
}

/* Background Rotation */
@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Scroll Triggered Animations
   ========================================================================== */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

/* ==========================================================================
   3D Animations
   ========================================================================== */

/* 3D Rotate */
@keyframes rotate3d {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }

    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

.rotate-3d {
    animation: rotate3d 10s linear infinite;
}

/* 3D Tilt on Hover */
.tilt-3d {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.tilt-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* 3D Float */
@keyframes float3d {

    0%,
    100% {
        transform: perspective(1000px) translateZ(0) rotateX(0) rotateY(0);
    }

    25% {
        transform: perspective(1000px) translateZ(20px) rotateX(2deg) rotateY(2deg);
    }

    50% {
        transform: perspective(1000px) translateZ(30px) rotateX(0) rotateY(0);
    }

    75% {
        transform: perspective(1000px) translateZ(20px) rotateX(-2deg) rotateY(-2deg);
    }
}

.float-3d {
    animation: float3d 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* Icon 3D Effect */
.icon-3d {
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

.icon-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icon-3d:hover {
    transform: translateY(-5px) scale(1.05);
}

.icon-3d:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Animated Backgrounds
   ========================================================================== */

.animated-bg {
    position: relative;
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.05) 0%, rgba(0, 102, 255, 0.02) 50%, rgba(255, 255, 255, 0) 70%);
    animation: rotation 30s linear infinite;
    z-index: -1;
}

/* Hexagon Background Pattern */
.hexagon-bg {
    position: relative;
    overflow: hidden;
}

.hexagon-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%230066ff' fill-opacity='0.05' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
}

/* Floating Dots Background */
.dots-bg {
    position: relative;
}

.dots-bg .dot {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.3) 0%, rgba(0, 102, 255, 0) 70%);
    opacity: 0.5;
    animation: float 15s infinite alternate;
}

.dots-bg .dot:nth-child(1) {
    width: 150px;
    height: 150px;
}

.dots-bg .dot:nth-child(2) {
    width: 100px;
    height: 100px;
    animation-duration: 12s;
    animation-direction: alternate-reverse;
}

.dots-bg .dot:nth-child(3) {
    width: 80px;
    height: 80px;
    animation-duration: 10s;
}

.dots-bg .dot:nth-child(4) {
    width: 60px;
    height: 60px;
    animation-duration: 8s;
    animation-direction: alternate-reverse;
}

/* ==========================================================================
   Image Reveal Animation
   ========================================================================== */

.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-500);
    transform: translateX(0);
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.image-reveal.revealed::after {
    transform: translateX(100%);
}

/* ==========================================================================
   Parallax
   ========================================================================== */

.parallax {
    transition: transform 0.2s ease-out;
}

/* ==========================================================================
   Hover Transitions
   ========================================================================== */

.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: transform var(--transition-normal);
}

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

.hover-rotate {
    transition: transform var(--transition-normal);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* ==========================================================================
   Staggered Animations (for lists)
   ========================================================================== */

.stagger-children>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 0.6s;
}

.stagger-children>*:nth-child(7) {
    animation-delay: 0.7s;
}

.stagger-children>*:nth-child(8) {
    animation-delay: 0.8s;
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}