/* Custom styles that complement Tailwind */

/* Ensure all text has strong contrast */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Geometric shape animations */
@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float-diagonal {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -15px) rotate(5deg); }
    50% { transform: translate(-5px, -25px) rotate(-3deg); }
    75% { transform: translate(-10px, -10px) rotate(2deg); }
}

.geo-rect[aria-hidden="true"] {
    animation: float-diagonal 8s ease-in-out infinite;
}

/* Service card accent bars */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:nth-child(1)::before { background: linear-gradient(90deg, #1b5e20, #33691e); }
.service-card:nth-child(2)::before { background: linear-gradient(90deg, #e8735a, #f4a261); }
.service-card:nth-child(3)::before { background: linear-gradient(90deg, #d4a843, #e8c36a); }
.service-card:nth-child(4)::before { background: linear-gradient(90deg, #2d8f8f, #4db6ac); }
.service-card:nth-child(5)::before { background: linear-gradient(90deg, #558b2f, #7cb342); }
.service-card:nth-child(6)::before { background: linear-gradient(90deg, #0d3b12, #1b5e20); }

/* Smooth image loading */
img {
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
}

/* Selection color */
::selection {
    background: #1b5e20;
    color: #fdfcfa;
}

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

/* Print styles */
@media print {
    nav, .mobile-menu, #contact-form, .geo-circle, .geo-rect, .geo-triangle, .pattern-dots {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}

/* 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;
    }
    .float-slow, .float-medium, .float-fast {
        animation: none !important;
    }
    .service-card:hover {
        transform: none;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
    .geo-circle {
        display: none;
    }
    .geo-rect, .geo-triangle {
        display: none;
    }
}

/* Ensure hero images don't cause layout shift */
#hero img {
    contain: layout;
}

/* Gallery hover overlay */
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Stat card shimmer */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::after {
    left: 100%;
}
