/* ==========================================================================
   NARD CREATIVE — main.css
   تنسيق الأقسام — بطاقات متراكمة، زوايا دائرية كبيرة، عناوين وسطية ضخمة
   ========================================================================== */

/* ==========================================================================
   0أ. ترقيم الفصول — إيقاع تحريري يفتح كل قسم
   الصفحة ستة فصول، على عدد وجوه النرد
   ========================================================================== */
.chapter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-top: clamp(18px, 2.2vw, 26px);
  border-top: 1px solid var(--edge-ctl);
  margin-bottom: clamp(44px, 6vw, 88px);
}
.chapter__num {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  font-weight: 800;
  line-height: 0.9;
  color: rgba(231, 238, 226, 0.24);
  font-variant-numeric: tabular-nums;
}
/* الرقم مفرّغ بحدّ رفيع حيث يُدعم */
@supports (-webkit-text-stroke: 1px currentColor) {
  .chapter__num {
    color: transparent;
    -webkit-text-stroke: 1.6px rgba(231, 238, 226, 0.38);
  }
}
.chapter__label {
  font-size: var(--ctl-fs-sm);
  color: var(--muted);
  letter-spacing: 0;
}
.chapter__of {
  font-size: var(--fs-micro);
  color: var(--muted);
  opacity: .7;
}

/* فوق الأقسام الداكنة */
.voices .chapter { border-top-color: var(--edge-light); }
.voices .chapter__num { color: rgba(238, 236, 230, 0.22); }
@supports (-webkit-text-stroke: 1px currentColor) {
  .voices .chapter__num { color: transparent; -webkit-text-stroke: 1.6px rgba(238,236,230,0.4); }
}
.voices .chapter__label,
.voices .chapter__of { color: rgba(238, 236, 230, 0.66); }

@media (max-width: 560px) {
  .chapter { gap: 12px; }
  .chapter__num { font-size: 2.3rem; }
}

/* ==========================================================================
   0. ترويسة قسم وسطية (تتكرر في كل الأقسام)
   ========================================================================== */
.head {
  max-width: 940px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(44px, 6vw, 84px);
}
.head .eyebrow { margin-bottom: 20px; }
.head .h2 { font-weight: 500; }
.head .h2 strong { font-weight: 700; }
.head p {
  margin-top: 22px;
  max-width: 62ch;
  margin-inline: auto;
  color: var(--muted);
}

/* ==========================================================================
   1. الهيرو — تكوين غير متماثل: النص يميناً والنرد يساراً
   ========================================================================== */
.hero {
  min-height: 100svh;
  padding-block: clamp(132px, 15vw, 190px) clamp(72px, 10vw, 132px);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero__in {
  display: block;
}
.hero__copy { width: 100%; max-width: 900px; }
.hero__badge { justify-self: start; }

/* شارة التوفّر — تبقى كبسولة (لافتة لا فعل) */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--ctl-sm);
  padding-inline: var(--ctl-px-sm);
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font-size: var(--ctl-fs-sm);
  color: var(--ink-soft);
}
.pulse {
  position: relative;
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.6); opacity: .7; }
  100% { transform: scale(1.7); opacity: 0; }
}

.hero__title {
  font-family: "IBM Plex Sans Arabic", var(--font-ar);
  margin-block: 0;
  font-size: clamp(3.35rem, 7vw, 6.1rem);
  font-weight: 700;
  line-height: 1.12;
}
.hero__title strong { font-weight: 700; }
.hero__title em { font-style: normal; position: relative; white-space: nowrap; }
.hero__title em::after {
  content: "";
  position: absolute;
  inset-inline: -0.04em;
  bottom: 0.08em;
  height: 0.055em;
  border-radius: 999px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
}
body.is-ready .hero__title em::after {
  animation: underline-in 1.1s .75s var(--ease) forwards;
}
@keyframes underline-in { to { transform: scaleX(1); } }

