/* ماروكو — طبقة الحركة والرسوم (صفحة الهبوط وحدها)
   كل الحركات على transform/opacity فقط — لا تعيد تخطيط الصفحة،
   فتبقى ٦٠ إطاراً في الثانية حتى على هاتف متوسط. */

/* ── مفاتيح الحركة ─────────────────────────────── */
@keyframes float      { 0%,100% { transform: translateY(0) }        50% { transform: translateY(-14px) } }
@keyframes floatSm    { 0%,100% { transform: translateY(0) }        50% { transform: translateY(-8px) } }
@keyframes floatTilt  { 0%,100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-16px) rotate(3deg) } }
@keyframes sway       { 0%,100% { transform: rotate(-2.5deg) }      50% { transform: rotate(2.5deg) } }
@keyframes twinkle    { 0%,100% { opacity: .25; transform: scale(.8) } 50% { opacity: 1; transform: scale(1.15) } }
@keyframes spinSlow   { to { transform: rotate(360deg) } }
@keyframes pulseRing  { 0% { transform: scale(.7); opacity: .65 } 100% { transform: scale(2.6); opacity: 0 } }
@keyframes blink      { 0%,93%,100% { transform: scaleY(1) } 96% { transform: scaleY(.08) } }
@keyframes bob        { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
@keyframes gradShift  { 0%,100% { background-position: 0% 50% } 50% { background-position: 100% 50% } }
@keyframes blobMorph  {
  0%,100% { border-radius: 42% 58% 63% 37% / 43% 38% 62% 57% }
  33%     { border-radius: 62% 38% 36% 64% / 58% 63% 37% 42% }
  66%     { border-radius: 38% 62% 55% 45% / 36% 45% 55% 64% }
}
@keyframes popIn      { from { opacity: 0; transform: translateY(26px) scale(.97) } to { opacity: 1; transform: none } }
@keyframes slideUp    { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@keyframes drawLine   { to { stroke-dashoffset: 0 } }
@keyframes shimmer    { to { background-position: 200% 0 } }

/* ── الكشف عند التمرير ─────────────────────────────
   الإخفاء مشروط بـ .js التي يضيفها سكربت في <head>.
   بلا جافاسكربت — أو لو فشل تحميله — يبقى المحتوى ظاهراً.
   صفحة تُخفي نصّها افتراضياً وتنتظر سكربتاً لإظهاره هي صفحة
   بيضاء عند أول عطل. */
.js .reveal { opacity: 0; }
.reveal.in { animation: popIn .72s cubic-bezier(.22,1,.36,1) forwards; }
.reveal.in.d1 { animation-delay: .09s }
.reveal.in.d2 { animation-delay: .18s }
.reveal.in.d3 { animation-delay: .27s }
.reveal.in.d4 { animation-delay: .36s }
.reveal.in.d5 { animation-delay: .45s }

/* ── البطل ─────────────────────────────────────── */
.hero-a {
  position: relative;
  overflow: hidden;
  color: #fff;
  /* لا حشو سفلي هنا — وإلا ظهر شريط برتقالي تحت الموجة الفاصلة.
     الحشو ينتقل إلى .wrap فتلتصق الموجة بنهاية القسم. */
  padding: 64px 0 0;
  background: linear-gradient(120deg, #E5502A, #FF9A3C, #FF7A59, #E5502A);
  background-size: 300% 300%;
  animation: gradShift 18s ease-in-out infinite;
}
.hero-a > .wrap { position: relative; z-index: 3; padding-bottom: 78px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .hero-grid .cta { justify-content: center; }
}

.hero-a h1 { font-size: clamp(31px, 5.6vw, 50px); font-weight: 900; margin: 0 0 15px; line-height: 1.28; }
.hero-a .lede { font-size: clamp(16px, 2.3vw, 19px); opacity: .95; margin: 0 0 30px; max-width: 560px; line-height: 1.82; }
@media (max-width: 900px) { .hero-a .lede { margin-inline: auto } }
.hero-a .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.19); border: 1px solid rgba(255,255,255,.26);
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 700; margin-bottom: 20px;
}
.hero-a .eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #7CF2A0;
  box-shadow: 0 0 0 0 rgba(124,242,160,.7); animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(124,242,160,.7) }
  70%  { box-shadow: 0 0 0 9px rgba(124,242,160,0) }
  100% { box-shadow: 0 0 0 0 rgba(124,242,160,0) }
}

