/* ============================================
   Wortham Restaurant — Custom Styles
   ============================================ */

/* Scroll-behavior for smooth anchor navigation */
html {
    scroll-behavior: smooth;
}

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0d9488;
    transition: width 0.25s ease;
}

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

/* Mobile menu link styles */
.mobile-link {
    position: relative;
    padding-left: 0;
}

/* Header shadow on scroll */
#site-header.scrolled {
    box-shadow: 0 1px 20px rgba(2, 6, 23, 0.08);
}

/* Reveal animations — progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When JS is active, add the initial hidden state */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .js-enabled .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .group img {
        transition: none;
    }
    .group:hover img {
        transform: none;
    }
}

/* Image hover transitions */
.group img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #78716c;
}

/* Selection color */
::selection {
    background: #ccfbf1;
    color: #042f2e;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fafaf9 inset !important;
    box-shadow: 0 0 0 30px #fafaf9 inset !important;
}
