/* الأساس: تصفير، طباعة، تركيز، حركة. RTL-first بخصائص منطقية فقط. */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h) + var(--s-4));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  margin: 0 0 var(--s-4);
  font-weight: 800;
  text-wrap: balance;
}

h1 { font-size: clamp(32px, 5.2vw, 58px); line-height: 1.24; letter-spacing: -0.015em; }
h2 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.28; letter-spacing: -0.01em; }
h3 { font-size: 21px; line-height: 1.45; font-weight: 700; }
h4 { font-size: 18px; line-height: 1.5; font-weight: 700; }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-block-end: 0; }

small, .rn-small { font-size: 14.5px; line-height: 1.7; }
.rn-caption { font-size: 13px; line-height: 1.6; color: var(--ink-mute); }

a {
  color: var(--gold-700);
  text-decoration: none;
  transition: color .2s var(--ease);
}
a:hover { color: var(--gold-900); }

ul, ol { margin: 0 0 var(--s-4); padding-inline-start: var(--s-5); }
li { margin-block-end: var(--s-2); }

img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

hr { border: 0; border-block-start: 1px solid var(--line); margin: var(--s-6) 0; }

/* كل الأرقام والبيانات بخانات متساوية العرض */
.rn-num, .rn-price, table td, table th, time {
  font-variant-numeric: tabular-nums;
}

.rn-mono {
  font-family: var(--font-mono);
  letter-spacing: .08em;
  font-weight: 500;
}

/* الفاصل الذهبي — توقيع «المخطّط» */
.rn-rule {
  width: 64px;
  height: 2px;
  background: var(--gold-rule);
  border-radius: var(--r-pill);
}

/* التركيز */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold-700);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* رابط تخطّي المحتوى */
.rn-skip {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--s-4);
  z-index: var(--z-modal);
  background: var(--surface);
  color: var(--gold-900);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--gold-500);
  border-radius: var(--r-md);
  transition: inset-block-start .2s var(--ease);
}
.rn-skip:focus { inset-block-start: var(--s-3); }

.rn-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.rn-hp {
  position: absolute !important;
  inset-inline-start: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

[hidden] { display: none !important; }

/* الكشف عند التمرير */
.rn-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.rn-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .rn-reveal { opacity: 1; transform: none; }
}

::selection { background: var(--gold-100); color: var(--ink); }