/* كتل ضبابية متحرّكة في الخلفية */
.blob {
  position: absolute; z-index: 1; filter: blur(2px);
  background: rgba(255,255,255,.11);
  animation: blobMorph 16s ease-in-out infinite, float 9s ease-in-out infinite;
}
.blob.b1 { width: 420px; height: 420px; inset-block-start: -140px; inset-inline-start: -110px; }
.blob.b2 { width: 300px; height: 300px; inset-block-end: -130px; inset-inline-end: 6%; animation-duration: 21s, 11s; }
.blob.b3 { width: 170px; height: 170px; inset-block-start: 22%; inset-inline-end: 32%; background: rgba(255,255,255,.08); animation-duration: 13s, 8s; }

/* نجوم تلمع */
.stars { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.stars i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #fff; opacity: .3; animation: twinkle 3.4s ease-in-out infinite;
}

/* ── المشهد المجسّم ────────────────────────────── */
.scene { position: relative; display: grid; place-items: center; min-height: 400px; }
.scene svg { overflow: visible; }
.kid { animation: float 5.4s ease-in-out infinite; filter: drop-shadow(0 22px 34px rgba(90,25,10,.32)); }
.kid .eye-l, .kid .eye-r { animation: blink 5.6s infinite; transform-origin: center; transform-box: fill-box; }
/* المحور عند الكتف لا عند اليد — الذراع تتأرجح من أعلاها كما في الواقع */
.kid .arm-wave { animation: sway 2.6s ease-in-out infinite; transform-origin: 50% 100%; transform-box: fill-box; }
.kid .hair-tail { animation: sway 3.8s ease-in-out infinite; transform-origin: top center; transform-box: fill-box; }

/* بطاقات عائمة حول الطفل */
.chip3d {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.97); color: var(--ink);
  border-radius: 15px; padding: 9px 13px; font-size: 13.5px; font-weight: 900;
  box-shadow: 0 12px 28px rgba(90,25,10,.24);
  animation: floatTilt 6s ease-in-out infinite;
  white-space: nowrap;
}
.chip3d .e { font-size: 17px; }
.chip3d.c1 { inset-block-start: 6%;  inset-inline-end: -4%; animation-delay: -1.2s }
.chip3d.c2 { inset-block-start: 40%; inset-inline-start: -8%; animation-delay: -3.4s }
.chip3d.c3 { inset-block-end: 14%;   inset-inline-end: 2%;  animation-delay: -2.1s }
@media (max-width: 520px) {
  .chip3d { font-size: 12px; padding: 7px 10px }
  .chip3d.c1 { inset-inline-end: -2% }
  .chip3d.c2 { inset-inline-start: -2% }
}

