/* ═══════════════════════════════════════════════════════════════
   תוסף נגישות — בראשית בבלי
   כפתור צף + חלונית עם התאמות. כל התאמה היא class על <html>
   שנשמר ב-localStorage, כך שהיא נשמרת בין דפים וביקורים.
   ═══════════════════════════════════════════════════════════════ */

/* ---------- הכפתור ---------- */
.a11y-btn{
  position:fixed; left:14px; bottom:calc(var(--float-h, 0px) + 16px); z-index:75;
  width:50px; height:50px; padding:0; cursor:pointer;
  display:grid; place-items:center;
  background:#12100D; color:#E0B583;
  border:1px solid #C08A4E; border-radius:50%;
  box-shadow:0 8px 24px rgba(0,0,0,.45);
  transition:bottom .55s cubic-bezier(.22,1,.36,1), background .25s, transform .25s;
}
.a11y-btn:hover{ background:#C08A4E; color:#12100D; transform:scale(1.06); }
.a11y-btn:focus-visible{ outline:3px solid #E0B583; outline-offset:3px; }
.a11y-btn svg{ width:28px; height:28px; }

/* ---------- החלונית ---------- */
.a11y-panel{
  position:fixed; left:14px; bottom:calc(var(--float-h, 0px) + 76px); z-index:76;
  width:min(320px, calc(100vw - 28px));
  background:#111214; color:#F3F0EA;
  border:1px solid #2E3034; box-shadow:0 20px 60px rgba(0,0,0,.55);
  font:400 14px/1.5 Assistant, Arial, sans-serif; direction:rtl;
  opacity:0; visibility:hidden; transform:translateY(10px);
  transition:opacity .3s, transform .3s, visibility .3s, bottom .55s cubic-bezier(.22,1,.36,1);
}
.a11y-panel.open{ opacity:1; visibility:visible; transform:none; }
.a11y-panel header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid #2E3034;
}
.a11y-panel h2{ margin:0; font:300 1.15rem Heebo, Arial, sans-serif; color:#E0B583; }
.a11y-panel .a11y-close{
  width:32px; height:32px; cursor:pointer; display:grid; place-items:center;
  background:transparent; border:1px solid #2E3034; color:#F3F0EA; font-size:14px;
}
.a11y-panel .a11y-close:hover{ border-color:#C08A4E; }
.a11y-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:14px 16px; }
.a11y-grid button{
  padding:11px 10px; cursor:pointer; text-align:center;
  background:#16171A; color:#F3F0EA; border:1px solid #2E3034;
  font:400 13.5px Assistant, Arial, sans-serif; line-height:1.3;
  transition:border-color .2s, background .2s, color .2s;
}
.a11y-grid button:hover{ border-color:#C08A4E; }
.a11y-grid button[aria-pressed="true"]{ background:#C08A4E; border-color:#C08A4E; color:#12100D; font-weight:600; }
.a11y-grid button:focus-visible{ outline:2px solid #E0B583; outline-offset:2px; }
.a11y-panel footer{
  padding:12px 16px; border-top:1px solid #2E3034;
  display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:13px;
}
.a11y-panel footer a{ color:#E0B583; text-decoration:underline; text-underline-offset:3px; }
.a11y-panel footer .a11y-reset{
  background:transparent; border:0; color:#A3A19C; cursor:pointer; font:inherit; text-decoration:underline;
}
.a11y-panel footer .a11y-reset:hover{ color:#E0B583; }

/* ---------- ההתאמות ---------- */

/* גודל טקסט: html מגדיל rem, body מגדיל את גופן הבסיס שמוגדר ב-px */
html.a11y-font-1{ font-size:112.5%; }
html.a11y-font-2{ font-size:125%; }
html.a11y-font-3{ font-size:140%; }
html.a11y-font-1 body{ font-size:calc(clamp(16px, 1.05vw, 18px) * 1.125) !important; }
html.a11y-font-2 body{ font-size:calc(clamp(16px, 1.05vw, 18px) * 1.25)  !important; }
html.a11y-font-3 body{ font-size:calc(clamp(16px, 1.05vw, 18px) * 1.4)   !important; }

/* ניגודיות גבוהה.
   הכלל הכללי מחריג את האלמנטים שיש להם כלל ייעודי למטה — אחרת שרשרת
   ה-:not שלו מנצחת בספציפיות וצובעת גם אותם בלבן. */
html.a11y-contrast body,
html.a11y-contrast body *:not(img):not(video):not(svg):not(path):not(.a11y-panel):not(.a11y-panel *):not(.a11y-btn):not(a):not(.accent):not(.eyebrow):not(.stats b):not(.btn):not(button):not(input):not(select):not(textarea):not(.hero__scrim):not(.banner__scrim){
  background-color:#000 !important;
  background-image:none !important;
  color:#fff !important;
  border-color:#fff !important;
  -webkit-background-clip:border-box !important; background-clip:border-box !important;
  -webkit-text-fill-color:currentColor !important;
  text-shadow:none !important; box-shadow:none !important;
}
/* טקסט בגרדיאנט ברונזה (כותרת ההירו, הנתונים) — הופך לצהוב מלא */
html.a11y-contrast a,
html.a11y-contrast .accent,
html.a11y-contrast .eyebrow,
html.a11y-contrast .stats b{
  color:#ff0 !important;
  background:none !important;
  -webkit-background-clip:border-box !important; background-clip:border-box !important;
  -webkit-text-fill-color:#ff0 !important;
}
html.a11y-contrast a{ text-decoration:underline !important; }
html.a11y-contrast .btn,
html.a11y-contrast button[type="submit"],
html.a11y-contrast .float-form__toggle{ background:#ff0 !important; color:#000 !important; border-color:#ff0 !important; }
html.a11y-contrast input,
html.a11y-contrast select,
html.a11y-contrast textarea{ background:#000 !important; color:#fff !important; border:2px solid #fff !important; }
html.a11y-contrast input::placeholder{ color:#ccc !important; }
html.a11y-contrast .hero__scrim,
html.a11y-contrast .banner__scrim{ background:rgba(0,0,0,.78) !important; }
html.a11y-contrast img,
html.a11y-contrast video{ filter:contrast(1.15); }

/* גווני אפור — דרך משתני המותג, לא filter על html (filter שובר position:fixed) */
html.a11y-gray{ --bronze:#9a9a9a; --bronze-lt:#c6c6c6; --gold-grad:linear-gradient(120deg,#8a8a8a,#d0d0d0); }
html.a11y-gray img,
html.a11y-gray video,
html.a11y-gray .stats b,
html.a11y-gray .accent{ filter:grayscale(1); }

/* קישורים מודגשים */
html.a11y-links a{ text-decoration:underline !important; text-underline-offset:3px; text-decoration-thickness:2px; }

/* גופן קריא */
html.a11y-readable body,
html.a11y-readable body *:not(.a11y-panel):not(.a11y-panel *){
  font-family:Arial, Helvetica, sans-serif !important;
  letter-spacing:0 !important;
}

/* עצירת תנועה */
html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after{
  animation:none !important; transition:none !important; scroll-behavior:auto !important;
}
html.a11y-motion [data-reveal],
html.a11y-motion [data-reveal="mask"] > img{ opacity:1 !important; transform:none !important; clip-path:none !important; }
html.a11y-motion .hero__media video{ display:none !important; }

/* סמן גדול */
html.a11y-cursor,
html.a11y-cursor *{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'><path d='M4 2l16 12-7 1 4 7-3 1-4-7-6 5z' fill='%23fff' stroke='%23000' stroke-width='1.2' stroke-linejoin='round'/></svg>") 4 2, auto !important;
}

/* הדגשת כותרות */
html.a11y-headings h1,
html.a11y-headings h2,
html.a11y-headings h3{ outline:2px dashed #E0B583; outline-offset:6px; }

/* קו ממקד לקריאה */
.a11y-guide{
  position:fixed; inset-inline:0; height:0; z-index:9999; pointer-events:none;
  border-top:3px solid rgba(224,181,131,.85); box-shadow:0 0 0 999px rgba(0,0,0,.35) inset;
  display:none;
}
html.a11y-guide-on .a11y-guide{ display:block; }
