/* ============================================
   Travelin' Tom's Coffee Shop — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #d97706;
    color: #2a0f28;
}

/* ============================================
   Hero Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

    .reveal-on-scroll.is-hidden {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
}

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

/* ============================================
   Navbar
   ============================================ */
#navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(74, 31, 74, 0.08);
}

#navbar.scrolled .font-serif {
    color: #4a1f4a !important;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #d97706;
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
    left: 0;
}

/* ============================================
   Parallax Hero Background
   ============================================ */
#hero-bg {
    will-change: transform;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
}

/* ============================================
   Smooth Image Loading
   ============================================ */
img {
    image-rendering: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf8f5;
}

::-webkit-scrollbar-thumb {
    background: #cc9fd0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9c4d9e;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav, #back-to-top, form {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-plum-950, .bg-plum-50 {
        background: white !important;
        color: black !important;
    }
}
