/* מערכת העיצוב.
 *
 * כל ערך כאן מגיע מלוח המותג (2.9.2026, גרסה 1) או מכלל טיפוגרפי שנכתב
 * בו. אין כאן צבע שנבחר כי הוא נראה טוב — יש כאן שישה צבעים עם תפקידים,
 * ויחס שימוש שהלוח קובע: 60 סגול · 30 לבן־אפור · 10 דיו · צהוב עד 3%.
 *
 * הכלל שהכי קל להפר ולכן הכי חשוב: **הצהוב הוא אות בטיחות, לא קישוט.**
 * הוא מופיע על פס אזהרה, על מסגרת QR ועל אזהרה — ובשום מקום אחר. ברגע
 * שהוא הופך לצבע הדגשה כללי, המערכת מאבדת את היכולת לסמן סכנה.
 */

/* ==================================================== אסימונים */
:root {
  /* --- מותג --- */
  --purple:        #5B2C8F;   /* ראשי — לוגו, כפתורי פעולה, כותרות */
  --purple-deep:   #2E1650;   /* מצב כהה, ריחוף */
  --purple-lift:   #7B45B5;   /* הבהרה — קווי מתאר וזוהר בלבד */
  --ink:           #1B1D26;   /* דיו — טקסט וקווי מתאר */
  --concrete:      #E6E4EA;   /* אפור בטון — רקעי מקטע, טבלאות */
  --surface:       #F6F5F8;   /* משטח פאנל */
  --white:         #FFFFFF;

  /* אות בטיחות. עד 3% מהשטח, ורק על סמנטיקת בטיחות. */
  --safety:        #FFC400;

  /* --- משטחים כהים --- */
  --night:         #0C0910;
  --night-2:       #14101B;
  --night-line:    rgba(255,255,255,.10);

  /* --- טקסט --- */
  --on-dark:       #F4F1F8;
  --on-dark-dim:   #A79FB4;
  --on-light:      var(--ink);
  --on-light-dim:  #5D5867;

  /* --- טיפוגרפיה --- */
  --font-display: 'Rubik', 'Heebo', 'Assistant', 'Noto Sans Hebrew', Arial, sans-serif;
  --font-text:    'Heebo', 'Rubik', 'Assistant', 'Noto Sans Hebrew', Arial, sans-serif;

  /* סולם שנשען על clamp: הוא מדלג על נקודות שבירה ומחזיק יחס אחיד
     מ-360 עד 2560 פיקסלים. */
  --t-hero:  clamp(3rem, 11vw, 10rem);
  --t-h1:    clamp(2rem, 5.6vw, 4.4rem);
  --t-h2:    clamp(1.5rem, 3.4vw, 2.6rem);
  --t-h3:    clamp(1.15rem, 1.9vw, 1.5rem);
  --t-body:  clamp(1rem, 1.15vw, 1.0625rem);   /* 17px בלוח המותג */
  --t-cap:   .8125rem;                          /* 13px */

  /* --- מרווח --- */
  --gut: clamp(1.25rem, 5vw, 6rem);
  --sec: clamp(5rem, 12vh, 10rem);
  --max: 1360px;

  /* --- תנועה --- */
  /* עקומה אחת לכל האתר. תנועה מכנית עולה ונעצרת — היא לא מקפיצה. */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ==================================================== יסודות */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* גלילה חלקה היא חלק מהתחושה, אבל היא נכבית כשהמשתמש ביקש פחות תנועה. */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;

  /* הסרגל העליון דביק וגובהו 72 פיקסלים, ולכן כל מה שהדפדפן
     מגליל אליו נוחת **מתחתיו**. זה נראה כמטרד קטן בקישורי הניווט,
     והוא כשל נגישות מלא במקלדת: מי שמנווט ב-Tab מגיע לרכיב שהסרגל
     מכסה — הוא ממוקד, והוא לא נראה. זה WCAG 2.2 סעיף 2.4.11
     (Focus Not Obscured), רמה AA, והתיקון הוא שורה אחת.
     המרווח הנוסף הוא כדי שהטבעת עצמה לא תיגע בקצה הסרגל. */
  scroll-padding-block-start: calc(72px + 1rem);
}

