/* ================================================
   ProjectNXT - Advanced Animations
   ================================================ */

/* -------------------- Particle System -------------------- */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(201, 162, 39, 0.6);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 22s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
    animation-duration: 17s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
    animation-duration: 21s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
    animation-duration: 19s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 2.5s;
    animation-duration: 16s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 0.5s;
    animation-duration: 23s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 3.5s;
    animation-duration: 20s;
}

.particle:nth-child(10) {
    left: 15%;
    animation-delay: 1.5s;
    animation-duration: 18s;
}

.particle:nth-child(11) {
    left: 25%;
    animation-delay: 4.5s;
    animation-duration: 21s;
}

.particle:nth-child(12) {
    left: 35%;
    animation-delay: 0.8s;
    animation-duration: 17s;
}

.particle:nth-child(13) {
    left: 45%;
    animation-delay: 2.8s;
    animation-duration: 22s;
}

.particle:nth-child(14) {
    left: 55%;
    animation-delay: 1.2s;
    animation-duration: 19s;
}

.particle:nth-child(15) {
    left: 65%;
    animation-delay: 3.2s;
    animation-duration: 20s;
}

.particle:nth-child(16) {
    left: 75%;
    animation-delay: 0.3s;
    animation-duration: 16s;
}

.particle:nth-child(17) {
    left: 85%;
    animation-delay: 2.3s;
    animation-duration: 23s;
}

.particle:nth-child(18) {
    left: 95%;
    animation-delay: 4.3s;
    animation-duration: 18s;
}

.particle:nth-child(19) {
    left: 5%;
    animation-delay: 1.8s;
    animation-duration: 21s;
}

.particle:nth-child(20) {
    left: 95%;
    animation-delay: 3.8s;
    animation-duration: 17s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* -------------------- Glowing Effects -------------------- */
.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(155, 27, 48, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulseGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

/* -------------------- Text Animations -------------------- */
.text-shimmer {
    background: linear-gradient(90deg,
            var(--color-gold) 0%,
            var(--color-gold-light) 25%,
            var(--color-gold) 50%,
            var(--color-gold-light) 75%,
            var(--color-gold) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.text-glow {
    text-shadow:
        0 0 10px rgba(201, 162, 39, 0.5),
        0 0 20px rgba(201, 162, 39, 0.3),
        0 0 30px rgba(201, 162, 39, 0.2);
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow:
            0 0 10px rgba(201, 162, 39, 0.5),
            0 0 20px rgba(201, 162, 39, 0.3),
            0 0 30px rgba(201, 162, 39, 0.2);
    }

    to {
        text-shadow:
            0 0 20px rgba(201, 162, 39, 0.8),
            0 0 30px rgba(201, 162, 39, 0.5),
            0 0 40px rgba(201, 162, 39, 0.3);
    }
}

/* -------------------- Hover Animations -------------------- */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* -------------------- Loading Animations -------------------- */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-gray);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-pulse {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* -------------------- Border Animations -------------------- */
.border-animate {
    position: relative;
    overflow: hidden;
}

.border-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    animation: borderSlide 3s linear infinite;
}

@keyframes borderSlide {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* -------------------- Background Animations -------------------- */
.bg-gradient-animate {
    background: linear-gradient(-45deg,
            var(--color-dark),
            var(--color-charcoal),
            var(--color-primary-dark),
            var(--color-dark));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* -------------------- Reveal Animations -------------------- */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.8s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-up {
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 0.8s ease forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.6s ease forwards;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger delays for grouped items */
.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;
}

/* -------------------- Icon Animations -------------------- */
.icon-bounce {
    animation: iconBounce 2s ease infinite;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.icon-pulse {
    animation: iconPulse 2s ease infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* -------------------- Floating Elements -------------------- */
.float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

.float-medium {
    animation: floatMedium 4s ease-in-out infinite;
}

@keyframes floatMedium {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.float-fast {
    animation: floatFast 2s ease-in-out infinite;
}

@keyframes floatFast {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* -------------------- Ripple Effect -------------------- */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* -------------------- Typewriter Effect -------------------- */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-gold);
    white-space: nowrap;
    animation:
        typing 3.5s steps(40, end),
        blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--color-gold);
    }
}