/* ============================================
   Lucky's — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(26, 58, 42, 0.15);
    color: #1a3a2a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f9f4eb;
}
::-webkit-scrollbar-thumb {
    background: #b9d0be;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb896;
}

/* Header scroll state */
#site-header.scrolled {
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(26, 58, 42, 0.06);
}

#site-header.scrolled .font-serif {
    color: #1a3a2a;
}

/* Nav links underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #1a3a2a;
    transition: width 0.3s ease;
}

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

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

#menu-icon.active #bar-top {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-icon.active #bar-mid {
    opacity: 0;
    width: 0;
}

#menu-icon.active #bar-bot {
    transform: rotate(-45deg) translate(3px, -3px);
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: all 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 base — content always visible */
.about-reveal,
.menu-reveal,
.atm-reveal,
.visit-reveal,
.contact-reveal {
    opacity: 1;
    transform: none;
}

/* Animated states — applied via JS only */
.animate-on-scroll.is-visible {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* Stagger children */
.animate-on-scroll .about-reveal:nth-child(1),
.animate-on-scroll .menu-reveal:nth-child(1),
.animate-on-scroll .atm-reveal:nth-child(1),
.animate-on-scroll .visit-reveal:nth-child(1),
.animate-on-scroll .contact-reveal:nth-child(1) { animation-delay: 0s; }

.animate-on-scroll .about-reveal:nth-child(2),
.animate-on-scroll .menu-reveal:nth-child(2),
.animate-on-scroll .atm-reveal:nth-child(2),
.animate-on-scroll .visit-reveal:nth-child(2),
.animate-on-scroll .contact-reveal:nth-child(2) { animation-delay: 0.1s; }

.animate-on-scroll .about-reveal:nth-child(3),
.animate-on-scroll .menu-reveal:nth-child(3),
.animate-on-scroll .atm-reveal:nth-child(3),
.animate-on-scroll .visit-reveal:nth-child(3),
.animate-on-scroll .contact-reveal:nth-child(3) { animation-delay: 0.2s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .animate-on-scroll.is-visible {
        animation: none;
    }
    .nav-link::after {
        display: none;
    }
}

/* Image hover */
.relative.overflow-hidden.rounded-2xl img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.relative.overflow-hidden.rounded-2xl:hover img {
    transform: scale(1.03);
}

/* Button focus */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3d7a52;
    outline-offset: 2px;
}

/* Form */
input::placeholder,
textarea::placeholder {
    color: rgba(26, 26, 24, 0.2);
}
