/* ========================================
   Roxy's Beach Bar & Cafe — Custom Styles
   ======================================== */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

/* Selection */
::selection {
    background-color: #d4b478;
    color: #1f3922;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Scroll Reveal Classes */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ========================================
   Navbar
   ======================================== */

#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background-color: rgba(15, 29, 15, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ========================================
   Mobile Menu
   ======================================== */

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.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.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* ========================================
   Mobile Menu Hamburger
   ======================================== */

#menu-toggle.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active #bar2 {
    opacity: 0;
}

#menu-toggle.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ========================================
   Smooth Scroll Offset for Anchors
   ======================================== */

section[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   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;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Focus Styles
   ======================================== */

a:focus-visible,
button:focus-visible {
    outline: 2px solid #d4b478;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ========================================
   Image Loading Placeholder
   ======================================== */

img {
    background-color: #e3efe8;
}

/* ========================================
   Custom Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f3922;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #76a679;
}
