/* ============================================================
   Good People — סרגל נגישות (עיצוב)
   ------------------------------------------------------------
   נטען אחרי styles.css כדי שההגדרות יגברו על עיצוב האתר.
   ============================================================ */

:root { --a11y-font-scale: 1; }

/* ============================================
   1. קישור דילוג לתוכן
   ============================================ */

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  top: -100px;
  transform: translateX(50%);
  z-index: 2000;
  background: #0F1912;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 0 0 12px 12px;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #D2AF66;
  outline-offset: 2px;
}

/* ============================================
   2. מיקוד מקלדת ברור בכל האתר
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0F1912;
  outline-offset: 3px;
  border-radius: 4px;
}
/* על רקעים כהים המיקוד צריך להיות בהיר */
.site-footer a:focus-visible,
.mission a:focus-visible,
.btn-primary:focus-visible {
  outline-color: #FFD98A;
}
main:focus { outline: none; }

/* ============================================
   3. כפתור פתיחת סרגל הנגישות
   ============================================ */

.a11y-open {
  position: fixed;
  inset-inline-start: 20px;
  bottom: 20px;
  z-index: 1200;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: #2E4A34;
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.a11y-open:hover { background: #0F1912; transform: scale(1.06); }
.a11y-open:focus-visible { outline: 3px solid #0F1912; outline-offset: 3px; }

/* ============================================
   4. חלונית ההגדרות
   ============================================ */

.a11y-panel {
  position: fixed;
  inset-inline-start: 20px;
  bottom: 88px;
  z-index: 1201;
  width: min(340px, calc(100vw - 40px));
  max-height: min(78vh, 640px);
  overflow-y: auto;
  background: #FFFFFF;
  border: 2px solid #0F1912;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  text-align: right;
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #0F1912;
}
.a11y-panel[hidden] { display: none; }

.a11y-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid #E0DCD3;
}
.a11y-panel__head h2 { font-size: 18px; font-weight: 700; margin: 0; }

.a11y-close {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid #E0DCD3;
  border-radius: 8px;
  background: #FAFBF9;
  color: #0F1912;
  font-size: 15px;
  line-height: 1;
}
.a11y-close:hover { background: #EAF0EB; }

.a11y-group { margin-top: 18px; }
.a11y-group__title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #4A564C;
  margin-bottom: 10px;
}

.a11y-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.a11y-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1.5px solid #E0DCD3;
  border-radius: 10px;
  background: #FAFBF9;
  color: #0F1912;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  line-height: 1.3;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.a11y-btn:hover { background: #EAF0EB; border-color: #33502F; }
.a11y-btn.is-on {
  background: #2E4A34;
  border-color: #2E4A34;
  color: #FFFFFF;
}

.a11y-font-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.a11y-btn--sq {
  width: 56px;
  flex: none;
  justify-content: center;
  font-size: 15px;
}
.a11y-font-val {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 0;
  border: 1.5px solid #E0DCD3;
  border-radius: 10px;
  background: #FFFFFF;
}

.a11y-reset {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: 1.5px solid #0F1912;
  border-radius: 10px;
  background: #FFFFFF;
  color: #0F1912;
  font-size: 14px;
  font-weight: 700;
}
.a11y-reset:hover { background: #0F1912; color: #FFFFFF; }

.a11y-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: #4A564C;
}
.a11y-note a { text-decoration: underline; color: #2E4A34; font-weight: 600; }

@media (max-width: 700px) {
  .a11y-open { width: 52px; height: 52px; inset-inline-start: 14px; bottom: 14px; }
  .a11y-panel { inset-inline-start: 14px; inset-inline-end: 14px; width: auto; bottom: 78px; }
}

/* ============================================
   5. ההגדרות עצמן
   ============================================ */

/* ---- גודל טקסט ----
   ההגדלה עצמה מוגדרת בסעיף 9 שבסוף הקובץ: היא משנה גדלי גופן בלבד,
   ולא מותחת את כל הדף. כך הפריסה נשארת יציבה, אין גלילה אופקית,
   וסרגל הנגישות שומר על גודלו הקבוע. */

/* ---- ריווח שורות מוגדל ---- */
.a11y-spacing body :is(p, li, blockquote, .story-text, .pro-quote, .review-quote, .legal-article p) {
  line-height: 2.1 !important;
  letter-spacing: 0.03em !important;
  word-spacing: 0.14em !important;
}

/* ---- פונט קריא ---- */
.a11y-readable body,
.a11y-readable body :is(h1, h2, h3, h4, p, a, span, li, button, input, textarea, blockquote, strong, div) {
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif !important;
  letter-spacing: 0.01em;
}

/* ---- הדגשת קישורים ---- */
.a11y-links body :is(a, .chip, button) {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-thickness: 2px !important;
}
.a11y-links body a:not(.btn):not(.socials a):not(.logo) {
  outline: 1px dashed currentColor;
  outline-offset: 2px;
}

/* ---- עצירת אנימציות ---- */
.a11y-stop-motion *,
.a11y-stop-motion *::before,
.a11y-stop-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
/* חשוב: הגילויים בגלילה חייבים להישאר גלויים כשאין אנימציה */
.a11y-stop-motion [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}
/* קלפי ההמלצות: להציג רק את הקלף הקדמי, בלי תנועה */
.a11y-stop-motion .deck-card { opacity: 0 !important; }
.a11y-stop-motion .deck-card.is-front {
  opacity: 1 !important;
  transform: translate3d(-50%, -50%, 0) !important;
}

/* ---- סמן גדול ---- */
.a11y-big-cursor,
.a11y-big-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='M8 2 8 38 17 30 23 44 30 41 24 27 36 27z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto !important;
}
.a11y-big-cursor a,
.a11y-big-cursor button,
.a11y-big-cursor .chip,
.a11y-big-cursor .deck {
  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='M17 4c-2 0-3 1.4-3 3v16l-3-3c-1.6-1.6-4-1.4-5.4 0-1.4 1.6-1.2 3.8.2 5.3l9 10.4c1.6 1.9 3.4 3 6 3h9c4 0 7-3 7-7V19c0-1.7-1.3-3-3-3s-3 1.3-3 3v-2c0-1.7-1.3-3-3-3s-3 1.3-3 3v-2c0-1.7-1.3-3-3-3s-3 1.3-3 3V7c0-1.6-1.3-3-3-3z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 12 2, pointer !important;
}

/* ============================================
   6. ערכות ניגודיות
   ============================================ */

/* ---- ניגודיות גבוהה (שחור-לבן חד) ---- */
.a11y-contrast-high body,
.a11y-contrast-high body :is(section, header, footer, article, div, main, aside, nav, form) {
  background: #FFFFFF !important;
  color: #000000 !important;
}
.a11y-contrast-high body :is(h1, h2, h3, h4, p, span, li, strong, blockquote, label, td, th) {
  color: #000000 !important;
}
.a11y-contrast-high body a { color: #00308F !important; text-decoration: underline !important; }
.a11y-contrast-high body :is(.btn, button) {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 2px solid #000000 !important;
}
.a11y-contrast-high body :is(input, textarea) {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}
.a11y-contrast-high body :is(.badge, .chip, .pro-tag, .deck-tag, .quote-mark, .criteria-check) {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}
.a11y-contrast-high body :is(.pro-card, .criteria-item, .review-card, .selection-card, .deck-card, .legal-nav, .a11y-panel, form) {
  border: 2px solid #000000 !important;
}
.a11y-contrast-high body img { filter: contrast(1.15); }

/* ---- רקע כהה ---- */
.a11y-contrast-dark body,
.a11y-contrast-dark body :is(section, header, footer, article, div, main, aside, nav, form) {
  background: #0B0B0B !important;
  color: #F5F5F5 !important;
}
.a11y-contrast-dark body :is(h1, h2, h3, h4, p, span, li, strong, blockquote, label, td, th) {
  color: #F5F5F5 !important;
}
.a11y-contrast-dark body a { color: #FFD98A !important; text-decoration: underline !important; }
.a11y-contrast-dark body :is(.btn, button) {
  background: #FFD98A !important;
  color: #0B0B0B !important;
  border: 2px solid #FFD98A !important;
}
.a11y-contrast-dark body :is(input, textarea) {
  background: #1A1A1A !important;
  color: #F5F5F5 !important;
  border: 2px solid #7A7A7A !important;
}
.a11y-contrast-dark body :is(.badge, .chip, .pro-tag, .deck-tag, .quote-mark, .criteria-check) {
  background: #1A1A1A !important;
  color: #FFD98A !important;
  border: 1px solid #FFD98A !important;
}
.a11y-contrast-dark body :is(.pro-card, .criteria-item, .review-card, .selection-card, .deck-card, .legal-nav, form) {
  border: 1px solid #5A5A5A !important;
}
.a11y-contrast-dark body img { filter: brightness(0.9); }

/* ---- גווני אפור ---- */
.a11y-contrast-mono body { filter: grayscale(1); }

/* ---- הגנה על סרגל הנגישות עצמו ----
   כללי הניגודיות למעלה חלים על כל הדף, כולל על החלונית. שימוש
   במזהה (ID) נותן עדיפות גבוהה יותר מכל כלל מבוסס-מחלקה, כך
   שהסרגל נשאר קריא ובצבעיו המקוריים בכל ערכת ניגודיות. */
#a11yPanel,
#a11yPanel div,
#a11yPanel p {
  background: #FFFFFF !important;
  color: #0F1912 !important;
  border-color: #E0DCD3 !important;
}
#a11yPanel { border: 2px solid #0F1912 !important; }
#a11yPanel :is(h2, span, strong) { color: #0F1912 !important; }
#a11yPanel .a11y-group__title,
#a11yPanel .a11y-note { color: #4A564C !important; }

#a11yPanel .a11y-btn,
#a11yPanel .a11y-close,
#a11yPanel .a11y-font-val {
  background: #FAFBF9 !important;
  color: #0F1912 !important;
  border: 1.5px solid #E0DCD3 !important;
  text-decoration: none !important;
}
#a11yPanel .a11y-btn.is-on,
#a11yPanel .a11y-btn.is-on span {
  background: #2E4A34 !important;
  border-color: #2E4A34 !important;
  color: #FFFFFF !important;
}
#a11yPanel .a11y-reset {
  background: #FFFFFF !important;
  color: #0F1912 !important;
  border: 1.5px solid #0F1912 !important;
}
#a11yPanel .a11y-note a { color: #2E4A34 !important; text-decoration: underline !important; }

