/* Custom styles for Pieces of Wood */

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

/* Prevent content flash on load for reveal animations */
.js-enabled .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

/* Stat cards floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.stat-card:nth-child(1) { animation: float 4s ease-in-out infinite; }
.stat-card:nth-child(2) { animation: float 4s ease-in-out infinite 0.5s; }
.stat-card:nth-child(3) { animation: float 4s ease-in-out infinite 1s; }
.stat-card:nth-child(4) { animation: float 4s ease-in-out infinite 1.5s; }

/* Service card hover lift */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
}

/* Portfolio item hover */
.portfolio-item {
    cursor: pointer;
}

/* Navbar scroll effect */
.nav-scrolled #navbar {
    background: rgba(245, 240, 247, 0.97);
    box-shadow: 0 1px 20px rgba(107, 63, 107, 0.08);
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
}

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

::-webkit-scrollbar-track {
    background: #F5F0F7;
}

::-webkit-scrollbar-thumb {
    background: #DBCEDF;
    border-radius: 4px;
}

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

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #D4A853;
    outline-offset: 2px;
}

/* Reduced motion */
@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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .stat-card {
        animation: none !important;
    }
}
