/* ===== BASE & RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: #9c2222;
    color: #faf8f5;
}

/* ===== NAVBAR ===== */
#navbar {
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(156, 34, 34, 0.08);
}

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

/* ===== MOBILE MENU ===== */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

/* ===== FLOATING CARDS ===== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: -2s;
}

.card-3 {
    animation-delay: -4s;
}

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

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9c2222;
}

/* ===== FORM STYLES ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ===== IMAGE LAZY LOADING ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #9c2222;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .floating-card.card-3 {
        display: none;
    }
}
