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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(46, 86, 46, 0.15);
    color: #1f381f;
}

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

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

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

/* ── Mobile Menu ── */
#mobileMenu.open {
    transform: translateX(0);
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    margin-right: 0;
    transform: translateY(-4px) rotate(-45deg);
}

/* ── Reveal Animations ── */
.reveal-left,
.reveal-right,
.reveal-up {
    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-left {
    transform: translateX(-30px);
}

.reveal-right {
    transform: translateX(30px);
}

.reveal-float {
    opacity: 0;
    transform: translateY(20px);
    animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.reveal-float-delayed {
    opacity: 0;
    transform: translateY(20px);
    animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0) translateY(0);
}

@keyframes floatIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Floating card animation ── */
.reveal-float,
.reveal-float-delayed {
    animation: gentle-float 4s ease-in-out infinite;
}

.reveal-float-delayed {
    animation-delay: 1s;
}

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

/* ── Scroll indicator ── */
@keyframes scroll-bounce {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
    50% { transform: translate(-50%, 8px); opacity: 1; }
}

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

/* ── Smooth anchor offset ── */
section[id] {
    scroll-margin-top: 80px;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    section[id] {
        scroll-margin-top: 70px;
    }
}

@media (min-width: 1024px) {
    section[id] {
        scroll-margin-top: 80px;
    }
}
