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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #527a4e;
    color: #fdfcf8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f2;
}
::-webkit-scrollbar-thumb {
    background: #9fb898;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #527a4e;
}

/* Hero Animations */
.hero-anim {
    opacity: 0;
    transform: translateY(24px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Line Animation */
@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* Section Reveal Animations - Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
    .section-reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .section-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger children */
    .service-card {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar Styles */
.nav-scrolled #navbar {
    background-color: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(44, 77, 39, 0.08);
}

.nav-scrolled #logo-text {
    color: #11180e;
}

.nav-scrolled #logo-sub {
    color: #3d5f3a;
}

/* Mobile Menu */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* Mobile Menu Button Animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* Image Hover Effects */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Service Card Hover */
.service-card {
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(82, 122, 78, 0.1);
}

/* Gallery Image Hover */
aspect-ratio\:square:hover img {
    transform: scale(1.1);
}

/* Print Styles */
@media print {
    nav, #mobile-menu, .animate-scroll-line {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
