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

body {
    font-family: 'Lora', Georgia, serif;
}

.font-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

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

/* === 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);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Hero Animations === */
.hero-anim {
    opacity: 0;
    transform: translateY(20px);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-anim {
        animation: heroFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    .hero-anim:nth-child(1) { animation-delay: 0.2s; }
    .hero-anim:nth-child(2) { animation-delay: 0.4s; }
    .hero-anim:nth-child(3) { animation-delay: 0.5s; }
    .hero-anim:nth-child(4) { animation-delay: 0.6s; }
}

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

/* === Navbar === */
.nav-scrolled {
    background-color: rgba(250, 249, 246, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(47, 79, 34, 0.08);
}

.nav-scrolled .nav-text-color {
    color: #2f4f22 !important;
}

.nav-scrolled .nav-text-muted {
    color: #548239 !important;
}

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

.nav-scrolled #nav-logo {
    color: #2f4f22 !important;
}

.nav-scrolled #bar1,
.nav-scrolled #bar2,
.nav-scrolled #bar3 {
    background-color: #2f4f22 !important;
}

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

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

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

.mobile-menu-open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }

/* === Menu Button Animation === */
.menu-active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-active #bar2 {
    opacity: 0;
}

.menu-active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
}

/* === Image Hover === */
img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === Selection === */
::selection {
    background-color: rgba(47, 79, 34, 0.2);
    color: #1d3318;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #548239;
}

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