/* ובנייד גם מלמטה: סרגל האגודל יושב קבוע על תחתית המסך. */
@media (max-width: 819px) {
  html {
    scroll-padding-block-end: calc(56px + env(safe-area-inset-bottom, 0px) + 1rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--on-dark);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.06;
  /* לוח המותג: **לעולם לא לרווח עברית.** ריווח אותיות בעברית שובר את
     צורת המילה, כי אין בה אותיות גדולות שמחזיקות את הקצב. */
  letter-spacing: normal;
  margin: 0;
  text-wrap: balance;
}

/* לטינית — וזה ההפך: לטינית בכותרת דורשת ריווח +40. */
.latin {
  font-family: var(--font-display);
  letter-spacing: .04em;
  font-weight: 700;
}

p { margin: 0 0 1em; max-width: 62ch; }
a { color: inherit; }

/* מספרים בטבלאות ובמפרטים — ספרות בעלות רוחב אחיד, אחרת עמודת מספרים
   מתנדנדת בכל שורה. */
.tnum, table, .spec, .metric-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* קוד דגם לטיני בתוך משפט עברי. `bdi` מבודד אותו מכיוון הפסקה — בלעדיו
   "XE3246" בסוף משפט עברי קופץ לצד הלא נכון. */
bdi { unicode-bidi: isolate; }

img, canvas { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--safety);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

/* קישור הדילוג חייב להיראות כשמגיעים אליו.
   הוא היה מוסתר תמיד — גם במיקוד — ולכן מי שמנווט במקלדת
   לחץ Tab פעם אחת על כלום שאינו נראה, והמנגנון שנבנה כדי
   לדלג על שבעה קישורי ניווט פשוט לא היה קיים בשבילו. */
.sr-only:focus {
  position: fixed;
  inset-block-start: .75rem;
  inset-inline-start: .75rem;
  z-index: 200;
  width: auto; height: auto;
  margin: 0;
  padding: .7rem 1.1rem;
  overflow: visible;
  clip: auto;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

/* ==================================================== פריסה */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

section { position: relative; }

.section-pad { padding-block: var(--sec); }

/* מקטע בהיר. המכונות נראות טוב על בהיר, והחילופין בין בהיר לכהה הם מה
   שנותן לדף קצב במקום גלילה אחת ארוכה. */
.light {
  background: var(--white);
  color: var(--on-light);
}
.light .eyebrow { color: var(--purple); }
.light .lede { color: var(--on-light-dim); }

.tint { background: var(--surface); color: var(--on-light); }

/* ==================================================== טיפוגרפיה של מקטע */
.eyebrow {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--t-cap);
  letter-spacing: .02em;
  color: var(--purple-lift);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: '';
  inline-size: 1.75rem;
  block-size: 2px;
  background: currentColor;
  flex: none;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--on-dark-dim);
  max-width: 46ch;
}

/* ==================================================== כפתורים */
.btn {
  --btn-bg: var(--purple);
  --btn-fg: var(--white);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.6rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--purple-deep); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.btn-ghost:hover { background: rgba(123,69,181,.14); }

.btn svg { inline-size: 1.15em; block-size: 1.15em; flex: none; }

/* ==================================================== גיבור */
.hero {
  position: relative;
  min-block-size: 100svh;
  display: grid;
  isolation: isolate;
}

/* הקנבס יושב מאחורי הכול ומכסה את המקטע. הטקסט חי מעליו, ולכן הוא
   חייב שכבת הצללה — טקסט לבן על מכונה בהירה אינו קריא. */
