// ============================================================================
// Poster
// ============================================================================

////
/// 
/// Zoom Animations Mixin Module
/// ===========================================================================
/// 
/// This module ...
/// 
/// 
/// @group Animations
/// @author Scape Agency
/// @link https://move.gl
/// @since 0.1.0 initial release
/// @todo None
/// @access public
/// 
////


// ============================================================================
// Use
// ============================================================================

@use "../dev" as *;
@use "../variables" as *;
@use "../keyframes" as *;
@use "base" as *;


// ============================================================================
// Mixins
// ============================================================================


///
/// Zoom Animation
/// Creates a zoom effect by scaling an element.
/// 
/// @name animate_zoom
/// @param {Number} $scale [1.5] - The scale factor at the peak of the animation.
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
/// 
@mixin animate_zoom(
    $scale: 1.5, 
    $duration: $animate_base_duration, 
    $timing_function: ease-in-out, 
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_zoom,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_zoom {
        0%, 100% { transform: scale(1); }
        50% { transform: scale($scale); }
    }
}



// Gentle Zoom Animation
// ----------------------------------------------------------------------------

///
/// Gentle Zoom Animation
/// A slower and subtler zoom animation.
/// 
/// @name animate_zoom_slow
/// @param {Number} $scale [1.3] - The scale factor at the peak of the animation.
/// @param {Duration} $duration [$animate_base_duration_slow] - The duration of the animation.
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
///
@mixin animate_zoom_slow(
    $scale: 1.3, 
    $duration: $animate_base_duration_slow,
    $timing_function: ease-in-out, 
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_zoom_slow,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_zoom_slow {
        0%, 100% { transform: scale(1); }
        50% { transform: scale($scale); }
    }
}



// Rapid Zoom Animation
// ----------------------------------------------------------------------------

///
/// Rapid Zoom Animation
/// A faster and more intense zoom animation.
/// @name animate_zoom_fast
/// @param {Number} $scale [1.7] - The scale factor at the peak of the animation.
/// @param {Duration} $duration [$animate_base_duration_fast] - The duration of the animation.
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
///
@mixin animate_zoom_fast(
    $scale: 1.7, 
    $duration: $animate_base_duration_fast, 
    $timing_function: ease-in-out, 
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_zoom_fast,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_zoom_fast {
        0%, 100% { transform: scale(1); }
        50% { transform: scale($scale); }
    }
}


// Zoom with Fade Animation
// ----------------------------------------------------------------------------

///
/// Zoom with Fade Animation
/// Combines zoom with a fade effect.
/// @name animate_zoom_fade
/// @param {Number} $scale [1.5] - The scale factor at the peak of the animation.
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
///
@mixin animate_zoom_fade(
    $scale: 1.5, 
    $duration: $animate_base_duration, 
    $timing_function: ease-in-out, 
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_zoom_fade,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_zoom_fade {
        0%, 100% { 
            transform: scale(1); 
            opacity: 1;
        }
        50% { 
            transform: scale($scale); 
            opacity: 0.5;
        }
    }
}
