/* Custom styles for Nilsen Farms */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f0;
}
::-webkit-scrollbar-thumb {
    background: #b92242;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #961734;
}

/* Decorative circles animation */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.02); }
    66% { transform: translate(-15px, 15px) scale(0.98); }
}

@keyframes float-medium {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-25px, 20px) scale(1.05); }
}

@keyframes float-fast {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, -15px); }
}

.decorative-circle.c1 {
    animation: float-slow 12s ease-in-out infinite;
}
.decorative-circle.c2 {
    animation: float-medium 10s ease-in-out infinite;
}
.decorative-circle.c3 {
    animation: float-fast 8s ease-in-out infinite;
}

/* Hero floating elements */
@keyframes hero-float-1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}
@keyframes hero-float-2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
}
@keyframes hero-float-3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(4deg); }
}

.hero-float {
    animation: hero-float-1 6s ease-in-out infinite;
}
.hero-float[style*="animation-delay: 1s"] {
    animation: hero-float-2 7s ease-in-out infinite;
}
.hero-float[style*="animation-delay: 2s"] {
    animation: hero-float-3 5s ease-in-out infinite;
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger delays */
    .reveal:nth-child(2) { transition-delay: 100ms; }
    .reveal:nth-child(3) { transition-delay: 200ms; }
    .reveal:nth-child(4) { transition-delay: 300ms; }
}

/* Navbar glass effect when scrolled */
nav.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(150, 23, 52, 0.08);
}

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active nav link */
nav a.active {
    color: #961734;
}

/* Button press effect */
button:active, a:active {
    transform: scale(0.97) !important;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #b92242;
    outline-offset: 2px;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #fce7eb 0%, #faf0dc 100%);
}
