/*--------------------------------------------------------------
# Accessibility Utilities
--------------------------------------------------------------*/

/* Screen reader only text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Skip links */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background-color: var(--color-primary-black);
    color: var(--color-accent-gold);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 999999;
}

.skip-link:focus {
    position: absolute;
    left: 6px;
    top: 7px;
    width: auto;
    height: auto;
    clip: auto;
    z-index: 999999;
}

/* Focus indicators */
*:focus {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-title,
    .section-title {
        color: #ffffff;
        text-shadow: 2px 2px 4px #000000;
    }
    
    .btn-product {
        border: 3px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .oozing-dab,
    .hero-drip-container,
    .concentrate-canvas {
        display: none;
    }
}

/* Color blindness support */
.color-blind-friendly {
    --color-accent-gold: #FFD700;
    --color-accent-yellow: #FFC107;
    /* Using patterns or symbols instead of just colors */
}

/* Improved form accessibility */
.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-neutral-white);
}

.form-field input:required + label::after {
    content: " *";
    color: #ff6b6b;
}

.form-field input:invalid {
    border-color: #ff6b6b;
}

.form-field input:valid {
    border-color: #4caf50;
}

/* Error states */
.error-message {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success states */
.success-message {
    color: #4caf50;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading states */
.loading {
    cursor: wait;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--color-accent-gold);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
