/* Custom styles for Cereal City Nutrition */

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

/* Base typography */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero animations - only for below-fold or use prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    .hero-anim {
        opacity: 0;
        transform: translateY(24px);
        animation: heroFadeIn 0.8s ease forwards;
    }
    
    .hero-anim:nth-child(1) { animation-delay: 0.1s; }
    .hero-anim:nth-child(2) { animation-delay: 0.25s; }
    .hero-anim:nth-child(3) { animation-delay: 0.4s; }
    .hero-anim:nth-child(4) { animation-delay: 0.55s; }
    
    @keyframes heroFadeIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Scroll reveal - progressive enhancement, only when JS runs and motion preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Navbar transitions */
.nav-text {
    transition: color 0.3s ease;
}

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

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

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

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

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

/* Image loading placeholder */
img {
    background-color: #e8e6e1;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e85a3a;
    outline-offset: 2px;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

/* Subtle hover lift on cards */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Print styles */
@media print {
    nav, #contact, .reveal-up {
        display: none;
    }
    
    body {
        color: #1a1a1a;
        background: white;
    }
}