/* الفقرة في عمود ضيّق مع خط فاصل قصير فوقها */
.hero__text {
  font-family: "IBM Plex Sans Arabic", var(--font-ar);
  font-size: clamp(0.875rem, 1vw, 0.9375rem);
  font-weight: 300;
  line-height: 1.9;
  max-width: 42ch;
  margin-top: clamp(28px, 3.4vw, 40px);
  padding-top: clamp(24px, 3vw, 34px);
  border-top: 1px solid var(--edge);
  color: var(--ink-soft);
}

.navpill__action .pip,
.navpill__action:hover .pip { background: var(--brown); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 3.4vw, 40px);
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: var(--fs-micro);
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
  margin-top: clamp(48px, 6vw, 84px);
}

/* ---------- دخول متدرّج لعناصر الهيرو ---------- */
.js .hero__copy > * { opacity: 0; transform: translateY(26px); }
body.is-ready .hero__copy > * { animation: hero-in .95s var(--ease) forwards; }
body.is-ready .hero__badge   { animation-delay: .05s; }
body.is-ready .hero__title   { animation-delay: .16s; }
body.is-ready .hero__text    { animation-delay: .28s; }
body.is-ready .hero__actions { animation-delay: .40s; }
@keyframes hero-in { to { opacity: 1; transform: none; } }

/* ---------- الجوال والتابلت: عمود واحد ---------- */
@media (max-width: 900px) {
  .hero { padding-block: 116px 44px; }
  .hero__meta { flex-direction: column; gap: 6px; text-align: center; }

  /* العمود الواحد يُوسَّط مثل بقية الأقسام — بدل حافة يتيمة وسط صفحة موسّطة */
  .hero__copy { text-align: center; }
  .hero__badge { justify-self: center; }
  .hero__title { max-width: 14ch; margin-inline: auto; }
  .hero__text  { margin-inline: auto; border-top: 0; padding-top: 0; }
  .hero__text::before {
    content: "";
    display: block;
    width: 52px;
    height: 1px;
    background: var(--edge-ctl);
    margin: 0 auto clamp(22px, 4vw, 30px);
  }
  .hero__actions { justify-content: center; }
}

/* ==========================================================================
   2. الشريط المتحرك
   ========================================================================== */
.marquee {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding-block: 22px;
  overflow: hidden;
  margin-inline: var(--gutter);
}
.marquee__track {
  display: flex;
  width: max-content;
  /* --shift و --dur يضبطهما الجافاسكربت حسب عرض المجموعة
     عشان اللوب يكون سلساً ومستمراً في أي مقاس شاشة */
  animation: marquee var(--dur, 22s) linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
/* RTL: الشريط يمتدّ إلى اليسار، فالمجموعات التالية تقع يسار الأولى.
   التحريك السالب كان يدفعها بعيداً عن المنفذ بدل أن يجلبها — الاتجاه موجب. */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--shift, 50%)); }
}

.marquee__group { display: flex; align-items: center; flex: none; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: clamp(22px, 3vw, 44px);
  padding-inline: clamp(11px, 1.5vw, 22px);
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  font-weight: 500;
  white-space: nowrap;
}
.marquee__item::after {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink); opacity: .5;
}

/* ==========================================================================
   3. من نحن
   ========================================================================== */
.about__body {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}
.about__body > p + p { margin-top: 24px; }

