/* =========================================================================
   צפון — רכיב נגישות (Accessibility)
   תפריט נגישות + מצבי תצוגה, תואם תקן ישראלי 5568 / WCAG 2.0 AA.
   Vanilla CSS · RTL · ללא תלויות חיצוניות.
   ========================================================================= */

:root{
  --a11y-accent:#c5823c;
  --a11y-accent-d:#9a5f28;
  --a11y-basalt:#13212a;
  --a11y-basalt-2:#1c2f3a;
  --a11y-line:rgba(255,255,255,.14);
}

/* ---------- כפתור הפעלה צף ---------- */
.a11y-fab{
  position:fixed;bottom:28px;inset-inline-start:24px;z-index:300;
  width:54px;height:54px;border-radius:50%;
  background:var(--a11y-basalt);color:#fff;
  border:2px solid rgba(255,255,255,.18);
  display:grid;place-items:center;cursor:pointer;
  box-shadow:0 6px 22px -6px rgba(0,0,0,.55);
  transition:transform .25s cubic-bezier(.34,1.3,.64,1),background .2s,box-shadow .2s;
}
.a11y-fab:hover{background:var(--a11y-basalt-2);transform:translateY(-2px) scale(1.04)}
.a11y-fab:active{transform:scale(.96)}
.a11y-fab svg{width:28px;height:28px}
@media(max-width:600px){.a11y-fab{width:50px;height:50px;bottom:20px;inset-inline-start:16px}}

/* ---------- שכבת רקע ---------- */
.a11y-overlay{
  position:fixed;inset:0;z-index:299;background:rgba(8,15,20,.45);
  backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s;
}
.a11y-overlay.open{opacity:1;visibility:visible}

/* ---------- הפאנל ---------- */
.a11y-panel{
  position:fixed;bottom:0;inset-inline-start:0;z-index:301;
  width:340px;max-width:calc(100vw - 24px);max-height:88vh;overflow-y:auto;
  margin:0 12px 12px;border-radius:20px;
  background:#fff;color:var(--a11y-basalt);
  border:1px solid #e4e9e9;
  box-shadow:0 18px 60px -18px rgba(19,33,42,.5);
  transform:translateY(24px) scale(.97);opacity:0;visibility:hidden;
  transition:transform .3s cubic-bezier(.34,1.2,.64,1),opacity .25s,visibility .25s;
  font-family:'Heebo',system-ui,-apple-system,sans-serif;
}
.a11y-panel.open{transform:none;opacity:1;visibility:visible}
.a11y-panel *{box-sizing:border-box}

