/* ============================================
   EnE Welding — Custom Styles
   ============================================ */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5ff;
}
::-webkit-scrollbar-thumb {
    background: #c084fc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(107, 33, 168, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #581c87 !important;
}

#navbar.scrolled a:not(.nav-cta) {
    color: #4b5563 !important;
}

#navbar.scrolled a:not(.nav-cta):hover {
    color: #7e22ce !important;
}

/* ============================================
   Spark / Particle Animation (Hero)
   ============================================ */
.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
}

.spark span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: sparkFloat 3s ease-in-out infinite;
}

.spark-1 span { background: #fbbf24; animation-delay: 0s; animation-duration: 2.5s; }
.spark-2 span { background: #fcd34d; animation-delay: 0.5s; animation-duration: 3s; }
.spark-3 span { background: #f59e0b; animation-delay: 1s; animation-duration: 2.8s; }
.spark-4 span { background: #d8b4fe; animation-delay: 1.5s; animation-duration: 3.2s; }
.spark-5 span { background: #c084fc; animation-delay: 0.8s; animation-duration: 2.6s; }
.spark-6 span { background: #fde68a; animation-delay: 2s; animation-duration: 3.5s; }

.spark-1 { top: 25%; left: 15%; }
.spark-2 { top: 40%; right: 20%; }
.spark-3 { top: 60%; left: 25%; }
.spark-4 { top: 30%; right: 30%; }
.spark-5 { top: 70%; right: 15%; }
.spark-6 { top: 50%; left: 10%; }

@keyframes sparkFloat {
    0%, 100% {
        opacity: 0.2;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1.5);
    }
}

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    /* Stagger children */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Fallback: ensure content is visible even if JS is disabled */
.no-js .reveal,
.js-fallback .reveal {
    opacity: 1;
    transform: none;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Form Styles
   ============================================ */
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='%239ca3af' 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;
    padding-right: 2.5rem;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.75rem;
    }

    .spark {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@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;
    }

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

    .spark span {
        animation: none;
        opacity: 0.6;
    }
}

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