/* ============================================
   Crosswalk Bar & Grill — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(126, 212, 193, 0.3);
    color: #ffffff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0A1628;
}
::-webkit-scrollbar-thumb {
    background: rgba(126, 212, 193, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(126, 212, 193, 0.5);
}

/* --- Navbar --- */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(6, 14, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(126, 212, 193, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open .mobile-link {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Hamburger Animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* --- Hero Animations --- */
.hero-subtitle {
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease 0.5s forwards;
    opacity: 0;
}

.hero-desc {
    animation: fadeUp 0.8s ease 0.7s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 0.8s ease 0.9s forwards;
    opacity: 0;
}

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

/* --- Scroll Reveal --- */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- 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;
    }

    .hero-subtitle,
    .hero-title,
    .hero-desc,
    .hero-cta {
        opacity: 1;
    }
}

/* --- Image hover effect --- */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* --- Button focus --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #7ED4C1;
    outline-offset: 2px;
    border-radius: 9999px;
}

/* --- Map dark theme override --- */
iframe[title*="Maps"] {
    border-radius: 0 0 1rem 1rem;
}

/* --- Responsive adjustments --- */
@media (max-width: 767px) {
    .hero-title {
        font-size: 3rem;
        line-height: 1;
    }

    #navbar nav {
        padding: 1rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5.5rem;
    }
}

@media (min-width: 1280px) {
    .hero-title {
        font-size: 6.5rem;
    }
}
