/* ─── Custom overrides & additions ─── */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* ─── Scroll reveal animations ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

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

/* ─── Navbar scroll state ─── */
.navbar-scrolled {
    background: rgba(253, 252, 248, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

.navbar-scrolled .font-serif,
.navbar-scrolled a:not(.bg-emerald-800) {
    color: #064e3b !important;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f0;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #064e3b;
}

/* ─── Input autofill override ─── */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
    box-shadow: 0 0 0 30px #fff inset !important;
}

/* ─── Selection color ─── */
::selection {
    background: #166534;
    color: #fdfcf8;
}
