/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite 1s;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Navbar Scroll State ── */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .font-display {
    color: #1f3615 !important;
}

/* ── Card Hover Glow ── */
.group:hover .shadow-lg {
    transition: box-shadow 0.5s ease;
}

/* ── Custom Selection ── */
::selection {
    background: #c5dfb2;
    color: #1f3615;
}

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #74a852;
    outline-offset: 2px;
}

/* ── Mobile Menu Transition ── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    max-height: 400px;
}

/* ── Image Hover Transforms ── */
.group .overflow-hidden img,
section .overflow-hidden img {
    will-change: transform;
}

/* ── Smooth Scroll Offset for Fixed Nav ── */
section[id] {
    scroll-margin-top: 80px;
}

/* ── Form Input Transitions ── */
input, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
    border-color: #74a852 !important;
    box-shadow: 0 0 0 3px rgba(116, 168, 82, 0.15) !important;
}

/* ── Responsive Adjustments ── */
@media (max-width: 640px) {
    html {
        scroll-padding-top: 80px;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    .animate-float,
    .animate-float-delayed {
        display: none;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 3.5rem;
    }
}
