/* --a: יחידת המידה של תפריט הנגישות (מבוססת vw, מותאמת לכל גודל מסך) */
:root { --a: var(--u); }
@media (min-width: 768px) { :root { --a: calc(var(--u) * 1.15); } }
@media (min-width: 1200px) { :root { --a: calc(var(--u) * 1.3); } }

/* ===== תפריט נגישות – דף קרוע, גראנג'י ===== */
.a11y__toggle {
  position: fixed; z-index: 1000; left: calc(var(--a) * 16); bottom: calc(var(--a) * 16);
  width: calc(var(--a) * 56); height: calc(var(--a) * 56);
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--green-dark); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 calc(var(--a) * 4) calc(var(--a) * 14) rgba(0,0,0,.22);
  transition: transform .35s cubic-bezier(.3,1.6,.5,1);
}
.a11y__toggle:hover { transform: rotate(-12deg) scale(1.08); }
.a11y__toggle svg { width: 62%; height: 62%; }

.a11y__panel {
  position: fixed; z-index: 1001; left: calc(var(--a) * 16); bottom: calc(var(--a) * 84);
  width: min(92vw, calc(var(--a) * 340));
  filter: drop-shadow(0 calc(var(--a) * 6) calc(var(--a) * 14) rgba(0,0,0,.22));
  rotate: -1.2deg;
  font-family: var(--f-body); font-size: calc(var(--a) * 16); line-height: 1.3;
  direction: rtl; text-align: right; color: var(--ink);
}
.a11y__panel[hidden] { display: none; }
.a11y__paper {
  max-height: calc(100vh - var(--a) * 140); overflow: auto;
  padding: calc(var(--a) * 26) calc(var(--a) * 18) calc(var(--a) * 28);
  background: #fff;
  -webkit-mask: url("../assets/torn-top.svg") top / 100% calc(var(--a) * 14) no-repeat,
                linear-gradient(#000, #000) 0 calc(var(--a) * 13) / 100% calc(100% - calc(var(--a) * 26)) no-repeat,
                url("../assets/torn-bottom.svg") bottom / 100% calc(var(--a) * 14) no-repeat;
          mask: url("../assets/torn-top.svg") top / 100% calc(var(--a) * 14) no-repeat,
                linear-gradient(#000, #000) 0 calc(var(--a) * 13) / 100% calc(100% - calc(var(--a) * 26)) no-repeat,
                url("../assets/torn-bottom.svg") bottom / 100% calc(var(--a) * 14) no-repeat;
}
.a11y__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: calc(var(--a) * 10); }
.a11y__title { font-family: var(--f-display); font-weight: 900; font-size: calc(var(--a) * 30); line-height: 1; color: var(--green); }
.a11y__panel button, .a11y__panel a { font: inherit; color: inherit; }
.a11y__close { background: none; border: 0; font-size: calc(var(--a) * 20); cursor: pointer; padding: calc(var(--a) * 4) calc(var(--a) * 8); transition: transform .3s; }
.a11y__close:hover { transform: rotate(90deg); }
.a11y__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: calc(var(--a) * 12); font-weight: 600; }
.a11y__grid { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--a) * 10) calc(var(--a) * 8); }

/* כל אפשרות = פיסת נייר קרועה קצת, מוטה לסירוגין – אייקון + שם + רמות */
.a11y__opt {
  min-height: calc(var(--a) * 92); padding: calc(var(--a) * 12) calc(var(--a) * 8) calc(var(--a) * 10); border: 0; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--a) * 6);
  background: rgba(50,50,50,.07);
  clip-path: polygon(2% 6%, 18% 0, 41% 5%, 63% 1%, 86% 6%, 100% 2%, 98% 48%, 100% 94%, 79% 100%, 55% 95%, 31% 100%, 9% 95%, 0 100%, 2% 52%);
  transition: transform .3s cubic-bezier(.3,1.6,.5,1), background-color .2s;
}
.a11y__icon { width: calc(var(--a) * 28); height: calc(var(--a) * 28); flex: none; direction: ltr; overflow: visible; }
.a11y__label { font-weight: 600; font-size: calc(var(--a) * 14); line-height: 1.15; }
.a11y__sub { font-size: calc(var(--a) * 12); min-height: 1em; opacity: .8; }
.a11y__sub:empty { display: none; }
.a11y__dots { display: flex; gap: calc(var(--a) * 4); }
.a11y__dot { width: calc(var(--a) * 14); height: calc(var(--a) * 4); border-radius: calc(var(--a) * 2); background: currentColor; opacity: .25; }
.a11y__dot.is-on { opacity: 1; }