/* السطر الختامي — أكبر ومفصول بخط */
.about__punch {
  margin-top: clamp(40px, 5vw, 60px) !important;
  padding-top: clamp(30px, 4vw, 44px);
  border-top: 1px solid var(--line);
  font-size: clamp(1.28rem, 2.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.7;
  max-width: 36ch;
  margin-inline: auto;
  color: var(--ink);
}
.about__punch strong { font-weight: 700; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: clamp(56px, 7vw, 88px);
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 4vw, 52px) clamp(20px, 3vw, 44px);
}
.stat { text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat__num {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.stat__num span + span { font-size: 0.45em; opacity: .6; }
.stat__label { font-size: var(--fs-small); color: var(--muted); margin-top: 12px; }

/* ==========================================================================
   4. الخدمات — بطاقات تتراكم فوق بعضها مع السكرول
   ========================================================================== */
.stack {
  max-width: 1000px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* العنوان يلتصق أعلى الشاشة، والبطاقات تصعد وتتراكم فوقه
   (نفس سلوك سرمد: عنوان القسم ثابت والمحتوى يمرّ عليه) */
@media (min-width: 761px) {
  #services .head {
    position: sticky;
    top: 104px;
    z-index: 0;
    margin-bottom: clamp(40px, 5vw, 64px);
  }
}

.service {
  position: sticky;
  z-index: 1;
  top: calc(104px + var(--i, 0) * 16px);
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 64px) clamp(26px, 4vw, 62px);
  text-align: center;
  overflow: hidden;
  box-shadow: 0 -3px 0 rgba(238, 236, 231, 0.6),
              0 18px 44px -28px rgba(49, 22, 21, 0.55);
  transition: box-shadow .5s var(--ease);
}
.service.is-picked {
  box-shadow: 0 0 0 2px var(--ink), 0 18px 44px -28px rgba(49, 22, 21, 0.55);
}

/* نقاط وجه النرد كعلامة مائية ضخمة في خلفية البطاقة */
.service__ghost {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: -36px;
  transform: translateY(-50%);
  width: clamp(150px, 20vw, 230px);
  height: clamp(150px, 20vw, 230px);
  opacity: .13;
  pointer-events: none;
  gap: 10%;
}
.service__ghost .pip { background: var(--ink); }

.service > *:not(.service__ghost) { position: relative; z-index: 1; }

.service__icon {
  margin-inline: auto;
  margin-bottom: 26px;
  width: 54px; height: 54px;
  gap: 7px;
}
.service__num {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 16px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(33, 35, 34, 0.34);
  font-size: var(--fs-micro);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.service__num b { font-weight: 700; color: var(--ink); font-size: 1.12em; }
.service__title {
  margin-bottom: 16px;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 700;
}
.service__desc {
  color: var(--muted);
  max-width: 52ch;
  margin-inline: auto;
  line-height: 1.85;
}

.service__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.service__list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

/* في الشاشات القصيرة (لاندسكيب، نوافذ صغيرة) البطاقة ما تسع الشاشة،
   فنلغي التراكم ونخليها قائمة عادية عشان المحتوى يُقرأ كاملاً */
@media (max-height: 680px) {
  .service {
    position: static;
    box-shadow: 0 14px 34px -24px rgba(49, 22, 21, 0.5);
  }
}

/* ==========================================================================
   5. الأعمال — شريط أفقي قابل للتمرير
   ========================================================================== */
.carousel { position: relative; }

.carousel__track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block-end: 8px;
  /* يطلع خارج الحاوية عشان البطاقات تلامس حافة الشاشة */
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  /* يطابق الحشو عشان نقاط الالتصاق تنطبق على حافة البطاقة */
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }

.carousel__track > * {
  flex: 0 0 clamp(268px, 34vw, 440px);
  /* start وليس center: يجعل خطوة الزر الواحدة تنطبق على نقطة التصاق بالضبط */
  scroll-snap-align: start;
}

.carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(30px, 4vw, 46px);
}
.carousel__btn { font-size: 1.05rem; }

/* مؤشر الموضع بنقاط نرد */
.carousel__dots { display: flex; align-items: center; gap: 2px; margin-inline: 6px; }
/* النقطة زر حقيقي: مساحة لمس 24×24 حول نقطة 8px (WCAG 2.5.8) */
.carousel__dot {
  position: relative;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
}
.carousel__dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink);
  opacity: .28;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.carousel__dot:hover::before { opacity: .6; }
.carousel__dot.is-on::before { opacity: 1; transform: scale(1.4); }
.carousel__dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* حلقة تركيز للشريط نفسه عند التنقّل بالأسهم */
.carousel__track:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: var(--radius); }

/* البطاقة */
.work-card { display: block; }
.work-card__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  aspect-ratio: 4 / 5;
}
.work-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.work-card:hover .work-card__media img { transform: scale(1.05); }

