/* Base & Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #1B4332;
    color: #F0EDE5;
}

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

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* Navbar Scroll State */
#navbar.scrolled {
    background: rgba(240, 237, 229, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

#navbar.scrolled .nav-link {
    color: rgba(27, 67, 50, 0.7);
}

#navbar.scrolled .nav-link:hover {
    color: #1B4332;
}

/* Mobile Menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.close {
    opacity: 0;
    pointer-events: none;
}

/* Mobile Menu Links */
.mobile-link {
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(27, 67, 50, 0.7);
    transition: color 0.3s ease;
}

.mobile-link:hover {
    color: #1B4332;
}

/* Hamburger Animation */
#menu-btn.active #menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-btn.active #menu-icon span:nth-child(2) {
    opacity: 0;
}

#menu-btn.active #menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

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

/* Input Focus States */
input:focus,
textarea:focus {
    outline: none;
}

/* Smooth Scroll Offset for Fixed Nav */
section[id] {
    scroll-margin-top: 80px;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(27, 67, 50, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(27, 67, 50, 0.4);
}

/* Image Lazy Load Fade */
img[loading="lazy"] {
    transition: opacity 0.6s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"] {
    opacity: 0;
}

/* Print Styles */
@media print {
    #navbar,
    #mobile-menu,
    .reveal {
        display: none !important;
    }
    
    body {
        background: white;
        color: #1B4332;
    }
    
    .bg-forest-500,
    .bg-forest-700 {
        background: #1B4332 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
