/* ===== CUSTOM STYLES ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #DCA052;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B85D38;
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(253, 248, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

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

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

.nav-scrolled .nav-link {
    color: #714722 !important;
}

.nav-scrolled .nav-link:hover {
    color: #B85D38 !important;
}

/* Mobile menu transitions */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
.menu-line {
    transition: top 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:first-child {
    top: 17px;
    transform: rotate(45deg);
}

#menu-btn.active .menu-line:last-child {
    top: 17px;
    transform: rotate(-45deg);
}

/* Service cards */
.service-card {
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: #f5c0b0;
}

/* Process steps */
.process-step::after {
    content: '';
    position: absolute;
    top: 28px;
    right: -2rem;
    width: 1.5rem;
    height: 2px;
    background: linear-gradient(to right, #B85D38, transparent);
    opacity: 0.3;
}

@media (max-width: 1023px) {
    .process-step::after {
        display: none;
    }
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(46, 21, 13, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Testimonial cards */
.testimonial-card {
    border: 1px solid #f2d9b0;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    border-color: #e46f4e;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(184, 93, 56, 0.15);
}

/* Selection color */
::selection {
    background: #f5c0b0;
    color: #2e150d;
}

/* ===== PROGRESSIVE ENHANCEMENT: Scroll Reveal ===== */
/* Default state: visible (works without JS) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Animated state: applied via JS only (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-animated {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-animated.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-animated.delay-100 { transition-delay: 0.1s; }
    .reveal-animated.delay-200 { transition-delay: 0.2s; }
    .reveal-animated.delay-300 { transition-delay: 0.3s; }
    .reveal-animated.delay-400 { transition-delay: 0.4s; }
    .reveal-animated.delay-500 { transition-delay: 0.5s; }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .gallery-item img {
        transition: none !important;
    }
    
    .gallery-item:hover img {
        transform: none !important;
    }
}
