/* Base — RTL-native, Arabic-led typography, logical properties only. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: var(--m-font-text);
  font-size: var(--m-fs-base); /* 17px — Arabic reads smaller than Latin at equal size (DS-6) */
  line-height: var(--m-lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.m-locked { overflow: hidden; }

/* (::selection is refine.css's — a soft primary wash that keeps the
   text's own ink readable. The old solid-primary rule fought it and
   left white text on a 22% tint. Phase 2.5.) */

img { max-width: 100%; height: auto; display: block; }
/* The header is sticky, so an in-page anchor otherwise lands underneath it. */
html { scroll-padding-block-start: calc(var(--m-header-h) + var(--m-header-gap)); }

h1, h2, h3 {
  font-family: var(--m-font-display);
  font-weight: 700;
  line-height: var(--m-lh-tight);
  margin: 0 0 var(--m-sp-3);
  text-wrap: balance;
}
p { margin: 0 0 var(--m-sp-3); text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; }

/* THE focus ring — one branded ring for every surface. No border-radius
   override: outlines hug the element's own corners in modern engines,
   and a radius here visibly squashed pill shapes while focused. */
:focus-visible { outline: 2px solid var(--m-primary); outline-offset: 2px; }

.screen-reader-text {
  position: absolute; clip-path: inset(50%);
  width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
}
.m-skip {
  position: absolute; inset-inline-start: -999px; top: 0; z-index: 100;
  background: var(--m-primary); color: var(--m-on-primary);
  padding: var(--m-sp-2) var(--m-sp-4); border-radius: 0 0 var(--m-r-s) var(--m-r-s);
}
.m-skip:focus { inset-inline-start: var(--m-sp-4); }

.m-container { max-width: var(--m-container); margin-inline: auto; padding-inline: var(--m-sp-4); }
.m-title { font-size: var(--m-fs-xl); }

.m-section { padding-block: var(--m-sp-7); }
.m-section__title {
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--m-sp-6);
  text-wrap: balance;
}
/* Section titles carry themselves: scale and space, no ornament.
   (The old five-dot "shade strip" signature is retired — it branded
   every store as one specific kind of shop.) */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
