/* Custom styles for Crump Construction */

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

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-float,
    .animate-float-delayed {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Navbar transition states */
nav.scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* Mobile menu open state */
#mobile-menu.open {
    transform: translateX(0) !important;
}

/* Mobile menu links animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* Hamburger animation */
.menu-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
    margin-left: 0;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2c4266;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4a853;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #0a1628;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 100%);
}

/* Prevent layout shift */
img {
    content-visibility: auto;
}
