/* ============================================================================
   POPULAR GLASS PRINTERS - ENHANCED ANIMATION SYSTEM
   Premium, Sophisticated Animations
   ============================================================================ */

/* ============================================================================
   ADVANCED KEYFRAMES
   ============================================================================ */

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Animations with Bounce */
@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    60% {
        opacity: 1;
        transform: translateY(-8px);
    }

    80% {
        transform: translateY(4px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }

    60% {
        transform: translateX(8px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }

    60% {
        transform: translateX(-8px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleInBounce {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.97);
    }

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

@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

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

/* Rotation & 3D */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes flipIn {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }

    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0deg);
    }
}

/* Continuous Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(201, 169, 97, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(201, 169, 97, 0.6), 0 0 30px rgba(201, 169, 97, 0.4);
    }
}

/* Attention Seekers */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-8px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   ANIMATION UTILITIES
   ============================================================================ */

/* Basic Entrances */
.animate-fade {
    animation: fadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-fade-up {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-fade-down {
    animation: fadeInDown 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide-up {
    animation: slideUp 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-slide-down {
    animation: slideDown 0.7s ease-out forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-slide-right {
    animation: slideInRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-scale {
    animation: scaleIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-scale-bounce {
    animation: scaleInBounce 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.animate-zoom {
    animation: zoomIn 0.6s ease-out forwards;
}

.animate-rotate {
    animation: rotateIn 0.7s ease-out forwards;
}

.animate-flip {
    animation: flipIn 0.8s ease-out forwards;
}

/* Continuous */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/*  ============================================================================
   STAGGER DELAYS
   ============================================================================ */

.stagger>*:nth-child(1) {
    animation-delay: 0s;
}

.stagger>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger>*:nth-child(3) {
    animation-delay: 0.2s;
}

.stagger>*:nth-child(4) {
    animation-delay: 0.3s;
}

.stagger>*:nth-child(5) {
    animation-delay: 0.4s;
}

.stagger>*:nth-child(6) {
    animation-delay: 0.5s;
}

.stagger>*:nth-child(7) {
    animation-delay: 0.6s;
}

.stagger>*:nth-child(8) {
    animation-delay: 0.7s;
}

.stagger>*:nth-child(9) {
    animation-delay: 0.8s;
}

.stagger>*:nth-child(10) {
    animation-delay: 0.9s;
}

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

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease-out;
    will-change: transform;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.hover-lift-subtle {
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.hover-lift-subtle:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hover-grow {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.hover-grow:hover {
    transform: scale(1.08);
}

.hover-grow-subtle {
    transition: transform 0.25s ease-out;
}

.hover-grow-subtle:hover {
    transform: scale(1.03);
}

.hover-glow {
    transition: box-shadow 0.3s ease-out, filter 0.3s ease-out;
}

.hover-glow:hover {
    box-shadow: 0 0 25px rgba(201, 169, 97, 0.4), 0 0 40px rgba(201, 169, 97, 0.2);
    filter: brightness(1.1);
}

.hover-brighten {
    transition: filter 0.3s ease-out;
}

.hover-brighten:hover {
    filter: brightness(1.15);
}

.hover-tilt {
    transition: transform 0.3s ease-out;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #C9A961, #D4B876);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-underline:hover::after {
    width: 100%;
}

/* ============================================================================
   PAGE LOAD SEQUENCES
   ============================================================================ */

.page-load-fade {
    animation: fadeIn 1s ease-out forwards;
}

.page-load-seq-1 {
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.page-load-seq-2 {
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.page-load-seq-3 {
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.page-load-seq-4 {
    animation: fadeInUp 0.8s ease-out 0.7s backwards;
}

/* ============================================================================
   SCROLL REVEALS
   ============================================================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.skeleton-loading {
    background: linear-gradient(90deg, #E5E5E5 0%, #F0F0F0 50%, #E5E5E5 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(201, 169, 97, 0.2);
    border-top-color: #C9A961;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@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;
    }

    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right,
    .scroll-reveal-scale {
        opacity: 1;
        transform: none;
    }

    .animate-float,
    .animate-pulse,
    .animate-glow {
        animation: none;
    }
}

/* ============================================================================
   PERFORMANCE
   ============================================================================ */

.will-animate {
    will-change: transform, opacity;
}

.gpu-accelerate {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}