/* ==========================================================================
   SmartFlow — Hebrew RTL overrides
   Loaded ONLY on *-he.html pages, after styles.css. Scoped to [dir="rtl"] so
   it never touches the English site. Physical-property overrides for the
   handful of spots styles.css hardcodes left/right (flex/grid already mirror
   automatically under dir="rtl" — see israeli-ui-design-system + hebrew-rtl-
   best-practices skills for why those are left alone).
   ========================================================================== */

@font-face {
  font-family: 'Heebo';
  src: url('../fonts/Heebo-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

[dir="rtl"] {
  --font: 'Heebo', 'Rubik', 'Segoe UI', 'Open Sans', Arial, sans-serif;
  --font-display: 'Heebo', 'Rubik', 'Segoe UI', 'Open Sans', Arial, sans-serif;
}

/* Hebrew type scale (israeli-ui-design-system §2): taller line-height, no
   letter-spacing, slight word-spacing. Headings drop the tight negative
   tracking + width-axis push tuned for Archivo — Heebo carries its own
   weight without it. */
[dir="rtl"] body {
  line-height: 1.7;
  word-spacing: 0.05em;
}
[dir="rtl"] h1 {
  letter-spacing: normal;
  font-variation-settings: normal;
  line-height: 1.25;
}
[dir="rtl"] h2, [dir="rtl"] .thesis, [dir="rtl"] .statement {
  letter-spacing: normal;
  font-variation-settings: normal;
  line-height: 1.3;
}
[dir="rtl"] .eyebrow, [dir="rtl"] .mono-caption, [dir="rtl"] .fig-caption,
[dir="rtl"] .photo-placeholder span, [dir="rtl"] .booking-placeholder {
  letter-spacing: normal;
}

/* Skip link: fixed to the visual left in LTR; mirror to the right */
[dir="rtl"] .skip-link { left: auto; right: 12px; }

/* Lists: padding-left → padding-right */
[dir="rtl"] ul, [dir="rtl"] ol { padding-left: 0; padding-right: 20px; }

/* Table: text starts on the right, cell gutter flips */
[dir="rtl"] th, [dir="rtl"] td {
  text-align: right;
  padding: 13px 0 13px 14px;
}

/* Mobile table stack: offscreen header flips side */
@media (max-width: 640px) {
  [dir="rtl"] thead { left: auto; right: -9999px; }
}

/* English brand terms / numbers inside Hebrew flow stay LTR and don't
   reorder surrounding punctuation */
[dir="rtl"] bdi, [dir="rtl"] .ltr-run { unicode-bidi: isolate; direction: ltr; }

/* SVG text-anchor is direction-relative: under the page's inherited dir=rtl,
   `text-anchor:end/start` resolve mirror-wrong, throwing diagram labels across
   their circles and running the logo wordmark off its viewBox (the "cut" logo).
   Force LTR resolution on anchored SVG text so anchors are physical again.
   Left off text-anchor="middle" labels (e.g. mixed "מבקרי AI") so their bidi
   ordering stays correct. */
[dir="rtl"] .logo-mark text,
[dir="rtl"] .fig svg text[text-anchor="start"],
[dir="rtl"] .fig svg text[text-anchor="end"] { direction: ltr; }

/* Workflow examples: keep the sequence marker on the reading-start side. */
[dir="rtl"] .workflow-lane li { padding-left: 0; padding-right: 42px; }
[dir="rtl"] .workflow-lane li::before { left: auto; right: 0; }
[dir="rtl"] .decision-row i { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .decision-row b { margin-right: 0; margin-left: 5px; }
@media (max-width: 640px) {
  [dir="rtl"] .workflow-lane li { padding-right: 38px; }
}
