/* Custom Styles for Hutchinson Custom Lumber & Mill */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(176, 55, 95, 0.4);
    color: #fff;
}

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

::-webkit-scrollbar-track {
    background: #0f0f1a;
}

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

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

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(7, 7, 16, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(117, 38, 66, 0.2) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal.delay-100 { transition-delay: 0.1s; }
    .reveal.delay-200 { transition-delay: 0.2s; }
    .reveal.delay-300 { transition-delay: 0.3s; }
    .reveal.delay-400 { transition-delay: 0.4s; }
    .reveal.delay-500 { transition-delay: 0.5s; }
}

/* Gold shimmer on hover for interactive elements */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ensure proper text rendering */
h1, h2, h3, h4 {
    text-rendering: optimizeLegibility;
}

/* Hero gradient animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Pulse animation for dots */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}
