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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #E07050;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C0603C;
}

/* Marquee Animation */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Feature Cards */
.feature-card {
    opacity: 1;
}

.feature-card .bg-white {
    will-change: transform, box-shadow;
}

/* Special Cards */
.special-card {
    will-change: transform;
}

/* Scroll Reveal Animations */
/* Note: These are applied via JS for progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    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);
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

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

/* Navbar Transition */
#navbar.scrolled {
    background: rgba(253, 248, 240, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(192, 96, 60, 0.08), 0 4px 20px rgba(61, 43, 31, 0.06);
}

/* Smooth Anchor Links */
a[href^="#"] {
    -webkit-tap-highlight-color: transparent;
}

/* Selection */
::selection {
    background: #F5C0B0;
    color: #3D2B1F;
}

/* 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;
    }
    .animate-marquee {
        animation: none;
    }
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #C0603C;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Image Optimization */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Print Styles */
@media print {
    #navbar, .animate-marquee, #mobile-menu {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