.work-card__badge {
  position: absolute;
  inset-block-end: 18px;
  inset-inline: 18px;
  background: var(--ink);
  color: var(--brown);
  border-radius: 999px;
  padding: 12px 20px;
  font-size: var(--fs-micro);
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.work-card:hover .work-card__badge { opacity: 1; transform: none; }
/* أجهزة اللمس لا مرور فيها، فالسنة كانت مخفيّة تماماً عن مستخدم الجوال */
@media (hover: none) {
  .work-card__badge { opacity: 1; transform: none; }
}

.work-card__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-inline: 6px;
}
.work-card__title { font-family: var(--font-ar); font-size: 1.5rem; font-weight: 700; }
.work-card__meta { font-size: var(--fs-small); color: var(--muted); }

.work__more { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 48px); }

/* شبكة الأعمال — تُستخدم في صفحة الأعمال فقط */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.2vw, 30px);
}
.work-grid .work-card__media { aspect-ratio: 4 / 3; }
.work-grid .work-card__badge {
  inset-block-start: 18px;
  inset-block-end: auto;
  inset-inline-start: 18px;
  inset-inline-end: auto;
  padding: 8px 18px;
  transform: translateY(-8px);
}
.work-card--wide { grid-column: span 2; }
.work-grid .work-card--wide { grid-column: span 1; }
.work-grid .work-card--wide .work-card__media { aspect-ratio: 4 / 3; }

/* ==========================================================================
   6. كيف نشتغل
   ========================================================================== */
/* صفوف بحدود، لا بطاقات متجاورة: العين تقرأ خطوة تحت خطوة */
.head__sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
}

.process {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 940px;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 16px);
  counter-reset: step;
}

.step {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
  padding: clamp(20px, 2.4vw, 28px) clamp(22px, 3vw, 40px);
  border: 1px solid var(--edge-ctl);
  border-radius: var(--radius);
  background: transparent;
}

.step__body { flex: 1; min-width: 0; }

.step__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(1.15rem, 0.95rem + 0.9vw, 1.7rem);
  line-height: 1.3;
}
.step__desc {
  margin-top: 8px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  line-height: 1.8;
}

/* شارة النقاط تحلّ محلّ الرقم — نفس لغة النرد */
.step__badge {
  width: var(--ctl-lg);
  height: var(--ctl-lg);
  padding: 13px;
  gap: 3px;
  border: 1px solid var(--edge);
  border-radius: 50%;
  flex: none;
}

/* الدعوة تحت الخطوات: رابط نصّي، لا زر — الزر الوحيد في الخاتمة */
.process__cta {
  margin: clamp(34px, 4.4vw, 52px) 0 0;
  text-align: center;
}
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--ctl-sm);
  padding-inline: 6px;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--edge-ctl);
  transition: border-color var(--t) var(--ease), gap var(--t) var(--ease);
}
.link-cta:hover { border-bottom-color: var(--ink); gap: 15px; }
.link-cta__arrow { font-size: 1.1em; line-height: 1; transform: scaleX(-1); }

/* ==========================================================================
   7. آراء العملاء — قسم داكن يكسر رتابة الإيقاع
   ========================================================================== */
.voices {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-lg);
  margin-inline: var(--gutter);
  padding-block: clamp(56px, 8vw, 120px);
}
/* حافة المحتوى داخل القسم تنطبق على بقية الصفحة */
.voices > .container { padding-inline: clamp(14px, 3.4vw, 40px); }
.voices .eyebrow { color: rgba(238, 236, 230, 0.62); }
.voices .eyebrow::before { background: var(--cream); }

