/* ==========================================================================
   Recustomer Engineer Entrance Book - Animations (Light Theme)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fade In Animations
   -------------------------------------------------------------------------- */
.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.9s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   Scroll-based Animations
   -------------------------------------------------------------------------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

/* Stagger children animation */
.animate-on-scroll.stagger > * {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-on-scroll.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.animate-on-scroll.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.animate-on-scroll.stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.animate-on-scroll.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.animate-on-scroll.stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.animate-on-scroll.stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.animate-on-scroll.stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }

.animate-on-scroll.stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Glow Effects - Subtle for Light Theme
   -------------------------------------------------------------------------- */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    }
    50% {
        box-shadow: 0 8px 36px rgba(0, 0, 0, 0.08);
    }
}

.glow-effect {
    animation: glow 4s ease-in-out infinite;
}

/* Text Glow - Disabled for minimal design */
@keyframes textGlow {
    0%, 100% {
        text-shadow: none;
    }
    50% {
        text-shadow: none;
    }
}

.text-glow {
    animation: none;
}

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

.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

/* --------------------------------------------------------------------------
   Float Animation
   -------------------------------------------------------------------------- */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

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

/* --------------------------------------------------------------------------
   Pulse Animation
   -------------------------------------------------------------------------- */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.015);
    }
}

.pulse {
    animation: pulse 2.5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Particle Animations - Light Theme
   -------------------------------------------------------------------------- */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.1));
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.1);
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

.particle-1 { animation: particleFloat 18s linear infinite; left: 10%; animation-delay: 0s; }
.particle-2 { animation: particleFloat 22s linear infinite; left: 20%; animation-delay: 2s; }
.particle-3 { animation: particleFloat 28s linear infinite; left: 30%; animation-delay: 4s; }
.particle-4 { animation: particleFloat 20s linear infinite; left: 40%; animation-delay: 1s; }
.particle-5 { animation: particleFloat 25s linear infinite; left: 50%; animation-delay: 3s; }
.particle-6 { animation: particleFloat 19s linear infinite; left: 60%; animation-delay: 5s; }
.particle-7 { animation: particleFloat 23s linear infinite; left: 70%; animation-delay: 2s; }
.particle-8 { animation: particleFloat 21s linear infinite; left: 80%; animation-delay: 4s; }
.particle-9 { animation: particleFloat 26s linear infinite; left: 90%; animation-delay: 1s; }

/* --------------------------------------------------------------------------
   Counter Animation
   -------------------------------------------------------------------------- */
.counter-animate {
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --------------------------------------------------------------------------
   Card Hover Effects - Light Theme
   -------------------------------------------------------------------------- */
.card-hover-effect {
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                border-color 0.4s ease;
}

.card-hover-effect:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.1);
}

/* Premium Card Lift Effect */
.card-lift {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.card-lift:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.12),
                0 16px 32px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.02);
}

/* Subtle Shine Effect */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.8s ease;
}

.shine-effect:hover::after {
    left: 150%;
}

/* --------------------------------------------------------------------------
   Border Gradient Animation - Muted for Light Theme
   -------------------------------------------------------------------------- */
@keyframes borderGradient {
    0%, 100% {
        border-color: rgba(0, 0, 0, 0.06);
    }
    33% {
        border-color: rgba(0, 0, 0, 0.1);
    }
    66% {
        border-color: rgba(0, 0, 0, 0.06);
    }
}

.border-gradient-animated {
    animation: borderGradient 5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Typing Animation
   -------------------------------------------------------------------------- */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--color-text-primary); }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--color-text-primary);
    animation: typing 3.5s steps(40, end), blink 0.8s step-end infinite;
}

/* --------------------------------------------------------------------------
   Ripple Effect
   -------------------------------------------------------------------------- */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.7s ease, height 0.7s ease;
}

.ripple:active::after {
    width: 350px;
    height: 350px;
}

/* --------------------------------------------------------------------------
   Shimmer Loading Effect - Light Theme
   -------------------------------------------------------------------------- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        var(--color-bg-secondary) 25%,
        var(--color-bg-primary) 50%,
        var(--color-bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite;
}

/* --------------------------------------------------------------------------
   Slide In Animations
   -------------------------------------------------------------------------- */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.slide-in-right {
    animation: slideInRight 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* --------------------------------------------------------------------------
   Scale Animations
   -------------------------------------------------------------------------- */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* --------------------------------------------------------------------------
   Bounce Animation
   -------------------------------------------------------------------------- */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-18px);
    }
    70% {
        transform: translateY(-9px);
    }
    90% {
        transform: translateY(-4px);
    }
}

.bounce {
    animation: bounce 2.5s ease infinite;
}

/* --------------------------------------------------------------------------
   Rotate Animation
   -------------------------------------------------------------------------- */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 12s linear infinite;
}

/* --------------------------------------------------------------------------
   Spin Animation (for loading)
   -------------------------------------------------------------------------- */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1.2s linear infinite;
}

/* --------------------------------------------------------------------------
   Parallax Effect (via CSS transform)
   -------------------------------------------------------------------------- */
.parallax-slow {
    will-change: transform;
    transition: transform 0.15s linear;
}

.parallax-fast {
    will-change: transform;
    transition: transform 0.08s linear;
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
