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

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f172a;
}

/* Navbar transition states */
#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled .nav-logo-text {
    color: #ffffff;
}

#navbar.scrolled .nav-logo-sub {
    color: #5eead4;
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#navbar.scrolled .nav-link:hover {
    color: #ffffff;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 2px;
    background: #14b8a6;
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Service card entrance animation */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, background 0.5s ease, box-shadow 0.5s ease;
}

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

/* Approach card entrance animation */
.approach-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, background 0.5s ease, border-color 0.5s ease;
}

/* Hero text entrance */
.hero-element {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card,
    .approach-card,
    .hero-element {
        transition: none;
    }
}

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

/* Subtle parallax for hero */
@media (prefers-reduced-motion: no-preference) {
    #hero {
        will-change: background-position;
    }
}

/* Print styles */
@media print {
    #navbar,
    #contact-form,
    .mobile-menu {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}
