/* ===== Custom Styles for Butler Fence ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0e0e0e;
}
::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C4844C;
}

/* Selection color */
::selection {
    background: rgba(196, 132, 76, 0.3);
    color: #f5f0e6;
}

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

.animate-fade-up {
    animation-name: fade-up;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: both;
}

@keyframes scroll-dot {
    0% {
        top: -12px;
        opacity: 1;
    }
    100% {
        top: 20px;
        opacity: 0;
    }
}

.animate-scroll-dot {
    animation: scroll-dot 1.5s ease-in-out infinite;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== Header scroll state ===== */
#header.scrolled {
    background: rgba(8, 8, 8, 0.95) !important;
    backdrop-blur: 20px !important;
}

#header.scrolled .bg-noir-900/70 {
    background: rgba(8, 8, 8, 0.95) !important;
}

/* ===== Service Card Hover ===== */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(196, 132, 76, 0.15);
}

/* ===== Gallery Items ===== */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
}

/* ===== Back to Top ===== */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== Mobile Menu ===== */
.mobile-menu-link {
    transition: padding-left 0.3s ease;
}

.mobile-menu-link:hover {
    padding-left: 8px;
}

/* ===== Input Focus States ===== */
input:focus,
select:focus,
textarea:focus {
    background: rgba(20, 20, 20, 0.8);
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.1;
    }
}

/* ===== Print styles ===== */
@media print {
    #header, #back-to-top, .animate-scroll-dot {
        display: none;
    }
}
