/* ==========================================================================
   Base — reset, טיפוגרפיה, פריסה בסיסית, utilities, אנימציות
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* רקע מעברי לכל הדף. השכבה מקובעת למסך (fixed) ולא נגללת יחד עם התוכן,
   ולכן כל "עמוד" בגלילה מקבל את אותו גרדיאנט של אזור הפתיחה, בלי תפרים
   ובלי חזרתיות. הסקשנים עצמם שקופים והוא נראה דרכם. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--grad-tint);
  pointer-events: none;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--c-ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-display); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

p  { margin: 0; text-wrap: pretty; }

/* המספור מוצג ידנית (01, 02…) — מבטלים את הסמנים של הדפדפן בשתי סוגי הרשימות */
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

strong { font-weight: 700; }

/* קטעי קוד/נתיבים בתוך טקסט עברי — מבודדים כדי שהסוגריים לא יתהפכו */
code {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  font-family: ui-monospace, "Consolas", "SFMono-Regular", monospace;
  font-size: 0.85em;
}

button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- מיקוד נגיש ---------- */
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- דילוג לתוכן ---------- */
.skip-link {
  position: absolute;
  inset-inline-start: var(--sp-4);
  top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-ink);
  color: var(--c-ink-inv);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* ==========================================================================
   פריסה
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

/* כל הסקשנים שקופים — הרקע המעברי של הדף (body::before) עובר דרכם.
   מה שמפריד ביניהם הוא קו־שיער דק ולא בלוק צבע, כדי לשמור על אווריריות. */
.section--soft,
.section--tint { background: transparent; }

.section + .section::before,
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-line), transparent);
}
.section + .section::before { inset-block-start: 0; }

.section--dark {
  background: var(--c-bg-dark);
  color: var(--c-ink-inv);
}
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--c-ink-inv); }

/* ==========================================================================
   כותרות סקשן
   ========================================================================== */

.section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-accent);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 2px;
}
.section-head--center .eyebrow::before { display: none; }
.section--dark .eyebrow { color: #FF6B70; }
.section--dark .eyebrow::before { background: #FF6B70; }

/* קו אדום — מוטיב מרכזי מהלוגו */
.rule {
  width: 52px;
  height: 2px;
  background: var(--c-accent);
  border: 0;
  margin: var(--sp-5) 0 0;
  border-radius: 2px;
}
.section-head--center .rule { margin-inline: auto; }

.lead {
  margin-top: var(--sp-5);
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--c-ink-2);
  font-weight: 300;
}
.section--dark .lead { color: var(--c-ink-inv-2); }

.text-accent { color: var(--c-accent); }
.section--dark .text-accent { color: #FF6B70; }

/* משפט סיכום מודגש */
.statement {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}

/* ==========================================================================
   אנימציות — עדינות בלבד (§26)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* השהיה מדורגת לרשימות כרטיסים */
.reveal[data-delay="1"] { transition-delay: .07s; }
.reveal[data-delay="2"] { transition-delay: .14s; }
.reveal[data-delay="3"] { transition-delay: .21s; }
.reveal[data-delay="4"] { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

