/* Custom styles for Williams Building and Construction */

:root {
    --nav-color: #1a1a1a;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Reveal animations — progressive enhancement via JS */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Mobile menu state */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b22f19;
}

/* Selection color */
::selection {
    background: #f8c4b5;
    color: #742114;
}

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

/* Mobile menu button animation */
.menu-line {
    display: block;
    width: 24px;
    height: 1.5px;
    background-color: var(--nav-color, #1a1a1a);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:first-child {
    transform: translateY(5px) rotate(45deg);
}

#menu-btn.active .menu-line:last-child {
    transform: translateY(-5px) rotate(-45deg);
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

#navbar.scrolled .menu-line {
    background-color: #1a1a1a !important;
}