.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
}
.quote {
  margin: 0;
  padding: clamp(28px, 3.4vw, 42px);
  border-radius: var(--radius);
  background: rgba(238, 236, 230, 0.07);
  border: 1px solid rgba(238, 236, 230, 0.14);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.quote__text {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.95;
  color: rgba(238, 236, 230, 0.92);
}
.quote__text::before { content: "«"; margin-inline-end: 2px; }
.quote__text::after  { content: "»"; margin-inline-start: 2px; }
.quote__by { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.quote__name { font-weight: 700; }
.quote__role { font-size: var(--ctl-fs-sm); color: rgba(238, 236, 230, 0.6); }

/* شريط أسماء العملاء */
.roll {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: clamp(30px, 4vw, 44px);
  border-top: 1px solid rgba(238, 236, 230, 0.16);
  overflow: hidden;
}
.roll__track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}
.roll__item {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(238, 236, 230, 0.2);
  font-size: var(--ctl-fs-sm);
  color: rgba(238, 236, 230, 0.78);
}

/* ==========================================================================
   7ب. الأسئلة الشائعة
   ========================================================================== */
.faq { max-width: 860px; margin-inline: auto; }
.faq__item {
  border-top: 1px solid var(--line);
  padding-block: 4px;
}
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: clamp(18px, 2.2vw, 24px);
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  font-weight: 500;
  transition: color var(--t) var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 100% no-repeat;
  transition: transform var(--t) var(--ease);
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__q:hover { color: var(--muted); }
.faq__q:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
/* الجواب: يُحرّكه الجافاسكربت بارتفاع محسوب (details لا يقبل انتقال CSS) */
.faq__a { overflow: hidden; }
.faq__a > p {
  color: var(--ink-soft);
  line-height: 1.95;
  max-width: 68ch;
  padding-bottom: clamp(18px, 2.2vw, 26px);
  margin: 0;
}
.faq__item.is-animating .faq__a { transition: height var(--t-slow) var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .faq__item.is-animating .faq__a { transition: none; }
}

@media (max-width: 900px) {
  .quotes { grid-template-columns: 1fr; }
}

/* ==========================================================================
   9. صفحة الأعمال
   ========================================================================== */
.page-hero {
  padding-block: clamp(140px, 17vw, 210px) clamp(36px, 5vw, 58px);
  text-align: center;
}
.page-hero p { max-width: 54ch; margin-inline: auto; margin-top: 22px; }
.page-hero__count { margin-top: 26px; font-size: var(--fs-small); color: var(--muted); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px;
  background: var(--bg-2);
  border-radius: var(--radius);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  margin-bottom: clamp(40px, 5vw, 66px);
}
.filter {
  height: var(--ctl-sm);
  padding-inline: var(--ctl-px-sm);
  border-radius: var(--r-ctl-sm);
  border: 1px solid transparent;
  font-size: var(--ctl-fs-sm);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  transition: background var(--t) var(--ease), color var(--t) var(--ease),
              border-color var(--t) var(--ease);
}
.filter:hover { background: var(--soft); border-color: var(--edge-ctl); }
.filter.is-active { background: var(--ink); color: var(--brown); border-color: var(--ink); }
.filter:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.filter__count { font-size: 0.72em; opacity: .55; margin-inline-start: 6px; }

.work-grid__item {
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--d, 0ms);
}
.work-grid__item.is-filtered {
  opacity: 0;
  transform: scale(.96);
  position: absolute;
  pointer-events: none;
  visibility: hidden;
}

.empty-state { padding-block: 70px; text-align: center; color: var(--muted); }

/* ==========================================================================
   10. الشاشات المتوسطة والصغيرة
   ========================================================================== */
@media (max-width: 1080px) {
  .clients { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  /* الفراغ الرأسي يتناسب مع عرض الشاشة بدل ما يبتلع المحتوى */
  .section { padding-block: 66px; }
  .section--tight { padding-block: 54px; }
  .head { margin-bottom: 34px; }

  .hero { padding-block: 112px 44px; }
  .hero__dice .dice-stage { --s: clamp(150px, 40vw, 208px); }
  .hero__meta { flex-direction: column; gap: 8px; text-align: center; }

  .service { top: calc(88px + var(--i, 0) * 10px); }
  .service__ghost { display: none; }
  .service { padding: 34px 22px; }

  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .work-card--wide { grid-column: span 1; }
  .work-grid .work-card__badge { inset-block-start: 10px; inset-inline-start: 10px; padding: 5px 11px; }
  .work-card__title { font-size: 1.12rem; }
  .work-card__meta { font-size: .86rem; }
  .work-grid .work-card--wide .work-card__media { aspect-ratio: 4 / 3; }
  .carousel__track > * { flex-basis: 78vw; }

  .clients { grid-template-columns: repeat(2, 1fr); }

  /* الصف يبقى صفاً على الجوال، لكن الشارة تصغر والحشو ينكمش */
  .step { gap: 14px; padding: 18px 20px; border-radius: 22px; }
  .step__badge { width: 44px; height: 44px; padding: 10px; gap: 2px; }

  .stats { grid-template-columns: 1fr; gap: 26px; padding-block: 34px; }
  .stat + .stat { border-inline-start: 0; border-top: 1px solid var(--line); padding-top: 26px; }

  .filters { width: auto; }
}

/* ==========================================================================
   11. صفحة المشروع
   ========================================================================== */
.crumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--ctl-fs-sm);
  color: var(--muted);
  margin-bottom: 20px;
}
.crumbs a { border-bottom: 1px solid var(--edge); padding-bottom: 2px; transition: border-color var(--t) var(--ease); }
.crumbs a:hover { border-color: var(--ink); }

