/* ========================================
   Creekside Saw Mill — Custom Styles
   ======================================== */

/* Base */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(27, 67, 50, 0.2);
    color: #1B4332;
}

/* Navbar transitions */
.nav-text {
    color: #1B4332;
}

nav.scrolled .nav-text {
    color: #1B4332;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #407240;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero stat cards */
.stat-card {
    animation: floatCard 6s ease-in-out infinite;
}

.stat-card:nth-child(1) {
    animation-delay: 0s;
}

.stat-card:nth-child(2) {
    animation-delay: -1.5s;
}

.stat-card:nth-child(3) {
    animation-delay: -3s;
}

.stat-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Mobile menu */
.mobile-menu-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .mobile-menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#mobile-menu-btn.active .mobile-menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .mobile-menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.375rem;
}

/* Scroll reveal animations (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: reduce) {
    .reveal.hidden-reveal {
        opacity: 1;
        transform: none;
    }
    
    .stat-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    img {
        transition: none;
    }
}

/* Image hover effects */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #407240;
    outline-offset: 3px;
    border-radius: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8aad82;
}

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