/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Service card stagger animation - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }
    .service-card:nth-child(1) { transition-delay: 0.05s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.15s; }
    .service-card:nth-child(4) { transition-delay: 0.2s; }
    .service-card:nth-child(5) { transition-delay: 0.25s; }
    .service-card:nth-child(6) { transition-delay: 0.3s; }
}

/* About image animation */
@media (prefers-reduced-motion: no-preference) {
    .about-image {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    .about-content {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
    }
}

/* Feature item animation */
@media (prefers-reduced-motion: no-preference) {
    .feature-item {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    .feature-item:nth-child(1) { transition-delay: 0.05s; }
    .feature-item:nth-child(2) { transition-delay: 0.1s; }
    .feature-item:nth-child(3) { transition-delay: 0.15s; }
    .feature-item:nth-child(4) { transition-delay: 0.2s; }
}

/* Scroll reveal base state - visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Apply animations only when JS adds the animated class */
.js-enabled .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Focus visible for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #d64522;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
#mobile-menu.open {
    max-height: 400px;
}

/* Counter animation */
.counter {
    display: inline-block;
}
</style>
