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

html {
    scroll-behavior: smooth;
}

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

/* ===== Scroll Animation ===== */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===== Navbar ===== */
.nav-link {
    position: relative;
}

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

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

.nav-scrolled {
    background: rgba(253, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-link {
    color: #2f4c26;
}

.nav-scrolled .menu-line {
    background: #2f4c26;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.15em;
}

/* ===== Gallery Scroll ===== */
@keyframes scrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-300px * 4 - 16px * 4)); }
}

.animate-scroll {
    display: flex;
    gap: 16px;
    animation: scrollGallery 20s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* ===== Back to Top ===== */
#back-to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===== Form Focus States ===== */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(77, 122, 62, 0.15);
}

/* ===== Selection ===== */
::selection {
    background: #e8a849;
    color: #1a2e12;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 640px) {
    .font-heading {
        letter-spacing: 0.05em;
    }
}
