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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #7B2D3B;
    color: #FAF7F4;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAF7F4;
}
::-webkit-scrollbar-thumb {
    background: #d4c8c0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

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

#navbar.scrolled {
    background: rgba(250, 247, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

#navbar.scrolled .nav-text {
    color: #1A1A1A;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #7B2D3B;
    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: fadeUp 0.4s ease forwards;
    opacity: 1;
}

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

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

/* Menu toggle animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg);
    top: 4px;
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg);
    width: 24px;
}

/* ============================================
   Hero
   ============================================ */
.hero-deco {
    animation: heroDeco 1.2s ease forwards;
    opacity: 0;
}

.hero-deco:nth-child(1) { animation-delay: 0.2s; }
.hero-deco:nth-child(2) { animation-delay: 0.4s; }
.hero-deco:nth-child(3) { animation-delay: 0.6s; }

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

.hero-reveal {
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(24px);
}

.hero-reveal:nth-child(1) { animation-delay: 0.1s; }
.hero-reveal:nth-child(2) { animation-delay: 0.25s; }
.hero-reveal:nth-child(3) { animation-delay: 0.4s; }
.hero-reveal:nth-child(4) { animation-delay: 0.55s; }

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

/* Scroll line animation */
.scroll-line {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #7B2D3B);
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
                    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .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; }
}

/* Always visible for reduced motion or no-JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* No-JS fallback: ensure everything is visible */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ============================================
   Typography refinements
   ============================================ */
.font-serif {
    letter-spacing: -0.01em;
}

/* ============================================
   Image hover effects
   ============================================ */
img {
    display: block;
}

/* ============================================
   Smooth transitions on links
   ============================================ */
a {
    text-decoration: none;
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    #navbar, .scroll-indicator {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
