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

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

body {
    overflow-x: hidden;
}

/* Font Families */
.font-dm {
    font-family: 'DM Sans', sans-serif;
}

.font-lora {
    font-family: 'Lora', serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F7F4EE;
}

::-webkit-scrollbar-thumb {
    background: #2D5A3D;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3A6B4D;
}

/* Selection */
::selection {
    background: #2D5A3D;
    color: #F7F4EE;
}

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

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

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

.nav-link:hover {
    color: #2D5A3D !important;
}

/* Mobile Menu */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.mobile-nav-link:hover {
    padding-left: 12px;
    color: #2D5A3D !important;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #2D5A3D;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::before {
    width: 8px;
}

/* Hero Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.15s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.45s;
}

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

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.scroll-reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.scroll-reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.scroll-reveal:nth-child(4) {
    transition-delay: 0.3s;
}

/* Navbar Scroll State */
.nav-scrolled {
    background: rgba(247, 244, 238, 0.92) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(44, 62, 45, 0.08);
}

.nav-scrolled .nav-link {
    color: #2C3E2D !important;
}

.nav-scrolled .nav-link::after {
    background: #2D5A3D;
}

/* Button hover glow */
button:hover, a:hover {
    cursor: pointer;
}

/* Image placeholder fallback */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth transitions for interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #2D5A3D;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-menu.hidden {
    animation: slideUp 0.2s ease forwards;
}

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