/* ============================================================
   BEAUTECH — right-to-left overrides (Arabic, /ar/)
   Loaded after site.css and the page stylesheet, only on pages with
   <html dir="rtl"> (tools/build-i18n.mjs adds it). Flex/grid layouts mirror
   on their own; this covers type and the few physical left/right rules.
   ============================================================ */
:root[dir="rtl"] {
  --f-display: 'Noto Sans Arabic', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --f-sans:    'Noto Sans Arabic', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --f-mono:    'JetBrains Mono', 'Noto Sans Arabic', monospace;
}
/* Arabic letters join: tracking and uppercase styles break the script */
:root[dir="rtl"] body,
:root[dir="rtl"] h1, :root[dir="rtl"] h2, :root[dir="rtl"] h3, :root[dir="rtl"] h4,
:root[dir="rtl"] .display, :root[dir="rtl"] .h-xl,
:root[dir="rtl"] .eyebrow, :root[dir="rtl"] .nav-links a, :root[dir="rtl"] .nav-dd-btn,
:root[dir="rtl"] .btn, :root[dir="rtl"] .ftitle { letter-spacing: 0; }
:root[dir="rtl"] body { line-height: 1.75; }
:root[dir="rtl"] h1, :root[dir="rtl"] h2, :root[dir="rtl"] h3 { line-height: 1.35; }

/* arrows point the way the text reads */
:root[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
:root[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }
:root[dir="rtl"] .site-footer a.fl.fl-cta:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* dropdown panels open from the start edge */
:root[dir="rtl"] .nav-dd-panel { left: auto; right: 0; }
:root[dir="rtl"] .lang-dd-panel { right: auto; left: 0; }

/* Latin-only runs (codes, emails, phone numbers) keep their own order */
:root[dir="rtl"] a[href^="mailto:"], :root[dir="rtl"] a[href^="tel:"], :root[dir="rtl"] a[href^="https://wa.me"] { unicode-bidi: plaintext; }
