/* ========================================
   Plentiful Harvest — Custom Styles
   ======================================== */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #d4a84b;
    color: #0f2419;
}

/* ========================================
   Navigation
   ======================================== */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.97);
    box-shadow: 0 1px 20px rgba(26, 58, 42, 0.08);
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #d4a84b;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobileMenu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn.active .menu-line:first-child {
    transform: translateY(7px) rotate(45deg);
}

.menu-btn.active .menu-line:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ========================================
   Hero
   ======================================== */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(8, 19, 12, 0.85) 0%,
        rgba(26, 58, 42, 0.70) 50%,
        rgba(45, 79, 45, 0.55) 100%
    );
    z-index: 1;
}

#hero > .relative {
    position: relative;
    z-index: 2;
}

/* ========================================
   Scroll Reveal Animations
   (Progressive enhancement — content is visible by default)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal-left {
        transform: translateX(0);
    }
    
    .reveal-left.revealed {
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* ========================================
   Product Cards
   ======================================== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ========================================
   Form Focus States
   ======================================== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(74, 122, 72, 0.15);
}

/* ========================================
   Smooth Scroll Offset for Anchors
   ======================================== */
[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   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;
    }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 767px) {
    #hero h1 {
        font-size: 2.75rem;
    }
    
    #hero h1 span {
        display: block;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* ========================================
   Image Loading Placeholder
   ======================================== */
img {
    background: linear-gradient(135deg, #dce8df 0%, #f0f5f1 100%);
}

/* ========================================
   Subtle Pattern Overlay for Sections
   ======================================== */
.bg-cream-100::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(26, 58, 42, 0.02) 1px, transparent 1px),
                      radial-gradient(circle at 75% 75%, rgba(26, 58, 42, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
