/* ========== BASE ========== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    background-color: #faf9f6;
    color: #1a2e1a;
    overflow-x: hidden;
}

::selection {
    background: #c6dfc6;
    color: #1a2e1a;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ========== NAVBAR ========== */
#navbar {
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    border-bottom-color: #e3efe3;
    box-shadow: 0 1px 0 rgba(45, 85, 45, 0.06);
}

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

#menu-btn.active .nav-line:first-child {
    transform: translateY(5px) rotate(45deg);
}

#menu-btn.active .nav-line:last-child {
    transform: translateY(-5px) rotate(-45deg);
}

/* ========== MOBILE MENU ========== */
#mobile-menu {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
}

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

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

/* ========== FLOATING CARDS ========== */
@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 6s ease-in-out infinite;
}

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

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ========== FOCUS ========== */
a:focus-visible, button:focus-visible {
    outline: 1px solid #2d552d;
    outline-offset: 4px;
    border-radius: 2px;
}