.hero-canvas {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  z-index: 0;
}

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

   לכן ההגרדיאנטים נגזרים מההרכבה: החלון השקוף במקום שבו המכונה עומדת,
   וההחשכה בצד שבו יושבים הכותרת והבורר. שינוי `composition()` ב-
   `scene-hero.js` מחייב שינוי כאן. */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(95% 75% at 26% 42%, transparent 34%, rgba(12,9,16,.62) 100%),
    linear-gradient(to left, rgba(12,9,16,.72) 0%, rgba(12,9,16,.35) 42%, transparent 70%),
    linear-gradient(to bottom, rgba(12,9,16,.7) 0%, transparent 22%, transparent 58%, rgba(12,9,16,.92) 100%);
}

/* במסך צר המכונה במרכז־עליון והבורר בתחתית, ולכן ההחשכה אנכית בלבד —
   החשכה צדדית שם הייתה חותכת את המכונה לשניים. */
@media (max-width: 819px) {
  .hero-veil {
    background:
      radial-gradient(120% 60% at 50% 30%, transparent 42%, rgba(12,9,16,.5) 100%),
      linear-gradient(to bottom, rgba(12,9,16,.72) 0%, transparent 18%, transparent 48%, rgba(12,9,16,.95) 78%);
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: space-between;
  gap: 2rem;
  padding-block: clamp(6rem, 14vh, 9rem) clamp(2rem, 6vh, 4rem);
  min-block-size: 100svh;
  pointer-events: none;
}
.hero-inner > * { pointer-events: auto; }

.hero h1 {
  font-size: var(--t-h1);
  max-inline-size: 15ch;
}
.hero h1 .quiet { color: var(--on-dark-dim); font-weight: 700; }

/* ---- קריאת הגובה ---- */
/* המספר הגדול הוא הנושא של העמוד. הוא לא כותרת — הוא מד. */
.readout {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: .85;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.readout-value {
  font-size: var(--t-hero);
  /* המעבר הוא על הצבע בלבד. המספר עצמו מתעדכן בכל פריים, ואנימציית
     CSS עליו הייתה נלחמת בעדכון. */
  color: var(--white);
}
.readout-unit {
  font-size: clamp(1.25rem, 3vw, 2.4rem);
  color: var(--purple-lift);
  font-weight: 700;
}
.readout-label {
  font-family: var(--font-text);
  font-size: var(--t-cap);
  font-weight: 600;
  color: var(--on-dark-dim);
  margin-block-start: .75rem;
}

/* ---- הבורר ---- */
.dial {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.4rem 1.4rem;
  background: rgba(20,16,27,.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--night-line);
  border-radius: 22px;
  max-inline-size: 44rem;
}

.dial-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.dial input[type='range'] {
  flex: 1 1 16rem;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  block-size: 2.75rem;
  margin: 0;
  cursor: grab;
  direction: ltr;   /* המסילה עולה שמאל→ימין כמו סרגל גובה */
}
.dial input[type='range']:active { cursor: grabbing; }

.dial input[type='range']::-webkit-slider-runnable-track {
  block-size: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,
    var(--purple-lift) 0%, var(--purple-lift) var(--fill, 0%),
    rgba(255,255,255,.16) var(--fill, 0%), rgba(255,255,255,.16) 100%);
}
.dial input[type='range']::-moz-range-track {
  block-size: 4px; border-radius: 2px; background: rgba(255,255,255,.16);
}
.dial input[type='range']::-moz-range-progress {
  block-size: 4px; border-radius: 2px; background: var(--purple-lift);
}
.dial input[type='range']::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  inline-size: 26px; block-size: 26px;
  margin-block-start: -11px;
  border-radius: 50%;
  background: var(--white);
  border: 5px solid var(--purple);
  box-shadow: 0 4px 18px rgba(0,0,0,.5);
  transition: transform .18s var(--ease);
}
.dial input[type='range']:active::-webkit-slider-thumb { transform: scale(1.16); }
.dial input[type='range']::-moz-range-thumb {
  inline-size: 26px; block-size: 26px; border-radius: 50%;
  background: var(--white); border: 5px solid var(--purple);
  box-shadow: 0 4px 18px rgba(0,0,0,.5);
}

