/* ===== Custom Styles for Hillbilly Igloo ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #e4c4a8;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C0603A;
}

/* Selection color */
::selection {
    background: #C0603A;
    color: #fff;
}

/* ===== Header ===== */
#site-header {
    background: rgba(253, 248, 240, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 200, 168, 0.3);
}

#site-header.scrolled {
    background: rgba(253, 248, 240, 0.95);
    box-shadow: 0 4px 30px rgba(61, 33, 23, 0.06);
}

/* ===== Hamburger Animation ===== */
#menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.hamburger-line {
    display: block;
    height: 2px;
    background: #3D2117;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

/* ===== Marquee ===== */
.marquee-track {
    animation: marquee 30s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Start below fold elements slightly lower by default (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered delays */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.12s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.19s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.26s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.33s; }

/* ===== Nav Links ===== */
.nav-link {
    position: relative;
}

/* ===== Back to Top ===== */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

/* ===== Image hover transitions ===== */
img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #C0603A;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ===== 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;
    }
    .marquee-track {
        animation: none;
    }
}
