/* Base & Utilities */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Navbar */
#navbar {
    background: rgba(253, 248, 239, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(6, 95, 70, 0.08);
}

#navbar.scrolled {
    background: rgba(253, 248, 239, 0.95);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

.nav-brand-text {
    color: #064e3b;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.25s ease;
}

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

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-link:hover {
    transform: scale(1.05);
}

/* Menu button animations */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 24px;
    transform: translateY(-4px) rotate(-45deg);
}

/* Reveal animations (below-fold only, progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-grid {
        opacity: 1;
        transform: none;
    }

    .reveal-card {
        opacity: 1;
        transform: none;
    }

    .reveal-grid.revealed,
    .reveal-card.revealed {
        animation: revealUp 0.6s ease forwards;
    }
}

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

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

/* Selection */
::selection {
    background: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

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

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

::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}

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

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