/* ===== Scroll Hero — فيديو يتحرك مع السكرول ===== */
.sh-hero {
  position: relative;
  height: 320vh;              /* طول مساحة السكرول: كل ما زاد، صار الفيديو أبطأ */
  background: #0b0b0b;
  color: #fff;
  isolation: isolate;
  --sh-accent: #E5252A;       /* لون التمييز (أحمر الهوية) */
}

/* الموقع حاط overflow-x: hidden على html/body بالموبايل، وهاد بيوقف الـ sticky.
   clip بيمنع السكرول الأفقي بدون ما يوقفه. (الملف بيتحمل بالصفحة الرئيسية بس) */
html, body {
  overflow-x: hidden;
  overflow-x: clip !important;
  overflow-y: visible !important;
}

/* الطبقة الثابتة اللي فيها الفيديو والمحتوى */
.sh-hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.sh-hero__poster,
.sh-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sh-hero__poster { z-index: -3; }
.sh-hero__canvas { z-index: -2; }

/* بالإنجليزي: نقلب الفيديو حتى يصير الشخص على اليمين والنص على اليسار */
html:not([dir="rtl"]) .sh-hero__poster,
html:not([dir="rtl"]) .sh-hero__canvas { transform: scaleX(-1); }

/* تغميق فوق الفيديو حتى يبين النص */
.sh-hero__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--sh-dir, 90deg), rgba(0,0,0,.55), rgba(0,0,0,0) 60%),
    linear-gradient(0deg, rgba(0,0,0,.25), rgba(0,0,0,.1));
  pointer-events: none;
}
[dir="rtl"] .sh-hero { --sh-dir: 270deg; }

.sh-hero__content {
  width: min(1200px, 92%);
  margin-inline: auto;
  max-width: 1200px;
  padding-top: 80px;          /* مساحة للهيدر الثابت */
}
.sh-hero__inner { max-width: 760px; }

.sh-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 18px;
}
.sh-hero__eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--sh-accent, #E5252A);
  transform: rotate(45deg);
}

.sh-hero__title {
  font-size: clamp(34px, 4.8vw, 66px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0 0 22px;
}
[dir="rtl"] .sh-hero__title { letter-spacing: 0; line-height: 1.2; text-transform: none; }
.sh-hero__title .sh-accent { color: var(--sh-accent, #E5252A); }

/* مؤشر الكتابة اللي بيرمش */
.sh-hero__caret {
  display: inline-block;
  width: .38em;
  height: .82em;
  margin-inline-start: .08em;
  background: #fff;
  vertical-align: baseline;
  animation: sh-blink 1.25s steps(1) infinite;
}
@keyframes sh-blink { 50% { opacity: 0; } }

.sh-hero__text {
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.7;
  opacity: .88;
  margin: 0 0 32px;
}

.sh-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }

.sh-btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 8px 8px 8px 26px;
  background: #fff;
  color: #111;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .25s ease;
}
[dir="rtl"] .sh-btn { padding: 8px 26px 8px 8px; }
.sh-btn:hover { transform: translateY(-2px); }
.sh-btn__icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #111; color: #fff;
  display: grid; place-items: center;
}
[dir="rtl"] .sh-btn__icon svg, [dir="rtl"] .sh-link svg { transform: scaleX(-1); }

.sh-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.sh-link svg { color: var(--sh-accent, #E5252A); transition: transform .25s; }
.sh-link:hover svg { transform: translateX(4px); }

/* ===== نصوص بتتغير مع السكرول ===== */
.sh-scenes { display: grid; }
.sh-scene {
  grid-area: 1 / 1;
  align-self: end;
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  pointer-events: none;
  transition: opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1), filter .6s ease;
}
.sh-scene.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.sh-scene.is-past { transform: translateY(-40px); }

/* مؤشر المراحل */
.sh-steps { display: flex; gap: 8px; margin-top: 34px; }
.sh-steps span {
  width: 34px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,.25);
  transition: background .4s, width .4s;
}
.sh-steps span.is-active { background: var(--sh-accent, #E5252A); width: 56px; }

/* تلميح السكرول */
.sh-hero__hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .7;
  transition: opacity .3s;
}
.sh-hero.is-scrolled .sh-hero__hint { opacity: 0; }

/* إذا المستخدم طالب تقليل الحركة: هيرو عادي بطول شاشة واحدة */
@media (prefers-reduced-motion: reduce) {
  .sh-hero { height: auto; }
  .sh-hero__stage { position: relative; }
  .sh-hero__caret { animation: none; }
  .sh-scene { transition: none; }
}

@media (max-width: 768px) {
  .sh-hero { height: 260vh; }
  .sh-hero__stage::after {
    background: linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.2) 70%);
  }
}