.a11y-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:18px 20px 14px;border-bottom:1px solid #eef2f2;
}
.a11y-head h2{
  font-family:'Frank Ruhl Libre',Georgia,serif;font-size:19px;font-weight:800;
  color:var(--a11y-basalt);margin:0;display:flex;align-items:center;gap:9px;
}
.a11y-head h2 svg{width:22px;height:22px;color:var(--a11y-accent-d)}
.a11y-close{
  width:34px;height:34px;border-radius:10px;background:#f5f7f7;color:#48595f;
  display:grid;place-items:center;cursor:pointer;flex-shrink:0;transition:.15s;
}
.a11y-close:hover{background:#e9eded;color:var(--a11y-basalt)}
.a11y-close svg{width:18px;height:18px}

.a11y-body{padding:16px 18px 8px}
.a11y-group-label{
  font-size:12px;font-weight:700;color:#84979d;letter-spacing:.04em;
  text-transform:uppercase;margin:6px 4px 10px;
}

/* בקרת גודל טקסט */
.a11y-font{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:#f5f7f7;border:1px solid #e4e9e9;border-radius:12px;padding:10px 12px;margin-bottom:16px;
}
.a11y-font-label{font-size:13.5px;font-weight:600;color:#48595f;display:flex;align-items:center;gap:8px}
.a11y-font-label svg{width:17px;height:17px;color:var(--a11y-accent-d)}
.a11y-font-ctrls{display:flex;align-items:center;gap:6px}
.a11y-step{
  width:34px;height:34px;border-radius:9px;background:#fff;border:1.5px solid #d2dada;
  color:var(--a11y-basalt);font-size:18px;font-weight:700;display:grid;place-items:center;cursor:pointer;transition:.15s;
}
.a11y-step:hover{border-color:var(--a11y-accent);background:#fff8f0}
.a11y-step:disabled{opacity:.4;cursor:not-allowed}
.a11y-step-val{min-width:42px;text-align:center;font-size:13px;font-weight:700;color:var(--a11y-basalt);font-variant-numeric:tabular-nums}

/* רשת כפתורי מצבים */
.a11y-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.a11y-toggle{
  display:flex;flex-direction:column;align-items:flex-start;gap:7px;
  padding:12px 12px;border-radius:12px;border:1.5px solid #e4e9e9;background:#fff;
  color:#48595f;cursor:pointer;text-align:start;transition:.16s;min-height:74px;font-family:inherit;
}
.a11y-toggle:hover{border-color:#c7d2d2;background:#fafcfc}
.a11y-toggle svg{width:21px;height:21px;color:#84979d;transition:color .16s}
.a11y-toggle .t-name{font-size:12.8px;font-weight:600;line-height:1.3}
.a11y-toggle[aria-pressed="true"]{
  border-color:var(--a11y-accent);background:#fbf2e7;color:var(--a11y-accent-d);
}
.a11y-toggle[aria-pressed="true"] svg{color:var(--a11y-accent-d)}
.a11y-toggle[aria-pressed="true"] .t-name{font-weight:700}

.a11y-foot{padding:12px 18px 18px;border-top:1px solid #eef2f2;margin-top:12px}
.a11y-reset{
  width:100%;padding:11px;border-radius:11px;background:#13212a;color:#fff;
  font-size:13.5px;font-weight:600;cursor:pointer;transition:.18s;font-family:inherit;
  display:flex;align-items:center;justify-content:center;gap:8px;
}
.a11y-reset:hover{background:#1c2f3a}
.a11y-reset svg{width:16px;height:16px}
.a11y-statement{
  display:flex;align-items:center;justify-content:center;gap:7px;
  margin-top:12px;font-size:12.5px;font-weight:600;color:var(--a11y-accent-d);
}
.a11y-statement svg{width:15px;height:15px}
.a11y-statement:hover{text-decoration:underline}

.a11y-fab:focus-visible,.a11y-close:focus-visible,.a11y-step:focus-visible,
.a11y-toggle:focus-visible,.a11y-reset:focus-visible,.a11y-statement:focus-visible{
  outline:3px solid var(--a11y-accent);outline-offset:2px;
}

/* =========================================================================
   מצבי נגישות — מוחלים על <html>
   ========================================================================= */

/* הדגשת קישורים */
html.a11y-links a:not(.a11y-fab):not(.a11y-statement){
  text-decoration:underline !important;text-underline-offset:3px !important;
  outline:1.5px dashed currentColor;outline-offset:2px;
}

/* גופן קריא — מחליף לגופן סנס פשוט עם ריווח מוגבר */
html.a11y-readable *:not(.a11y-panel):not(.a11y-panel *):not(.a11y-fab):not(.a11y-fab *){
  font-family:Arial,'Heebo',sans-serif !important;
  letter-spacing:.02em !important;
  line-height:1.7 !important;
}

/* עצירת אנימציות */
html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after{
  animation:none !important;transition:none !important;scroll-behavior:auto !important;
}
html.a11y-no-motion #hero-canvas,
html.a11y-no-motion .portal-grid,
html.a11y-no-motion .hero-grid{display:none !important}

/* סמן גדול */
html.a11y-cursor,html.a11y-cursor *{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1.2' d='M5 2l14 7-6 1.5L17 17l-3 1.5-3.5-6.5L5 16z'/%3E%3C/svg%3E") 4 2,auto !important;
}

/* הדגשת מיקוד מוגברת בכל המצבים */
html.a11y-active :focus-visible{outline:3px solid #c5823c !important;outline-offset:3px !important}
