/* ===== TYPEWRITER ANIMATIONS ===== */

.cursor,
.cursor-small {
    animation: blink 1s infinite;
    font-weight: 300;
    color: #000;
}

.cursor-small {
    font-size: 0.9em;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Typewriter container */
#typewriter-text,
#about-typewriter {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
}

/* ===== SCROLL ANIMATIONS ===== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Service cards entrance */
.service-card {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.service-card.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for service cards */
.service-card:nth-child(1) {
    transition-delay: 0.1s;
}

.service-card:nth-child(2) {
    transition-delay: 0.2s;
}

.service-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* ===== HOVER ANIMATIONS ===== */

.service-card {
    transform-origin: center;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* CTA Button pulse effect */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

/* ===== FORM ANIMATIONS ===== */

.form-group input,
.form-group select,
.form-group textarea {
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: scale(1.02);
}

/* Submit button loading animation */
.btn-loader {
    display: inline-block;
}

.btn-loader::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top: 2px solid transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== NAVIGATION ANIMATIONS ===== */

.nav {
    transform: translateY(-100%);
    animation: slideDown 0.5s ease forwards;
}

@keyframes slideDown {
    to {
        transform: translateY(0);
    }
}

/* ===== HERO ENTRANCE ===== */

.hero-container {
    opacity: 0;
    transform: translateY(50px);
    animation: heroEntrance 1s ease 0.5s forwards;
}

@keyframes heroEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SECTION REVEAL ===== */

.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== STATS COUNTER ANIMATION ===== */

.stat-number {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.stat-number.animate {
    opacity: 1;
    transform: scale(1);
}

/* ===== LOGO ANIMATION ===== */

.logo {
    transition: transform 0.3s ease;
}

.nav-logo:hover .logo {
    transform: rotate(360deg);
}

/* ===== FOOTER LINKS HOVER ===== */

.footer-section ul li a {
    position: relative;
    display: inline-block;
}

.footer-section ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background: #fff;
    transition: width 0.3s ease;
}

.footer-section ul li a:hover::after {
    width: 100%;
}

/* ===== MOBILE ANIMATIONS ===== */

@media (max-width: 768px) {
    .service-card:hover {
        transform: translateY(-2px);
    }

    .cta-button:hover {
        transform: none;
    }
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    .cursor,
    .cursor-small {
        animation: none;
    }

    .fade-in,
    .service-card,
    .section-reveal,
    .hero-container {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }

    .nav {
        animation: none;
        transform: none;
    }

    .btn-loader::after {
        animation: none;
    }
}