/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.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;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8ea;
}
::-webkit-scrollbar-thumb {
    background: #2b6e3c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1e4728;
}

/* Navbar transitions */
.navbar-scrolled {
    background: rgba(254, 253, 248, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(30, 71, 40, 0.08);
}

.navbar-scrolled .nav-text-color,
.navbar-scrolled .nav-link-color {
    color: #1e4728 !important;
}

.navbar-scrolled .nav-subtext-color {
    color: #2b6e3c !important;
}

.navbar-scrolled .menu-line {
    background: #1e4728 !important;
}

/* Mobile menu animations */
#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-line:nth-child(1) {
    transform-origin: center;
}
.menu-line:nth-child(2) {
    transform-origin: center;
}
.menu-line:nth-child(3) {
    transform-origin: center;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Selection color */
::selection {
    background: #dceee0;
    color: #1e4728;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2b6e3c;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Print styles */
@media print {
    nav, .reveal { display: none; }
    body { background: white; color: black; }
}
