/* Yaniv.TV accessibility layer: skip link, landmark, toolbar, focus rings, reduced motion, display modes.
   Tokens come from the child theme (base.css, --y-*). Mobile breakpoint 760px. */

/* ---------- Skip link + landmark ---------- */
.y-skip-link:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.y-skip-link:focus {
	position: fixed; top: 8px; inset-inline-start: 8px; z-index: 100000; padding: 12px 20px; border-radius: 999px;
	background: var(--y-ink); color: var(--y-bg); font-weight: 700; font-size: 16px; text-decoration: none;
	outline: 2px solid var(--y-signal); outline-offset: 2px;
}
#content.y-main { display: block; outline: 0; scroll-margin-top: 90px; }

/* ---------- Trigger ---------- */
.y-a11y-trigger {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0;
	border: 1.5px solid var(--y-ink); border-radius: 999px; background: transparent; color: var(--y-ink);
	font: inherit; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
.y-a11y-trigger:hover, .y-a11y-trigger:focus-visible, .y-a11y-trigger[aria-expanded="true"] { background: var(--y-ink); color: var(--y-bg); }
.y-a11y-icon { flex: 0 0 auto; width: 22px; height: 22px; }
/* Header: icon only, the label stays for screen readers. */
.y-a11y-trigger--header .y-a11y-trigger__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Inside a menu panel ([data-y-a11y-slot]): a full-width row with the visible label. */
.y-a11y-trigger--panel { width: 100%; height: auto; min-height: 52px; justify-content: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 18px; }
/* The header slot is a shortcode widget; keep it compact (the nav widget takes the space). */
.elementor-location-header .elementor-widget-shortcode:has(.y-a11y-trigger--header) { flex: 0 0 auto; width: auto; max-width: none; }

/* ---------- Panel (dialog) ---------- */
.y-a11y-panel {
	position: fixed; z-index: 100001; top: 84px; inset-inline-end: max(16px, calc((100vw - 1280px) / 2 + 16px));
	width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow-y: auto; box-sizing: border-box;
	background: var(--y-card); color: var(--y-ink);
	border: 1.5px solid var(--y-ink); border-radius: var(--y-radius-card, 18px);
	box-shadow: var(--y-shadow-player, 0 16px 40px -12px rgba(31, 35, 48, .5));
	padding: 18px 18px 14px; font-family: var(--y-font-body); font-size: 16px; line-height: 1.4;
}
.y-a11y-panel[hidden] { display: none; }
.y-a11y-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.y-a11y-panel__title { margin: 0; font-family: var(--y-font-display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--y-ink); }
.y-a11y-close {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
	border-radius: 50%; border: 1.5px solid var(--y-ink); background: transparent; color: var(--y-ink); cursor: pointer;
}
.y-a11y-close svg { width: 22px; height: 22px; }
.y-a11y-close:hover, .y-a11y-close:focus-visible { background: var(--y-ink); color: var(--y-bg); }
.y-a11y-group { margin: 0 0 12px; }
.y-a11y-group__label { margin: 0 0 6px; font-family: var(--y-font-mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--y-slate); }
.y-a11y-size { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.y-a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.y-a11y-panel .y-a11y-btn {
	display: flex; align-items: center; gap: 8px; min-height: 48px; width: 100%; padding: 8px 12px; box-sizing: border-box;
	border: 1.5px solid var(--y-line); border-radius: 12px; background: var(--y-surface); color: var(--y-ink);
	font: inherit; font-size: 15px; font-weight: 500; text-align: start; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.y-a11y-panel .y-a11y-btn:hover { border-color: var(--y-ink); background: var(--y-card); color: var(--y-ink); }
.y-a11y-panel .y-a11y-btn[aria-pressed="true"] { border-color: var(--y-ink); background: var(--y-ink); color: var(--y-bg); }
.y-a11y-btn--size { justify-content: center; flex-direction: column; gap: 0; }
.y-a11y-size__a { font-family: var(--y-font-display); font-weight: 800; line-height: 1.1; }
.y-a11y-size__a--0 { font-size: 16px; } .y-a11y-size__a--1 { font-size: 20px; } .y-a11y-size__a--2 { font-size: 24px; }
.y-a11y-size__pct { font-family: var(--y-font-mono); font-size: 12px; letter-spacing: .06em; }
.y-a11y-btn__box { flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 5px; position: relative; }
.y-a11y-btn[aria-pressed="true"] .y-a11y-btn__box::after {
	content: ""; position: absolute; inset: 2px 4px 5px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.y-a11y-panel .y-a11y-btn--reset { justify-content: center; background: transparent; border-style: dashed; }
.y-a11y-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 0; font-size: 15px; }
.y-a11y-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--y-signal-text); text-decoration: underline; text-underline-offset: 3px; }
.y-a11y-links a:hover { color: var(--y-ink); }
.y-a11y-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; margin: 0; }
@media (max-width: 760px) {
	.y-a11y-panel { top: auto; bottom: 0; inset-inline: 0; width: auto; max-height: 85vh; border-radius: 18px 18px 0 0; border-bottom: 0; }
}

