/* Custom styles for CRS Clean Team */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base font settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero animations - above the fold, always visible */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    animation: heroFadeIn 0.8s ease-out forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

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

/* Scroll reveal - below the fold only, progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
    
    .hero-anim {
        opacity: 1;
        transform: translateY(0);
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Service card stagger animation */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Navbar states */
.navbar-scrolled {
    background: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(47, 81, 33, 0.08);
}

.navbar-scrolled .nav-text {
    color: #2f5121 !important;
}

.navbar-transparent .nav-text {
    color: #2f5121;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(47, 81, 33, 0.08);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%236fa14e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Selection color */
::selection {
    background: rgba(111, 161, 78, 0.2);
    color: #1f3516;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #6fa14e;
    outline-offset: 2px;
}

/* Subtle line decorations */
.section-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, #c5dab0, transparent);
    margin: 0 auto;
}

/* Image hover effect */
img {
    transition: transform 0.6s ease;
}

/* Thin line accent */
.accent-line {
    width: 40px;
    height: 1px;
    background: #9dbe7e;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9dbe7e;
}
