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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: #f5bdb0;
    color: #5c1c1c;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdf0eb;
}
::-webkit-scrollbar-thumb {
    background: #d04534;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8c2929;
}

/* ===== Scroll Reveal Animations (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .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; }
}

/* ===== Navbar transition ===== */
.nav-scrolled {
    background: rgba(253, 247, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(140, 41, 41, 0.08);
}

.nav-scrolled .navbar-brand {
    color: #5c1c1c !important;
}

.nav-scrolled nav a {
    color: #8c2929 !important;
}

.nav-scrolled nav a:hover {
    color: #5c1c1c !important;
}

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

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

/* ===== Floating cards animation ===== */
@media (prefers-reduced-motion: no-preference) {
    .float-card-1 {
        animation: float1 6s ease-in-out infinite;
    }
    .float-card-2 {
        animation: float2 7s ease-in-out infinite;
    }
    .float-card-3 {
        animation: float3 5s ease-in-out infinite;
    }
    .float-card-4 {
        animation: float4 8s ease-in-out infinite;
    }
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
@keyframes float4 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

/* ===== Button hover effects ===== */
a {
    text-decoration: none;
}

/* ===== Image optimization ===== */
img {
    max-width: 100%;
    height: auto;
}

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

/* ===== Print styles ===== */
@media print {
    nav, #mobile-menu-btn, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
