/* ============================================
   Maguffy's Pub — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(163, 84, 110, 0.15);
    color: #4d2430;
}

/* --- Navigation --- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(111, 49, 69, 0.06);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #4d2430;
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #f4b942;
}

#navbar:not(.scrolled) .nav-link::after {
    background-color: #f4b942;
}

#navbar:not(.scrolled) .w-8 {
    border-color: rgba(255, 255, 255, 0.6);
}

#navbar.scrolled .w-8 {
    border-color: #4d2430;
}

#navbar:not(.scrolled) .font-serif {
    color: rgba(255, 255, 255, 0.9);
}

#navbar.scrolled .font-serif {
    color: #4d2430;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 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 fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu button animation */
#menu-btn.active #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active #line2 {
    opacity: 0;
}

#menu-btn.active #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* --- Hero --- */
.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.2s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.1s;
}

.hero-desc {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.4s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.5s;
}

.hero-accent {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.7s;
}

.hero-image-wrapper {
    opacity: 0;
    transform: translateX(30px);
    animation: heroImageReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.3s;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Scroll Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- About Section --- */
.about-label {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.6s ease;
}

.about-title {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease;
}

.about-image-grid {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s ease;
}

.about-content-right {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.8s ease;
}

.about-label.revealed,
.about-title.revealed,
.about-image-grid.revealed,
.about-content-right.revealed {
    opacity: 1;
    transform: translate(0);
}

/* --- Menu Section --- */
.menu-category {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-category.revealed {
    opacity: 1;
    transform: translateY(0);
}

.menu-category:nth-child(1) { transition-delay: 0.1s; }
.menu-category:nth-child(2) { transition-delay: 0.2s; }
.menu-category:nth-child(3) { transition-delay: 0.3s; }

.menu-label,
.menu-title,
.menu-desc {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease;
}

.menu-label.revealed,
.menu-title.revealed,
.menu-desc.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Atmosphere Section --- */
.atmosphere-label,
.atmosphere-title {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease;
}

.atmosphere-label.revealed,
.atmosphere-title.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Visit Section --- */
.visit-label,
.visit-title {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease;
}

.visit-label.revealed,
.visit-title.revealed {
    opacity: 1;
    transform: translateY(0);
}

.visit-item {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.5s ease;
}

.visit-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.visit-item:nth-child(1) { transition-delay: 0.1s; }
.visit-item:nth-child(2) { transition-delay: 0.2s; }
.visit-item:nth-child(3) { transition-delay: 0.3s; }

/* --- Image hover effects --- */
.overflow-hidden {
    position: relative;
}

.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(77, 36, 48, 0.08));
    pointer-events: none;
}

/* --- Smooth anchor offset --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-title span {
        font-size: 2.5rem !important;
    }
    
    .hero-accent {
        display: none;
    }
    
    .about-image-grid {
        margin-top: 0 !important;
    }
    
    .visit-item {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
}

/* --- Print --- */
@media print {
    #navbar, .hero-accent {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