/* מסילת סימוני הגבהים שהעסק באמת מחזיק. סימון אינו קישוט — הוא אומר
   "כאן יש לנו מכונה", וזו התשובה שהמבקר מחפש. */
.ticks {
  position: relative;
  block-size: 1.5rem;
  direction: ltr;
  margin-inline: 13px;   /* חצי רוחב האגודל, כדי שהסימון יתיישר לערך */
}
.tick {
  position: absolute;
  inset-block-start: 0;
  inline-size: 2px;
  block-size: .5rem;
  background: rgba(255,255,255,.3);
  transform: translateX(-1px);
}
.tick[data-strong] { block-size: .8rem; background: var(--purple-lift); }
.tick span {
  position: absolute;
  inset-block-start: .9rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--on-dark-dim);
  white-space: nowrap;
}

/* ---- תשובת הבורר ---- */
.answer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  background: var(--night-line);
  border-radius: 14px;
  overflow: hidden;
}
.answer-cell {
  background: rgba(12,9,16,.75);
  padding: .85rem 1rem;
}
.answer-cell dt {
  font-size: var(--t-cap);
  font-weight: 600;
  color: var(--on-dark-dim);
  margin: 0 0 .2rem;
}
.answer-cell dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.answer-cell dd small {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--t-cap);
  color: var(--on-dark-dim);
}

/* ---- הידוק במסך צר ----
 *
 * במסך טלפון הבורר תפס יותר ממחצית הגובה, והמכונה נדחסה לרצועה שבה היא
 * נקראה כצעצוע. שלוש הפעולות כאן מחזירות לה גובה: הקריאה קטנה, ארבע
 * התשובות הופכות לשורה אחת נגללת במקום שתי שורות, והריפוד מתהדק.
 *
 * התשובות **לא נמחקות**. "כמה כלים מגיעים לגובה הזה" היא התשובה שהמבקר
 * בא בשבילה, והסתרתה בטלפון — שם מגיע רוב התנועה — הופכת את הבורר
 * לקישוט. */
@media (max-width: 819px) {
  .hero-inner { padding-block: clamp(4.5rem, 11vh, 6rem) 1.25rem; gap: 1.25rem; }
  .hero h1 { font-size: clamp(1.75rem, 7.5vw, 2.4rem); }
  .dial { padding: 1rem 1rem 1.15rem; gap: .75rem; }
  .readout-value { font-size: clamp(2.75rem, 16vw, 4.5rem); }
  .readout-label { margin-block-start: .45rem; }

  .answer {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(8.5rem, 1fr);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .answer::-webkit-scrollbar { display: none; }
  .answer-cell { scroll-snap-align: start; padding: .7rem .85rem; }
  .ticks { block-size: 1.25rem; }
}

/* ==================================================== רמז גלילה */
.scroll-hint {
  display: flex; align-items: center; gap: .5rem;
  font-size: var(--t-cap); color: var(--on-dark-dim);
  justify-self: start;
}
.scroll-hint i {
  inline-size: 1px; block-size: 2.2rem;
  background: linear-gradient(var(--purple-lift), transparent);
  animation: drop 2.2s var(--ease) infinite;
}
@keyframes drop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ==================================================== ניווט */
.nav {
  position: fixed;
  inset-block-start: 0; inset-inline: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem var(--gut);
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease);
}
.nav[data-stuck] {
  background: rgba(12,9,16,.78);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-block-end: 1px solid var(--night-line);
}
.nav-brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; font-family: var(--font-display); font-weight: 900;
}
.nav-brand svg { inline-size: 2.1rem; block-size: 2.1rem; flex: none; }
.nav-brand .he { font-size: 1.15rem; }
.nav-brand .en {
  font-size: .68rem; letter-spacing: .16em; color: var(--on-dark-dim);
  font-weight: 700; display: block; margin-block-start: -.15rem;
}
.nav-links { display: flex; gap: 1.4rem; margin-inline-start: auto; }
.nav-links a {
  text-decoration: none; font-size: .95rem; font-weight: 500;
  color: var(--on-dark-dim); transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--white); }
