:root {
    --bg-light: #f6F4F0;
    --bg-dark: #222222;
    --bg-card-light: #FFFFFF;
    --bg-card-dark: #2a2a2a;
    --text-dark: #222222;
    --text-light: #f6F4F0;
    --text-muted-light: #575757;
    --text-muted-dark: #A1A1AA;
    --border-color-light: #EAE8E4;
    --border-color-dark: #3a3a3a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Sora', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-light);
    color: var(--text-dark);
    background-image: 
        linear-gradient(rgba(34, 34, 34, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 34, 34, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
}

.font-heading {
    font-family: 'Satoshi', sans-serif;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.is-visible,
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

#nav-links-container {
    position: relative;
}

#nav-active-pill {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: var(--bg-dark);
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
    opacity: 0.1;
}

.nav-link {
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease-in-out;
}

.logo-scroller {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.logo-scroller-inner {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.logo-scroller-inner img {
    height: 2rem;
    margin: 0 1.5rem;
}

@media (min-width: 768px) {
    .logo-scroller-inner img {
        height: 2.5rem;
        margin: 0 2.5rem;
    }
}

@keyframes scroll {
    to {
        transform: translateX(-50%);
    }
}

.service-card .icon-container {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover .icon-container {
    transform: scale(1.15) rotate(-8deg);
}

.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover::after {
    left: 100%;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

#contact input:focus,
#contact textarea:focus {
    --tw-ring-color: var(--text-dark);
    border-color: var(--text-dark);
}

/* Grid pattern for cards and sections */
.bg-card-light, .bg-card-dark {
    background-image: 
        linear-gradient(rgba(34, 34, 34, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 34, 34, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.bg-card-dark {
    background-image: 
        linear-gradient(rgba(246, 244, 240, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(246, 244, 240, 0.08) 1px, transparent 1px);
}

/* Enhanced grid pattern for dark sections */
.bg-dark {
    background-image: 
        linear-gradient(rgba(246, 244, 240, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(246, 244, 240, 0.06) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Hero section enhancement */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(34, 34, 34, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 34, 34, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Mobile improvements */
@media (max-width: 767px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #hero {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
    
    #hero h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    /* Keep animations on mobile but make them faster */
    .animate-on-scroll {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    }
    
    .animate-on-scroll.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
    
    .bg-card-light, .bg-card-dark {
        margin-bottom: 1rem;
    }
    
    /* Reduce spacing on mobile */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Improve mobile navigation */
    #nav-links-container {
        display: none;
    }
    
    /* Mobile menu improvements */
    #mobile-menu {
        background-color: var(--bg-light);
        border-top: 1px solid var(--border-color-light);
    }
    
    #mobile-menu a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color-light);
    }
    
    /* Mobile form improvements */
    #contact-form input,
    #contact-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Mobile button improvements */
    .cta-button {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    /* Mobile image optimizations */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Mobile text improvements */
    h1, h2, h3 {
        word-wrap: break-word;
        hyphens: auto;
    }
    
    /* Mobile grid improvements */
    .grid {
        gap: 1rem;
    }
    
    /* Mobile logo scroller */
    .logo-scroller-inner img {
        height: 1.5rem;
        margin: 0 1rem;
    }
}