/* Custom styles for Quality Growers Peanut & Gin */

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

/* Prevent flash of hidden content for reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

/* Navigation scroll state */
.nav-scrolled {
    background: rgba(253, 246, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-link {
    color: #44403c !important;
}

.nav-scrolled .font-display {
    color: #1c1917 !important;
}

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

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: none;
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Scroll reveal animations */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: none;
    }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: all !important;
    transform: translateY(0) !important;
}

/* Image hover effects */
img {
    transition: transform 0.7s ease;
}

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

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

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

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

/* Selection color */
::selection {
    background: #fce7e7;
    color: #78350F;
}

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

/* Subtle pattern for hero */
.hero-pattern {
    background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Loading state for form */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Navbar initial state */
#navbar {
    background: transparent;
}

/* Ensure hero text is readable */
#hero h1,
#hero p,
#hero a {
    position: relative;
    z-index: 10;
}
