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

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

/* Clip diagonal for hero */
.clip-diagonal {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Navbar scroll state */
.nav-scrolled #navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 26, 53, 0.06);
}

.nav-scrolled .nav-logo-text {
    color: #0a1a35;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open #line1 {
    transform: translateY(4px) rotate(45deg);
}

.mobile-menu-open #line2 {
    opacity: 0;
}

.mobile-menu-open #line3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Service card hover */
.service-card {
    transition: background-color 0.3s ease;
}

.service-card:hover {
    background-color: #f8fafc;
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card {
        transition: none;
    }
    
    .mobile-link {
        opacity: 1;
        transform: none;
        transition: color 0.3s ease;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8da4cf;
}

/* 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 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
}

/* Input focus states */
input:focus,
textarea:focus,
select:focus {
    border-color: #C9A84C !important;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}
