/* =====================================================================
   BASE — reset, typography, layout helpers, motion.
   Uses logical properties (inline-start/end) so RTL & LTR both work.
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-surface);
  color: var(--c-ink);
  font-family: var(--font-ar);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { font-family: var(--font-en); line-height: 1.6; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; font-family: var(--font-ar-head); }
html[lang="en"] :is(h1, h2, h3, h4) { font-family: var(--font-en-head); line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
dl, dd { margin: 0; }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-y); }
.section-alt { background: var(--c-white); }
.section-dark { background: var(--c-primary-deep); color: var(--c-white); }

/* Section heading */
.section-head { max-width: 680px; margin-block-end: clamp(32px, 4vw, 48px); }
.section-head.is-center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--c-accent); font-weight: 600; font-size: .9rem; letter-spacing: .02em;
  margin-block-end: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head.is-center .eyebrow::after { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section-title { font-size: var(--fs-h2); color: var(--c-primary); }
.section-lead { margin-block-start: 14px; color: var(--c-muted); font-size: var(--fs-lead); }
.section-head.is-light .eyebrow { color: var(--c-gold); }
.section-head.is-light .section-title { color: var(--c-white); }
.section-head.is-light .section-lead { color: rgba(255, 255, 255, .75); }

/* Numbers like "45+" always read left-to-right */
.count { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Icons */
.ic { width: 24px; height: 24px; flex: none; }
[dir="rtl"] .ic-dir { transform: scaleX(-1); }

/* Skip link */
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--c-primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-s);
}
.skip-link:focus { top: 12px; }

.noscript { padding-block: 120px; text-align: center; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
