/* Arabic edition. Loaded after styles.css on ar.html.
   Same design as the English page, with Cairo as the text font and the layout mirrored for right-to-left reading. */

:root {
  --font-display: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-body: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Arabic has no italics and joins its letters, so no slanting and no letter-spacing */
html[dir="rtl"] body { line-height: 1.95; }
html[dir="rtl"] * {
  font-style: normal !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { line-height: 1.3; }
html[dir="rtl"] .title {
  font-size: clamp(3.2rem, 13vw, 8.4rem);
  line-height: 1.12;
}
html[dir="rtl"] .ready-line { line-height: 1.5; }
html[dir="rtl"] .brand { font-size: 1.05rem; line-height: 1.5; }
html[dir="rtl"] .subtitle { font-size: clamp(1.1rem, 2.8vw, 1.7rem); }

/* Mirror the decorative corner and the burn hole to the other side */
html[dir="rtl"] .burn-corner { left: 0; right: auto; transform: scaleX(-1); }
html[dir="rtl"] .burn-hole { left: auto; right: 6%; }
html[dir="rtl"] .skip { left: auto; right: 16px; }

html[dir="rtl"] .prose .aside {
  padding-left: 0; padding-right: 18px;
  border-left: 0; border-right: 3px solid var(--red);
}
html[dir="rtl"] .q-list li { padding: 20px 50px 20px 0; }
html[dir="rtl"] .q-list li::before { left: auto; right: 2px; }
html[dir="rtl"] .faq-list summary { padding: 22px 0 22px 52px; }
html[dir="rtl"] .faq-list summary::after { right: auto; left: 2px; }
html[dir="rtl"] .faq-list details p { padding: 0 0 24px 52px; }

/* Money row: the currency box sits on the right, the amount on the left */
html[dir="rtl"] .money select { border-radius: 0 12px 12px 0; border-right-width: 1px; border-left-width: 2px; }
html[dir="rtl"] .money input { border-radius: 12px 0 0 12px !important; border-left-width: 1px !important; border-right-width: 2px !important; }
html[dir="rtl"] .range-row output { text-align: left; }
html[dir="rtl"] .res-val { text-align: left; }
html[dir="rtl"] .notify input { text-align: left; }

/* The timeline reads right to left, so its gold-to-red line runs (and draws itself) that way too */
html[dir="rtl"] .timeline::before { background: linear-gradient(270deg, var(--gold), var(--red)); transform-origin: 100% 50%; }

/* Motion runs right to left as well: the reading line burns from the right, list items slide in from the right,
   the gold lines of the section labels draw out from the word, and the brush stroke under red words starts on the right */
html[dir="rtl"] { --from-x: 24px; }
html[dir="rtl"] .burnline { transform: scaleX(-1); }
html[dir="rtl"] .reveal .kicker::before { transform-origin: 0 50%; }
html[dir="rtl"] .reveal .kicker::after { transform-origin: 100% 50%; }
html[dir="rtl"] h2 .red { background-position: 100% 100%; }

@media (max-width: 760px) {
  html[dir="rtl"] .timeline::before { left: auto; right: 33px; background: linear-gradient(var(--gold), var(--red)); transform-origin: 50% 0; }
  html[dir="rtl"] .step { text-align: right; }
}
@media (max-width: 520px) {
  html[dir="rtl"] .timeline::before { right: 21px; }
  html[dir="rtl"] .burn-hole { right: 4%; }
}

html[dir="rtl"] .sub2 { max-width: 42ch; }

/* "Read the first page": set in Amiri, a book face (Naskh), like a printed Arabic page */
html[dir="rtl"] .page-text p, html[dir="rtl"] .page-title { font-family: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif; }
html[dir="rtl"] .page-text p { font-size: clamp(1.18rem, 2.4vw, 1.34rem); line-height: 2.05; }
html[dir="rtl"] .page-title { font-weight: 700; }
html[dir="rtl"] .page-stack::before { transform: rotate(2.2deg) translate(6px, 8px); }
html[dir="rtl"] .page-stack::after { transform: rotate(-1.4deg) translate(-5px, 4px); }