.project-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 16 / 10;
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; }

/* بطاقة الحقائق */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: clamp(26px, 3.4vw, 40px) 0 0;
  padding: clamp(24px, 3vw, 34px) clamp(20px, 3vw, 40px);
  background: var(--bg-2);
  border-radius: var(--radius);
}
.fact { text-align: center; }
.fact + .fact { border-inline-start: 1px solid var(--line); }
.fact__k { font-size: var(--fs-micro); color: var(--muted); }
.fact__v { margin: 8px 0 0; font-weight: 700; font-size: 1.02rem; }

/* جسم المشروع — عنوان جانبي ونص */
.pbody { max-width: 980px; margin-inline: auto; }
.pblock {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(20px, 3vw, 44px);
  padding-block: clamp(26px, 3.4vw, 40px);
  border-top: 1px solid var(--line);
}
.pblock:first-child { border-top: 0; padding-top: 0; }
.pblock__k { font-weight: 700; }
.pblock__v { color: var(--ink-soft); line-height: 1.95; }
.pblock__v--lead { font-size: clamp(1.1rem, 1.9vw, 1.4rem); font-weight: 500; color: var(--ink); }
.pblock .service__list { margin-top: 0; justify-content: flex-start; }

/* معرض صور المشروع */
.pgallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 26px); }
.pgallery__item { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); aspect-ratio: 4 / 3; }
.pgallery__item img { width: 100%; height: 100%; object-fit: cover; }

/* المشروع التالي */
.pnext {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 52px);
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.pnext:hover { background: var(--ink); transform: translateY(-3px); }
.pnext:hover .pnext__k, .pnext:hover .pnext__m { color: rgba(238, 236, 230, 0.7); }
.pnext:hover .pnext__t { color: var(--brown); }
.pnext__k { font-size: var(--fs-micro); color: var(--muted); transition: color var(--t) var(--ease); }
.pnext__t { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; transition: color var(--t) var(--ease); }
.pnext__m { font-size: var(--ctl-fs-sm); color: var(--muted); transition: color var(--t) var(--ease); }

