/* ================================================
   ANIMATIONS - Matt Bangs Wood Website
   ================================================ */

/* Hero Content Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Tool Item Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Scroll Indicator Pulse */
@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Book Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotateY(-25deg) rotateX(5deg);
    }
    50% {
        transform: translateY(-20px) rotateY(-25deg) rotateX(5deg);
    }
}

/* Tool Ring Spin */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Measuring Tape Animation */
@keyframes measureOut {
    0% {
        width: 0;
    }
    100% {
        width: var(--measure-length, 100%);
    }
}

/* Drill Rotation */
@keyframes drillSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(720deg);
    }
}

/* Saw Motion */
@keyframes sawMotion {
    0%, 100% {
        transform: translateX(0) rotate(-45deg);
    }
    50% {
        transform: translateX(10px) rotate(-45deg);
    }
}

/* Hammer Strike */
@keyframes hammerStrike {
    0%, 80%, 100% {
        transform: rotate(0deg);
    }
    85% {
        transform: rotate(-45deg);
    }
    90% {
        transform: rotate(15deg);
    }
}

/* Wrench Turn */
@keyframes wrenchTurn {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(30deg);
    }
    75% {
        transform: rotate(-30deg);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
    }
    50% {
        box-shadow: 0 0 20px currentColor, 0 0 40px currentColor, 0 0 60px currentColor;
    }
}

/* Reveal Animation */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Blink Cursor */
@keyframes blink {
    0%, 100% {
        border-color: transparent;
    }
    50% {
        border-color: var(--navy, #1B3B5A);
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

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

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

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Progress Bar Fill */
@keyframes progressFill {
    from {
        width: 0;
    }
    to {
        width: var(--progress, 100%);
    }
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Construction Line Draw */
@keyframes lineDraw {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Blueprint Fade */
@keyframes blueprintFade {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Staggered Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }

/* Animation Utilities */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.from-left {
    transform: translateX(-50px);
}

.animate-on-scroll.from-left.is-visible {
    transform: translateX(0);
}

.animate-on-scroll.from-right {
    transform: translateX(50px);
}

.animate-on-scroll.from-right.is-visible {
    transform: translateX(0);
}

.animate-on-scroll.scale-up {
    transform: scale(0.8);
}

.animate-on-scroll.scale-up.is-visible {
    transform: scale(1);
}

/* Pause Animation on Hover */
.pause-on-hover:hover {
    animation-play-state: paused;
}

/* Slow Animation */
.slow {
    animation-duration: 3s;
}

/* Slower Animation */
.slower {
    animation-duration: 5s;
}

/* Fast Animation */
.fast {
    animation-duration: 0.5s;
}

/* Infinite Animation */
.infinite {
    animation-iteration-count: infinite;
}

/* Alternate Animation */
.alternate {
    animation-direction: alternate;
}

/* Ease Out */
.ease-out {
    animation-timing-function: ease-out;
}

/* Ease In Out */
.ease-in-out {
    animation-timing-function: ease-in-out;
}
