/* ==========================================================================
   LAX Studio — שכבת נגישות (ת"י 5568 / WCAG 2.0 AA)
   קובץ משותף לכל עמודי האתר, עברית ואנגלית.
   נטען אחרי ה-<style> הפנימי של כל עמוד, לכן ה-:root כאן גובר.
   ========================================================================== */

/* --- 1. תיקון ניגודיות: הכהיית טקסט ה"עשן" המושתק ---------------------------
   הגוון המקורי #938676 נותן יחס 3.08:1 על רקע Pearl — נכשל ב-AA.
   הגוון החדש #6b6153 נותן 5.27:1 — עובר בנוחות, ונשאר אותו טאופ חמים. */
:root{
  --smoke:#6b6153 !important;
}

/* --- 2. קישור דילוג לתוכן (WCAG 2.4.1 Bypass Blocks) ----------------------- */
.lax-skip{
  position:fixed; top:-100px; inset-inline-start:12px; z-index:100000;
  background:#42122C; color:#F2EEED;
  padding:12px 20px; border-radius:10px;
  font-family:inherit; font-size:16px; font-weight:600; text-decoration:none;
  box-shadow:0 6px 24px rgba(0,0,0,.35);
  transition:top .15s ease;
}
.lax-skip:focus{ top:12px; outline:3px solid #456AF9; outline-offset:2px; }

/* --- 3. מחוון פוקוס נראה לכל אלמנט אינטראקטיבי (WCAG 2.4.7) ----------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible{
  outline:3px solid #456AF9 !important;
  outline-offset:3px !important;
  border-radius:4px;
}
/* יעד קישור הדילוג לא מקבל טבעת ויזואלית מיותרת */
#lax-main:focus{ outline:none; }

/* ==========================================================================
   4. סרגל הנגישות — כפתור צף + חלונית
   ========================================================================== */
.lax-a11y-btn{
  position:fixed; bottom:20px; inset-inline-end:20px; z-index:99998;
  width:56px; height:56px; border-radius:50%;
  background:#42122C; color:#F2EEED; border:2px solid #F2EEED;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; box-shadow:0 8px 28px rgba(0,0,0,.35);
  transition:transform .18s ease, background .18s ease;
}
.lax-a11y-btn:hover{ transform:scale(1.07); background:#2A0A1C; }
.lax-a11y-btn svg{ width:30px; height:30px; }

.lax-a11y-panel{
  position:fixed; bottom:88px; inset-inline-end:20px; z-index:99999;
  width:min(340px, calc(100vw - 40px)); max-height:min(78vh, 620px);
  overflow-y:auto;
  background:#F2EEED; color:#42122C;
  border:1px solid rgba(66,18,44,.18); border-radius:16px;
  box-shadow:0 18px 50px rgba(0,0,0,.30);
  padding:18px; display:none;
  font-family:"Arial","Noto Sans Hebrew",system-ui,sans-serif;
}
.lax-a11y-panel[data-open="true"]{ display:block; }

.lax-a11y-panel h2{
  margin:0 0 4px; font-size:18px; font-weight:800; color:#42122C;
}
.lax-a11y-panel .lax-a11y-sub{
  margin:0 0 14px; font-size:12.5px; line-height:1.5; color:#6b6153;
}
.lax-a11y-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.lax-a11y-opt{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:12px 8px; background:#fff; border:1px solid rgba(66,18,44,.15);
  border-radius:12px; cursor:pointer; text-align:center;
  font-size:12.5px; font-weight:600; color:#42122C; line-height:1.3;
  transition:border-color .15s ease, background .15s ease;
}
.lax-a11y-opt:hover{ border-color:#456AF9; }
.lax-a11y-opt[aria-pressed="true"]{
  background:#42122C; color:#F2EEED; border-color:#42122C;
}
.lax-a11y-opt .ico{ font-size:22px; line-height:1; }

.lax-a11y-reset{
  margin-top:14px; width:100%; padding:11px;
  background:transparent; color:#42122C;
  border:1.5px solid #42122C; border-radius:10px;
  font-family:inherit; font-size:14px; font-weight:700; cursor:pointer;
  transition:background .15s ease, color .15s ease;
}
.lax-a11y-reset:hover{ background:#42122C; color:#F2EEED; }

.lax-a11y-statement{
  display:block; margin-top:12px; text-align:center;
  font-size:13px; font-weight:600; color:#456AF9; text-decoration:underline;
}
.lax-a11y-close{
  position:absolute; top:12px; inset-inline-end:12px;
  width:30px; height:30px; border:none; background:transparent;
  font-size:22px; line-height:1; color:#42122C; cursor:pointer; border-radius:6px;
}
.lax-a11y-close:hover{ background:rgba(66,18,44,.1); }

/* ==========================================================================
   5. מצבי התאמה שמופעלים על ה-<html>/<body>
   ========================================================================== */

/* הגדלת טקסט — zoom סורק גם ערכי px קבועים. חל על כל תוכן הדף פרט לסרגל */
html.lax-text-1 body > *:not(.lax-a11y-btn):not(.lax-a11y-panel):not(.lax-skip){ zoom:1.15; }
html.lax-text-2 body > *:not(.lax-a11y-btn):not(.lax-a11y-panel):not(.lax-skip){ zoom:1.32; }

/* ניגודיות גבוהה — טקסט כהה על רקע בהיר, גבולות ברורים */
html.lax-contrast body{ background:#ffffff !important; }
html.lax-contrast body *:not(.lax-a11y-btn):not(.lax-a11y-panel):not(.lax-a11y-panel *){
  background-color:transparent !important;
  color:#111111 !important;
  border-color:#111111 !important;
  text-shadow:none !important;
}
html.lax-contrast a:not(.lax-a11y-statement){ color:#0000EE !important; text-decoration:underline !important; }
html.lax-contrast img,
html.lax-contrast video{ filter:contrast(1.15); }

/* מונוכרום */
html.lax-grayscale body{ filter:grayscale(100%); }

/* קו תחתון לכל הקישורים (WCAG 1.4.1 — לא רק צבע) */
html.lax-underline a:not(.lax-a11y-statement){ text-decoration:underline !important; }

/* גופן קריא */
html.lax-readable body *:not(.lax-a11y-btn):not(.lax-a11y-panel):not(.lax-a11y-panel *){
  font-family:"Arial","Noto Sans Hebrew",Verdana,system-ui,sans-serif !important;
  letter-spacing:.02em !important;
  line-height:1.7 !important;
}

/* עצירת אנימציות ותנועה (WCAG 2.3.3 / 2.2.2) */
html.lax-nomotion *,
html.lax-nomotion *::before,
html.lax-nomotion *::after{
  animation:none !important;
  transition:none !important;
  scroll-behavior:auto !important;
}
html.lax-nomotion video{ /* עצירת וידאו רקע נעשית ב-JS */ }

/* הדגשת כותרות */
html.lax-titles h1, html.lax-titles h2, html.lax-titles h3,
html.lax-titles h4, html.lax-titles h5, html.lax-titles h6{
  background:#FFF3B0 !important; color:#42122C !important;
  outline:2px solid #42122C; padding:2px 6px;
}

/* סמן גדול */
html.lax-cursor,
html.lax-cursor *{ cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 2 L6 40 L16 30 L23 45 L30 42 L23 27 L38 27 Z' fill='%2342122C' stroke='white' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto !important; }

/* כיבוד העדפת מערכת: פחות תנועה */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

/* עזר: מוסתר-ויזואלית אך נגיש לקורא מסך */
.lax-sr-only{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
