/* Custom styles for Superior Builders of Carolinas */

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

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #d65a2e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c4451e;
}

/* Selection color */
::selection {
    background: #d65a2e;
    color: white;
}

/* Navbar transition states */
.nav-scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled #nav-logo-text,
.nav-scrolled #nav-logo-sub {
    color: white !important;
}

.nav-scrolled #nav-logo-text {
    color: white !important;
}

.nav-scrolled #nav-logo-sub {
    color: #f5c4b0 !important;
}

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

#hero > .relative > .max-w-3xl > * {
    animation: fadeInUp 0.8s ease-out forwards;
}

#hero > .relative > .max-w-3xl > *:nth-child(1) { animation-delay: 0.1s; }
#hero > .relative > .max-w-3xl > *:nth-child(2) { animation-delay: 0.3s; }
#hero > .relative > .max-w-3xl > *:nth-child(3) { animation-delay: 0.5s; }
#hero > .relative > .max-w-3xl > *:nth-child(4) { animation-delay: 0.7s; }
#hero > .relative > .max-w-3xl > *:nth-child(5) { animation-delay: 0.9s; }

/* Service card hover effects */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    border-color: #f5c4b0;
    box-shadow: 0 20px 40px rgba(214, 90, 46, 0.1);
}

/* Project card effects */
.project-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Testimonial card effects */
.testimonial-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(214, 90, 46, 0.1);
}

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

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d65a2e;
    outline-offset: 2px;
}

/* Reduced motion preference */
@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;
    }
}

/* Print styles */
@media print {
    nav, #hero, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Additional responsive adjustments */
@media (max-width: 640px) {
    .font-display {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* Subtle pattern for sections */
.pattern-grid {
    background-image: 
        linear-gradient(rgba(214, 90, 46, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(214, 90, 46, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}
