/* Custom styles for Caledonia Nutrition */

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

/* Prevent content flash on load */
body {
    opacity: 1 !important;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.03); }
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 7s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-bounce-subtle {
    animation: bounce-subtle 3s ease-in-out infinite;
}

/* Navigation */
.nav-logo-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #1F1F1F;
}

/* Scroll reveal - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Mobile menu */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #F97066;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mobile-link:hover::after {
    width: 80%;
}

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

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

::-webkit-scrollbar-thumb {
    background: #F97066;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #F05248;
}

/* Selection color */
::selection {
    background: #F97066;
    color: white;
}

/* Image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #F97066;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Subtle hover effects on cards */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Typography adjustments */
.font-serif {
    letter-spacing: -0.02em;
}

/* Mobile menu animation */
#mobileMenu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero text shadow for readability */
#hero h1 {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* Ensure all text is readable on gradient backgrounds */
#hero p,
#hero a {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}
