/* ═══════════════════════════════════════════════════════════════
   AI BUILD INFRA — CSS Animations
   Lightweight, performant scroll animations
   ═══════════════════════════════════════════════════════════════ */

/* ── Scroll Reveal Animations ───────────────────────────────── */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}
[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-down"] {
    transform: translateY(-30px);
}
[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: none;
}
[data-aos="fade-left"].aos-animate {
    transform: none;
}

[data-aos="fade-right"] {
    transform: none;
}
[data-aos="fade-right"].aos-animate {
    transform: none;
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}
[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

[data-aos="flip-up"] {
    transform: perspective(800px) rotateX(10deg);
}
[data-aos="flip-up"].aos-animate {
    transform: perspective(800px) rotateX(0);
}

/* Stagger delays */
[data-aos-delay="100"] { transition-delay: 100ms; }
[data-aos-delay="200"] { transition-delay: 200ms; }
[data-aos-delay="300"] { transition-delay: 300ms; }
[data-aos-delay="400"] { transition-delay: 400ms; }
[data-aos-delay="500"] { transition-delay: 500ms; }
[data-aos-delay="600"] { transition-delay: 600ms; }
[data-aos-delay="700"] { transition-delay: 700ms; }
[data-aos-delay="800"] { transition-delay: 800ms; }

/* ── Keyframe Animations ────────────────────────────────────── */

/* Pulse for CTAs */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* Float animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

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

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Glow effect */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(249,115,22,0.2); }
    50% { box-shadow: 0 0 30px rgba(249,115,22,0.4); }
}

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

/* Shimmer for logos */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Slide in from left */
@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Slide in from right */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Scale in */
@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

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

/* ── Logo Scroll (Trusted Companies) ────────────────────────── */
@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.logo-scroll-track {
    display: flex;
    animation: scrollLogos 25s linear infinite;
    width: max-content;
}

.logo-scroll-track:hover {
    animation-play-state: paused;
}

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

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientMove 8s ease infinite;
}

/* ── Dot Grid Background ────────────────────────────────────── */
.dot-grid {
    background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ── Hero Particles (CSS-only) ──────────────────────────────── */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(56,189,248,0.3);
    border-radius: 50%;
    animation: float var(--duration, 4s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.hero-particles .particle:nth-child(1) { top: 20%; left: 10%; --duration: 5s; --delay: 0s; }
.hero-particles .particle:nth-child(2) { top: 40%; left: 80%; --duration: 4s; --delay: 1s; width: 6px; height: 6px; background: rgba(249,115,22,0.2); }
.hero-particles .particle:nth-child(3) { top: 60%; left: 30%; --duration: 6s; --delay: 2s; }
.hero-particles .particle:nth-child(4) { top: 80%; left: 70%; --duration: 5s; --delay: 0.5s; width: 5px; height: 5px; }
.hero-particles .particle:nth-child(5) { top: 15%; left: 60%; --duration: 4.5s; --delay: 1.5s; background: rgba(249,115,22,0.15); }
.hero-particles .particle:nth-child(6) { top: 70%; left: 50%; --duration: 5.5s; --delay: 0.8s; width: 3px; height: 3px; }
.hero-particles .particle:nth-child(7) { top: 30%; left: 90%; --duration: 6s; --delay: 2.5s; background: rgba(249,115,22,0.2); width: 5px; height: 5px; }
.hero-particles .particle:nth-child(8) { top: 50%; left: 15%; --duration: 4s; --delay: 1.2s; }

/* ── Geometric Shapes ───────────────────────────────────────── */
.geo-shape {
    position: absolute;
    opacity: 0.06;
    pointer-events: none;
}

.geo-shape--circle {
    width: 300px;
    height: 300px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.geo-shape--ring {
    width: 200px;
    height: 200px;
    border: 1px solid var(--secondary);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

.geo-shape--dots {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 16px 16px;
    animation: float 5s ease-in-out infinite;
}

/* ── Typing Cursor ──────────────────────────────────────────── */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--secondary);
    margin-left: 2px;
}

/* ── Counter Animation ──────────────────────────────────────── */
.counter-animate {
    display: inline-block;
    transition: all 0.3s ease;
}

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

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