#a11yOpen {
  background: #2E4A34 !important;
  color: #FFFFFF !important;
  border: 2px solid #FFFFFF !important;
}

/* מצב גווני אפור מוחל כפילטר על ה-body, ולכן חייב להתבטל על הסרגל */
.a11y-contrast-mono #a11yPanel,
.a11y-contrast-mono #a11yOpen { filter: none; }

/* ============================================
   7. שיפורים כלליים
   ============================================ */

/* יעדי מגע של 44px לפריטי ניווט ולצ'יפים */
.nav a { min-height: 44px; display: inline-flex; align-items: center; }
.chip { min-height: 44px; }
.icon-btn { min-width: 44px; min-height: 44px; }

/* טקסט זמין לקוראי מסך בלבד */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* הדפסה: להסתיר את סרגל הנגישות */
@media print {
  .a11y-open, .a11y-panel, .skip-link { display: none !important; }
}

/* ============================================
   8. קלפי העקרונות בעמוד הבית (במקום תמונת פרופיל)
   ============================================ */

.deck-icon {
  width: 88px;
  height: 88px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #EAF0EB;
  font-size: 38px;
  line-height: 1;
}
.a11y-contrast-dark .deck-icon { background: #1A1A1A !important; }
.a11y-contrast-high .deck-icon { background: #FFFFFF !important; border: 2px solid #000; }

/* ============================================
   9. הגדלת טקסט — סקאלה אמיתית של גודל הגופן
   --------------------------------------------
   הרשימה נגזרה ישירות מ-styles.css: לכל כלל שמגדיר
   גודל גופן קבוע יש כאן כלל מקביל שמכפיל אותו בסקאלה
   שנבחרה בסרגל. זה משנה רק את הטקסט — הפריסה, המיקומים
   והסרגל עצמו נשארים במקומם.
   ============================================ */

/* משתני הטיפוגרפיה הראשיים של האתר */
:root {
  --fs-h1: calc(56px * var(--a11y-font-scale));
  --fs-h2: calc(40px * var(--a11y-font-scale));
  --fs-h3: calc(28px * var(--a11y-font-scale));
  --fs-body-lg: calc(20px * var(--a11y-font-scale));
  --fs-body: calc(20px * var(--a11y-font-scale));
  --fs-caption: calc(16px * var(--a11y-font-scale));
}
@media (max-width: 1100px) {
  :root { --fs-h1: calc(40px * var(--a11y-font-scale)); --fs-h2: calc(32px * var(--a11y-font-scale)); --fs-h3: calc(24px * var(--a11y-font-scale)); }
}
@media (max-width: 700px) {
  :root { --fs-h1: calc(32px * var(--a11y-font-scale)); --fs-h2: calc(28px * var(--a11y-font-scale)); }
}

/* גדלים קבועים שמופיעים ישירות בכללי העיצוב */
.pro-photo--placeholder small,
.pro-tag { font-size: calc(16px * var(--a11y-font-scale)); }
.deck-tag,
.field label,
.footer-bottom,
.footer-col a,
.form-intro,
.form-note,
.pro-rating,
.profile-cover--placeholder small,
.review-author span { font-size: calc(16px * var(--a11y-font-scale)); }
.chip,
.deck-quote,
.field input, .field textarea,
.footer-brand p,
.footer-col h4,
.legal-nav__link,
.meta-stats,
.pro-foot .label,
.pro-quote,
.pro-role,
.selection-card p { font-size: calc(16px * var(--a11y-font-scale)); }
.legal-nav__title,
.nav,
.review-author strong,
.review-quote,
/* Under-review banner shown while site is private */ .under-review-banner { font-size: calc(16px * var(--a11y-font-scale)); }
.criteria-item-text h3 { font-size: calc(24px * var(--a11y-font-scale)); }
.criteria-item p { font-size: calc(20px * var(--a11y-font-scale)); }
.legal-article h3 { font-size: calc(20px * var(--a11y-font-scale)); }
.pro-photo--placeholder span,
.quote-mark,
.selection-card h3,
.story-contact-content p { font-size: calc(20px * var(--a11y-font-scale)); }
.contact-form h3,
.deck-name,
.logo,
.profile-role,
.story-contact-form h2 { font-size: calc(20px * var(--a11y-font-scale)); }
.pro-name,
.quote-form h2 { font-size: calc(24px * var(--a11y-font-scale)); }
.legal-content h2,
.mission-mark,
.profile-cover--placeholder span { font-size: calc(24px * var(--a11y-font-scale)); }
.detail-block h2 { font-size: calc(28px * var(--a11y-font-scale)); }
.story-intro h1 { font-size: calc(32px * var(--a11y-font-scale)); }
.selection-header h2,
.story-about-content h2 { font-size: calc(32px * var(--a11y-font-scale)); }
.about-content h2 { font-size: calc(40px * var(--a11y-font-scale)); }
.selection-num,
.story-intro h1 { font-size: calc(40px * var(--a11y-font-scale)); }

/* ============================================
   תיקון: גדלי כותרות רספונסיביים
   --------------------------------------------
   הבלוק שמעלה מגדיר מחדש כל גודל גופן כדי לכפול אותו בסקאלת הנגישות,
   והוא נטען אחרי styles.css — ולכן הוא ביטל את ההקטנות של הכותרות
   במסכים קטנים, והכותרת "נעים להכיר, אני נתי" נשברה לשתי שורות.
   min() מחזיר את ההתנהגות הרספונסיבית בלי לוותר על ההגדלה הידנית:
   הגודל יורד עם רוחב המסך, ועדיין מוכפל בסקאלה שהמשתמש בחר.
   9.3vw נבחר לפי מדידה — הכותרת נכנסת לשורה אחת עד רוחב 320 פיקסלים.
   ============================================ */

.story-intro h1  { font-size: calc(min(40px, 9.3vw) * var(--a11y-font-scale)); }
.about-content h2 { font-size: calc(min(40px, 9.3vw) * var(--a11y-font-scale)); }

/* ============================================
   תיקון: גדלי כותרות במסכים קטנים
   --------------------------------------------
   הבלוק שלמעלה מגדיר מחדש כל גודל גופן כדי לכפול אותו בסקאלת הנגישות,
   והוא נטען אחרי styles.css — ולכן ביטל את ההקטנה של הכותרות במסכים
   קטנים, והכותרת "נעים להכיר, אני נתי" נשברה לשתי שורות.
   min() מחזיר את ההתנהגות הרספונסיבית בלי לוותר על ההגדלה הידנית:
   הגודל יורד עם רוחב המסך ועדיין מוכפל בסקאלה שהמשתמש בחר.
   9.3vw נבחר לפי מדידה — הכותרת נכנסת לשורה אחת עד רוחב 320 פיקסלים.
   ============================================ */

.story-intro h1   { font-size: calc(min(40px, 9.3vw) * var(--a11y-font-scale)); }
.about-content h2 { font-size: calc(min(40px, 9.3vw) * var(--a11y-font-scale)); }

/* ============================================
   תיקון: גדלי טקסט בעמוד "קצת עליי"
   --------------------------------------------
   הגדלים כאן מיישרים את העמוד לגדלים שכבר קיימים בשאר האתר.
   הם יושבים בקובץ הזה ולא ב-styles.css כי הקובץ הזה נטען אחרון
   ומגדיר מחדש כל גודל גופן — כל ערך שנכתוב שם פשוט יידרס.
   ============================================ */

/* כותרות סקשן: 40 כמו "איך למצוא את המומחה" ו"אנשי מקצוע מומלצים"
   בעמוד הבית. היו 32. clamp כדי שלא יישברו לשלוש שורות בטלפון —
   אותה שיטה שכבר בשימוש ב-.hero-content h1. */
.selection-header h2,
.story-about-content h2 { font-size: calc(clamp(28px, 4.2vw, 40px) * var(--a11y-font-scale)); }

/* כותרת כרטיס: 16 כמו .criteria-item h3 בעמוד הבית. היה 18. */
.selection-card h3 { font-size: calc(16px * var(--a11y-font-scale)); }

/* פסקת הפתיחה של "צרו קשר": 16 כמו .contact-content h2 בעמוד הבית. היה 18. */
.story-contact-content p { font-size: calc(16px * var(--a11y-font-scale)); }

/* כותרת הטופס: 20 כמו .contact-form h3 בעמוד הבית. נפלה ל-18.7 —
   ברירת המחדל של הדפדפן ל-h3 — כי הסלקטור ברשימה שלמעלה הוא h2. */
.story-contact-form h3 { font-size: calc(20px * var(--a11y-font-scale)); }

/* כפתורים: 16 קבוע (כך זה בפיגמה), אבל עדיין מוכפל בסקאלת הנגישות —
   בלי השורה הזאת הכפתורים היו מפסיקים להגיב לסרגל הגדלת הטקסט. */
.btn { font-size: calc(16px * var(--a11y-font-scale)); }
