/**
 * Kenekted platform — WCAG 2.1 AA accessibility baseline (PR8Y + MEDIT8TE)
 */

/* Skip link */
.kenekted-skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100000;
    padding: 0.75rem 1.25rem;
    background: #fbbf24;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 0 0 0.5rem 0;
    transform: translateY(-120%);
    transition: transform 0.2s ease;
}

.kenekted-skip-link:focus {
    transform: translateY(0);
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only,
.kenekted-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;
}

/* Visible focus — 3:1 contrast minimum */
:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

html[data-theme="light"] :focus-visible {
    outline-color: #1d4ed8;
}

/* Decorative media must not capture focus */
video[aria-hidden="true"],
.kenekted-decorative-bg {
    pointer-events: none;
}

/* Live region for announcements */
#kenekted-a11y-live {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Minimum touch target helper for icon-only controls */
.kenekted-touch-target {
    min-width: 44px;
    min-height: 44px;
}

/* High contrast mode support */
@media (forced-colors: active) {
    :focus-visible {
        outline: 3px solid CanvasText;
    }

    .kenekted-skip-link {
        forced-color-adjust: none;
        background: Canvas;
        color: CanvasText;
        border: 2px solid CanvasText;
    }
}

/* Respect reduced motion (WCAG 2.3.3) */
@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;
    }

    .kenekted-skip-link {
        transition: none;
    }
}

/* Link underline for body copy in legal/content pages */
.kenekted-prose a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.kenekted-prose a:hover {
    text-decoration-thickness: 2px;
}

/* Small helper text contrast on dark backgrounds (WCAG 1.4.3) */
body:not([data-theme="light"]) .kenekted-prose .text-slate-500,
body:not([data-theme="light"]) main .text-slate-500.text-sm {
    color: #94a3b8;
}
