/* Custom styles and overrides */

:root {
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Lato', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(200%); opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Scroll reveal base - always visible, JS adds animation */
.scroll-reveal {
    /* Content is visible by default for accessibility */
}

/* Animation states - applied by JS */
.scroll-reveal.animate-on-scroll {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Staggered delays for grid items */
.scroll-reveal.animate-on-scroll:nth-child(1) { animation-delay: 0ms; }
.scroll-reveal.animate-on-scroll:nth-child(2) { animation-delay: 80ms; }
.scroll-reveal.animate-on-scroll:nth-child(3) { animation-delay: 160ms; }
.scroll-reveal.animate-on-scroll:nth-child(4) { animation-delay: 240ms; }
.scroll-reveal.animate-on-scroll:nth-child(5) { animation-delay: 320ms; }
.scroll-reveal.animate-on-scroll:nth-child(6) { animation-delay: 400ms; }

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Mobile menu transition */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobileMenu.open {
    max-height: 400px;
}

/* Selection color */
::selection {
    background-color: rgba(15, 118, 110, 0.2);
    color: inherit;
}

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