/* Base styles & custom properties */
:root {
    --emerald-800: #166534;
    --emerald-900: #14532d;
    --forest: #1a3c2a;
    --cream-50: #fdfcf8;
    --cream-100: #fef9ee;
    --sage: #6b7f6b;
    --sand: #c9b99a;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Diagonal clip for hero background */
.clip-diagonal {
    clip-path: polygon(30% 0%, 100% 0, 100% 100%, 0% 100%);
}

/* Hero animations */
.hero-content {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-image-grid {
    animation: fadeInRight 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero image grid layout */
.main-img-wrap {
    position: relative;
    z-index: 1;
}

.accent-img {
    position: absolute;
    bottom: -40px;
    right: -30px;
    width: 55%;
    z-index: 2;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.deco-circle {
    position: absolute;
    top: -20px;
    left: -20px;
    z-index: 0;
    opacity: 0.6;
}

/* Service cards */
.service-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery items */
.gallery-item {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.revealed {
    opacity: 1;
    transform: scale(1);
}

/* About section */
.about-image {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.about-image.revealed {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.7s ease 0.1s, transform 0.7s ease 0.1s;
}

.about-content.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Section reveal (below fold) */
.section-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 60, 42, 0.08);
}

nav.scrolled #bar1,
nav.scrolled #bar2,
nav.scrolled #bar3 {
    background-color: #1a3c2a;
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu button animation */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active #bar2 {
    opacity: 0;
}

#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Smooth focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Selection color */
::selection {
    background-color: rgba(22, 101, 52, 0.15);
    color: #1a3c2a;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-content,
    .hero-image-grid,
    .service-card,
    .gallery-item,
    .about-image,
    .about-content,
    .section-reveal {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .clip-diagonal {
        clip-path: polygon(15% 0%, 100% 0, 100% 100%, 0% 100%);
    }
    
    .accent-img {
        width: 65%;
        bottom: -20px;
        right: -10px;
    }
    
    .deco-circle {
        display: none;
    }
}

@media (max-width: 640px) {
    .clip-diagonal {
        clip-path: none;
        background: transparent;
    }
    
    #hero {
        padding-top: 100px;
    }
}