/* ── الهاتف الحيّ ──────────────────────────────── */
.live-phone {
  width: 272px; background: #10201D; border-radius: 36px; padding: 9px;
  box-shadow: 0 30px 66px rgba(23,37,35,.34);
  animation: float 7s ease-in-out infinite;
}
.live-phone .screen { background: var(--bg); border-radius: 28px; overflow: hidden; }
.live-phone .top {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 24px 16px 16px; color: #fff; border-radius: 0 0 20px 20px;
}
.live-phone .top b { display: block; font-size: 15px; font-weight: 900 }
.live-phone .top span { font-size: 11.5px; opacity: .86 }
.live-phone .feed { padding: 12px 12px 16px; min-height: 232px; }
.live-row {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; margin-bottom: 8px; display: flex; align-items: center; gap: 9px;
  animation: slideUp .5s cubic-bezier(.22,1,.36,1) both;
}
.live-row .ic {
  flex: 0 0 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 15px;
  background: var(--primary-tint);
}
.live-row .t { flex: 1; min-width: 0 }
.live-row .t b { display: block; font-size: 12.5px; font-weight: 900 }
.live-row .t span { font-size: 11px; color: var(--ink3) }
.live-row.alert { background: var(--danger-tint); border-color: #F5C9D2; position: relative }
.live-row.alert .ic { background: #FBD0D8 }
.live-row.alert .t b { color: #B32A45 }
.live-row.alert::before {
  content: ''; position: absolute; inset-block-start: 14px; inset-inline-start: 14px;
  width: 12px; height: 12px; border-radius: 50%; background: rgba(228,82,107,.5);
  animation: pulseRing 1.9s ease-out infinite;
}

/* ── أيقونات متجهة عائمة ───────────────────────── */
.vfloat { animation: float 6s ease-in-out infinite; }
.vfloat.s1 { animation-duration: 7.5s; animation-delay: -1s }
.vfloat.s2 { animation-duration: 5.2s; animation-delay: -2.6s }
.vfloat.s3 { animation-duration: 8.4s; animation-delay: -3.8s }

/* ── شريط اليوم المتحرّك ───────────────────────── */
.daystrip {
  background: var(--surface); border-block: 1px solid var(--line);
  padding: 26px 0; overflow: hidden;
}
.daystrip .track { display: flex; gap: 12px; width: max-content; animation: marquee 34s linear infinite; }
.daystrip:hover .track { animation-play-state: paused }
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }
[dir="rtl"] .daystrip .track { animation-name: marqueeRtl }
@keyframes marqueeRtl { from { transform: translateX(0) } to { transform: translateX(50%) } }
.daystrip .pill3d {
  display: flex; align-items: center; gap: 9px; flex: 0 0 auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-weight: 800; font-size: 14.5px;
}
.daystrip .pill3d .e { font-size: 18px }

/* ── بطاقات بتأثير مجسّم ───────────────────────── */
.card3d {
  position: relative; transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
  box-shadow: 0 2px 0 rgba(23,37,35,.03);
}
.card3d:hover { transform: translateY(-6px); box-shadow: 0 18px 34px rgba(23,37,35,.11); }
.card3d .ico3d {
  width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center;
  font-size: 25px; margin-bottom: 13px;
  background: linear-gradient(145deg, #fff, var(--primary-tint));
  box-shadow: inset 0 2px 5px rgba(255,255,255,.9), 0 7px 16px rgba(20,119,106,.17);
  animation: bob 4.5s ease-in-out infinite;
}
.card3d.red .ico3d  { background: linear-gradient(145deg, #fff, var(--danger-tint));  box-shadow: inset 0 2px 5px rgba(255,255,255,.9), 0 7px 16px rgba(228,82,107,.2) }
.card3d.sun .ico3d  { background: linear-gradient(145deg, #fff, var(--sun-tint));     box-shadow: inset 0 2px 5px rgba(255,255,255,.9), 0 7px 16px rgba(255,194,75,.26) }
.card3d.sky .ico3d  { background: linear-gradient(145deg, #fff, var(--sky-tint));     box-shadow: inset 0 2px 5px rgba(255,255,255,.9), 0 7px 16px rgba(79,163,227,.2) }
.card3d.lil .ico3d  { background: linear-gradient(145deg, #fff, #EEEBFC);             box-shadow: inset 0 2px 5px rgba(255,255,255,.9), 0 7px 16px rgba(139,123,232,.2) }

/* ── عدّادات ───────────────────────────────────── */
.stat3d { text-align: center }
.stat3d .n { font-family: Inter, sans-serif; font-size: clamp(30px,5vw,42px); font-weight: 700; color: var(--primary); line-height: 1.1 }
.stat3d .l { font-size: 14.5px; color: var(--ink2); margin-top: 4px }

/* ── موجة فاصلة ────────────────────────────────── */
.wave-sep { display: block; width: 100%; height: 62px; margin-block-start: -1px }

/* ── احترام تفضيل تقليل الحركة ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; }
  .card3d:hover { transform: none }
}
