/* Custom styles for Clair Enterprises */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* 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;
}

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Selection color */
::selection {
    background-color: #0d9488;
    color: white;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.scroll-reveal-delay-1 { transition-delay: 0.1s; }
.scroll-reveal-delay-2 { transition-delay: 0.2s; }
.scroll-reveal-delay-3 { transition-delay: 0.3s; }
.scroll-reveal-delay-4 { transition-delay: 0.4s; }

/* Stagger children animations */
.stagger-children .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .scroll-reveal:nth-child(2) { transition-delay: 0.12s; }
.stagger-children .scroll-reveal:nth-child(3) { transition-delay: 0.19s; }
.stagger-children .scroll-reveal:nth-child(4) { transition-delay: 0.26s; }
.stagger-children .scroll-reveal:nth-child(5) { transition-delay: 0.33s; }
.stagger-children .scroll-reveal:nth-child(6) { transition-delay: 0.40s; }

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    max-height: 400px;
}

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

/* Button press effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Image lazy loading fade */
img[loading="lazy"] {
    transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}
img[loading="lazy"] {
    opacity: 0;
}