/* מתג "יישומון גדול" */
.a11y__switch {
  position: relative; flex: none; width: calc(var(--a) * 46); height: calc(var(--a) * 26); padding: 0; border: 0; border-radius: calc(var(--a) * 13);
  background: rgba(50,50,50,.25); cursor: pointer; transition: background-color .2s;
}
.a11y__switch span {
  position: absolute; top: calc(var(--a) * 3); right: calc(var(--a) * 3);
  width: calc(var(--a) * 20); height: calc(var(--a) * 20); border-radius: 50%; background: #fff;
  box-shadow: 0 calc(var(--a) * 1) calc(var(--a) * 3) rgba(0,0,0,.3); transition: right .2s;
}
.a11y__switch[aria-checked="true"] { background: var(--green-dark); }
.a11y__switch[aria-checked="true"] span { right: calc(var(--a) * 23); }
html.a11y-bigwidget .a11y__panel { zoom: 1.2; }
html.a11y-bigwidget .a11y__toggle { zoom: 1.25; }

/* בועת "תיאורים" */
.a11y__tip {
  position: fixed; z-index: 1002; max-width: min(80vw, calc(var(--a) * 320));
  padding: calc(var(--a) * 8) calc(var(--a) * 12); border-radius: calc(var(--a) * 6);
  background: var(--ink); color: #fff; font-family: var(--f-body); font-size: calc(var(--a) * 15); line-height: 1.35;
  direction: rtl; text-align: right; pointer-events: none;
  box-shadow: 0 calc(var(--a) * 4) calc(var(--a) * 12) rgba(0,0,0,.25);
}
.a11y__tip[hidden] { display: none; }
.a11y__opt:nth-child(odd)  { rotate: -1deg; }
.a11y__opt:nth-child(even) { rotate: 1.2deg; }
.a11y__opt:hover { transform: scale(1.04) rotate(-1.5deg); background: rgba(14,224,174,.22); }
.a11y__opt[aria-pressed="true"] { background: var(--green-dark); color: var(--white) !important; }
.a11y__reset {
  margin-top: calc(var(--a) * 14); width: 100%; min-height: calc(var(--a) * 44); border: 0; cursor: pointer; font-weight: 700 !important;
  background: var(--yellow);
  clip-path: polygon(0 10%, 12% 0, 30% 8%, 52% 0, 74% 7%, 100% 0, 98% 50%, 100% 92%, 82% 100%, 60% 93%, 38% 100%, 15% 94%, 0 100%, 2% 50%);
  transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.a11y__reset:hover { transform: rotate(1deg) scale(1.02); }
.a11y__link { display: block; margin-top: calc(var(--a) * 12); text-align: center; text-decoration: underline; }
.a11y__panel :focus-visible, .a11y__toggle:focus-visible { outline: calc(var(--a) * 3) solid var(--green); outline-offset: calc(var(--a) * 2); }

/* ===== מצבי נגישות ===== */
/* ניגודיות + רוויה: פילטר אחד שמורכב ב-JS (--a11y-filter) */
/* הפילטר על כל המסמך – כך הרקע, ההדר וכל הסקשנים משתנים יחד (בלי אזורים שנשארים בצבע המקורי) */
html.a11y-filtered { filter: var(--a11y-filter); background: #fff; }
html.a11y-contrast-1 .page::before, html.a11y-contrast-1 .page::after,
html.a11y-contrast-2 .page::before, html.a11y-contrast-2 .page::after { display: none; }
/* ===== מצב כהה (ניגודיות – רמה 2) =====
   רקע כהה אחיד, טקסט בהיר, בלי מברשות/טקסטורות דקורטיביות. תמונות וסרטונים נשארים בצבעים האמיתיים. */
html.a11y-dark, html.a11y-dark body, html.a11y-dark .page { background: #121212 !important; }
html.a11y-dark .page::before, html.a11y-dark .page::after,
html.a11y-dark .deco, html.a11y-dark .texture, html.a11y-dark .about__bg,
html.a11y-dark .pj-cover::after, html.a11y-dark .form-wrap__corner { display: none !important; }
html.a11y-dark :is(.page, .site-header) *:not(img, video, iframe, picture, svg, svg *, .pj-map, .pj-map *, .pj-zara, .pj-zara *, .pj-swatch, .pj-peek__dots li, .reel__frame *) {
  background-color: transparent !important; background-image: none !important;
  color: #f2f2f2 !important; border-color: #f2f2f2 !important; box-shadow: none !important; text-shadow: none !important;
}
/* מסגרות שהיו "דף נייר" (מסכות) – מקבלות רקע כהה מעט בהיר יותר וקו מתאר */
html.a11y-dark.a11y-dark body :is(.nav, .insta__sheet, .pj-note, .pj-path li, .pj-insight, .card__link, .pj-peek__tag, .pj-ph) {
  background-color: #1e1e1e !important; outline: 2px solid #f2f2f2; outline-offset: -2px;
}
html.a11y-dark .nav::before { display: none !important; }
html.a11y-dark.a11y-dark body :is(.btn, .lead-form__submit, .reels__btn) { background-color: #000 !important; outline: 2px solid #ffd54a; color: #ffd54a !important; }
html.a11y-dark.a11y-dark body .page a:not(.btn):not(.card__link) { color: #ffd54a !important; }
html.a11y-dark.a11y-dark body :is(input, textarea) { background-color: #000 !important; color: #fff !important; outline: 2px solid #f2f2f2; }
html.a11y-dark :is(input, textarea)::placeholder { color: #cfcfcf !important; }
html.a11y-dark.a11y-dark body .footer__icon { background-color: #f2f2f2 !important; color: #121212 !important; }
html.a11y-dark.a11y-dark body .footer__icon * { color: #121212 !important; }
html.a11y-dark.a11y-dark body .pj-swatch { color: #fff !important; }
html.a11y-dark .site-header .nav__logo img, html.a11y-dark .footer__logo img { filter: brightness(0) invert(1); }
html.a11y-dark .sk-deck, html.a11y-dark .sk-wheel circle { fill: #f2f2f2; stroke: #f2f2f2; }

/* ריווח טקסט – אותיות ומילים */
html.a11y-spacing-1 .page * { letter-spacing: .05em !important; word-spacing: .12em !important; }
html.a11y-spacing-2 .page * { letter-spacing: .1em !important; word-spacing: .25em !important; }
html.a11y-spacing-3 .page * { letter-spacing: .15em !important; word-spacing: .4em !important; }

/* גובה שורה */
html.a11y-lineh-1 .page :is(p, li, dd, dt, h1, h2, h3, figcaption, label, a, span) { line-height: 1.6 !important; }
html.a11y-lineh-2 .page :is(p, li, dd, dt, h1, h2, h3, figcaption, label, a, span) { line-height: 1.9 !important; }
html.a11y-lineh-3 .page :is(p, li, dd, dt, h1, h2, h3, figcaption, label, a, span) { line-height: 2.2 !important; }

/* יישור טקסט */
html.a11y-align-1 .page :is(p, li, dd, dt, h1, h2, h3, figcaption) { text-align: right !important; }
html.a11y-align-2 .page :is(p, li, dd, dt, h1, h2, h3, figcaption) { text-align: center !important; }
html.a11y-align-3 .page :is(p, li, dd, dt, h1, h2, h3, figcaption) { text-align: left !important; }

/* הסתרת תמונות (המקום נשמר, כדי שהעמוד לא יקפוץ) */
html.a11y-noimg .page img, html.a11y-noimg .page video, html.a11y-noimg .page picture { visibility: hidden !important; }
html.a11y-noimg .page .texture, html.a11y-noimg .page .about__bg { background-image: none !important; }

html.a11y-links a { text-decoration: underline !important; text-underline-offset: .15em; }
html.a11y-links .page a:not(.btn) { background: #ffff00 !important; color: #000 !important; }

/* תמיכה בדיסלקציה: גופן פשוט וקריא, ריווח קל ובלי טקסט מוטה */
html.a11y-font body, html.a11y-font .page * { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: .03em; word-spacing: .08em; font-style: normal !important; }

html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; }
html.a11y-still .reveal { opacity: 1 !important; transform: none !important; }
html.a11y-still .chat { translate: none !important; }
html.a11y-still .underlined::after { transform: none !important; }
html.a11y-still { scroll-behavior: auto; }

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 48 48'%3E%3Cpath d='M6 3l30 18-13 3 8 16-6 3-8-16-11 9z' fill='%23000' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E") 6 3, auto !important;
}

/* ההדר במצב כהה: רקע מלא כדי שהתוכן לא ייראה מתחתיו */
html.a11y-dark.a11y-dark body .site-header .nav { background-color: #1e1e1e !important; }
