/* ============================================
   Rushbrook General Store & Café
   Premium Dark Luxury Theme
   Midnight Blue + Mint + Gold
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: #050a14;
    color: #ffffff;
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 160, 23, 0.4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 160, 23, 0.6);
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollLine {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

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

.reveal-on-scroll.revealed:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll.revealed:nth-child(3) { transition-delay: 0.2s; }
.reveal-on-scroll.revealed:nth-child(4) { transition-delay: 0.3s; }

/* ============================================
   Navbar
   ============================================ */

#navbar {
    background: transparent;
    backdrop-filter: none;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(5, 10, 20, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 160, 23, 0.1);
}

/* Mobile Menu */
#mobile-menu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transition: opacity 0.3s ease;
}

/* Menu toggle animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ============================================
   Buttons & Interactive Elements
   ============================================ */

a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Focus styles */
a:focus-visible, 
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(251, 191, 36, 0.6);
    outline-offset: 2px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* ============================================
   Utility: Subtle grain texture overlay
   ============================================ */

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}
