/* ============================================================
   if-max Teknoloji — Animasyonlar
   ============================================================ */

/* ---- Keyframes ---- */

/* Scroll Wheel */
@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

/* Floating Shapes */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -40px) rotate(90deg); }
    50% { transform: translate(-20px, -70px) rotate(180deg); }
    75% { transform: translate(40px, -30px) rotate(270deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-40px, 30px) rotate(-90deg); }
    50% { transform: translate(30px, -50px) rotate(-180deg); }
    75% { transform: translate(-20px, 40px) rotate(-270deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.1); }
}

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

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

/* Marquee */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---- Floating Shapes ---- */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero .shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float1 20s ease-in-out infinite;
}

.hero .shape-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation: float2 25s ease-in-out infinite;
}

.hero .shape-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    top: 40%;
    left: 20%;
    animation: float3 15s ease-in-out infinite;
}

.hero .shape-4 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    top: 20%;
    right: 25%;
    animation: float2 18s ease-in-out infinite reverse;
}

.hero .shape-5 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
    bottom: 10%;
    right: 10%;
    animation: float1 22s ease-in-out infinite reverse;
}

/* CTA Banner Shapes */
.cta-banner .shape-1 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation: float1 18s ease-in-out infinite;
}

.cta-banner .shape-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    bottom: -80px;
    right: -80px;
    animation: float2 22s ease-in-out infinite;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered delays for grid items */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* ---- Hero Fade In ---- */
.hero .fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.hero .fade-in:nth-child(1) { animation-delay: 0.2s; }
.hero .fade-in:nth-child(2) { animation-delay: 0.4s; }
.hero .fade-in:nth-child(3) { animation-delay: 0.6s; }
.hero .fade-in:nth-child(4) { animation-delay: 0.8s; }

/* ---- Gradient Text Animation ---- */
.gradient-text {
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

/* ---- Counter Animation ---- */
.stat-number {
    transition: all 0.3s ease;
}

/* ---- Hover Microinteractions ---- */

/* Card lift */
.service-card,
.value-card,
.why-item,
.step-content {
    will-change: transform;
}

/* Button ripple effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Icon rotation on hover */
.service-icon,
.why-icon,
.step-icon,
.value-icon {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon,
.why-item:hover .why-icon,
.step-content:hover .step-icon,
.value-card:hover .value-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Nav link underline animation */
.nav-link::after {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Social link hover */
.social-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* FAQ smooth open/close */
.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Testimonial slide transition */
.testimonial-track {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero .fade-in {
        opacity: 1;
        transform: none;
    }

    .tech-track {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}