@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; gap: 18px; }
  .fact + .fact { border-inline-start: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .pblock { grid-template-columns: 1fr; gap: 12px; }
  .pgallery { grid-template-columns: 1fr; }
  .pnext { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- التنقّل بين المشاريع: سابق + تالي ---------- */
.pnav { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 24px); }
.pnext--prev { text-align: start; }
.pnav .pnext:last-child { text-align: end; align-items: flex-end; }

/* ---------- صور المعرض: أزرار تفتح المكبّر ---------- */
.pgallery__item {
  display: block;
  padding: 0;
  border: 0;
  width: 100%;
  position: relative;
}
.pgallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(49, 22, 21, 0);
  transition: background var(--t) var(--ease);
}
.pgallery__item:hover::after { background: rgba(49, 22, 21, 0.18); }
.pgallery__item img { transition: transform var(--t-slow) var(--ease); }
.pgallery__item:hover img { transform: scale(1.04); }
.pgallery__item:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ---------- مكبّر الصور ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: none;
  place-items: center;
  gap: 18px;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(30, 13, 12, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.lb.is-open { display: grid; animation: lb-in .3s var(--ease); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lb__img {
  grid-column: 2;
  max-width: 100%;
  max-height: 82vh;
  max-height: 82dvh;  /* iOS: vh يتجاهل شريط سفاري */
  border-radius: var(--radius);
  background: var(--bg-2);
  object-fit: contain;
}
.lb__nav, .lb__close {
  background: rgba(238, 236, 230, 0.12);
  border: 1px solid rgba(238, 236, 230, 0.28);
  color: var(--cream);
  font-size: 1.1rem;
}
.lb__nav:hover, .lb__close:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.lb__nav:focus-visible, .lb__close:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.lb__nav--prev { grid-column: 3; }
.lb__nav--next { grid-column: 1; }
.lb__close { position: absolute; inset-block-start: 18px; inset-inline-end: 18px; font-size: 1.5rem; }
.lb__count {
  position: absolute;
  inset-block-end: 20px;
  inset-inline: 0;
  text-align: center;
  font-size: var(--ctl-fs-sm);
  color: rgba(238, 236, 230, 0.66);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .pnav { grid-template-columns: 1fr; }
  .pnav .pnext:last-child { text-align: start; align-items: flex-start; }
  .lb { grid-template-columns: 1fr; gap: 12px; }
  .lb__img { grid-column: 1; max-height: 68vh; max-height: 68dvh; }
  .lb__nav--prev, .lb__nav--next { grid-column: 1; }
  .lb__nav { position: absolute; inset-block-end: 56px; }
  .lb__nav--prev { inset-inline-end: 24%; }
  .lb__nav--next { inset-inline-start: 24%; }
}


/* ========================================================================== 
   5–7. ابدأ معنا، آلية العمل، شركاء النجاح
   ========================================================================== */
.start__card {
  min-height: clamp(420px, 58vw, 680px);
  padding: clamp(38px, 7vw, 96px);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}
.start__card .h2 { max-width: 16ch; font-weight: 500; }
.start__card .h2 strong { font-weight: 700; }
.start__card .lead { max-width: 46ch; margin-top: 24px; }
.start__card .btn { margin-top: 32px; }

.process__list {
  list-style: none;
  max-width: 980px;
  margin-inline: auto;
  border-top: 1px solid var(--edge-ctl);
}
.process__item {
  display: grid;
  grid-template-columns: 64px minmax(180px, .8fr) 1.2fr;
  gap: clamp(18px, 3vw, 42px);
  align-items: baseline;
  padding-block: clamp(24px, 3vw, 38px);
  border-bottom: 1px solid var(--edge);
}
.process__item > span { color: var(--muted); font-size: var(--fs-small); }
.process__item h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 700; }
.process__item p { color: var(--muted); line-height: 1.9; }

.partners__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--edge-ctl);
  border-inline-start: 1px solid var(--edge);
}
.partners__grid li {
  min-height: clamp(120px, 15vw, 190px);
  display: grid;
  place-items: center;
  border-inline-end: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  font-weight: 500;
}

@media (max-width: 760px) {
  .start__card { min-height: 460px; align-items: center; text-align: center; }
  .process__item { grid-template-columns: 40px 1fr; }
  .process__item p { grid-column: 2; }
  .partners__grid { grid-template-columns: repeat(2, 1fr); }
  .partners__grid li { min-height: 112px; }
}

/* ========================================================================== 
   8. الخاتمة — تحلّ محلّ قسم «ابدأ مشروعك» والفوتر معاً
   بنية سرمد: عنوان ضخم، فعل واحد، صف أيقونات، سطر حقوق
   ========================================================================== */
.closing { padding-block: clamp(14px, 1.8vw, 26px); }

