/* Custom styles for Electrical Contractor Nj */

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

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(139, 26, 77, 0.08);
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero decorative shapes floating */
@media (prefers-reduced-motion: no-preference) {
    .absolute.top-20.right-0 {
        animation: float 8s ease-in-out infinite;
    }
    .absolute.bottom-0.left-0 {
        animation: float 10s ease-in-out infinite reverse;
    }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(12px, -16px); }
}

/* 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='%238B1A4D' 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 12px center;
    padding-right: 40px;
}

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

/* Subtle pattern overlay for dark sections */
.bg-gradient-to-br.from-burgundy-600 {
    background-image:
        linear-gradient(to bottom right, rgb(139, 26, 77), rgb(109, 21, 64), rgb(79, 16, 46)),
        radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

/* Selection color */
::selection {
    background: rgba(139, 26, 77, 0.2);
    color: #4f102e;
}
