/* Custom overrides and enhancements */
:root {
    --emerald-700: #047857;
    --emerald-600: #059669;
    --cream-200: #FFF9E0;
    --cream-300: #FFF5C7;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background: #047857;
    color: #FFFEF7;
}

/* Focus visible styles */
:focus-visible {
    outline: 3px solid #047857;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Subtle pattern overlay for hero */
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Card gradient border effect */
.card-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, #a7f3d0, transparent, #FFF5C7);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-hover:hover::before {
    opacity: 1;
}

/* Navbar scroll effect */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(4, 120, 87, 0.1);
}

/* Mobile menu animation */
.mobile-menu {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Button press effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

button:active, a:active {
    transform: scale(0.98);
}

/* Loading state for form button */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
