/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

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

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

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

/* Service Card Hover */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

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

/* Navbar Scroll Effect */
.navbar-scrolled {
    background: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(45, 77, 58, 0.08);
}

/* Mobile Menu Transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    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; }

/* Menu Button Animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6fa07e;
}

/* Selection */
::selection {
    background: #9cc5a8;
    color: #1f3227;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid #4d8060;
    outline-offset: 2px;
}

/* Input Autofill */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #FAFAF7 inset !important;
}

/* 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 {
        opacity: 1;
        transform: none;
    }
}

/* Print Styles */
@media print {
    nav,
    #contact-form,
    .animate-fade-in-up {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
