/* Base Styles */
* {
    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 Color */
::selection {
    background-color: #3d634b;
    color: #fdfcf8;
}

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

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

::-webkit-scrollbar-thumb {
    background: #9dc2ab;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6fa180;
}

/* Hero Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal[data-state="hidden"] {
    opacity: 0;
    transform: translateY(40px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-state="hidden"] {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal[data-state="visible"] {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Mobile Menu Transitions */
.menu-line {
    transition: all 0.3s ease-in-out;
}

#mobileMenu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Link Hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #3d634b;
    transition: width 0.3s ease;
}

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

/* Navbar Scrolled State */
#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(45, 65, 51, 0.08);
}

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Button Hover Effects */
button, a {
    cursor: pointer;
}

/* Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Smooth Image Transitions */
img {
    transition: filter 0.3s ease;
}

img:hover {
    filter: brightness(1.02);
}

/* Custom Cursor for Interactive Elements */
@media (hover: hover) {
    a, button {
        transition: all 0.2s ease;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #mobileMenu,
    .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
