/* Custom styles for The Drawing Room Community Coffeehouse */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #243b53;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #102a43;
}

/* Selection color */
::selection {
    background: #f6e09a;
    color: #102a43;
}

/* Image reveal animation - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-image {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-image.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade-in animations for scroll sections */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .fade-in.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-display {
    color: #102a43;
}

/* Hero parallax-like effect */
#hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}

/* Button hover effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #f6e09a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal-image {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
