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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #a5ccb1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #76b188;
}

/* Navigation */
.nav-fixed {
    background: rgba(250, 248, 244, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(165, 204, 177, 0.2);
    transition: box-shadow 0.3s ease;
}

.nav-fixed.scrolled {
    box-shadow: 0 4px 30px rgba(26, 92, 58, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #357a4c;
    border-radius: 1px;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Mobile Menu */
#mobileMenu.open {
    max-height: 400px;
}

.mobile-nav-link {
    display: block;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    padding-left: 1rem;
}

/* Hero Blobs */
.hero-blob {
    animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
    animation-delay: 0s;
}

.blob-2 {
    animation-delay: -3s;
}

.blob-3 {
    animation-delay: -5s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.05); }
    50% { transform: translate(-10px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.02); }
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a5c3a, #529667);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }
.reveal[data-delay="6"] { transition-delay: 0.6s; }

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Image hover effects */
img {
    max-width: 100%;
    height: auto;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #357a4c;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Selection color */
::selection {
    background: #a5ccb1;
    color: #1a5c3a;
}
