/* ============================================
   The Butternut Cafe — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #aed0b0;
    color: #1a3225;
}

/* ============================================
   Floating Animation Cards
   ============================================ */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

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

.floating-card-1 {
    animation: float-slow 6s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-medium 4.5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float-fast 3.5s ease-in-out infinite;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Always-visible fallback for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Navbar Scroll State
   ============================================ */
.nav-scrolled {
    background-color: rgba(254, 253, 251, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(26, 50, 37, 0.08);
}

.nav-scrolled .font-display {
    color: #1a3225 !important;
}

/* ============================================
   Form Focus States
   ============================================ */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* ============================================
   Smooth transitions for interactive elements
   ============================================ */
a, button {
    transition: all 0.2s ease;
}

img {
    will-change: transform;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7fb882;
}

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

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

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
    .floating-card-1 {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin-bottom: 1rem;
        animation: float-slow 6s ease-in-out infinite;
    }
    
    .floating-card-2 {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin-bottom: 1rem;
        animation: float-medium 4.5s ease-in-out infinite;
    }
    
    .floating-card-3 {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        animation: float-fast 3.5s ease-in-out infinite;
    }
}
