/* ========================================
   Black Cat Diner — Custom Styles
   ======================================== */

/* ---- Reset & Base ---- */
*, *::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%;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1210;
}
::-webkit-scrollbar-thumb {
    background: #781f21;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b8253f;
}

/* ---- Selection ---- */
::selection {
    background: #781f21;
    color: #faf6f3;
}

/* ---- Hero Background ---- */
.hero-bg {
    will-change: transform;
}

.hero-scrim {
    background: linear-gradient(
        to bottom,
        rgba(26, 18, 16, 0.35) 0%,
        rgba(26, 18, 16, 0.25) 40%,
        rgba(26, 18, 16, 0.70) 80%,
        rgba(26, 18, 16, 0.92) 100%
    );
}

/* ---- Hero Animations ---- */
.hero-tagline {
    animation: fadeSlideUp 0.9s ease-out 0.3s both;
}

.hero-headline {
    animation: fadeSlideUp 0.9s ease-out 0.5s both;
}

.hero-sub {
    animation: fadeSlideUp 0.9s ease-out 0.7s both;
}

.hero-cta {
    animation: fadeSlideUp 0.9s ease-out 0.9s both;
}

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

/* ---- CTA Section Background ---- */
.cta-bg {
    will-change: transform;
}

.cta-scrim {
    background: linear-gradient(
        to bottom,
        rgba(26, 18, 16, 0.55) 0%,
        rgba(26, 18, 16, 0.75) 50%,
        rgba(26, 18, 16, 0.90) 100%
    );
}

/* ---- Scroll Indicator ---- */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ---- Marquee ---- */
.marquee-track {
    animation: marqueeScroll 30s linear infinite;
    will-change: transform;
}

.marquee-item {
    white-space: nowrap;
}

.marquee-dot {
    flex-shrink: 0;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Section Tags ---- */
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #781f21;
}

/* ---- Menu Items ---- */
.menu-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(26, 18, 16, 0.06);
}

.menu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ---- Reveal Animations (progressive enhancement) ---- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Default state: content is visible (no JS) */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Button Styles ---- */
.cta-primary {
    position: relative;
    overflow: hidden;
}

.cta-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cta-primary:hover::after {
    opacity: 1;
}

/* ---- Navbar Transition ---- */
#navbar.scrolled {
    background: rgba(250, 246, 243, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 18, 16, 0.08);
}

#navbar.scrolled .nav-logo {
    color: #1a1210 !important;
}

#navbar.scrolled .hamburger-line {
    background: #1a1210 !important;
}

/* ---- Mobile Menu ---- */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    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.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; }

/* ---- Hamburger Animation ---- */
#menu-toggle.active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: rotate(45deg);
}

#menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    top: 50%;
}

#menu-toggle.active .hamburger-line:nth-child(3) {
    top: 50%;
    transform: rotate(-45deg);
    width: 1.25rem;
}

/* ---- Image Hover ---- */
.aspect-square img,
.rounded-2xl img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- Focus Styles ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #781f21;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .hero-tagline,
    .hero-headline,
    .hero-sub,
    .hero-cta {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .marquee-track {
        animation: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .aspect-square img,
    .rounded-2xl img {
        transition: none;
    }
    .scroll-line {
        animation: none;
        opacity: 0.5;
    }
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem;
    }
    
    .font-serif.text-5xl,
    .font-serif.text-6xl,
    .font-serif.text-7xl {
        font-size: 2.5rem;
    }
    
    #navbar .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 4rem;
    }
}

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