.closing__card {
  max-width: 1040px;
  margin-inline: auto;
  background: var(--cta-bg);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 2.4vw, 36px) clamp(24px, 3vw, 52px) clamp(20px, 1.8vw, 26px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing__chapter {
  width: 100%;
  border-top-color: var(--edge-light);
  margin-bottom: clamp(48px, 7vw, 88px);
}
.closing__chapter .chapter__num { color: rgba(238, 236, 230, 0.34); }
.closing__chapter .chapter__label { color: rgba(238, 236, 230, 0.72); }
.closing__kicker {
  margin-bottom: clamp(22px, 3vw, 34px);
  color: rgba(238, 236, 230, 0.74);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.closing__dice { margin-bottom: clamp(10px, 1.2vw, 14px); }
.closing__dice .dice-stage { --s: clamp(44px, 3.6vw, 54px); }
.closing__dice .dice {
  animation: cta-spin 26s linear infinite;
  transition: none;
  cursor: default;
}
@keyframes cta-spin { to { transform: rotateX(360deg) rotateY(720deg); } }

.closing__mark {
  margin: 0 0 clamp(8px, 1vw, 12px);
  color: rgba(238, 236, 230, 0.55);
  font-size: var(--fs-small);
}
.closing__kicker {
  max-width: 40ch;
  margin: 0 0 clamp(10px, 1.4vw, 16px);
  color: rgba(238, 236, 230, 0.7);
  font-size: clamp(.92rem, 1.1vw, 1rem);
  line-height: 1.85;
}
/* توقيع الختام: سطر عربي وسطر لاتيني تحته */
.closing__signoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: clamp(14px, 1.6vw, 20px) 0 0;
  text-align: center;
}
.closing__signoff span {
  color: rgba(238, 236, 230, 0.82);
  font-size: clamp(.95rem, 1.15vw, 1.05rem);
}
.closing__signoff b {
  font-size: var(--fs-small);
  font-weight: 700;
  color: rgba(238, 236, 230, 0.5);
}

.closing__title {
  margin: 0;
  font-size: clamp(1.6rem, 2.9vw, 2.45rem);
  font-weight: 500;
  line-height: 1.18;
  max-width: 26ch;
}
.closing__title strong { font-weight: 700; }

.closing__sub {
  margin-top: clamp(14px, 1.9vw, 22px);
  max-width: 42ch;
  color: rgba(238, 236, 230, 0.74);
  line-height: 1.9;
}

.closing__roll {
  margin-top: 22px;
  color: rgba(238, 236, 230, 0.78);
  font-size: var(--fs-small);
}

/* الفعل الواحد — كبسولة كبيرة كما عند سرمد */
.closing__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(14px, 1.5vw, 18px);
  padding: 0 clamp(22px, 2.6vw, 30px);
  height: var(--ctl-md);
  border-radius: 999px;
  background: var(--cream);
  color: var(--brown);
  font-size: var(--ctl-fs-md);
  font-weight: 700;
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.7);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.closing__cta:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.75); }
.closing__cta:active { transform: translateY(0); }
.closing__cta:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }
.closing__arrow { font-size: 1.15em; line-height: 1; transform: scaleX(-1); }

.closing__mail {
  margin-top: 12px;
  font-size: var(--ctl-fs-sm);
  color: rgba(238, 236, 230, 0.66);
  padding: 6px 4px;
  transition: color var(--t) var(--ease);
}
.closing__mail:hover { color: var(--cream); }

.closing__social-label {
  margin-top: clamp(34px, 4.4vw, 54px);
  color: rgba(238, 236, 230, 0.66);
  font-size: var(--fs-small);
}

/* صف الأيقونات الدائرية */
.closing__social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
.soc {
  width: var(--ctl-md); height: var(--ctl-md);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(238, 236, 230, 0.10);
  border: 1px solid var(--edge-light);
  color: var(--cream);
  transition: background var(--t) var(--ease), color var(--t) var(--ease),
              border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.soc:hover { background: var(--cream); color: var(--brown); border-color: var(--cream); transform: translateY(-3px); }
.soc:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.soc svg {
  width: 23px; height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.soc svg .soc__fill { fill: currentColor; stroke: none; }
.soc__word { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em; }

/* سطر الحقوق */
.closing__base {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: clamp(12px, 1.3vw, 16px);
  padding-top: clamp(10px, 1.1vw, 13px);
  border-top: 1px solid rgba(238, 236, 230, 0.16);
  font-size: var(--fs-small);
  color: rgba(238, 236, 230, 0.55);
}
.closing__up {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: rgba(238, 236, 230, 0.72);
  transition: color var(--t) var(--ease), gap var(--t) var(--ease);
}
.closing__up:hover { color: var(--cream); gap: 13px; }

@media (max-width: 760px) {
  .closing { padding-block: 12px 14px; }
  .closing__card { padding: 44px 20px 20px; }
  .closing__social { gap: 9px; }
  .closing__base { justify-content: center; gap: 8px; }
}
