/* ============================================
   Old Rail Coffee Pub — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(114, 47, 55, 0.15);
    color: #722F37;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F4;
}
::-webkit-scrollbar-thumb {
    background: #E6B8B6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C06064;
}

/* --- Nav Link Underline --- */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #722F37, #d47654);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* --- Scroll Reveal Animations --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up {
    transform: translateY(0);
}
.reveal-left {
    transform: translateX(0);
}
.reveal-right {
    transform: translateX(0);
}

/* When JS adds the hidden state, these animate in */
.js-enabled .reveal-up {
    opacity: 0;
    transform: translateY(30px);
}
.js-enabled .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
}
.js-enabled .reveal-right {
    opacity: 0;
    transform: translateX(30px);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .js-enabled .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    .js-enabled .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* --- Navbar Scrolled State --- */
.navbar-scrolled {
    background: rgba(253, 248, 244, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(114, 47, 55, 0.08);
}

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

/* --- Menu Item Hover --- */
#menu ul li {
    border-bottom: 1px solid rgba(114, 47, 55, 0.06);
    padding-bottom: 1.25rem;
}
#menu ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* --- Gallery Image Hover --- */
#gallery .rounded-2xl {
    overflow: hidden;
    position: relative;
}
#gallery .rounded-2xl::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(51, 22, 25, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}
#gallery .rounded-2xl:hover::after {
    opacity: 1;
}

/* --- Form Select Arrow --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C06064' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #722F37;
    outline-offset: 2px;
}

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

/* --- Smooth Image Loading --- */
img {
    image-rendering: auto;
}

/* --- Selection Colors --- */
::selection {
    background: rgba(114, 47, 55, 0.12);
}

/* --- Print Styles --- */
@media print {
    #navbar, #menu-btn, #mobile-menu { display: none !important; }
    body { background: white; color: black; }
    section { padding: 20px 0 !important; }
}
