/* Custom styles for Charlie's Coop & Crumb */

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

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

/* Navbar transition states */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-text {
    color: #2E2E3C !important;
}

/* Hero overlay for text readability */
#hero .absolute.inset-0::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(18, 18, 26, 0.6) 0%, rgba(18, 18, 26, 0.4) 50%, rgba(18, 18, 26, 0.7) 100%);
    z-index: 1;
}

#hero .relative.z-10 {
    position: relative;
    z-index: 2;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Floating animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
    animation-delay: 1s;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

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

/* Card hover effects */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Form focus states */
input:focus,
textarea:focus {
    outline: none;
}

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

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

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

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .animate-float,
    .animate-float-delayed {
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .font-display {
        font-weight: 600;
    }
}

/* Print styles */
@media print {
    nav,
    #back-to-top,
    .animate-float,
    .animate-float-delayed {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
