/* Custom styles for Jitterbug Espresso */

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

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

/* Selection color */
::selection {
    background-color: #305425;
    color: #faf8f4;
}

/* Navbar scroll state */
nav.scrolled {
    background-color: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(48, 84, 37, 0.08);
}

nav.scrolled #nav-logo,
nav.scrolled #nav-logo-text {
    color: #305425;
}

nav.scrolled a:not([class*="bg-"]) {
    color: #305425 !important;
}

nav.scrolled a:not([class*="bg-"]):hover {
    color: #52873c !important;
}

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

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #75a659;
}

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

/* Image loading placeholder */
img {
    background-color: #e3eddc;
}

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

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

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
