/* ============================================
   COWICHAN CONNECTS - ANIMATIONS
   ============================================ */

/* KEYFRAMES */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}
@keyframes countUp {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

/* ANIMATION CLASSES */
.animate-fade-up {
    opacity: 0;
    animation: fadeUp 0.7s ease forwards;
}
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.7s ease forwards;
}
.animate-slide-left {
    opacity: 0;
    animation: slideLeft 0.7s ease forwards;
}
.animate-slide-right {
    opacity: 0;
    animation: slideRight 0.7s ease forwards;
}

/* DELAYS */
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
.delay-5 { animation-delay: 0.75s; }

/* SCROLL-TRIGGERED (added via JS) */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-animate.slide-left {
    transform: translateX(-40px);
}
.scroll-animate.slide-right {
    transform: translateX(40px);
}
.scroll-animate.slide-left.visible,
.scroll-animate.slide-right.visible {
    transform: translateX(0);
}

/* HOVER ANIMATIONS */
.hover-float:hover { animation: float 2s ease infinite; }
.hover-pulse:hover { animation: pulse 1s ease infinite; }
.hover-heartbeat:hover { animation: heartbeat 1.2s ease infinite; }

/* LOADING SPINNER */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--green-mid);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

/* SHIMMER EFFECT */
.shimmer {
    background: linear-gradient(90deg, var(--gray-light) 25%, var(--white) 50%, var(--gray-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* GRADIENT ANIMATED BG */
.gradient-animated {
    background: linear-gradient(270deg, var(--green-dark), var(--blue-dark), var(--green-mid), var(--gold-dark));
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

/* PARTICLE STYLES */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

/* RIPPLE BUTTON EFFECT */
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.btn-ripple::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: scale(0);
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
}
.btn-ripple:active::after {
    animation: ripple 0.4s ease;
}

/* NOTIFICATION TOAST */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--green-dark);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.4s ease;
    max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast i { font-size: 1.2rem; color: var(--gold-light); }
.toast-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    background: none;
    border: none;
    color: var(--white);
    font-size: 1rem;
}
.toast-close:hover { opacity: 1; }

/* SCROLL TO TOP */
.scroll-top {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--green-mid);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    border: none;
    font-size: 1rem;
}
.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}
.scroll-top:hover {
    background: var(--green-dark);
    transform: translateY(-3px);
}

/* PAGE TRANSITIONS */
.page-transition {
    animation: fadeIn 0.5s ease;
}

/* COUNTER ANIMATION */
.counter-wrap {
    display: inline-block;
}
