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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, #4a7c4a 80%, white);
    color: white;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f5ee;
}
::-webkit-scrollbar-thumb {
    background: #b9d3b9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fbf8f;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceSlow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-bounce-slow {
    animation: bounceSlow 2s ease-in-out infinite;
}

/* ========== Scroll Reveal ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ========== Navbar Scrolled State ========== */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(74, 124, 74, 0.08);
}

#navbar.scrolled .font-serif {
    color: #1f341f;
}

/* ========== Hero Section ========== */
#top {
    position: relative;
}

#top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #fefdf8, transparent);
    pointer-events: none;
    z-index: 1;
}

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

/* ========== Buttons ========== */
button, a[type="submit"] {
    cursor: pointer;
}

/* ========== Form Focus States ========== */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* ========== Mobile Menu Transition ========== */
#mobile-menu {
    animation: fadeIn 0.3s ease-out;
}

/* ========== Responsive Tweaks ========== */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 768px) {
    .lg\:hover\:shadow-xl:hover {
        box-shadow: 0 20px 60px rgba(74, 124, 74, 0.12);
    }
}

/* ========== Print ========== */
@media print {
    #navbar, #contact, .animate-bounce-slow {
        display: none;
    }
    body {
        color: #1f341f;
        background: white;
    }
}
