/* Grain texture overlay */
.grain-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background-color: #7A9E7E;
    color: #FAF8F5;
}

/* Focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #2D5A3D;
    outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #7A9E7E;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2D5A3D;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image loading placeholder */
img {
    background-color: #E8E2D9;
}

/* Form input placeholder animation */
input::placeholder {
    transition: color 0.3s ease;
}

/* Subtle hover lift for interactive elements */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(45, 90, 61, 0.1);
}

/* Responsive typography scaling */
@media (max-width: 640px) {
    html {
        font-size: 15px;
    }
}

/* Print styles */
@media print {
    nav, footer, form {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}