@media (max-width: 860px) { .nav-links { display: none; } }
.nav .btn { padding: .6rem 1.1rem; font-size: .9rem; margin-inline-start: auto; }
@media (min-width: 861px) { .nav .btn { margin-inline-start: 1.4rem; } }

/* ==================================================== עמודי תוכן */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

/* ---- שלושת העמודים ---- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1px;
  background: var(--concrete);
  border-radius: 20px;
  overflow: hidden;
}
.pillar { background: var(--white); padding: clamp(1.5rem, 3vw, 2.5rem); }
.pillar h3 {
  font-size: var(--t-h3);
  color: var(--purple);
  margin-block-end: .5rem;
}
.pillar .metric-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--ink);
  display: block;
  margin-block-end: .35rem;
}
.pillar p { font-size: .95rem; color: var(--on-light-dim); margin: 0; }

/* ---- כרטיסי צי ---- */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
}
.mcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--concrete);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease);
}
.mcard:hover {
  border-color: var(--purple);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.45);
}
.mcard canvas { aspect-ratio: 4 / 3; inline-size: 100%; }
.mcard-body { padding: 1rem 1.15rem 1.2rem; }
.mcard h3 { font-size: 1.05rem; color: var(--ink); margin-block-end: .1rem; }
.mcard .mcard-sub { font-size: var(--t-cap); color: var(--on-light-dim); }
.mcard-specs {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-block-start: .8rem;
}
.chip {
  font-size: 11px; font-weight: 600;
  padding: .25rem .55rem;
  border-radius: 6px;
  background: var(--concrete);
  color: var(--on-light-dim);
}
.chip[data-electric] { background: #E7F3EC; color: #1F6B41; }
.chip[data-count] { background: var(--purple); color: var(--white); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-end: 2rem; }
.filter {
  border: 1.5px solid var(--concrete);
  background: var(--white);
  color: var(--on-light-dim);
  border-radius: 999px;
  padding: .5rem 1.05rem;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.filter[aria-pressed='true'] {
  background: var(--purple); border-color: var(--purple); color: var(--white);
}

/* ---- פריסה ---- */
.coverage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: .5rem;
}
.city {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem;
  padding: .55rem .8rem;
  border-radius: 10px;
  background: var(--surface);
  font-size: .9rem;
}
.city b {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--purple);
}

/* ---- אזהרת בטיחות: המקום היחיד שהצהוב מופיע בו כשטח ----
 *
 * ההערה מופיעה גם על מקטע כהה וגם על בהיר. גרסה אחת עם רקע בהיר נתנה
 * קופסה לבנה עם טקסט לבן על המקטע הכהה — אזהרת בטיחות שאי אפשר לקרוא,
 * שהיא גרוע יותר מאזהרה שלא קיימת. לכן ברירת המחדל כהה, והמקטעים
 * הבהירים דורסים אותה. */
.safety-note {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: 1rem 1.2rem;
  border-inline-start: 4px solid var(--safety);
  background: var(--night-2);
  color: var(--on-dark);
  border-radius: 0 12px 12px 0;
  font-size: .95rem;
}
.safety-note svg { flex: none; inline-size: 1.4rem; block-size: 1.4rem; color: var(--safety); }

.light .safety-note,
.tint .safety-note {
  background: var(--surface);
  color: var(--on-light);
}
.light .safety-note svg,
.tint .safety-note svg { color: var(--ink); }

