/*
 * Right-to-left pages.
 *
 * Loaded only when <html dir="rtl">, after tailwind.css. Flexbox, grid and
 * text alignment already follow the direction on their own; this file fixes
 * what does not:
 *
 *   1. Fonts. Cinzel and Playfair Display have no Arabic letters.
 *   2. Letter-spacing. Arabic is joined-up writing; any tracking pulls the
 *      letters of a word apart.
 *   3. Size and line height. Arabic at 10-12px is not readable, and its
 *      marks need more room above and below the line.
 *
 * Layout is not corrected here. Since 2026-11-10 the markup uses only the
 * side-neutral utilities (text-start, me-2, ms-1, end-0, -end-1), which
 * follow the direction by themselves. Do not add text-left, mr-*, ml-*,
 * left-*, right-* or border-l-* to a page that can be Arabic; use the
 * start/end form instead, and nothing needs mirroring.
 */

/* ---------------------------------------------------------------- fonts */

html[dir="rtl"] body {
  font-family: 'Amiri', 'Playfair Display', 'EB Garamond', serif;
  font-size: 1.0625rem;
  line-height: 1.9;
}

html[dir="rtl"] .oracle-font,
html[dir="rtl"] .prose h2,
html[dir="rtl"] .coffee-cta {
  font-family: 'Aref Ruqaa', 'Amiri', 'Cinzel', serif;
}

/* The brand stays in Latin letters, in the brand's own face. */
html[dir="rtl"] .brand-latin {
  font-family: 'Cinzel', 'EB Garamond', serif;
  letter-spacing: 0.1em !important;
  unicode-bidi: isolate;
}

/* Small labels set in a system sans elsewhere read better in Amiri here. */
html[dir="rtl"] .font-sans,
html[dir="rtl"] .bmc-btn,
html[dir="rtl"] .bmc-btn span {
  font-family: 'Amiri', 'Playfair Display', serif !important;
}

/* -------------------------------------------------------- joined letters */

html[dir="rtl"] * {
  letter-spacing: 0 !important;
}

/* Arabic has no italic; a slanted Naskh reads as a rendering fault. */
html[dir="rtl"] .italic,
html[dir="rtl"] em,
html[dir="rtl"] .prophecy p {
  font-style: normal;
}

html[dir="rtl"] .prose em {
  font-weight: 700;
}

/* ------------------------------------------------- size and line height */

html[dir="rtl"] .text-\[10px\] { font-size: 0.8125rem; }
html[dir="rtl"] .text-\[11px\] { font-size: 0.875rem; }
html[dir="rtl"] .text-xs { font-size: 0.9rem; line-height: 1.6; }
html[dir="rtl"] .text-sm { font-size: 1rem; line-height: 1.8; }

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 {
  line-height: 1.5;
}

html[dir="rtl"] .prose p,
html[dir="rtl"] .prose li {
  line-height: 2;
}

html[dir="rtl"] .prose h2 {
  font-size: 1.7rem;
}

/* Language names in the menu: one step larger, like the rest of the small text. */
html[dir="rtl"] .lang-menu-list a,
html[dir="rtl"] .lang-menu-list span {
  font-size: 1.05rem;
}