/* ---------- Focus rings (2px signal, offset 2px; stronger than Elementor's resets) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [role="button"]:focus-visible, [tabindex]:not([tabindex="-1"]):focus-visible {
	outline: 2px solid var(--y-signal) !important; outline-offset: 2px !important;
}
.y-dark a:focus-visible, .y-dark button:focus-visible, .elementor-location-footer a:focus-visible, .elementor-location-footer button:focus-visible {
	outline-color: var(--y-signal-on-dark) !important;
}

/* ---------- Reduced motion (OS setting) and "stop animations" (toolbar) ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
html.a11y-motion { scroll-behavior: auto !important; }
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
	animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* ---------- Text size (zoom: Elementor atomic styles are in px) ---------- */
html.a11y-size-1 { zoom: 1.15; }
html.a11y-size-2 { zoom: 1.3; }
/* Turnstile renders a fixed 300px iframe: undo the zoom so it still fits a 390px phone. */
html.a11y-size-1 .cf-turnstile { zoom: .87; }
html.a11y-size-2 .cf-turnstile { zoom: .77; }
/* The toolbar keeps its own (already large) size at every step so it always fits a phone. */
html.a11y-size-1 .y-a11y-panel { zoom: .87; }
html.a11y-size-2 .y-a11y-panel { zoom: .77; }
/* zoom on html does not change what media queries see: the header must repeat its 760px mobile rules at the zoomed
   widths (760 x 1.15 = 874px for html.a11y-size-1, 760 x 1.3 = 988px for html.a11y-size-2) in the site bundle. */

/* ---------- Highlight links ---------- */
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px !important; outline: 2px dashed currentColor; outline-offset: 2px; }

/* ---------- Readable font ---------- */
html.a11y-font body, html.a11y-font body *:not(svg):not(svg *) {
	font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important; letter-spacing: .02em !important; word-spacing: .08em !important;
}

/* ---------- Larger cursor ---------- */
html.a11y-cursor, html.a11y-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M4 3l26 13-11 3-5 11z' fill='%231F2330' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 4 3, auto !important;
}
html.a11y-cursor a, html.a11y-cursor a *, html.a11y-cursor button, html.a11y-cursor button *, html.a11y-cursor [role="button"], html.a11y-cursor label, html.a11y-cursor summary {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M4 3l26 13-11 3-5 11z' fill='%23F26A1F' stroke='%231F2330' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 4 3, pointer !important;
}

/* Display modes apply on screen only: a printed page is always dark text on white. */
@media screen {
	/* ---------- High contrast: black on white, strong borders ---------- */
	html.a11y-contrast body { background: #fff !important; }
	html.a11y-contrast body *:not(svg):not(svg *):not(img):not(video):not(iframe):not(picture) {
		background-color: #fff !important; background-image: none !important; color: #000 !important; border-color: #000 !important;
		text-shadow: none !important; box-shadow: none !important; backdrop-filter: none !important;
	}
	html.a11y-contrast body :is(.y-card, [class$="card"], [class*="card "], [class*="__card"], .y-btn, button, input, select, textarea), html.a11y-contrast .y-a11y-panel {
		border: 2px solid #000 !important;
	}
	html.a11y-contrast body a, html.a11y-contrast body a *:not(svg):not(svg *) { color: #000 !important; text-decoration: underline !important; }
	html.a11y-contrast body :is(button[aria-pressed="true"], .y-btn--primary, .y-btn--ink, .y-player__play),
	html.a11y-contrast body :is(button[aria-pressed="true"], .y-btn--primary, .y-btn--ink) *:not(svg):not(svg *) { background-color: #000 !important; color: #fff !important; }
	html.a11y-contrast .elementor-location-header { border-bottom: 2px solid #000 !important; }
	html.a11y-contrast img { filter: none !important; }

	/* ---------- Dark mode: paper text on ink ---------- */
	html.a11y-dark body { background: #1F2330 !important; color: #FAF8F4 !important; }
	html.a11y-dark body *:not(svg):not(svg *):not(img):not(video):not(iframe):not(picture) {
		background-color: #1F2330 !important; background-image: none !important; color: #FAF8F4 !important; border-color: #5D6273 !important;
		text-shadow: none !important; box-shadow: none !important; backdrop-filter: none !important;
	}
	html.a11y-dark body :is(.y-card, [class$="card"], [class*="card "], [class*="__card"], .y-btn, button, input, select, textarea), html.a11y-dark .y-a11y-panel {
		background-color: #2B3040 !important; border: 1.5px solid #5D6273 !important;
	}
	html.a11y-dark body a, html.a11y-dark body a *:not(svg):not(svg *) { color: #FFA36C !important; }
	html.a11y-dark body :is(button[aria-pressed="true"], .y-btn--primary, .y-player__play),
	html.a11y-dark body :is(button[aria-pressed="true"], .y-btn--primary) *:not(svg):not(svg *) { background-color: #FFA36C !important; color: #1F2330 !important; }
	html.a11y-dark body input::placeholder, html.a11y-dark body textarea::placeholder { color: #A9AEBD !important; }
	/* The header logo is ink-on-paper: give it a paper plate (the footer already uses the dark logo). */
	html.a11y-dark .elementor-location-header img, html.a11y-dark .elementor-location-header svg.y-logo { background: #FAF8F4 !important; border-radius: 10px; padding: 4px; }
}

@media print {
	html.a11y-size-1, html.a11y-size-2 { zoom: 1; }
	.y-a11y-panel, .y-a11y-trigger, .y-skip-link { display: none !important; }
	html.a11y-links a { outline: 0; }
}