/* ==================================================== כותרת תחתונה */
.foot {
  background: var(--night-2);
  border-block-start: 1px solid var(--night-line);
  padding-block: clamp(3rem, 8vh, 5rem) 2rem;
}
.foot a { color: var(--on-dark-dim); text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 2rem;
}
/* רמת הכותרת היא h3 ולא h4: הכותרת שלפניה בעמוד היא
   h2, וקורא מסך שמדלג רמה שומע "רמה 4" ומחפש את ה-3 שאינו קיים. */
.foot h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: .95rem; margin: 0 0 .8rem; color: var(--white);
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.foot-bottom {
  margin-block-start: 3rem; padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--night-line);
  font-size: var(--t-cap); color: var(--on-dark-dim);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}

/* ==================================================== חשיפה בגלילה
 *
 * אלמנט מתגלה כשהוא נכנס למסך. ההזזה קטנה בכוונה: 14 פיקסלים נקראים
 * כהתיישבות, 60 נקראים כאנימציה.
 *
 * **הכיוון כאן הפוך ממה שנראה טבעי, וזאת הנקודה.** אם ברירת המחדל היא
 * `opacity: 0`, אז כל תקלה בשרשרת — JavaScript שלא נטען, `IntersectionObserver`
 * שלא מדווח, לשונית שהדפדפן מרסן ברקע — משאירה **עמוד ריק לגמרי**.
 * זה קרה כאן: העמוד היה שחור לחלוטין בעוד שכל התוכן שלו במקום.
 *
 * לכן התוכן גלוי כברירת מחדל, וההסתרה מופעלת רק אחרי ש-JavaScript הצהיר
 * שהוא מסוגל לחשוף אותה בחזרה. כישלון מוביל לעמוד סטטי, לא לעמוד ריק. */
[data-reveal] {
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
html.js-reveal [data-reveal]:not([data-shown]) {
  opacity: 0;
  transform: translateY(14px);
}
@media (prefers-reduced-motion: reduce) {
  html.js-reveal [data-reveal]:not([data-shown]) { opacity: 1; transform: none; }
}

/* ==================================================== נפילה חיננית */
/* בלי WebGL הקנבס נעלם והמקטע ממשיך לעבוד כטקסט. אתר שמציג מלבן שחור
   על מכשיר ישן גרוע מאתר בלי תלת־ממד. */
.no-webgl .hero-canvas,
.no-webgl .mcard canvas { display: none; }
.no-webgl .hero-veil {
  background: linear-gradient(160deg, var(--purple-deep), var(--night) 70%);
}

/* ==================================================== לוח בנטו
 *
 * לא "כרטיסים בשורה". ההבדל בין רשת בנטו לרשת כרטיסים הוא ש**כל אריח
 * הוא סוג אחר של דבר** — אחד הוא קנבס תלת־ממד, אחד הוא מספר שגדל, אחד
 * הוא טבלת מפרט, אחד הוא מפה — ושהם **אינם באותו משקל**. רשת של תשעה
 * ריבועים זהים היא טבלה עם פינות מעוגלות.
 *
 * שנים־עשר עמודים ולא ארבעה: ‏12 מתחלק ב-2, ב-3, ב-4 וב-6, ולכן אריח
 * יכול לתפוס שליש, רבע או חצי באותה רשת בלי שברים.
 */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(.65rem, 1vw, 1rem);
  container-type: inline-size;
}

.tile {
  --span: 4;
  --rows: 1;
  --tile-bg: var(--surface);
  --tile-line: var(--concrete);
  grid-column: span var(--span);
  grid-row: span var(--rows);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(16px, 1.4vw, 24px);
  background: var(--tile-bg);
  min-block-size: 0;
  display: flex;
  flex-direction: column;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}

/* עומק בשתי שכבות: קו פנימי בהיר שמדמה קצה מוגבה, וצל חיצוני רחב
   ורך. מסגרת אחת של פיקסל נותנת כרטיס; שתי השכבות נותנות עצם. */
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  box-shadow:
    inset 0 0 0 1px var(--tile-line),
    inset 0 1px 0 0 rgba(255, 255, 255, .55);
}

