/* Custom styles for The Loch Café & Games */

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

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

/* Navigation transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width duration-300;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

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

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

/* Floating stat cards subtle animation */
@media (prefers-reduced-motion: no-preference) {
    .absolute.top-0.right-0 {
        animation: float-slow 6s ease-in-out infinite;
    }
    
    .absolute.top-28.right-48 {
        animation: float-slow 5s ease-in-out infinite 1s;
    }
    
    .absolute.bottom-8.right-12 {
        animation: float-slow 7s ease-in-out infinite 0.5s;
    }
}

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

/* Image hover effects */
.rounded-2xl.overflow-hidden img {
    display: block;
}

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

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 249, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(49, 77, 33, 0.1);
}

.nav-scrolled .nav-link {
    color: #314d21 !important;
}

.nav-scrolled #navbar a:not(.nav-link):not([class*="bg-forest"]) .font-serif,
.nav-scrolled #navbar a:not(.nav-link):not([class*="bg-forest"]) .block {
    color: #314d21 !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #72a052;
}

/* Selection color */
::selection {
    background: #c6dbb0;
    color: #111a0b;
}

/* Form transitions */
input, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

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