/* ===== Custom Styles for Twisted Treats ===== */

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

/* Prevent content flash on load */
body {
    opacity: 1;
}

/* ===== Navbar ===== */
.navbar-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

/* ===== Floating Cards Animation ===== */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1s;
}

.floating-card:nth-child(3) {
    animation-delay: -2s;
}

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

/* ===== Treat Card Hover ===== */
.treat-card {
    will-change: transform;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    display: block;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .floating-card {
        animation: none;
    }
}

/* ===== Selection ===== */
::selection {
    background: #c6d9b0;
    color: #2a3d1b;
}

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

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

::-webkit-scrollbar-thumb {
    background: #9dbb7a;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #78994e;
}

/* ===== Focus visible ===== */
:focus-visible {
    outline: 3px solid #78994e;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ===== Form select arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23577a33' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Print ===== */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
