/* ============================================
   The Tavern at the Carmichael — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* --- Scroll Reveal Animations --- */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll[data-revealed="false"] {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* --- Navbar Active State --- */
.navbar-scrolled {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

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

/* --- Hamburger Animation --- */
.menu-btn-active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn-active #bar2 {
    opacity: 0;
}

.menu-btn-active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* --- Image Hover Effects --- */
.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-img:hover {
    transform: scale(1.05);
}

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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #C9A84C;
}

/* --- Selection Color --- */
::selection {
    background: rgba(232, 106, 91, 0.3);
    color: #f9fafb;
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 4px;
    border-radius: 4px;
}

/* --- Image Aspect Ratios --- */
.aspect-card {
    aspect-ratio: 4 / 3;
}

/* --- Gold Accent Line --- */
.gold-line {
    position: relative;
}

.gold-line::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #C9A84C, transparent);
}

/* --- Card Hover Glow --- */
.card-glow:hover {
    box-shadow: 0 0 40px rgba(232, 106, 91, 0.08);
}

/* --- Button Ripple Effect --- */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-ripple:hover::after {
    opacity: 1;
}

/* --- Parallax Subtle --- */
.parallax-slow {
    will-change: transform;
}

/* --- Loading State --- */
.page-loaded .reveal-on-scroll {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}
