/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #4a7a50;
    color: #fefdf8;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #98bf9c;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a7a50;
}

/* Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger delays for grid items */
.reveal-up:nth-child(2) { transition-delay: 100ms; }
.reveal-up:nth-child(3) { transition-delay: 200ms; }
.reveal-up:nth-child(4) { transition-delay: 300ms; }

/* Navbar Scroll State */
.nav-scrolled {
    background-color: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-link {
    color: #3d3529 !important;
}

.nav-scrolled .nav-text {
    color: #1c301f !important;
}

.nav-scrolled .nav-text span {
    color: #4a7a50 !important;
}

.nav-scrolled #menu-btn {
    background-color: #e3ede3;
}

/* Mobile Menu Transitions */
.mobile-menu-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Button Ripple Effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #6a9670;
    outline-offset: 2px;
    border-radius: 4px;
}

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

    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }

    .animate-bounce {
        animation: none;
    }
}

/* Smooth Image Loading */
img {
    background-color: #e3ede3;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Card Hover Glow */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Custom Blob Animation for Hero */
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

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

/* Print Styles */
@media print {
    nav,
    #contact-form,
    .animate-bounce {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
