/* ========================================
   1Daddy.work - Animations & Effects
   ======================================== */

/* Keyframe Animations */

/* Core Pulse Effect - GPU optimized */
@keyframes corePulse {
    0%, 100% {
        transform: translate3d(-50%, -50%, 0) scale(1);
        opacity: 0.52;
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale(1.12);
        opacity: 0.72;
    }
}

/* Ring Rotate - GPU optimized */
@keyframes ringRotate {
    from {
        transform: translate3d(-50%, -50%, 0) rotate(0deg);
    }
    to {
        transform: translate3d(-50%, -50%, 0) rotate(360deg);
    }
}

/* Tag Float Animation - GPU optimized */
@keyframes tagFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -12px, 0);
    }
}

/* Stars Twinkle */
@keyframes starsTwinkle {
    0%, 100% {
        opacity: 0.65;
    }
    50% {
        opacity: 0.82;
    }
}

/* Fade In Up - GPU-accelerated */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 24px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Fade In Down - GPU-accelerated */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -24px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Fade In Left - GPU-accelerated */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-24px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Fade In Right - GPU-accelerated */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(24px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Scale In - GPU-accelerated */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale3d(0.88, 0.88, 1);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 24px rgba(124, 92, 248, 0.32);
    }
    50% {
        box-shadow: 0 0 42px rgba(124, 92, 248, 0.62);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1100px 0;
    }
    100% {
        background-position: 1100px 0;
    }
}

/* Bounce - GPU-accelerated */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40% {
        transform: translate3d(0, -18px, 0);
    }
    60% {
        transform: translate3d(0, -9px, 0);
    }
}

/* Slide In From Bottom - GPU-accelerated */
@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translate3d(0, 55px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 52%;
    }
    50% {
        background-position: 100% 52%;
    }
    100% {
        background-position: 0% 52%;
    }
}

/* Utility Animation Classes */

/* Fade animations */
.animate-fade-in {
    animation: fadeInUp 0.55s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.55s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.55s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.55s ease-out forwards;
}

/* Scale animation */
.animate-scale {
    animation: scaleIn 0.45s ease-out forwards;
}

/* Delay classes */
.delay-100 { animation-delay: 0.12s; }
.delay-200 { animation-delay: 0.22s; }
.delay-300 { animation-delay: 0.32s; }
.delay-400 { animation-delay: 0.42s; }
.delay-500 { animation-delay: 0.52s; }
.delay-600 { animation-delay: 0.62s; }
.delay-700 { animation-delay: 0.72s; }
.delay-800 { animation-delay: 0.82s; }

/* Intersection Observer Animation Support */
.fade-in-section {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow {
    transition: box-shadow 0.22s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 34px rgba(124, 92, 248, 0.52);
}

/* Loading Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4.5px solid rgba(124, 92, 248, 0.22);
    border-top-color: var(--dk-primary);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
}

.progress-bar {
    animation: progressFill 2.2s ease-out forwards;
}

/* Text Shimmer Effect */
.text-shimmer {
    background: linear-gradient(
        90deg,
        var(--dk-primary) 0%,
        var(--dk-primary-light) 50%,
        var(--dk-primary) 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3.3s linear infinite;
}

/* Ripple Effect - GPU-accelerated */
@keyframes ripple {
    0% {
        transform: scale3d(0, 0, 1);
        opacity: 1;
    }
    100% {
        transform: scale3d(4.2, 4.2, 1);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(124, 92, 248, 0.52);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ripple-effect:active::after {
    width: 110px;
    height: 110px;
    animation: ripple 0.65s ease-out;
}

/* Gradient Background Animation */
.animated-gradient {
    background: linear-gradient(
        275deg,
        var(--dk-primary),
        var(--dk-accent),
        var(--dk-deep)
    );
    background-size: 420% 420%;
    animation: gradientShift 8.5s ease infinite;
}

/* Parallax Effect Support */
.parallax-slow {
    transition: transform 0.55s cubic-bezier(0.22, 0.82, 0.22, 1);
}

/* Smooth Reveal on Scroll */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translate3d(0, 18px, 0);
        transition: opacity 0.45s ease-out, transform 0.45s ease-out;
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Accessibility - Respect Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .dk-stars {
        animation: none;
    }
    
    .dk-hero-core {
        animation: none;
    }
    
    .dk-hero-ring {
        animation: none;
    }
}

