/* ============================================
   TECHenya Solutions — Animations CSS
   Custom keyframes and animation utilities
   beyond Tailwind's built-in animations.
   ============================================ */

/* ─── Scroll-triggered entrance animations ──── */
[data-aos] {
    transition-property: opacity, transform;
}

/* ─── Parallax layers ───────────────────────── */
.te-parallax {
    transform: translateZ(0);
    will-change: transform;
}

.te-parallax-slow {
    transition: transform 0.1s linear;
}

/* ─── Hover animations ──────────────────────── */
.te-hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.te-hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.te-hover-glow:hover {
    box-shadow: 0 0 20px rgba(31, 116, 172, 0.3);
}

.te-hover-scale {
    transition: transform 0.3s;
}

.te-hover-scale:hover {
    transform: scale(1.03);
}

/* ─── Pulse ring animation ──────────────────── */
.te-pulse-ring {
    position: relative;
}

.te-pulse-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid #1f74ac;
    animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.95);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* ─── Gradient shift ────────────────────────── */
.te-gradient-shift {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ─── Counter animation helper ──────────────── */
.te-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ─── Staggered children ────────────────────── */
.te-stagger>*:nth-child(1) {
    animation-delay: 0.1s;
}

.te-stagger>*:nth-child(2) {
    animation-delay: 0.2s;
}

.te-stagger>*:nth-child(3) {
    animation-delay: 0.3s;
}

.te-stagger>*:nth-child(4) {
    animation-delay: 0.4s;
}

.te-stagger>*:nth-child(5) {
    animation-delay: 0.5s;
}

.te-stagger>*:nth-child(6) {
    animation-delay: 0.6s;
}

.te-stagger>*:nth-child(7) {
    animation-delay: 0.7s;
}

.te-stagger>*:nth-child(8) {
    animation-delay: 0.8s;
}

/* ─── Typewriter ────────────────────────────── */
.te-typewriter {
    border-right: 3px solid #1f74ac;
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ─── Marquee / infinite scroll ─────────────── */
.te-marquee {
    display: flex;
    gap: 2rem;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ─── Ripple on click ───────────────────────── */
.te-ripple {
    position: relative;
    overflow: hidden;
}

.te-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.8s;
}

.te-ripple:active::after {
    transform: scale(0);
    opacity: 0.3;
    transition: 0s;
}

/* ─── Underline draw ────────────────────────── */
.te-underline-draw {
    position: relative;
    display: inline-block;
}

.te-underline-draw::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1f74ac;
    transition: width 0.3s ease;
}

.te-underline-draw:hover::after {
    width: 100%;
}

/* ─── Skeleton loading ──────────────────────── */
.te-skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ─── Modal / Popup animations ──────────────── */
.te-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.te-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.te-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.te-modal-content.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ─── Reduced motion ────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .te-marquee {
        animation: none;
    }

    .te-parallax {
        transform: none !important;
    }
}