/* Base & Utilities */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }
.scroll-reveal.delay-5 { transition-delay: 0.5s; }

/* Gallery hover */
.gallery-item {
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 44, 34, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Nav transition */
nav.scrolled #nav-logo-text,
nav.scrolled .nav-link {
    color: #FDF8F0 !important;
}

nav.scrolled #nav-logo-mark {
    background: rgba(253, 248, 240, 0.15) !important;
}

/* Mobile menu animation */
.mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu.fade-out {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Service card hover glow */
.service-card {
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.1), transparent, rgba(6, 78, 59, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Subtle pattern overlay for sections */
.section-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(6, 78, 59, 0.04) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .gallery-item img {
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }

    .service-card,
    .service-card * {
        transition: none !important;
    }
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #064E3B;
    outline-offset: 2px;
    border-radius: 4px;
}
</style>
