/* ===================================================
   ANIMATIONS.CSS - Keyframes & Scroll Animations
   Cihan Garage Motosiklet - cihanmotor.com
   =================================================== */

/* --- Scroll Reveal Base --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal--left {
    transform: translateX(-30px);
}

.reveal--right {
    transform: translateX(30px);
}

.reveal--scale {
    transform: scale(0.95);
}

.reveal--left.active,
.reveal--right.active,
.reveal--scale.active {
    transform: none;
}

/* --- Staggered Children --- */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--i, 0) * 100ms);
}

.reveal-stagger.active > * {
    opacity: 1;
    transform: none;
}

/* --- Keyframes --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes lineGrow {
    from { width: 0; }
    to { width: 60px; }
}

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

/* --- Hero Animations --- */
.hero-title {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-cta-anim {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-badge {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

/* --- Floating Button Pulse --- */
.floating-btn {
    animation: pulse 2.5s ease-in-out infinite;
}

.floating-btn:hover {
    animation: none;
}

/* --- Glass Divider Animation --- */
.glass-divider {
    width: 0;
    transition: width 0.8s ease;
}

.glass-divider.active {
    width: 60px;
}

/* --- Gallery Placeholder Shimmer --- */
.gallery-card--placeholder {
    background: linear-gradient(
        90deg,
        var(--color-bg-secondary) 25%,
        var(--color-bg-tertiary) 50%,
        var(--color-bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

/* --- Counter Glow --- */
.stat-number.counting {
    text-shadow: 0 0 20px rgba(198, 40, 40, 0.5);
}

/* --- Page Transition --- */
.page-transition {
    animation: fadeIn 0.4s ease;
}

/* --- Respect Reduced 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;
    }

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

    .reveal-stagger > * {
        opacity: 1;
        transform: none;
    }

    .floating-btn {
        animation: none;
    }
}
