/**
 * ALD GROUP - Ortak Animasyon Sistemi
 * Scroll reveal, fade, slide, scale animasyonları
 */

/* Base Animation Classes */
[data-animate] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].animated {
    opacity: 1;
}

/* Fade Animations */
.fade-up {
    transform: translateY(60px);
}

.fade-up.animated {
    transform: translateY(0);
}

.fade-down {
    transform: translateY(-60px);
}

.fade-down.animated {
    transform: translateY(0);
}

.fade-left {
    transform: translateX(60px);
}

.fade-left.animated {
    transform: translateX(0);
}

.fade-right {
    transform: translateX(-60px);
}

.fade-right.animated {
    transform: translateX(0);
}

.fade-in {
    opacity: 0;
}

.fade-in.animated {
    opacity: 1;
}

/* Scale Animations */
.scale-up {
    transform: scale(0.8);
}

.scale-up.animated {
    transform: scale(1);
}

.scale-down {
    transform: scale(1.2);
}

.scale-down.animated {
    transform: scale(1);
}

/* Rotate Animations */
.rotate-in {
    transform: rotate(-10deg) scale(0.9);
}

.rotate-in.animated {
    transform: rotate(0) scale(1);
}

/* Clip Animations */
.clip-up {
    clip-path: inset(100% 0 0 0);
}

.clip-up.animated {
    clip-path: inset(0 0 0 0);
}

.clip-down {
    clip-path: inset(0 0 100% 0);
}

.clip-down.animated {
    clip-path: inset(0 0 0 0);
}

.clip-left {
    clip-path: inset(0 100% 0 0);
}

.clip-left.animated {
    clip-path: inset(0 0 0 0);
}

.clip-right {
    clip-path: inset(0 0 0 100%);
}

.clip-right.animated {
    clip-path: inset(0 0 0 0);
}

/* Stagger Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

/* Duration Modifiers */
.duration-fast { transition-duration: 0.4s; }
.duration-normal { transition-duration: 0.8s; }
.duration-slow { transition-duration: 1.2s; }
.duration-slower { transition-duration: 1.6s; }

/* Easing Modifiers */
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.ease-bounce { transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.animated span {
    transform: translateY(0);
}

/* Split Text Animation */
.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.split-text.animated .char {
    opacity: 1;
    transform: translateY(0);
}

/* Line Draw Animation */
.line-draw {
    position: relative;
}

.line-draw::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.line-draw.animated::after {
    width: 100%;
}

/* Image Reveal */
.img-reveal {
    position: relative;
    overflow: hidden;
}

.img-reveal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #FAFAFA;
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.img-reveal.animated::before {
    transform: scaleX(0);
}

.img-reveal img {
    transform: scale(1.2);
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-reveal.animated img {
    transform: scale(1);
}

/* Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Parallax Classes */
.parallax-slow {
    will-change: transform;
}

.parallax-medium {
    will-change: transform;
}

.parallax-fast {
    will-change: transform;
}

/* Hover Morphing */
.morph-circle {
    border-radius: 0;
    transition: border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.morph-circle:hover {
    border-radius: 50%;
}

.morph-expand {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.morph-expand:hover {
    transform: scale(1.05);
}

/* Magnetic Effect Base */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #C4A77D, #E2B93B);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* Section Transitions */
.section-transition {
    position: relative;
}

.section-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, #FAFAFA, transparent);
    pointer-events: none;
    z-index: 10;
}

/* Keyframe Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-shake { animation: shake 0.5s ease-in-out; }
.animate-spin { animation: spin 1s linear infinite; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
