/* ================================
   ANIMATIONS & TRANSITIONS
   ================================ */

/* Floating animation for hero elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale in animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse animation for play button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Number counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Creative text glow pulse */
@keyframes glowPulse {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(232, 228, 92, 0.5),
            0 0 40px rgba(232, 228, 92, 0.3),
            0 0 60px rgba(232, 228, 92, 0.2);
    }
    50% {
        text-shadow: 
            0 0 30px rgba(232, 228, 92, 0.8),
            0 0 60px rgba(232, 228, 92, 0.5),
            0 0 90px rgba(232, 228, 92, 0.3);
    }
}

/* Creative text gradient flow */
@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

/* Subtle float for creative text */
@keyframes subtleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ================================
   ALTERNATIVE CREATIVE ANIMATIONS
   ================================ */

/* Option 1: Pulsing Scale Effect */
@keyframes pulseScale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Option 2: Neon Flicker */
@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 10px rgba(232, 228, 92, 0.8),
            0 0 20px rgba(232, 228, 92, 0.6),
            0 0 30px rgba(232, 228, 92, 0.4),
            0 0 40px rgba(232, 228, 92, 0.2);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* Option 3: Glitch Effect */
@keyframes glitch {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

/* Option 4: 3D Rotate */
@keyframes rotate3D {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }
    50% {
        transform: perspective(1000px) rotateY(10deg);
    }
    100% {
        transform: perspective(1000px) rotateY(0deg);
    }
}

/* Option 5: Bounce Effect */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-15px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-7px);
    }
}

/* Option 6: Wave Effect (for individual letters) */
@keyframes wave {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Option 7: Color Shift (simpler gradient) */
@keyframes colorShift {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1.2);
    }
    50% {
        filter: hue-rotate(15deg) brightness(1.5);
    }
}

/* Option 8: Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -100% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* ================================
   TAGLINE/SUBTEXT ANIMATIONS
   ================================ */

/* Typewriter effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCaret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--color-yellow);
    }
}

/* Gradient wave */
@keyframes gradientWave {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Slide in from bottom with bounce */
@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(5px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Glowing emphasis */
@keyframes glowEmphasis {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(232, 228, 92, 0.2),
            0 0 20px rgba(232, 228, 92, 0.1);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(232, 228, 92, 0.6),
            0 0 40px rgba(232, 228, 92, 0.4),
            0 0 60px rgba(232, 228, 92, 0.2);
    }
}

/* Scale pulse for emphasis */
@keyframes scalePulseSubtle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Letter spacing expand */
@keyframes letterSpaceExpand {
    0%, 100% {
        letter-spacing: 0.02em;
    }
    50% {
        letter-spacing: 0.15em;
    }
}

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

/* Elements with scroll animation class */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for grid items */
.case-study-card {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.case-study-card:nth-child(1) {
    animation-delay: 0.1s;
}

.case-study-card:nth-child(2) {
    animation-delay: 0.2s;
}

.case-study-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Service items animation */
.service-item {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.service-item:nth-child(1) {
    animation-delay: 0.15s;
}

.service-item:nth-child(2) {
    animation-delay: 0.3s;
}

.service-item:nth-child(3) {
    animation-delay: 0.45s;
}

/* Metric cards animation */
.metric-card {
    animation: scaleIn 0.6s ease forwards;
    opacity: 0;
}

.metric-card:nth-child(1) {
    animation-delay: 0.1s;
}

.metric-card:nth-child(2) {
    animation-delay: 0.2s;
}

.metric-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* ================================
   HOVER EFFECTS
   ================================ */

/* Smooth hover lift */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Button hover ripple effect */
.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Play button pulse on hover */
.play-button {
    position: relative;
}

.case-study-card:hover .play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s infinite;
}

/* ================================
   MODAL ANIMATIONS
   ================================ */

.video-modal {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: scaleIn 0.4s ease;
}

/* ================================
   LOADING STATES
   ================================ */

/* Skeleton loading for images */
.thumbnail-img {
    background: linear-gradient(
        90deg,
        #808080 0%,
        #999999 50%,
        #808080 100%
    );
    background-size: 200% 100%;
}

.thumbnail-img[src] {
    animation: none;
    background: none;
}

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

/* ================================
   PAGE LOAD ANIMATIONS
   ================================ */

.hero-title {
    animation: fadeIn 1.2s ease forwards;
}

.hero-tagline {
    animation: fadeIn 1.2s ease 0.3s forwards;
    opacity: 0;
}

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

/* Smooth color transitions */
* {
    transition-property: color, background-color, border-color;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Override for elements that need specific transitions */
a, button, .case-study-card, .service-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   REDUCED MOTION
   ================================ */

/* Respect user's motion preferences */
@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;
    }
    
    .floating-element {
        animation: none;
    }
}

