/* ── Base & Utilities ── */
html {
    scroll-behavior: smooth;
}

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

/* ── Scroll Reveal ── */
.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);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Default state for reduced-motion or no-JS is visible */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

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

/* ── Floating Cards Animation ── */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1s;
}

.floating-card:nth-child(3) {
    animation-delay: -2s;
}

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

/* ── Navbar ── */
#nav.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-blur-lg;
    box-shadow: 0 1px 20px rgba(31, 88, 27, 0.08);
}

/* ── Mobile Menu ── */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1f581b;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #368f30;
}

/* ── Selection ── */
::selection {
    background: #b6dfb3;
    color: #1f581b;
}

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

/* ── Smooth image loading ── */
img {
    image-rendering: auto;
    loading: lazy;
}

/* ── Print ── */
@media print {
    #nav, .floating-card, .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
