*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Floating card animations */
.floating-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 20px 24px;
    width: 180px;
    animation: float 4s ease-in-out infinite;
    text-align: center;
}

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

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header scroll state */
#site-header.scrolled {
    background: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(54, 69, 79, 0.08);
}

#site-header.scrolled .font-serif,
#site-header.scrolled .text-charcoal-900 {
    color: #14181c;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f5f3ef; }
::-webkit-scrollbar-thumb { background: #c7cbd0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ba2ab; }

/* Focus styles */
:focus-visible {
    outline: 2px solid #E8625B;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: #E8625B;
    color: white;
}
