/* Custom styles for Bears Hideaway Cabin */

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

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

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

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

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

/* Selection color */
::selection {
    background: #d4522e;
    color: white;
}

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

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

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
    margin-left: 0;
}

/* Mobile link animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Only apply reveal animations when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 0;
    }
    
    .reveal-up {
        transform: translateY(40px);
    }
    
    .reveal-left {
        transform: translateX(-40px);
    }
    
    .reveal-right {
        transform: translateX(40px);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Navbar transition */
#navbar {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-display,
#navbar.scrolled span {
    color: #1b1b1b;
}

#navbar.scrolled .menu-line {
    background: #1b1b1b;
}

/* Parallax-like subtle effect for hero */
#hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}

/* Image hover zoom with overflow hidden */
.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Button hover effects */
button, a {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduce motion preference */
@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;
    }
}

/* Print styles */
@media print {
    #navbar,
    #contact-form,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Aspect ratio utilities */
.aspect-card {
    aspect-ratio: 4/5;
}

/* Custom gradient text */
.gradient-text {
    background: linear-gradient(135deg, #B85D38, #e06b48);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle pattern overlay */
.pattern-overlay {
    background-image: radial-gradient(circle at 1px 1px, rgba(184, 93, 56, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}
