/* Custom styles and overrides */
:root {
    --emerald-950: #052e16;
    --emerald-900: #14532d;
    --emerald-800: #166534;
    --emerald-700: #15803d;
    --emerald-600: #16a34a;
    --cream-50: #fefdf8;
    --cream-100: #fdf9ef;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #16a34a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection color */
::selection {
    background: #16a34a;
    color: #fefdf8;
}

/* Focus styles */
*:focus-visible {
    outline: 3px solid #16a34a;
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@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;
    }
}

/* Print styles */
@media print {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    nav, footer {
        display: none;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn-primary {
        border: 2px solid currentColor;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .card-hover:hover {
        transform: none;
    }
    
    .card-hover:active {
        transform: translateY(-4px);
    }
}

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

/* Improve text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Button active states */
button:active,
a:active {
    transform: translateY(1px);
}

/* Loading state for form */
button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

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

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

img.loaded {
    opacity: 1;
}
