/* =========================================================
   תפריט נגישות — D-NINE
   ========================================================= */

/* ---------- Trigger & panel ---------- */
.a11y-trigger {
  position: fixed;
  right: 1.25rem;
  bottom: 5rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0b2140;
  color: #fff;
  border: 2px solid #c6a15b;
  box-shadow: 0 8px 24px rgba(8, 21, 40, .35);
  cursor: pointer;
}
.a11y-trigger:hover { background: #c6a15b; color: #081528; }

.a11y-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 8.5rem;
  z-index: 61;
  width: min(22rem, calc(100vw - 2.5rem));
  max-height: calc(100vh - 11rem);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1a2332;
  border: 2px solid #0b2140;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(8, 21, 40, .4);
  overflow: hidden;
  font-family: "Assistant", "Heebo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}
.a11y-panel[hidden] { display: none; }
.a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: #0b2140;
  color: #fff;
}
.a11y-head h2 { margin: 0; font-family: "Heebo", sans-serif; font-weight: 800; font-size: 1.1rem; color: #fff; }
.a11y-close {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
}
.a11y-close:hover { background: #c6a15b; color: #081528; }
.a11y-body { padding: .9rem; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; }
.a11y-size { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: center; }
.a11y-size-val { font-weight: 800; min-width: 3rem; text-align: center; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.a11y-btn {
  padding: .65rem .5rem;
  min-height: 2.75rem;
  border-radius: .7rem;
  border: 2px solid #0b2140;
  background: #fff;
  color: #0b2140;
  font-weight: 700;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}
.a11y-btn:hover:not(:disabled) { background: #eef2f8; }
.a11y-btn[aria-pressed="true"] { background: #0b2140; color: #fff; }
.a11y-btn:disabled { opacity: .45; cursor: not-allowed; }
.a11y-reset { border-color: #8a3b12; color: #8a3b12; }
.a11y-link { align-self: center; color: #13304f; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.a11y-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.a11y-trigger:focus-visible, .a11y-panel button:focus-visible, .a11y-panel a:focus-visible {
  outline: 3px solid #c6a15b;
  outline-offset: 2px;
}

@media print { .a11y-trigger, .a11y-panel { display: none !important; } }

/* ---------- Filters ---------- */
html.a11y-gray { filter: grayscale(1); }
html.a11y-invert { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert img, html.a11y-invert video, html.a11y-invert picture { filter: invert(1) hue-rotate(180deg); }

/* ---------- High contrast ---------- */
html.a11y-contrast body,
html.a11y-contrast body *:not(img):not(video):not(svg):not(path):not(circle) {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  -webkit-text-fill-color: currentColor !important;
}
html.a11y-contrast a, html.a11y-contrast a * { color: #ffeb3b !important; text-decoration: underline !important; }
html.a11y-contrast button, html.a11y-contrast input, html.a11y-contrast select, html.a11y-contrast textarea {
  border: 2px solid #fff !important;
}
html.a11y-contrast .a11y-btn[aria-pressed="true"] { background-color: #ffeb3b !important; color: #000 !important; }
html.a11y-contrast .a11y-trigger { border-color: #ffeb3b !important; }
html.a11y-contrast dialog::backdrop { background: rgba(0, 0, 0, .85); }
html.a11y-contrast .blob, html.a11y-contrast .video-glow { display: none !important; }

/* ---------- Links & headings ---------- */
html.a11y-links a:not(.a11y-trigger) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
html.a11y-headings h1, html.a11y-headings h2, html.a11y-headings h3, html.a11y-headings h4 {
  outline: 3px dashed #c6a15b;
  outline-offset: 4px;
}

/* ---------- Readable font & spacing ---------- */
html.a11y-font body, html.a11y-font body *:not(svg):not(path) {
  font-family: Arial, "Arial Hebrew", Helvetica, sans-serif !important;
  letter-spacing: normal !important;
}
html.a11y-spacing body *:not(svg):not(path) {
  line-height: 1.8 !important;
  letter-spacing: .05em !important;
  word-spacing: .16em !important;
}
html.a11y-spacing p { margin-bottom: 1.5em; }

/* ---------- Big cursor ---------- */
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'><path d='M3 2l7.5 19 2.7-7.8L21 10.5z' fill='black' stroke='white' stroke-width='1.6' stroke-linejoin='round'/></svg>") 4 2, auto !important;
}

/* ---------- Stop motion ---------- */
html.a11y-motion, html.a11y-motion * , html.a11y-motion *::before, html.a11y-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.a11y-motion .reveal { opacity: 1 !important; transform: none !important; }
