/* ============================================================
   SHIV TECHNOLOGIES — Animations
   ============================================================
   Custom keyframe animations, transitions, and effects
   Updated for white-dominant premium theme
   ============================================================ */

/* ── Keyframe Animations ── */

@keyframes loaderSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(27, 58, 92, 0.1),
                    0 0 20px rgba(27, 58, 92, 0.05);
    }
    50% {
        box-shadow: 0 0 20px rgba(27, 58, 92, 0.15),
                    0 0 40px rgba(27, 58, 92, 0.08);
    }
}

@keyframes textShimmer {
    0% { background-position: -500% center; }
    100% { background-position: 500% center; }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

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

@keyframes dash {
    to { stroke-dashoffset: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* ── Animation Utility Classes ── */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

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

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

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

.animate-zoom-in {
    animation: zoomIn 0.6s ease forwards;
}

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

.animate-bounce {
    animation: bounceSlow 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate360 20s linear infinite;
}

.animate-rotate-reverse {
    animation: rotateReverse 25s linear infinite;
}

/* Animation delays */
.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; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* ── Hover Effects ── */

/* Card tilt on hover */
.hover-tilt {
    transition: transform 0.3s ease;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-8px);
}

/* Glow on hover */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(27, 58, 92, 0.1),
                0 0 60px rgba(27, 58, 92, 0.05);
}

/* Scale on hover */
.hover-scale {
    transition: transform 0.3s ease;
}

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

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

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

/* Border glow */
.hover-border-glow {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hover-border-glow:hover {
    border-color: rgba(27, 58, 92, 0.2);
    box-shadow: 0 0 20px rgba(27, 58, 92, 0.06);
}

/* ── Loading Skeletons ── */
.skeleton {
    background: linear-gradient(90deg, 
        var(--gray-100) 25%, 
        var(--gray-50) 50%, 
        var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 10px;
    width: 100%;
}

.skeleton-text-sm {
    height: 12px;
    width: 60%;
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

/* ── Page Transition ── */
.page-transition {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

/* ── Ripple Effect on buttons ── */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

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

.ripple-effect:active::after {
    width: 300px;
    height: 300px;
}

/* ── Gradient text animation ── */
.animated-gradient-text {
    background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--brand-gold), var(--brand));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

/* ── Mouse follow cursor (handled by JS, CSS for the element) ── */
.cursor-follower {
    width: 20px;
    height: 20px;
    border: 2px solid var(--brand);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
    mix-blend-mode: difference;
    opacity: 0;
}

.cursor-follower.visible {
    opacity: 1;
}

.cursor-follower.hover {
    width: 50px;
    height: 50px;
    border-color: var(--brand-light);
}

/* Only show cursor follower on desktop */
@media (max-width: 991.98px) {
    .cursor-follower {
        display: none !important;
    }
}

/* ── Stagger Animation Container ── */
.stagger-container .stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-container.animated .stagger-item {
    animation: slideUp 0.5s ease forwards;
}

.stagger-container.animated .stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-container.animated .stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-container.animated .stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-container.animated .stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-container.animated .stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-container.animated .stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-container.animated .stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-container.animated .stagger-item:nth-child(8) { animation-delay: 0.8s; }
