/* Custom CSS for ModestMuse Wears with Scroll Animations */

/* ==========================================
   SCROLL ANIMATIONS (MOBILE ONLY)
   ========================================== */

/* Apply animations only on mobile devices for better performance */
@media (max-width: 768px) {

    /* Base animation styles - hidden by default */
    .animation-ready {
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Fade In Animation */
    .fade-in.animation-ready {
        opacity: 0;
    }

    .fade-in.animate-in {
        opacity: 1;
    }

    /* Slide Up Animation */
    .slide-up.animation-ready {
        opacity: 0;
        transform: translateY(20px);
    }

    .slide-up.animate-in {
        opacity: 1;
        transform: translateY(0);
    }

    /* Slide Left Animation */
    .slide-left.animation-ready {
        opacity: 0;
        transform: translateX(-20px);
    }

    .slide-left.animate-in {
        opacity: 1;
        transform: translateX(0);
    }

    /* Slide Right Animation */
    .slide-right.animation-ready {
        opacity: 0;
        transform: translateX(20px);
    }

    .slide-right.animate-in {
        opacity: 1;
        transform: translateX(0);
    }

    /* Zoom In Animation */
    .zoom-in.animation-ready {
        opacity: 0;
        transform: scale(0.95);
    }

    .zoom-in.animate-in {
        opacity: 1;
        transform: scale(1);
    }

    /* Stagger Items - for lists */
    .stagger-item.animation-ready {
        opacity: 0;
        transform: translateY(15px);
    }

    .stagger-item.animate-in {
        opacity: 1;
        transform: translateY(0);
    }

    /* Rotate In Animation */
    .rotate-in.animation-ready {
        opacity: 0;
        transform: rotate(-3deg) scale(0.97);
    }

    .rotate-in.animate-in {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }

    /* Bounce In Animation */
    @keyframes bounceIn {
        0% {
            opacity: 0;
            transform: scale(0.5);
        }

        50% {
            opacity: 1;
            transform: scale(1.03);
        }

        70% {
            transform: scale(0.97);
        }

        100% {
            transform: scale(1);
        }
    }

    .bounce-in.animate-in {
        animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
}

/* Desktop: Show content immediately without animations */
@media (min-width: 769px) {
    .animation-ready {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================
   LOADING ANIMATIONS
   ========================================== */

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d4a029;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Pulse animation for loading states */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ==========================================
   HOVER EFFECTS
   ========================================== */

/* Smooth lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Glow effect */
.hover-glow {
    position: relative;
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(212, 160, 41, 0.4);
}

/* Scale effect */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ==========================================
   SCROLL PROGRESS BAR
   ========================================== */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #0d0d0d, #d4a029);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ==========================================
   PARALLAX EFFECTS
   ========================================== */

.parallax {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ==========================================
   SMOOTH TRANSITIONS
   ========================================== */

/* * {
    transition-duration: 200ms;
} */

/* Disable transitions on buttons and links */
button,
a {
    transition-duration: 300ms;
}

/* ==========================================
   FORM STYLING
   ========================================== */

/* Remove spinner from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Focus ring */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #d4a029;
}

/* ==========================================
   CUSTOM SCROLLBAR
   ========================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #333333, #d4a029);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #1a1a1a, #b8841f);
}

/* ==========================================
   RESPONSIVE ANIMATIONS
   ========================================== */

/* Reduce animations on mobile for performance */
@media (max-width: 768px) {
    .animation-ready {
        transition-duration: 0.4s;
    }

    .parallax {
        transform: none !important;
    }
}

/* Respect user's motion preferences */
@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;
    }

    .animation-ready {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================
   GRADIENT TEXT
   ========================================== */

.gradient-text {
    background: linear-gradient(to right, #0d0d0d, #d4a029);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   CARD STYLES
   ========================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .animation-ready {
        opacity: 1 !important;
        transform: none !important;
    }

    #scroll-progress {
        display: none;
    }
}