/* ── Base & Utilities ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }

/* ── Nav scroll state ───────────────────────────────── */
#nav.scrolled {
    background: rgba(252, 252, 248, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(47, 79, 52, 0.08), 0 4px 24px rgba(47, 79, 52, 0.06);
}

/* ── Nav link underline animation ───────────────────── */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
    border-radius: 1px;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Floating card animations ───────────────────────── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-16px) rotate(-0.5deg); }
}
@keyframes float-fast {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-10px) rotate(0.3deg); }
}
.animate-float-slow   { animation: float-slow   6s ease-in-out infinite; }
.animate-float-medium { animation: float-medium  5s ease-in-out infinite; }
.animate-float-fast   { animation: float-fast   4s ease-in-out infinite; }

/* ── Scroll reveal (below the fold only) ────────────── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: none;
}

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

/* Stagger children */
.reveal-child {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-child.revealed {
    opacity: 1;
    transform: none;
}

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

/* ── Gallery strip hover ────────────────────────────── */
.gallery-strip section {
    overflow: hidden;
}

/* ── Mobile menu transitions ────────────────────────── */
#mobileMenu {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
}
#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
}

.mobile-link {
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.mobile-link:hover {
    color: #4a7c4f;
    padding-left: 8px;
}

/* ── Form focus styles ──────────────────────────────── */
input:focus, textarea:focus {
    outline: none;
}

/* ── Selection color ────────────────────────────────── */
::selection {
    background: rgba(74, 124, 79, 0.2);
    color: #1f3423;
}
