/* === Custom Styles for Sherry's Farmhouse Kitchen === */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #030a08;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Selection color */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #fef9f0;
}

/* Navbar transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4a843;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

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

/* Only apply hidden state when JS is active and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .js-enabled .scroll-reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
    .js-enabled .scroll-reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
    .js-enabled .scroll-reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
}

/* Hero floating cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Apply floating to hero cards on desktop */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    #hero .relative.z-20 {
        animation: float 6s ease-in-out infinite;
    }
    #hero .absolute.-top-6.-left-8.z-30 {
        animation: float-slow 5s ease-in-out infinite 0.5s;
    }
    #hero .absolute.-bottom-4.-left-4.z-30 {
        animation: float-slow 7s ease-in-out infinite 1s;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* Image hover effects */
.rounded-2xl.overflow-hidden {
    position: relative;
}
.rounded-2xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #f5d68a 0%, #d4a843 50%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a1f14 inset !important;
    -webkit-text-fill-color: #fef9f0 !important;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #d4a843;
    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;
    }
}
