/* ========== BASE & RESET ========== */
*, *::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: rgba(26, 122, 82, 0.2);
    color: #072217;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

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

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .group img {
        transition: none;
    }
}

/* ========== MOBILE MENU ========== */
.mobile-menu-open {
    overflow: hidden;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF6EE;
}
::-webkit-scrollbar-thumb {
    background: #1A7A52;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #14603F;
}

/* ========== FORM STYLES ========== */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
    border-color: #1A7A52;
    box-shadow: 0 0 0 3px rgba(26, 122, 82, 0.15);
    outline: none;
}

/* ========== SUCCESS MESSAGE ========== */
.success-msg {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== LOADING STATE ========== */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
