/* ============================================
   ETHICSCOMPUTER - PROFESSIONAL ANIMATIONS
   Ultra-smooth, modern animations & transitions
   ============================================ */

/* === ROOT VARIABLES === */
:root {
    --animation-speed: 0.6s;
    --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --bounce-timing: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* === SMOOTH SCROLL === */
html {
    scroll-behavior: smooth;
}

/* === SCROLL REVEAL ANIMATIONS === */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* === GRADIENT ANIMATIONS === */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

.gradient-text {
    background: linear-gradient(90deg, #3b82f6, #14b8a6, #8b5cf6, #3b82f6);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 5s ease infinite;
}

/* === FLOATING ANIMATIONS === */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

/* === PULSE ANIMATIONS === */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* === BOUNCE ANIMATION === */
@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.animate-bounce-in {
    animation: bounce-in 0.8s var(--bounce-timing);
}

/* === SLIDE IN ANIMATIONS === */
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-left {
    animation: slide-in-left 0.8s var(--animation-timing);
}

.animate-slide-right {
    animation: slide-in-right 0.8s var(--animation-timing);
}

/* === FADE IN ANIMATIONS === */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s var(--animation-timing);
}

/* === ROTATE ANIMATIONS === */
@keyframes rotate-360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-rotate {
    animation: rotate-360 2s linear infinite;
}

.animate-rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

/* === WIGGLE ANIMATION === */
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.animate-wiggle:hover {
    animation: wiggle 0.5s ease-in-out;
}

/* === CARD HOVER EFFECTS === */
.card-hover {
    transition: all 0.4s var(--animation-timing);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-hover:hover::before {
    left: 100%;
}

/* === GLASS EFFECT WITH ANIMATION === */
.glass {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s var(--animation-timing);
}

.glass:hover {
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* === BUTTON ANIMATIONS === */
.btn-ripple {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--animation-timing);
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:hover::before {
    width: 300px;
    height: 300px;
}

.btn-ripple:active {
    transform: scale(0.95);
}

/* === HOVER GLOW EFFECT === */
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.8), 0 0 60px rgba(59, 130, 246, 0.4); }
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* === FLIP CARD ANIMATIONS === */
.flip-card {
    perspective: 1000px;
    height: 100%;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* === COUNTER ANIMATION === */
@keyframes count-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-counter] {
    animation: count-up 0.6s ease;
}

/* === PROGRESS BAR ANIMATION === */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #14b8a6);
    border-radius: 10px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === TEXT TYPING ANIMATION === */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    50% { border-color: transparent; }
}

.typing-animation {
    overflow: hidden;
    border-right: 3px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* === SHAKE ANIMATION === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.5s ease;
}

/* === ZOOM IN/OUT === */
@keyframes zoom-in {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-zoom-in {
    animation: zoom-in 0.6s var(--animation-timing);
}

/* === PARTICLE EFFECT BACKGROUND === */
@keyframes particle-float {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    50% {
        transform: translate(50px, -50px);
        opacity: 0.6;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    animation: particle-float 8s ease-in-out infinite;
}

/* === CAROUSEL ANIMATIONS === */
.carousel-container {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    transition: all 0.4s var(--animation-timing);
}

.carousel-item:hover {
    transform: scale(1.05);
}

/* === STAGGER ANIMATIONS === */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--animation-timing);
}

.stagger-item.active {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }

/* === LOADING ANIMATIONS === */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* === ATTENTION SEEKERS === */
@keyframes bounce-attention {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.animate-bounce-attention {
    animation: bounce-attention 2s ease infinite;
}

/* === HOVER LIFT EFFECT === */
.hover-lift {
    transition: all 0.3s var(--animation-timing);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* === MORPHING SHAPES === */
@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

.animate-morph {
    animation: morph 8s ease-in-out infinite;
}

/* === NEON GLOW === */
@keyframes neon-glow {
    0%, 100% {
        text-shadow: 0 0 10px #3b82f6, 0 0 20px #3b82f6, 0 0 30px #3b82f6;
    }
    50% {
        text-shadow: 0 0 20px #3b82f6, 0 0 30px #3b82f6, 0 0 40px #3b82f6, 0 0 50px #3b82f6;
    }
}

.neon-text {
    animation: neon-glow 2s ease-in-out infinite;
}

/* === BACKGROUND PATTERNS === */
@keyframes pattern-move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.animated-pattern {
    animation: pattern-move 20s linear infinite;
}

/* === 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;
    }
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 768px) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        transform: translateY(20px);
    }
    
    .card-hover:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .hover-lift:hover {
        transform: translateY(-4px);
    }
}

/* === PERFORMANCE OPTIMIZATIONS === */
.will-animate {
    will-change: transform, opacity;
}

/* Force GPU acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

