/* Custom styles for Timbercreek Doors */

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

/* Base font styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Navigation states */
.nav-scrolled {
    background-color: rgba(5, 46, 22, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hero parallax effect */
.hero-bg {
    will-change: transform;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #14532d;
}

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

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

#mobile-menu.closed {
    opacity: 0;
    visibility: hidden;
}

/* Image hover effects */
img {
    transition: transform 0.7s ease;
}

/* Button hover effects */
button,
a {
    transition: all 0.3s ease;
}

/* Form input focus effects */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

/* Print styles */
@media print {
    nav,
    .scroll-reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Large screen adjustments */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }
}

/* Ensure all content is readable */
@media (prefers-color-scheme: dark) {
    /* Keep our custom colors regardless of system preference */
}
