/* Custom styles for Treehouse Pub and Grub */

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

/* Floating card animations */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(-1deg); }
}

@keyframes float-fast {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.floating-card {
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.animate-float-slow {
    animation: float-slow 4s ease-in-out infinite;
}

.animate-float-medium {
    animation: float-medium 3.2s ease-in-out infinite;
}

.animate-float-fast {
    animation: float-fast 2.6s ease-in-out infinite;
}

/* Scroll reveal styles */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(250, 240, 251, 0.92) !important;
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(123, 45, 142, 0.08);
}

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

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

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

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

/* Selection color */
::selection {
    background: #ebc0eb;
    color: #3d1544;
}

/* Image aspect ratio fallback */
img {
    max-width: 100%;
    height: auto;
}

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

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

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

/* Form focus ring custom */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(155, 77, 150, 0.15);
}

/* Button press effect */
button:active {
    transform: scale(0.97);
}

/* Print styles */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
