/* magio Hebrew site: right-to-left layer on top of magio.css.
   Only the rules that depend on direction are mirrored here. Centered rules
   (left: 50% + translateX(-50%)) stay as they are. Phone mockups and the
   product windows keep their own layout; text inside them follows dir="rtl". */

@font-face { font-family: "Simpler Pro"; src: url("../fonts/SimplerPro-Regular.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }
@font-face { font-family: "Simpler Pro"; src: url("../fonts/SimplerPro-Black.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }

:root {
  --font-sans: "Simpler Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-title: "Simpler Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* Hebrew has no tight display tracking: the negative letter-spacing tuned for SF Pro breaks letters apart. */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] .h-display, [dir="rtl"] .h1, [dir="rtl"] .h2, [dir="rtl"] .lead,
[dir="rtl"] .eyebrow, [dir="rtl"] .people-fig figcaption, [dir="rtl"] .intro-tag { letter-spacing: 0; }
[dir="rtl"] .h-display, [dir="rtl"] .h1 { line-height: 1.08; }
/* The wordmark, numbers and the intro stay Latin and keep their tracking. */
[dir="rtl"] .mg-word, [dir="rtl"] .intro-word, [dir="rtl"] .m-mono { direction: ltr; unicode-bidi: isolate; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif; }

/* arrows point the reading direction */
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow, [dir="rtl"] .card-link:hover .card-more .arrow { transform: scaleX(-1) translateX(3px); }

/* navigation */
[dir="rtl"] .nav-logo { margin-right: 0; margin-left: 14px; }
[dir="rtl"] .nav-panel { left: auto; right: -12px; transform-origin: top right; }
@media (max-width: 1080px) { [dir="rtl"] .nav-actions { margin-left: 0; margin-right: auto; } }

/* section heads and text blocks */
[dir="rtl"] .section-head.left { margin-left: auto; margin-right: 0; text-align: right; }
[dir="rtl"] .faq-q { text-align: right; }
[dir="rtl"] .step::before { left: auto; right: 26px; }
[dir="rtl"] .product-frame .frame-bar span { margin-left: 0; margin-right: 12px; direction: ltr; }
[dir="rtl"] .cta-band .radiant { text-align: right; }
[dir="rtl"] .plan .badge { right: auto; left: 18px; }

/* articles */
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .prose blockquote { padding: 4px 20px 4px 0; border-left: 0; border-right: 3px solid var(--primary); }
[dir="rtl"] .prose th, [dir="rtl"] .prose td { text-align: right; }

/* photos */
[dir="rtl"] .photo-chip { left: auto; right: -10px; padding: 7px 8px 7px 11px; }
[dir="rtl"] .hero-photo { right: auto; left: 24px; }
@media (max-width: 900px) { [dir="rtl"] .hero-photo { left: auto; } }
@media (max-width: 720px) { [dir="rtl"] .photo-chip { left: auto; right: -6px; padding: 6px 6px 6px 9px; } }

/* the flat chat mockups (fallback for the 3D scenes) */
[dir="rtl"] .mock-head .tile { margin-left: 0; margin-right: auto; }
[dir="rtl"] .bubble .meta { text-align: left; }
[dir="rtl"] .url-chip, [dir="rtl"] .ig-url { direction: ltr; }

/* Wide 3D stages bleed out past the column with a negative left margin. In a
   right-to-left block an over-wide box ignores margin-left and hangs from the
   right edge instead, so mirror the offsets onto the right side. */
[dir="rtl"] .scene-hero { left: auto; right: 50%; margin-left: 0; margin-right: -50vw; }
[dir="rtl"] .scene-store, [dir="rtl"] .scene-comment { margin-left: 0; margin-right: -13%; }
[dir="rtl"] .scene-chat { margin-left: 0; margin-right: -9%; }
@media (max-width: 900px) { [dir="rtl"] .scene-store, [dir="rtl"] .scene-comment, [dir="rtl"] .scene-chat { margin-right: 0; } }
html.is-phone[dir="rtl"] .scene3d { left: auto; right: auto; margin-left: 0; margin-right: calc(50% - 50vw); }
/* never let anything widen the page sideways on small screens */
@media (max-width: 900px) { html[dir="rtl"], html[dir="rtl"] body { overflow-x: clip; } }
