/* ==========================================================
   القسم 3: الهيرو — صورة الحملة تنكشف ← صورة العروض
   شكلان للانكشاف (data-hero-style):
     curtain = ستارة حقيقية تتجمّع طيّاتها على الجانبين
     cloth   = قماش ساتان يُرفع من المنتصف بحافة متموّجة
   الوضع الافتراضي (بدون جافاسكربت أو مع تقليل الحركة):
   الصورتان تحت بعضهما. مع GSAP تُضاف .is-enhanced فتتراكبان.
   ========================================================== */

.hero {
  --hero-offset: var(--header-h-mobile);
  position: relative;
  background: var(--c-nude);
}
.hero__stage {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------- الصورة 1: مشتركة ---------- */
.hero__cover {
  position: relative;
  order: -1;                       /* بدون حركة: صورة الحملة أولًا */
  height: calc(100svh - var(--hero-offset));
  min-height: 520px;
  overflow: hidden;
}
.hero[data-hero-style="curtain"] .hero__cloth,
.hero[data-hero-style="cloth"] .hero__curtain { display: none; }

/* ---------- الشكل 1: الستارة ---------- */
.hero__half {
  position: absolute;
  inset-block: 0;
  width: 50%;
  overflow: hidden;
}
.hero__half--left  { left: 0; }
.hero__half--right { right: 0; }
.hero__half picture { display: contents; }
.hero__half img {
  position: absolute;
  inset-block: 0;
  width: 199.2%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.hero__half--left img  { left: 0; }
.hero__half--right img { right: 0; }

/* ظلال الطيّات: شرائط ضوء وظل رأسية تظهر وتتكثّف مع التجمّع */
.hero__folds {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg,
      rgba(90, 55, 45, 0.16) 0px,
      rgba(90, 55, 45, 0.04) 20px,
      rgba(255, 250, 247, 0.30) 36px,
      rgba(255, 250, 247, 0.06) 52px,
      rgba(90, 55, 45, 0.16) 72px);
}
/* حافة الستارة الداخلية (الحاشية) */
.hero__hem {
  position: absolute;
  inset-block: 0;
  width: 14px;
  opacity: 0;
  background: linear-gradient(90deg, rgba(70, 40, 34, 0.35), rgba(255, 255, 255, 0.35), rgba(70, 40, 34, 0.2));
}
.hero__half--left .hero__hem  { right: 0; }
.hero__half--right .hero__hem { left: 0; transform: scaleX(-1); }

/* شرائط الطيّات (تُبنى بالجافاسكربت) */
.hero__strips { position: absolute; inset: 0; }
.hero__strip {
  position: absolute;
  inset-block: 0;
  left: 0;
  background-repeat: no-repeat;
  transform-origin: 0% 50%;
  will-change: transform;
}
.hero__half--right .hero__strip { left: auto; right: 0; transform-origin: 100% 50%; }
.hero__strip-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* طيّة داخلة: ظل */
  background: linear-gradient(90deg, rgba(58, 32, 27, 0.55) 0%, rgba(58, 32, 27, 0.22) 55%, rgba(255, 255, 255, 0.08) 100%);
}
/* طيّة بارزة: ضوء (بالتبادل) */
.hero__strip:nth-child(even) .hero__strip-shade {
  background: linear-gradient(90deg, rgba(255, 252, 250, 0.42) 0%, rgba(255, 252, 250, 0.12) 55%, rgba(58, 32, 27, 0.18) 100%);
}
.hero__half--right .hero__strip-shade { transform: scaleX(-1); }
/* الحاشية: ظل على الحافة الداخلية */
.hero.is-opening .hero__half--left .hero__strip.is-inner  { box-shadow: 8px 0 18px rgba(58, 32, 27, 0.18); }
.hero.is-opening .hero__half--right .hero__strip.is-inner { box-shadow: -8px 0 18px rgba(58, 32, 27, 0.18); }
.hero__half.has-strips > picture img { visibility: hidden; }
.hero__half.has-strips .hero__folds,
.hero__half.has-strips .hero__hem { display: none; }
.hero__half { transform-origin: 50% 0%; }

/* ---------- الشكل 2: قماش يُرفع ---------- */
.hero__cloth picture { display: contents; }
.hero__cloth img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__cloth-sheen {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  height: 22%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 55%,
    rgba(80, 45, 38, 0.28) 92%,
    rgba(80, 45, 38, 0) 100%);
}

/* مؤشر الإسكرول (بدون نص) */
.hero__cue {
  position: absolute;
  bottom: clamp(16px, 4vh, 36px);
  left: 50%;
  translate: -50% 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 64px;
  color: var(--c-ink);
}
.hero__cue-line {
  width: 1px;
  height: 44px;
  background: currentColor;
  transform-origin: top;
}

/* ---------- الصورة 2: العروض ---------- */
.hero__reveal {
  position: relative;
  min-height: calc(100svh - var(--hero-offset));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #EFE2DB;
}
.hero__reveal-media,
.hero__reveal-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__offer {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: var(--gutter);
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.94);
  text-align: center;
}
.hero__eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--c-muted);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.6rem + 4vw, 5rem);
  line-height: 1.15;
  margin-block: var(--space-2xs) var(--space-xs);
}
.hero__title em { font-style: normal; color: var(--c-wine); }
.hero__text {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  max-width: 34ch;
  margin-inline: auto;
}

/* السعر: واضح ومميز */
.hero__price {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-block: var(--space-md);
  padding: 6px 18px 8px;
  border-block: 1px solid var(--c-wine);
}
.hero__price-label {
  font-size: var(--fs-sm);
  color: var(--c-ink);
}
.hero__price-value {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--c-wine);
}
.hero__price-value strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
  line-height: 1;
  font-variant-numeric: lining-nums;
}
.hero__price-value span {
  font-size: var(--fs-base);
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}
.hero__actions .btn { width: 100%; max-width: 320px; }
.hero__next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: var(--fs-xs);
  color: var(--c-muted);
  transition: color var(--dur-fast);
}
.hero__next:hover { color: var(--c-ink); }
.hero__next .icon { width: 16px; height: 16px; }

/* ---------- الكمبيوتر ---------- */
@media (min-width: 1024px) {
  .hero { --hero-offset: 48px; }
  .hero__reveal { align-items: center; }
  .hero__offer {
    width: min(520px, 40vw);
    margin: 0;
    margin-inline-start: clamp(4rem, 10vw, 10rem);
    padding: 0;
    background: none;
    text-align: start;
  }
  .hero__text { margin-inline: 0; font-size: var(--fs-base); }
  .hero__price { justify-content: flex-start; padding-inline: 0 24px; }
  .hero__actions { flex-direction: row; gap: var(--space-lg); }
  .hero__actions .btn { width: auto; }
}

/* ==========================================================
   الوضع المحسّن (GSAP): الصورة 1 فوق صورة العروض
   ========================================================== */
.hero.is-enhanced .hero__stage {
  height: calc(100svh - var(--hero-offset));
  min-height: 520px;
  overflow: hidden;
}
.hero.is-enhanced .hero__reveal {
  position: absolute;
  inset: 0;
  min-height: 0;
}
.hero.is-enhanced .hero__cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: auto;
  min-height: 0;
  overflow: visible;
  pointer-events: none;
}
.hero.is-enhanced .hero__cloth { clip-path: url(#hero-cloth-clip); }
.hero.is-enhanced .hero__cue { pointer-events: auto; }

/* أثناء التثبيت لا يختفي الهيدر */
body.hero-pinned .site-header { transform: translateY(calc(-1 * var(--top-h, 0px))); }
