/* ============================================
   SPRING CREEK DINER — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(201, 168, 76, 0.3);
    color: #FDFCF8;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    padding: 0.75rem 1.5rem;
    background: #C9A84C;
    color: #07261c;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* --- Navbar --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #C9A84C;
    transition: width 0.3s ease;
}

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

.navbar-scrolled {
    background: rgba(3, 20, 12, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.mobile-menu-open body {
    overflow: hidden;
}

.mobile-menu-link {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
}

/* Animated hamburger */
#menu-btn[aria-expanded="true"] #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn[aria-expanded="true"] #bar3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Scroll Line Animation --- */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* --- Gold shimmer on hover for cards --- */
.reveal:hover .border-gold-500\/20 {
    border-color: rgba(201, 168, 76, 0.3);
}

/* --- Menu item hover --- */
#menu ul li:hover {
    background: rgba(201, 168, 76, 0.03);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
    transition: all 0.2s ease;
}

#menu ul li {
    padding: 4px 0;
    margin: 0 -8px;
    border-radius: 8px;
}

/* --- Input autofill styling --- */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgb(3, 20, 12) inset !important;
    -webkit-text-fill-color: #FDFCF8 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* --- Focus visible --- */
:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .animate-scroll-line {
        animation: none;
        opacity: 0.5;
    }
}

/* --- Responsive adjustments --- */
@media (max-width: 767px) {
    h1 {
        font-size: 2.75rem !important;
        line-height: 1.1 !important;
    }

    h2 {
        font-size: 2.25rem !important;
    }

    #hero {
        padding-top: 6rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    h1 {
        font-size: 4rem !important;
    }

    h2 {
        font-size: 3rem !important;
    }
}
