/* Custom styles for S&P America Painting Company */

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

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

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

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

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

/* Hero scroll indicator animation */
@keyframes scrollDown {
    0% {
        top: 0;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.animate-scroll-down {
    animation: scrollDown 1.8s ease-in-out infinite;
}

/* Navbar styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c93d20;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Service card hover */
.service-card {
    will-change: transform;
}

/* Gallery item hover */
.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Process step arrows */
.process-step::after {
    content: '';
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23524a43' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Selection color */
::selection {
    background: #f9c4b2;
    color: #400f0b;
}

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

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

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

/* Reveal animation base states */
.reveal {
    opacity: 1;
    transform: none;
}

.reveal-left {
    opacity: 1;
    transform: none;
}

.reveal-right {
    opacity: 1;
    transform: none;
}

/* Prefers reduced motion - disable all animations */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .service-reveal {
        opacity: 0;
        transform: translateY(25px);
        transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .process-step {
        opacity: 0;
        transform: translateY(25px);
        transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .gallery-item {
        opacity: 0;
        transform: scale(0.97);
        transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* Active section highlight in nav */
.nav-link.active {
    color: #c93d20;
}

.nav-link.active::after {
    width: 100%;
}
