/* ================================================================
   منصة حروف — هيرو الرئيسية: ستوري الكتّاب + دوّارة الكتب (home-hero.js)
   خلفية غامقة بألوان المنصة (بنفسجي غامق + لمسة سماوي) — من غير خلفية ورا الكتب ولا ظل.
   بارتفاع الشاشة بالظبط (تحت الهيدر الثابت)، والدوّارة بتكبر وتصغر مع ارتفاع الشاشة (--ch = ارتفاع الغلاف).
   الأغلفة بتتعرض زي ما هي من غير موكب من عندنا (10/30)؛ الموكب الجاهز بيتعرض من صورة
   شفافة السيرفر بيقصّها (من غير خلفيته البيضا/الرمادي).
   مصمم للموبايل الأول.
================================================================ */
/* ارتفاع الهيدر الثابت — home-hero.js بيحط القيمة الحقيقية */
:root { --hh-top: 70px; }
@media (min-width: 769px) { :root { --hh-top: 80px; } }
/* بعرض الشاشة كله: بيلغي حشو .h2-wrap (32px، و18px على الموبايل) — وبيطلع لحد تحت الهيدر على طول (الصفحة حاشية 85px) */
.hh { --hh-h: calc(100vh - var(--hh-top)); --ch: min(clamp(170px, calc(var(--hh-h) - 450px), 420px), 88vw);
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
  min-height: var(--hh-h); margin: calc(var(--hh-top) - 85px) -32px 0; padding: 12px 0 26px; border-radius: 0 0 28px 28px; color: #fff;
  background:
    radial-gradient(60% 46% at 92% 0%, rgba(150,95,255,.42), transparent 70%),
    radial-gradient(55% 42% at 0% 100%, rgba(79,209,255,.2), transparent 70%),
    linear-gradient(172deg, #2b0f63 0%, var(--brand-900, #260a55) 48%, #150533 100%);
}
@supports (height: 100svh) { .hh { --hh-h: calc(100svh - var(--hh-top)); } }
.hh-inner { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 1200px; margin: 0 auto; }

/* ── ستوري الكتّاب ── */
.hh-stories { flex: none; display: flex; gap: 12px; overflow-x: auto; padding: 8px 16px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hh-stories::-webkit-scrollbar { display: none; }
.hh-stories > :first-child { margin-inline-start: auto; }
.hh-stories > :last-child { margin-inline-end: auto; }
.hh-story { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; scroll-snap-align: start; animation: hhPop .45s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes hhPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.hh-ring { position: relative; display: block; width: 68px; height: 68px; padding: 3px; border-radius: 24px; background: conic-gradient(from 200deg, #a78bfa, #4fd1ff, #f472b6, #a78bfa); transition: transform .2s var(--ease-out); }
.hh-story:active .hh-ring { transform: scale(.94); }
.hh-story.is-seen .hh-ring { background: rgba(255,255,255,.22); }
.hh-ring img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 21px; border: 2.5px solid #240a52; background: #3a1d78; }
.hh-story > span { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 .72rem var(--font-body); color: rgba(255,255,255,.88); }
.hh-story .hh-new { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 999px; border: 2px solid #240a52; background: linear-gradient(135deg, var(--brand-500, #7c3aed), #4fd1ff); font: 800 .6rem/1.5 var(--font-display); color: #fff; white-space: nowrap; }
.hh-story--add .hh-ring { padding: 0; background: rgba(255,255,255,.08); border: 2px dashed rgba(255,255,255,.45); }
.hh-add { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 21px; color: #fff; }
.hh-add svg { width: 26px; height: 26px; }
.hh-plus { position: absolute; bottom: -5px; inset-inline-start: -5px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid #240a52; background: linear-gradient(135deg, var(--brand-500, #7c3aed), #4fd1ff); font: 900 1rem/1 var(--font-display); color: #fff; }
.hh-story.is-sk .hh-ring { background: rgba(255,255,255,.1); animation: hhSk 1.2s ease-in-out infinite; }
@keyframes hhSk { 50% { opacity: .5; } }

/* ── العنوان ── (العنوان + الدوّارة + البيانات في نص المساحة اللي تحت الستوري) */
.hh-h1 { margin: auto 20px 0; padding-top: 12px; text-align: center; font: 800 1.12rem/1.5 var(--font-display); color: rgba(255,255,255,.8); }
.hh-h1 b { background: linear-gradient(90deg, #c4b5fd, #4fd1ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── الدوّارة ── */
.hh-flow { position: relative; flex: none; height: calc(var(--ch) + 22px); margin-top: 6px; perspective: 1100px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.hh-flow:active { cursor: grabbing; }
.hh-card { position: absolute; top: 12px; left: 50%; width: calc(var(--ch) * 2 / 3); height: var(--ch); margin-left: calc(var(--ch) / -3); display: block; transition: transform .6s var(--ease-out), opacity .6s, filter .6s; will-change: transform; }
.hh-flow.is-sk .hh-card { background: rgba(255,255,255,.08); border-radius: 8px; animation: hhSk 1.2s ease-in-out infinite; }
/* الغلاف */
.hh-cv { position: relative; display: block; width: 100%; height: 100%; }
.hh-cv img { display: block; width: 100%; height: 100%; pointer-events: none; }
.hh-cv--mk { display: flex; align-items: flex-end; justify-content: center; }
.hh-cv--mk > img { object-fit: contain; object-position: center bottom; }

.hh-cv--flat img { object-fit: cover; }   /* الصورة لوحدها: من غير حواف ولا خلفية ولا ظل */

/* ── بيانات الكتاب اللي في النص ── */
.hh-info { display: flex; flex-direction: column; align-items: center; margin: 12px 0 auto; padding: 0 20px; text-align: center; }
.hh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font: 700 .76rem var(--font-body); color: rgba(255,255,255,.88); }
.hh-chip b { color: #a5f3fc; }
.hh-title { max-width: 440px; min-height: 2.6em; margin: 10px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 900 1.4rem/1.3 var(--font-display); color: #fff; }
.hh-author { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font: 700 .88rem var(--font-body); color: rgba(255,255,255,.78); text-decoration: none; }
.hh-author img { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; background: #3a1d78; }
.hh-info.is-swap .hh-title, .hh-info.is-swap .hh-chip, .hh-info.is-swap .hh-author { animation: hhTxt .45s var(--ease-out) both; }
@keyframes hhTxt { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hh-ctas { display: flex; gap: 10px; width: 100%; max-width: 380px; margin-top: 16px; }
.hh-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 16px; border-radius: 16px; text-decoration: none; font: 800 .96rem var(--font-display); transition: transform .2s var(--ease-out), box-shadow .2s, background .2s; }
.hh-btn:active { transform: scale(.97); }
.hh-btn svg { width: 18px; height: 18px; }
.hh-btn--main { color: #fff; background: linear-gradient(135deg, var(--brand-500, #7c3aed), var(--brand-700, #521ba8)); box-shadow: 0 10px 24px rgba(124,58,237,.28); }
.hh-btn--ghost { color: var(--brand-700, #521ba8); background: #fff; border: 1px solid var(--brand-200, #d0b4ff); }
/* الأزرار جوه الهيرو الغامق: الأساسي أبيض والتاني شفاف */
.hh-info .hh-btn--main { color: var(--brand-800, #3d1481); background: #fff; box-shadow: 0 12px 28px rgba(8,2,30,.35); }
.hh-info .hh-btn--ghost { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
.hh-info .hh-btn--ghost:hover { background: rgba(255,255,255,.16); }
.hh-prog { width: 100%; max-width: 220px; height: 4px; margin-top: 16px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.14); }
.hh-prog i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #a78bfa, #4fd1ff); transition: width .5s var(--ease-out); }

/* ── عارض الستوري ── */
.hh-viewer { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; background: rgba(21,19,29,.88); }
.hh-viewer[hidden] { display: none; }
.hh-viewer.is-open .hh-v-box { animation: hhOpen .35s var(--ease-out) both; }
@keyframes hhOpen { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.hh-v-box { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; width: 100%; height: 100%; color: #fff;
  background: radial-gradient(90% 50% at 85% 0%, rgba(79,209,255,.22), transparent 70%), linear-gradient(165deg, #2a1170 0%, var(--brand-700, #521ba8) 55%, var(--brand-500, #7c3aed) 100%); }
.hh-v-bars { display: flex; gap: 4px; padding: 12px 12px 0; }
.hh-v-bars i { flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.3); }
.hh-v-bars i b { display: block; width: 0; height: 100%; background: #fff; }
.hh-v-bars i.is-done b { width: 100%; }
.hh-v-bars i.is-now b { animation: hhBar var(--dur, 6s) linear forwards; }
@keyframes hhBar { to { width: 100%; } }
.hh-v-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.hh-v-head img { width: 40px; height: 40px; border-radius: 13px; object-fit: cover; background: rgba(255,255,255,.15); }
.hh-v-head a { color: #fff; text-decoration: none; }
.hh-v-head b { display: block; font: 800 .95rem var(--font-display); }
.hh-v-head small { display: block; font: 600 .76rem var(--font-body); color: rgba(255,255,255,.75); }
.hh-v-x { margin-inline-start: auto; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.hh-v-x svg { width: 20px; height: 20px; }
.hh-v-slide { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 24px; text-align: center; animation: hhTxt .4s var(--ease-out) both; }
.hh-v-nav { position: absolute; inset: 120px 0 120px; z-index: 2; display: flex; }
.hh-v-nav button { flex: 1; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hh-v-foot { position: relative; z-index: 3; display: flex; gap: 10px; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); }
.hh-v-foot .hh-btn--main { flex: 2; color: var(--brand-700, #521ba8); background: #fff; box-shadow: none; }
.hh-v-foot .hh-btn--ghost { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
/* شريحة كتاب */
.hh-s-book { width: 196px; aspect-ratio: 2/3; }
.hh-s-writer { width: 180px; aspect-ratio: 1; overflow: hidden; border-radius: 36px; border: 3px solid rgba(255,255,255,.85); background: rgba(255,255,255,.1); }
.hh-s-writer img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hh-s-kicker { margin-top: 22px; font: 700 .82rem var(--font-body); color: #a5f3fc; }
.hh-s-title { max-width: 320px; margin: 6px 0 0; font: 900 1.45rem/1.35 var(--font-display); }
.hh-s-meta { margin-top: 6px; font: 600 .86rem var(--font-body); color: rgba(255,255,255,.78); }
/* شريحة «انشر قصتك» */
.hh-s-join h3 { margin: 0; font: 900 1.9rem/1.3 var(--font-display); }
.hh-s-join h3 b { color: #a5f3fc; }
.hh-s-join p { max-width: 320px; margin: 12px auto 0; font: 500 1rem/1.9 var(--font-body); color: rgba(255,255,255,.85); }
.hh-s-fan { position: relative; width: 230px; height: 186px; margin: 0 auto 18px; }
.hh-s-fan .hh-cv { position: absolute; bottom: 0; left: 50%; width: 100px; height: 150px; margin-left: -50px; }
.hh-s-fan .hh-cv:nth-child(1) { transform: translateX(-68px) rotate(-11deg) scale(.88); }
.hh-s-fan .hh-cv:nth-child(3) { transform: translateX(68px) rotate(11deg) scale(.88); }
.hh-s-fan .hh-cv:nth-child(2) { z-index: 1; }
.hh-s-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.hh-s-perks span { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font: 700 .78rem var(--font-body); }

@media (max-width: 620px) { .hh { margin-left: -18px; margin-right: -18px; border-radius: 0 0 24px 24px; } }
/* موبايل قصير (آيفون SE وأقل): نصغّر الحاجات الثابتة عشان الهيرو كله يبان */
@media (max-width: 759px) and (max-height: 700px) {
  .hh { --ch: min(clamp(150px, calc(var(--hh-h) - 392px), 420px), 88vw); padding: 8px 0 18px; }
  .hh-story { width: 62px; gap: 4px; }
  .hh-ring { width: 58px; height: 58px; border-radius: 20px; }
  .hh-ring img { border-radius: 17px; }
  .hh-h1 { padding-top: 6px; font-size: 1rem; }
  .hh-title { font-size: 1.2rem; }
  .hh-ctas { margin-top: 12px; }
  .hh-btn { padding: 11px 14px; }
  .hh-prog { margin-top: 12px; }
}

/* ── تابلت ── */
@media (min-width: 760px) {
  .hh { --ch: min(clamp(220px, calc(var(--hh-h) - 520px), 470px), 60vw); padding: 16px 0 34px; border-radius: 0 0 36px 36px; }
  .hh-stories { gap: 18px; }
  .hh-story { width: 80px; }
  .hh-ring { width: 76px; height: 76px; border-radius: 26px; }
  .hh-ring img { border-radius: 23px; }
  .hh-h1 { font-size: 1.25rem; padding-top: 16px; }
  .hh-flow { margin-top: 10px; }
  .hh-title { font-size: 1.7rem; }
  .hh-v-box { width: 420px; height: min(760px, 94vh); border-radius: 26px; box-shadow: 0 40px 100px rgba(0,0,0,.5); }
}
/* ── كمبيوتر: عمودين — العنوان وبيانات الكتاب يمين، والدوّارة شمال، والكل في نص الشاشة ── */
@media (min-width: 1024px) {
  .hh { --ch: clamp(240px, calc(var(--hh-h) - 260px), 760px); padding: 14px 0 30px; }
  /* صف فاضي فوق وتحت العنوان+البيانات عشان يتوسّطوا الارتفاع، والدوّارة ماسكة العمود كله */
  .hh-inner { display: grid; grid-template-columns: clamp(360px, 30vw, 480px) minmax(0, 1fr); grid-template-rows: auto 1fr auto auto 1fr; grid-template-areas: "st st" ". flow" "h1 flow" "info flow" ". flow"; column-gap: 36px; padding: 0 40px; }
  .hh-stories { grid-area: st; padding-bottom: 10px; }
  .hh-h1 { grid-area: h1; margin: 0; padding-top: 0; text-align: start; font: 900 clamp(1.7rem, 4.6vh, 2.9rem)/1.3 var(--font-display); color: #fff; }
  .hh-flow { grid-area: flow; align-self: center; height: calc(var(--ch) + 56px); margin-top: 0; overflow: hidden; }
  .hh-card { top: 26px; }
  .hh-info { grid-area: info; align-items: flex-start; margin: 2.2vh 0 0; padding: 0; text-align: start; }
  .hh-title { font-size: clamp(1.4rem, 3.3vh, 2.2rem); }
  .hh-ctas { max-width: 420px; }
}
/* لابتوب صغير (ارتفاع قليل): ستوري أصغر عشان الكتب تكبر */
@media (min-width: 1024px) and (max-height: 720px) {
  .hh { --ch: clamp(220px, calc(var(--hh-h) - 225px), 600px); padding: 8px 0 20px; }
  .hh-stories { padding-top: 4px; padding-bottom: 4px; }
  .hh-story { width: 66px; gap: 4px; }
  .hh-ring { width: 62px; height: 62px; border-radius: 21px; }
  .hh-ring img { border-radius: 18px; }
  .hh-ctas { margin-top: 12px; }
  .hh-btn { padding: 12px 16px; }
}
/* شاشات كبيرة: المحتوى أعرض */
@media (min-width: 1500px) { .hh-inner { max-width: 1440px; } }
@media (min-width: 1900px) { .hh-inner { max-width: 1640px; } .hh-story { width: 86px; } .hh-ring { width: 82px; height: 82px; } }
@media (prefers-reduced-motion: reduce) {
  .hh-card { transition: none; }
  .hh-story { animation: none; }
}

/* ================================================================
   حركة في خلفية الهيرو بس (مش المحتوى): شفق بألوان المنصة + نجوم بتلمع + شهاب
================================================================ */
/* سما متحركة ورا المحتوى بس (نفس البلوك في قسم الكتّاب الغامق):
   شفق بألوان المنصة (بقع بنفسجي/سماوي/وردي بتتحرك وتكبر وتصغر) + نجوم بتلمع + شهاب كل كام ثانية */
.fx-sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; container-type: size; }
.fx-sky .au { position: absolute; border-radius: 50%; will-change: transform; }
.fx-sky .au1 { top: -38%; right: -22%; width: 80vmax; height: 80vmax; width: 85cqmax; height: 85cqmax; background: radial-gradient(closest-side, rgba(150,95,255,.62), rgba(150,95,255,.18) 55%, transparent); animation: fxAu1 14s ease-in-out infinite alternate; }
.fx-sky .au2 { bottom: -45%; left: -28%; width: 75vmax; height: 75vmax; width: 80cqmax; height: 80cqmax; background: radial-gradient(closest-side, rgba(79,209,255,.42), rgba(79,209,255,.1) 55%, transparent); animation: fxAu2 17s ease-in-out infinite alternate; }
.fx-sky .au3 { top: 18%; left: 22%; width: 50vmax; height: 50vmax; width: 55cqmax; height: 55cqmax; background: radial-gradient(closest-side, rgba(244,114,182,.3), rgba(244,114,182,.06) 60%, transparent); animation: fxAu3 21s ease-in-out infinite alternate; }
@keyframes fxAu1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-18cqw, 14cqh) scale(1.18); } 100% { transform: translate(-6cqw, 26cqh) scale(.92); } }
@keyframes fxAu2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(22cqw, -12cqh) scale(1.2); } 100% { transform: translate(10cqw, -24cqh) scale(.95); } }
@keyframes fxAu3 { 0% { transform: translate(0, 0) scale(.9); opacity: .6; } 50% { transform: translate(26cqw, -10cqh) scale(1.15); opacity: 1; } 100% { transform: translate(-14cqw, 16cqh) scale(1); opacity: .7; } }
/* نجوم: طبقتين نقط بأحجام مختلفة بتلمع بالتبادل */
.fx-sky::before, .fx-sky::after { content: ""; position: absolute; inset: 0; animation: fxTw 3.6s ease-in-out infinite alternate; }
.fx-sky::before { background:
  radial-gradient(1.6px 1.6px at 12% 18%, #fff 50%, transparent), radial-gradient(1.2px 1.2px at 34% 62%, #fff 50%, transparent),
  radial-gradient(1.8px 1.8px at 58% 12%, #fff 50%, transparent), radial-gradient(1.2px 1.2px at 76% 44%, #fff 50%, transparent),
  radial-gradient(1.5px 1.5px at 90% 80%, #fff 50%, transparent), radial-gradient(1.2px 1.2px at 22% 88%, #fff 50%, transparent);
  background-size: 420px 420px; }
.fx-sky::after { animation-delay: -1.8s; background:
  radial-gradient(1.2px 1.2px at 8% 52%, #c4b5fd 50%, transparent), radial-gradient(1.6px 1.6px at 46% 30%, #a5f3fc 50%, transparent),
  radial-gradient(1.2px 1.2px at 66% 74%, #fff 50%, transparent), radial-gradient(1.8px 1.8px at 84% 16%, #c4b5fd 50%, transparent),
  radial-gradient(1.2px 1.2px at 28% 8%, #fff 50%, transparent);
  background-size: 300px 300px; }
@keyframes fxTw { from { opacity: .25; } to { opacity: .95; } }
/* شهاب: خط نور بيعدّي بالعرض (من فوق يمين لتحت شمال) — واحد كل كام ثانية */
.fx-sky .sh { position: absolute; top: 8%; right: -10%; width: 150px; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(165,243,252,.5) 60%, #fff); box-shadow: 0 0 10px rgba(165,243,252,.7);
  animation: fxShoot 9s linear infinite; }
.fx-sky .sh:nth-of-type(2) { top: 30%; right: 20%; animation-delay: -3s; animation-duration: 11s; }
.fx-sky .sh:nth-of-type(3) { top: -4%; right: 45%; animation-delay: -6.5s; animation-duration: 13s; }
@keyframes fxShoot { 0% { transform: translate(0, 0) rotate(153deg); opacity: 0; } 2% { opacity: 1; } 11% { transform: translate(-55vw, 28vw) rotate(153deg); opacity: 0; } 100% { transform: translate(-55vw, 28vw) rotate(153deg); opacity: 0; } }
@media (max-width: 759px) { .fx-sky .sh { width: 90px; } }

/* ================================================================
   أقسام بألوان الهيرو (حواف مموّجة بتتحرك): .hb--dark غامق زي الهيرو · .hb--light نفس الألوان فاتحة خالص
   القسم نفسه بعرض الشاشة كله (بيلغي حشو .h2-wrap)، والموجة فوق وتحت بلون حرف القسم
================================================================ */
.hb { --wv: 1440px; position: relative; isolation: isolate; margin: 84px -32px; padding: 34px 32px 42px; }
.hb::before, .hb::after { content: ""; position: absolute; left: 0; right: 0; height: 48px; pointer-events: none; background-repeat: repeat-x; background-size: var(--wv) 100%; animation: hbWave 38s linear infinite; }
.hb::before { bottom: calc(100% - 1px); }
.hb::after { top: calc(100% - 1px); transform: scaleY(-1); }
@keyframes hbWave { to { background-position: var(--wv) 0, calc(-1 * var(--wv)) 0; } }   /* موجتين عكس بعض */
.hb--dark { --sp-bg: #22094f; color: #fff;
  background: radial-gradient(42% 38% at 90% 50%, rgba(150,95,255,.34), transparent 70%), radial-gradient(40% 36% at 6% 50%, rgba(79,209,255,.15), transparent 70%), linear-gradient(180deg, #2b0f63 0%, #22094f 50%, #170637 100%); }
.hb--dark::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1440 48%27 preserveAspectRatio=%27none%27%3E%3Cpath fill=%27%232b0f63%27 d=%27M0 24C360 0 360 0 720 24S1080 48 1440 24V48H0Z%27/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1440 48%27 preserveAspectRatio=%27none%27%3E%3Cpath fill=%27%237c3aed%27 fill-opacity=%27.35%27 d=%27M0 14C360 30 360 30 720 14S1080 0 1440 14V48H0Z%27/%3E%3C/svg%3E"); }
.hb--dark::after { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1440 48%27 preserveAspectRatio=%27none%27%3E%3Cpath fill=%27%23170637%27 d=%27M0 24C360 0 360 0 720 24S1080 48 1440 24V48H0Z%27/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1440 48%27 preserveAspectRatio=%27none%27%3E%3Cpath fill=%27%23521ba8%27 fill-opacity=%27.35%27 d=%27M0 14C360 30 360 30 720 14S1080 0 1440 14V48H0Z%27/%3E%3C/svg%3E"); }
.hb--dark .sp-shelf__eyebrow { color: #a5f3fc; }
.hb--dark .sp-shelf__title { color: #fff; }
.hb--dark .sp-shelf__title b { background: linear-gradient(90deg, #c4b5fd, #4fd1ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hb--dark .sp-shelf__all { color: rgba(255,255,255,.75); }
.hb--dark .sp-shelf__all:hover { color: #fff; }
.hb--dark .sp-nav--below .sp-nav-btn { box-shadow: 0 8px 22px rgba(8,2,30,.45); border-color: transparent; }
/* السما بتختفي قبل الموجة فوق وتحت عشان لون الحرف يفضل مطابق للموجة */
.hb .fx-sky { -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); }
/* تدرّج أطراف الرف لونه سادة فكان باين كمربع فوق الهالات — على الغامق من غيره */
.hb--dark .sp-shelf__rail-wrap::before, .hb--dark .sp-shelf__rail-wrap::after { display: none; }
.hb--light { --sp-bg: #f2ecff;
  background: radial-gradient(42% 38% at 92% 50%, rgba(150,95,255,.1), transparent 70%), radial-gradient(40% 36% at 6% 50%, rgba(79,209,255,.1), transparent 70%), linear-gradient(180deg, #efe8ff 0%, #f2ecff 50%, #f4f0ff 100%); }
.hb--light::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1440 48%27 preserveAspectRatio=%27none%27%3E%3Cpath fill=%27%23efe8ff%27 d=%27M0 24C360 0 360 0 720 24S1080 48 1440 24V48H0Z%27/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1440 48%27 preserveAspectRatio=%27none%27%3E%3Cpath fill=%27%23d9c8ff%27 fill-opacity=%27.55%27 d=%27M0 14C360 30 360 30 720 14S1080 0 1440 14V48H0Z%27/%3E%3C/svg%3E"); }
.hb--light::after { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1440 48%27 preserveAspectRatio=%27none%27%3E%3Cpath fill=%27%23f4f0ff%27 d=%27M0 24C360 0 360 0 720 24S1080 48 1440 24V48H0Z%27/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1440 48%27 preserveAspectRatio=%27none%27%3E%3Cpath fill=%27%23dccfff%27 fill-opacity=%27.55%27 d=%27M0 14C360 30 360 30 720 14S1080 0 1440 14V48H0Z%27/%3E%3C/svg%3E"); }
@media (max-width: 620px) {
  .hb { --wv: 560px; margin: 64px -18px; padding: 26px 18px 32px; }
  .hb::before, .hb::after { height: 30px; animation-duration: 22s; }
}
/* ================================================================
   سرعة (10/31): الأقسام اللي تحت الشاشة المتصفح مابيحسبش شكلها (layout/paint) لحد ما الزائر
   يقرّب منها — الـ layout الأول للصفحة كان بياخد أكتر من ثانية على موبايل متوسط.
   padding/margin بالسالب: content-visibility بيقص اللي برّه القسم، وأسهم الرفوف طالعة 6px برّه
   الحافة — كده بيبقى ليها مكان من غير ما مقاس المحتوى يتغيّر. (الشرايط اللي فيها ظل، والأقسام
   الملوّنة اللي موجاتها برّه حدودها، مش داخلة هنا)
================================================================ */
/* المقاسات التقديرية قريبة من الحقيقية (اتقاست 10/31) عشان طول الصفحة مايتغيّرش وانت نازل */
.h2-wrap > .sp-shelf:not(.hb), .h2-wrap > .hw-steps {
  content-visibility: auto; contain-intrinsic-size: auto 460px;
  padding-inline: 14px; margin-inline: -14px;
}
.h2-wrap > .hw-steps { contain-intrinsic-size: auto 750px; }
@media (min-width: 760px) { .h2-wrap > .hw-steps { contain-intrinsic-size: auto 390px; } }
/* الرفوف جوه الأقسام الملوّنة (القسم نفسه لأ عشان موجاته برّه حدوده) — نفس فكرة الحشو، والأسهم والتدرّج راجعين مكانهم */
.hb > .sp-shelf__rail-wrap { content-visibility: auto; contain-intrinsic-size: auto 320px; padding-inline: 14px; margin-inline: -14px; }
.hb > .sp-shelf__rail-wrap > .sp-nav--below { right: 8px; left: 8px; }
.hb > .sp-shelf__rail-wrap::before { right: 14px; }
.hb > .sp-shelf__rail-wrap::after { left: 14px; }
/* شريط الدار المتحرك: المحتوى جوه الشريط بس (الشريط نفسه عليه ظل) · آخر الصفحة والفوتر (مفيهمش حاجة طالعة برّه) */
.px-ticker__track { content-visibility: auto; contain-intrinsic-size: auto 3000px auto 44px; }
.h2-wrap > .cx-cta { content-visibility: auto; contain-intrinsic-size: auto 340px; }
.site-footer { content-visibility: auto; contain-intrinsic-size: auto 60px; }

@media (prefers-reduced-motion: reduce) {
  .hb::before, .hb::after, .fx-sky *, .fx-sky::before, .fx-sky::after { animation: none !important; }
  .fx-sky .sh { display: none; }
}
