/* ===== Base & Utilities ===== */
*, *::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: #B5651D;
    color: #FDF9F3;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }

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

/* ===== Navbar ===== */
#navbar {
    background: rgba(253, 249, 243, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(26, 39, 68, 0.06);
}

#navbar.scrolled {
    background: rgba(253, 249, 243, 0.95);
    box-shadow: 0 1px 20px rgba(15, 27, 51, 0.08);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
}

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

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #B5651D;
}

/* ===== Image Placeholder Fallback ===== */
img {
    background: linear-gradient(135deg, #F2E0C4 0%, #E8C99A 100%);
}

/* ===== Section Spacing ===== */
section {
    position: relative;
}

/* ===== Card Hover Glow ===== */
.group:hover .group-hover\:bg-terracotta-500\/20 {
    background-color: rgba(181, 101, 29, 0.2);
}

/* ===== Smooth Image Loading ===== */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}
