/* ========================================
   Dark Electrical — Custom Styles
   Classic & Elegant | Plum + Amber
   ======================================== */

/* ---- Base Reset & Typography ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(255, 201, 64, 0.3);
    color: #f5f0f5;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0e1a;
}
::-webkit-scrollbar-thumb {
    background: #4a2a4a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7a4a7a;
}

/* ---- Navbar ---- */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(13, 7, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 201, 64, 0.1);
}

/* ---- Hero ---- */
#hero {
    position: relative;
}

/* ---- Service Cards ---- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 201, 64, 0), transparent);
    transition: background 0.5s ease;
}

.service-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(255, 201, 64, 0.6), transparent);
}

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

/* ---- Form Styles ---- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(255, 201, 64, 0.3);
}

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='%23ffd980' stroke-width='2'%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;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-content {
    animation: fadeInUp 1s ease-out forwards;
}

.hero-content > * {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.6s; }
.hero-content > *:nth-child(4) { animation-delay: 0.8s; }

/* ---- Scroll Reveal (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .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; }
}

/* ---- Mobile Menu ---- */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.2;
    }
}

@media (min-width: 768px) {
    /* Subtle parallax on hero image */
    #hero .absolute img {
        will-change: transform;
    }
}

/* ---- Focus visible for accessibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(255, 201, 64, 0.6);
    outline-offset: 2px;
}

/* ---- Print styles ---- */
@media print {
    #navbar,
    #hero .absolute,
    .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
