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

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ed;
}
::-webkit-scrollbar-thumb {
    background: #d4a84b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c49a3f;
}

/* Selection */
::selection {
    background: #f5d06e;
    color: #1e3a5f;
}

/* Float animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Scroll reveal base — always visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Progressive enhancement — hide only when JS enables and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal-visible .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu */
.mobile-link {
    display: block;
    border-bottom: 1px solid rgba(30, 58, 95, 0.06);
}
.mobile-link:last-child {
    border-bottom: none;
}

/* Header scroll state */
header.scrolled {
    background: rgba(254, 253, 249, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(30, 58, 95, 0.06), 0 4px 20px rgba(30, 58, 95, 0.04);
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #d4a84b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading */
img {
    display: block;
    max-width: 100%;
}