.dark-bento .tile {
  --tile-bg: #16121e;
  --tile-line: rgba(255, 255, 255, .09);
}
.dark-bento .tile::after {
  box-shadow:
    inset 0 0 0 1px var(--tile-line),
    inset 0 1px 0 0 rgba(255, 255, 255, .07);
}

/* זרקור שעוקב אחרי הסמן. הוא לא קישוט — הוא מה שהופך רשת סטטית
   למשטח שמגיב, והוא עולה שני משתני CSS ואפס פריימים. */
.tile::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .35s var(--ease);
  background: radial-gradient(
    18rem 18rem at var(--mx, 50%) var(--my, 50%),
    rgba(123, 69, 181, .22), transparent 62%);
}
.tile:hover::before,
.tile:focus-within::before { opacity: 1; }

.tile:hover { transform: translateY(-3px); }
.tile[data-interactive]:hover {
  box-shadow: 0 22px 48px -24px rgba(0, 0, 0, .5);
}

/* ---- שכבות בתוך אריח ---- */
/* מדיה נושמת עד הקצה. אריח עם ריפוד סביב הקנבס נראה כמו תמונה
   ממוסגרת, ואריח שהמדיה בו נוגעת בקצה נראה כמו חלון. */
.tile-media {
  position: relative;
  z-index: 0;
  flex: 1 1 auto;
  min-block-size: 0;
  display: block;
  inline-size: 100%;
}
.tile-media canvas { inline-size: 100%; block-size: 100%; display: block; }

.tile-body {
  position: relative;
  z-index: 1;
  padding: clamp(.9rem, 1.5vw, 1.35rem);
  display: grid;
  gap: .3rem;
  align-content: start;
}

/* גוף שצף מעל מדיה, עם שיפוע קריאות מתחתיו */
.tile-overlay .tile-body {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  background: linear-gradient(to top, rgba(10, 7, 14, .92), transparent);
  color: var(--on-dark);
}

.tile-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--purple);
  text-transform: none;
}
.dark-bento .tile-kicker { color: var(--purple-lift); }

.tile-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.2;
}

/* המספר הגדול הוא סוג אריח בפני עצמו. הוא לא כותרת — הוא נתון,
   ולכן ספרות ברוחב אחיד ומשקל 900. */
.tile-figure {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 5.5cqi, 4.5rem);
  line-height: .92;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.02em;
}
.tile-note {
  font-size: .875rem;
  color: var(--on-light-dim);
  line-height: 1.45;
  max-inline-size: 34ch;
}
.dark-bento .tile-note { color: var(--on-dark-dim); }

/* ---- משקלים ---- */
.tile[data-w="full"]  { --span: 12; }
.tile[data-w="half"]  { --span: 6; }
.tile[data-w="third"] { --span: 4; }
.tile[data-w="two-thirds"] { --span: 8; }
.tile[data-w="quarter"] { --span: 3; }
.tile[data-h="tall"]  { --rows: 2; }

/* ---- קריסה ----
 * בשתי מדרגות ולא בשלוש: ‏12→6 שומר על היחסים (חצי הופך לרוחב מלא,
 * שליש לחצי), ו-‏6→2 בטלפון נותן עמודה אחת לכל אריח מלבד המספרים,
 * שנשארים שניים בשורה כי מספר בודד ברוחב מסך נראה כמו שגיאה. */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile[data-w="full"] { --span: 6; }
  .tile[data-w="two-thirds"] { --span: 6; }
  .tile[data-w="half"] { --span: 3; }
  .tile[data-w="third"] { --span: 3; }
  .tile[data-w="quarter"] { --span: 3; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { --span: 2; --rows: 1; }
  .tile[data-w="quarter"], .tile[data-compact] { --span: 1; }
  .tile[data-h="tall"] { --rows: 1; }
}
