/* Additional custom styles */

/* Ensure smooth scrolling for all browsers */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: #2d5c2d;
    color: #FAFAF5;
}

/* Focus visible styles for accessibility */
:focus-visible {
    outline: 3px solid #2d5c2d;
    outline-offset: 2px;
}

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

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .float-animation,
    .float-animation-delay-1,
    .float-animation-delay-2 {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-hover:hover {
        transform: none;
        box-shadow: 0 0 0 2px #2d5c2d;
    }
    
    .btn-primary:hover {
        transform: none;
        box-shadow: 0 0 0 2px #152915;
    }
}

/* Dark mode support (if system preference is set) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-offwhite: #1a1a1a;
        --color-cream: #242424;
        --color-gray-900: #f5f5f5;
        --color-gray-700: #d1d5db;
        --color-gray-600: #9ca3af;
        --color-gray-300: #4b5563;
    }
}

/* Ensure images don't overflow containers */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Form validation styles */
input:invalid, textarea:invalid {
    border-color: #ef4444;
}

input:valid, textarea:valid {
    border-color: #22c55e;
}

/* Loading state for buttons */
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
