/* 
    TechDwar Solutions - Premium Animations
    Refined micro-animations for light theme.
*/

/* === KEYFRAMES === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero-specific floating particles */
@keyframes particle-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    25% { transform: translate(30px, -40px) scale(1.1); opacity: 0.5; }
    50% { transform: translate(-20px, -80px) scale(0.9); opacity: 0.2; }
    75% { transform: translate(40px, -40px) scale(1.05); opacity: 0.4; }
}

@keyframes particle-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    33% { transform: translate(-40px, -50px) scale(1.15); opacity: 0.4; }
    66% { transform: translate(20px, -100px) scale(0.85); opacity: 0.3; }
}

@keyframes ambient-glow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.2)); box-shadow: 0 0 15px rgba(212, 175, 55, 0.2); }
    50% { filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4)); box-shadow: 0 0 30px rgba(212, 175, 55, 0.4); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.02); }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

/* === ANIMATION CLASSES === */
.animate-ambient-glow {
    animation: ambient-glow 4s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

.animate-orbit {
    animation: orbit 15s linear infinite;
    display: inline-block;
}

.animate-fade {
    animation: fadeInUp 0.8s var(--transition) forwards;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.animate-slide-left {
    animation: fadeInLeft 0.8s var(--transition) forwards;
}

.animate-slide-right {
    animation: fadeInRight 0.8s var(--transition) forwards;
}

.animate-scale {
    animation: scaleIn 0.8s var(--transition) forwards;
}

.animate-float {
    animation: float 5s ease-in-out infinite;
}

/* === DELAY UTILITIES === */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }

/* === CARD HOVER EFFECTS === */
.card-hover-lift {
    transition: all 0.4s var(--transition);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

/* Glow ring on card hover */
.card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent 40%, rgba(212, 175, 55, 0.15) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--transition);
    pointer-events: none;
    z-index: -1;
}

.card {
    position: relative;
}

.card:hover::after {
    opacity: 1;
}

/* === BUTTON INTERACTION === */
.btn-primary::before,
.btn-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: all 0.6s var(--transition);
}

.btn-primary:hover::before,
.btn-accent:hover::before {
    left: 100%;
}

/* === COUNTER ANIMATION HELPER === */
.counter-value {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* === HERO PARTICLES === */
.hero-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    pointer-events: none;
}

.hero-particle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 10%;
    animation: particle-float-1 12s ease-in-out infinite;
    filter: blur(60px);
}

.hero-particle:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 5%;
    animation: particle-float-2 15s ease-in-out infinite;
    filter: blur(50px);
}

.hero-particle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 30%;
    animation: particle-float-1 18s ease-in-out infinite reverse;
    filter: blur(40px);
    background: rgba(10, 31, 68, 0.1);
}

/* === MARQUEE / TICKER === */
.ticker-track {
    display: flex;
    gap: 4rem;
    animation: ticker 25s linear infinite;
    white-space: nowrap;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === LINK UNDERLINE EFFECT === */
.link-underline {
    position: relative;
    display: inline-block;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s var(--transition);
}

.link-underline:hover::after {
    width: 100%;
}

/* === HERO NEXT-GEN KEYFRAMES === */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes badge-glow {
    0%, 100% { border-color: rgba(212,175,55,0.2); box-shadow: 0 0 0 rgba(212,175,55,0); }
    50% { border-color: rgba(212,175,55,0.4); box-shadow: 0 0 15px rgba(212,175,55,0.1); }
}

@keyframes dashboard-float {
    0%, 100% { transform: rotateY(-8deg) rotateX(4deg) translateY(0); }
    50% { transform: rotateY(-8deg) rotateX(4deg) translateY(-12px); }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(212,175,55,0.3), 0 8px 32px -8px rgba(212,175,55,0.4); }
    50% { box-shadow: 0 0 30px rgba(212,175,55,0.45), 0 8px 32px -8px rgba(212,175,55,0.5); }
}

@keyframes bar-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes chart-grow {
    from { transform: scaleY(0); opacity: 0; }
    to { transform: scaleY(1); opacity: 1; }
}

@keyframes hero-stagger-in {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === SERVICES NEXT-GEN KEYFRAMES === */
@keyframes border-rotate {
    from { --glow-angle: 0deg; }
    to { --glow-angle: 360deg; }
}

@property --glow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes modal-in {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* === AI BUSINESS ANALYZER KEYFRAMES === */
@keyframes aba-step-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes aba-tag-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes aba-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes aba-spin {
    to { transform: rotate(360deg); }
}

/* === LIVE PROJECT TRACKER KEYFRAMES === */
@keyframes lpt-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 8px 2px rgba(52,211,153,0.2); }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
