/* ===== Base & Utilities ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(28, 48, 28, 0.08);
}

.nav-text {
    color: #1c301c;
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-text {
    color: #faf9f6;
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(250, 249, 246, 0.85);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #faf9f6;
}

#navbar.scrolled .nav-link {
    color: #315231;
}

/* ===== Floating Card Animations ===== */
.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); }
}

/* ===== Scroll Reveal ===== */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Staggered delays for grid items */
.section-reveal:nth-child(1) { transition-delay: 0ms; }
.section-reveal:nth-child(2) { transition-delay: 80ms; }
.section-reveal:nth-child(3) { transition-delay: 160ms; }
.section-reveal:nth-child(4) { transition-delay: 240ms; }
.section-reveal:nth-child(5) { transition-delay: 320ms; }
.section-reveal:nth-child(6) { transition-delay: 400ms; }

/* ===== Mobile Menu ===== */
.mobile-link {
    display: block;
}

/* ===== Selection ===== */
::selection {
    background: #315231;
    color: #faf9f6;
}

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

/* ===== Smooth Image Loading ===== */
img {
    display: block;
    max-width: 100%;
}
