/* Custom styles for Calera Nutrition */

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

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

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

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(10px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-slow 5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float-reverse 4.5s ease-in-out infinite;
}

.floating-card-4 {
    animation: float 5.5s ease-in-out infinite;
}

/* Reveal animations for scroll sections */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal="hidden"] {
    opacity: 0;
    transform: translateY(40px);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(27, 3, 43, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .nav-link {
    color: rgba(253, 214, 210, 0.8);
}

.nav-scrolled .nav-link:hover {
    color: #fbbf24;
}

/* Mobile menu animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    font-size: 1.25rem;
}

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

::-webkit-scrollbar-track {
    background: #1a0a2e;
}

::-webkit-scrollbar-thumb {
    background: #6b21a8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7e22ce;
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #faf5ff;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-card,
    .floating-card-2,
    .floating-card-3,
    .floating-card-4 {
        display: none;
    }
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #1a0a2e 0%, #2d1250 100%);
}
