/* Custom styles for Magnell Custom Cabinets and Woodworking */

/* Base styles */
:root {
    --gold-400: #c9a84c;
    --navy-950: #060e1a;
    --navy-900: #0a1628;
    --navy-800: #0d1b2a;
    --navy-700: #112237;
}

html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: rgba(201, 168, 76, 0.3);
    color: #f0e6c0;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #112237;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9a84c;
}

/* Header scroll state */
header.scrolled {
    background: rgba(6, 14, 26, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

/* Service card transitions */
.service-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.5s ease,
                box-shadow 0.5s ease;
}

.service-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(201, 168, 76, 0.06);
}

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

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Form input focus transitions */
input:focus,
textarea:focus,
select:focus {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Button hover states */
a[href="#contact"],
button[type="submit"] {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.3s ease;
    opacity: 0;
}

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

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    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);
}

/* Stagger children delays */
.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; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .service-card,
    .gallery-item,
    .testimonial-card,
    a,
    button {
        transition: none;
    }
    .gallery-item:hover {
        transform: none;
    }
    .testimonial-card:hover {
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 767px) {
    #hero h1 {
        font-size: 2.25rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 3.5rem;
    }
}

/* Print styles */
@media print {
    header,
    #contact-form,
    #mobile-menu {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
    }
}
