/* Custom styles for Perk Up */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Nav scroll state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
    box-shadow: 0 1px 20px rgba(88, 28, 135, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a855f7, #f59e0b);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 60%;
}

/* Floating card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(0.5deg); }
}

.floating-card-1 { animation: float1 4s ease-in-out infinite; }
.floating-card-2 { animation: float2 5s ease-in-out infinite; }
.floating-card-3 { animation: float3 4.5s ease-in-out infinite; }
.floating-card-4 { animation: float4 5.5s ease-in-out infinite; }

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-link {
    transition: all 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a855f7, #f59e0b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9333ea, #d97706);
}

/* Selection color */
::selection {
    background: rgba(168, 85, 247, 0.2);
    color: #581c87;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Button hover lift effect */
a[href="#visit"], a[href="#products"], a[href="#about"], a[href="#why-us"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Image placeholder fallback */
img {
    image-rendering: auto;
}

/* Subtle pattern overlay for sections */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(168, 85, 247, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}
