/* Custom styles for Dicky's Culverts */

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

/* Scroll reveal base - always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll reveal with animation (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animate-on-scroll {
        opacity: 0;
        transform: translateY(30px);
    }

    .scroll-reveal.animate-on-scroll.animated {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(15, 32, 56, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1a3356;
}

/* Selection color */
::selection {
    background: #d4a017;
    color: #0f2038;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23335a8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Subtle gradient for hero overlay */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(8, 16, 28, 0.85) 0%,
        rgba(15, 32, 56, 0.7) 50%,
        rgba(26, 51, 86, 0.6) 100%
    );
    z-index: 1;
}

#hero > .absolute {
    z-index: 2;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Pulse for the hero badge dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.animate-pulse {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Button hover glow effect */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

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

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