/* ==========================================================
   مكونات الموقع — تعتمد على المتغيرات في css/variables.css
   ========================================================== */

body {
  font-family: var(--font-sans);
}

section[id] {
  scroll-margin-top: 6.5rem;
}

:where(a, button, select, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
  border-radius: 0.75rem;
}

/* ---------- الأسطح الزجاجية ---------- */
.glass-panel {
  background: rgba(13, 13, 18, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background-color var(--dur-base) ease, box-shadow var(--dur-base) ease, border-color var(--dur-base) ease;
}

.site-header.is-scrolled .glass-panel {
  background: rgba(13, 13, 18, 0.9);
  border-color: rgba(168, 85, 247, 0.18);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.9);
}

.glass-card {
  background: rgba(19, 19, 26, 0.72);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---------- عناوين الأقسام ---------- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.22);
  color: var(--brand-300);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ---------- الأزرار ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  border-radius: 0.875rem;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) ease,
    background-color var(--dur-base) ease,
    border-color var(--dur-base) ease,
    color var(--dur-base) ease;
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn-sm {
  padding: 0.6rem 1.1rem;
  font-size: 0.8rem;
  border-radius: 0.75rem;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--indigo-600));
  box-shadow: 0 12px 28px -12px rgba(147, 51, 234, 0.65);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -14px rgba(147, 51, 234, 0.8);
}

/* لمعة تمر على الزر الأساسي عند التمرير */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 650ms var(--ease-out);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-outline {
  color: #fff;
  background: rgba(168, 85, 247, 0.06);
  border-color: rgba(168, 85, 247, 0.38);
}

.btn-outline:hover {
  transform: translateY(-2px);
  background: rgba(168, 85, 247, 0.16);
  border-color: var(--brand-400);
  box-shadow: 0 14px 30px -16px rgba(168, 85, 247, 0.7);
}

.btn-ghost {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  color: #fff;
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-disabled {
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  cursor: not-allowed;
}

/* ---------- البطاقات العامة ---------- */
.feature-card {
  background: linear-gradient(160deg, rgba(26, 26, 36, 0.75), rgba(13, 13, 18, 0.75));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.32);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  transition: transform var(--dur-base) var(--ease-out);
}

.feature-card:hover .feature-icon {
  transform: translateY(-2px) rotate(-6deg) scale(1.05);
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-300);
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  transition: background-color var(--dur-base) ease, border-color var(--dur-base) ease, color var(--dur-base) ease;
}

.skill-tag:hover {
  color: #fff;
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.4);
}

.social-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: transform var(--dur-fast) var(--ease-out), color var(--dur-base) ease, background-color var(--dur-base) ease, border-color var(--dur-base) ease;
}

.social-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.4);
}

/* ---------- الحقول ---------- */
.form-field {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: rgba(7, 7, 9, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.9rem;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.form-field::placeholder {
  color: var(--text-faint);
}

.form-field:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

/* ==========================================================
   قسم العروض والباقات
   ========================================================== */
.pkg-silver  { --tier-a: #f1f5f9; --tier-b: #94a3b8; --tier-glow: rgba(203, 213, 225, 0.16); }
.pkg-gold    { --tier-a: var(--accent-200); --tier-b: var(--accent-500); --tier-glow: rgba(245, 158, 11, 0.22); }
.pkg-diamond { --tier-a: var(--brand-400); --tier-b: #22d3ee; --tier-glow: rgba(168, 85, 247, 0.26); }

.pkg-card {
  --card-bg: #111118;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.6rem 1.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(26, 26, 36, 0.9), rgba(13, 13, 18, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease;
}

.pkg-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--tier-b) 45%, transparent);
  box-shadow: 0 28px 50px -26px var(--tier-glow), 0 0 0 1px color-mix(in srgb, var(--tier-b) 12%, transparent);
}

.pkg-card.is-featured {
  border: 1.5px solid transparent;
  background:
    linear-gradient(170deg, #1b1724, #100e16) padding-box,
    linear-gradient(140deg, var(--accent-400), var(--brand-500) 55%, var(--indigo-500)) border-box;
  box-shadow: 0 30px 60px -30px rgba(245, 158, 11, 0.35), 0 30px 70px -40px rgba(168, 85, 247, 0.55);
}

.pkg-card.is-featured:hover {
  box-shadow: 0 36px 70px -30px rgba(245, 158, 11, 0.45), 0 36px 80px -40px rgba(168, 85, 247, 0.7);
}

@media (min-width: 1024px) {
  .pkg-card.is-featured {
    transform: translateY(-14px);
    padding-top: 2.5rem;
  }
  .pkg-card.is-featured:hover {
    transform: translateY(-20px);
  }
}

.pkg-card.is-unavailable {
  opacity: 0.6;
  filter: grayscale(0.4);
}

.pkg-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  color: #1c1203;
  background: linear-gradient(135deg, var(--accent-200), var(--accent-400));
  box-shadow: 0 8px 20px -8px rgba(245, 158, 11, 0.7);
}

.pkg-badge i {
  font-size: 0.65rem;
}

.pkg-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pkg-icon {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-size: 1.35rem;
  color: var(--bg-950);
  background: linear-gradient(135deg, var(--tier-a), var(--tier-b));
  box-shadow: 0 12px 28px -12px var(--tier-glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform var(--dur-base) var(--ease-out);
}

.pkg-card:hover .pkg-icon {
  transform: rotate(-8deg) scale(1.06);
}

.pkg-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.pkg-tagline {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pkg-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 1.6rem 0 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.pkg-price-value {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(120deg, #fff 25%, var(--tier-a) 60%, var(--tier-b));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pkg-price-currency {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
}

.pkg-price-pending {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-300);
}

.pkg-features {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  flex-grow: 1;
  margin-bottom: 2rem;
}

.pkg-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.pkg-feature-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-top: 0.5rem;
  min-width: 0;
}

.pkg-feature-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
}

.pkg-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-300);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.22);
}

.pkg-feature-tag i {
  font-size: 0.65rem;
}

.pkg-feature-note {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-faint);
}

.feat-icon {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.feat-icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.feat-consult { color: var(--brand-300); background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.28); }
.feat-design  { color: #f0abfc; background: rgba(217, 70, 239, 0.12); border-color: rgba(217, 70, 239, 0.28); }
.feat-video   { color: #a5b4fc; background: rgba(99, 102, 241, 0.14); border-color: rgba(99, 102, 241, 0.3); }
.feat-support { color: var(--accent-300); background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.28); }

/* شعارات Canva وGemini: مربع أبيض كأيقونات التطبيقات الرسمية */
.feat-brand {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.8), inset 0 -2px 0 rgba(0, 0, 0, 0.06);
}

.feat-brand svg {
  width: 1.75rem;
  height: 1.75rem;
}

.pkg-cta {
  width: 100%;
}

/* ---------- آراء المتابعين ---------- */
.review-card {
  display: block;
  width: 100%;
  background: var(--bg-850);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.875rem;
  padding: 0.35rem;
  cursor: zoom-in;
  transition:
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease;
}

.review-card:hover,
.review-card:focus-visible {
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -6px rgba(168, 85, 247, 0.25);
}

.review-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 0.65rem;
  overflow: hidden;
  background-color: var(--bg-950);
}

.review-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s var(--ease-out);
}

.review-card:hover .review-img {
  transform: scale(1.05);
}

.review-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--dur-fast) ease;
}

.review-card:hover .review-overlay,
.review-card:focus-visible .review-overlay {
  opacity: 1;
}

@media (max-width: 640px) {
  .review-card {
    padding: 0.25rem;
    border-radius: 0.75rem;
  }
  .review-img-wrapper {
    aspect-ratio: 3 / 4;
  }
}

/* ---------- قائمة الهاتف ---------- */
.mobile-menu {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows var(--dur-base) var(--ease-out), opacity var(--dur-base) ease, margin var(--dur-base) ease;
}

.mobile-menu > div {
  overflow: hidden;
}

.mobile-menu.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0.75rem;
}

.mobile-menu:not(.is-open) {
  visibility: hidden;
}

/* ==========================================================
   الحركة
   ========================================================== */
/* يُستخدم translate (وليس transform) حتى لا يتعارض الظهور مع تأثيرات التحويم.
   بعد انتهاء الظهور يزيل main.js السمة فتعود انتقالات المكوّن الأصلية. */
.js [data-reveal] {
  transition:
    opacity var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms),
    translate var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms);
}

.js [data-reveal]:not(.is-visible) {
  opacity: 0;
  translate: 0 24px;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float-slow {
  animation: float-slow 7s ease-in-out infinite;
}

/* ==========================================================
   الحركة التسويقية للعروض
   ========================================================== */

/* فقاعات خلفية صاعدة (يولّدها js/promo.js) */
.bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.bubble {
  position: absolute;
  bottom: -60px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), var(--c) 45%, transparent 72%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  animation: bubble-rise var(--d) linear var(--delay) infinite;
  will-change: transform, opacity;
}

@keyframes bubble-rise {
  0%   { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  12%  { opacity: var(--o); }
  50%  { transform: translate3d(var(--sway), calc(var(--rise) * 0.5), 0) scale(1); }
  88%  { opacity: var(--o); }
  100% { transform: translate3d(0, var(--rise), 0) scale(1.05); opacity: 0; }
}

/* بطاقات المزايا العائمة حول عنوان صفحة العروض */
.promo-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  background: rgba(19, 19, 26, 0.78);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -18px rgba(168, 85, 247, 0.7);
  animation: chip-float 6s ease-in-out var(--delay, 0s) infinite;
}

.promo-chip .chip-icon {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.promo-chip svg {
  width: 1.45rem;
  height: 1.45rem;
}

.promo-chip .chip-icon.is-brand {
  background: #fff;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.8);
}

@keyframes chip-float {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); }
  50% { transform: translateY(-10px) rotate(calc(var(--tilt, 0deg) * -1)); }
}

/* لمعة تمر على البطاقة الموصى بها */
.pkg-card.is-featured::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.07) 50%, transparent 58%);
  background-size: 260% 100%;
  background-position: 130% 0;
  animation: card-sheen 5.5s ease-in-out 1.2s infinite;
}

@keyframes card-sheen {
  0%, 55% { background-position: 130% 0; }
  100% { background-position: -130% 0; }
}

.pkg-card.is-featured .pkg-badge {
  animation: badge-glow 2.6s ease-in-out infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 8px 20px -8px rgba(245, 158, 11, 0.7), 0 0 0 0 rgba(251, 191, 36, 0.45); }
  50% { box-shadow: 0 8px 20px -8px rgba(245, 158, 11, 0.7), 0 0 0 7px rgba(251, 191, 36, 0); }
}

/* لمعة دورية على زر الباقة الموصى بها */
.pkg-card.is-featured .btn-primary::after {
  animation: cta-shine 4s ease-in-out 2s infinite;
}

@keyframes cta-shine {
  0%, 70% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.pkg-price-value {
  font-variant-numeric: tabular-nums;
}

/* أيقونة الهدية تهتز بين حين وآخر */
.wiggle {
  display: inline-block;
  animation: wiggle 3.2s ease-in-out 1.5s infinite;
}

@keyframes wiggle {
  0%, 80%, 100% { transform: rotate(0); }
  84% { transform: rotate(-14deg) scale(1.1); }
  88% { transform: rotate(12deg) scale(1.1); }
  92% { transform: rotate(-8deg); }
  96% { transform: rotate(4deg); }
}

/* نقطة تنبيه بجانب رابط العروض */
.nav-ping {
  position: relative;
  display: inline-flex;
  width: 0.45rem;
  height: 0.45rem;
  margin-inline-start: 0.35rem;
  vertical-align: super;
}

.nav-ping::before,
.nav-ping::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent-400);
}

.nav-ping::before {
  animation: ping-soft 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping-soft {
  75%, 100% { transform: scale(2.4); opacity: 0; }
}

/* ==========================================================
   الشخصية المرافقة «سيمو» — لقطات الفيديو تُرسم على canvas
   (اللقطات من scripts/mascot-video.py، المنطق في js/mascot.js)
   ========================================================== */

/* rig-sway: ميلان نابض مع التمرير (JS) · rig-motion: القفز (CSS) · rig-inner: التنفّس */
.rig {
  position: relative;
  display: block;
}

.rig-sway,
.rig-motion,
.rig-inner {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
}

.rig-inner {
  animation: rig-breathe 4.2s ease-in-out infinite;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}

/* الجسم كاملًا (صفحة العروض): ظل خفيف تحت القدمين بدل التلاشي */
.rig.is-full .rig-inner {
  -webkit-mask-image: none;
  mask-image: none;
}

.rig.is-full::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: -1.5%;
  height: 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
  z-index: -1;
}

.rig-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@keyframes rig-breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.006, 1.012); }
}

.rig.do-hop .rig-motion {
  animation: rig-hop 780ms cubic-bezier(0.3, 0.7, 0.4, 1);
}

@keyframes rig-hop {
  0%   { transform: none; }
  16%  { transform: scale(1.05, 0.93); }
  44%  { transform: translateY(-7%) scale(0.97, 1.04); }
  68%  { transform: translateY(0) scale(1.05, 0.95); }
  84%  { transform: scale(0.99, 1.01); }
  100% { transform: none; }
}

/* النعاس: تنفّس أبطأ وميل خفيف */
.rig.is-sleeping .rig-inner {
  animation-duration: 6.5s;
}

.rig.is-sleeping .rig-motion {
  transform: rotate(-3deg);
  transition: transform 900ms var(--ease-out);
}

/* المؤثرات: نجوم ونعاس، بحجم يتبع حجم الشخصية (--u = 1% من عرضها) */
.rig-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rig-z {
  position: absolute;
  left: 66%;
  top: 14%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--u, 1.5px) * 9);
  color: var(--brand-300);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
  opacity: 0;
  display: none;
}

.rig.is-sleeping .rig-z {
  display: block;
  animation: rig-z 2.6s ease-out infinite;
}

.rig.is-sleeping .rig-z:nth-child(2) { animation-delay: 0.85s; font-size: calc(var(--u, 1.5px) * 7); }
.rig.is-sleeping .rig-z:nth-child(3) { animation-delay: 1.7s; font-size: calc(var(--u, 1.5px) * 5.5); }

@keyframes rig-z {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.6) rotate(-10deg); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--u, 1.5px) * 10), calc(var(--u, 1.5px) * -24)) scale(1.15) rotate(12deg); }
}

.rig-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: calc(var(--u, 1.5px) * var(--s));
  line-height: 1;
  color: var(--c);
  text-shadow: 0 0 8px var(--c);
  animation: rig-spark var(--t, 900ms) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

@keyframes rig-spark {
  0%   { transform: translate(-50%, -50%) scale(0.2) rotate(0); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(180deg); opacity: 0; }
}

/* نجمة تتلألأ بهدوء من حين لآخر */
.rig-twinkle {
  animation: rig-twinkle 1.4s ease-in-out forwards;
}

@keyframes rig-twinkle {
  0%, 100% { transform: translate(-50%, -50%) scale(0) rotate(0); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1) rotate(90deg); opacity: 1; }
}

/* ---------- الشخصية العائمة ---------- */
.mascot {
  position: fixed;
  z-index: 45;
  left: 0.5rem;
  bottom: 0;
  width: 10.5rem;
  pointer-events: none;
  transform: translateY(105%);
  transition: transform 700ms cubic-bezier(0.34, 1.3, 0.64, 1);
}

.mascot.is-in {
  transform: none;
}

.mascot[hidden] {
  display: none;
}

.mascot-glow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 4%;
  height: 55%;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(168, 85, 247, 0.55), rgba(245, 158, 11, 0.18) 60%, transparent);
  filter: blur(14px);
  pointer-events: none;
}

.mascot-btn {
  position: relative;
  display: block;
  width: 100%;
  pointer-events: auto;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 1.5rem 1.5rem 0 0;
}

.mascot-hide {
  position: absolute;
  top: 12%;
  left: 2%;
  z-index: 2;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.7rem;
  color: var(--text-main);
  background: rgba(13, 13, 18, 0.85);
  border: 1px solid var(--line-strong);
  pointer-events: auto;
  opacity: 0;
  transition: opacity var(--dur-fast) ease;
}

.mascot:hover .mascot-hide,
.mascot-hide:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .mascot-hide { opacity: 0.85; }
}

/* فقاعة الكلام */
.mascot-bubble {
  position: absolute;
  left: 78%;
  bottom: 62%;
  width: max-content;
  max-width: min(17rem, calc(100vw - 9rem));
  padding: 0.75rem 0.95rem 0.8rem;
  border-radius: 1.15rem 1.15rem 1.15rem 0.3rem;
  background:
    linear-gradient(160deg, rgba(27, 23, 36, 0.97), rgba(13, 13, 18, 0.97)) padding-box,
    linear-gradient(135deg, var(--accent-400), var(--brand-500) 60%, var(--indigo-500)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.95), 0 16px 36px -24px rgba(168, 85, 247, 0.85);
  pointer-events: auto;
  transform-origin: 0 100%;
  transform: translateY(8px) scale(0.85);
  opacity: 0;
  visibility: hidden;
  transition: transform 380ms cubic-bezier(0.34, 1.4, 0.64, 1), opacity 240ms ease, visibility 0s linear 380ms;
}

.mascot-bubble.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform 380ms cubic-bezier(0.34, 1.4, 0.64, 1), opacity 240ms ease, visibility 0s;
}

.mascot-bubble-close {
  position: absolute;
  top: -0.55rem;
  left: -0.55rem;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.65rem;
  color: var(--text-main);
  background: var(--bg-800);
  border: 1px solid var(--line-strong);
}

.mascot-msg {
  min-height: 1.6em;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
}

.mascot-actions {
  display: none;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.mascot-bubble.has-actions .mascot-actions {
  display: flex;
}

.mascot-actions .btn {
  flex: 1;
  padding: 0.55rem 0.7rem;
  white-space: nowrap;
}

.mascot-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-inline-start: 2px;
  vertical-align: -0.15em;
  background: var(--accent-300);
  animation: caret-blink 0.9s steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.typing {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.typing i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--brand-300);
  animation: typing-dot 1.1s ease-in-out infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 640px) {
  .mascot { width: 7.5rem; left: 0.25rem; }
  .mascot-bubble { left: 84%; bottom: 58%; max-width: calc(100vw - 7.5rem); }
  .mascot-msg { font-size: 0.82rem; }
  .mascot-actions .btn { font-size: 0.75rem; padding: 0.5rem 0.5rem; gap: 0.35rem; }
}

/* ==========================================================
   منصة الشخصية في صفحة العروض
   ========================================================== */
.presenter {
  position: relative;
  width: 100%;
  max-width: 17rem;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .presenter { max-width: 22rem; }
}

.presenter-stage {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* هالة متدرجة خلف الشخصية */
.presenter-halo {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 92%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(168, 85, 247, 0.45), rgba(99, 102, 241, 0.18) 60%, transparent 72%);
}

.presenter-halo::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, var(--accent-400), var(--brand-500), var(--indigo-500), transparent 70%, var(--accent-400));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: halo-spin 9s linear infinite;
  opacity: 0.85;
}

@keyframes halo-spin {
  to { transform: rotate(360deg); }
}

.presenter-stage .rig {
  position: relative;
  height: 100%;
}

.presenter-bubble {
  position: absolute;
  z-index: 2;
  top: 2%;
  right: -1rem;
  max-width: 14rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.55;
  color: #1c1203;
  background: linear-gradient(135deg, #fff7d6, var(--accent-300));
  box-shadow: 0 18px 36px -16px rgba(245, 158, 11, 0.75);
}

.presenter-bubble .mascot-caret {
  background: #1c1203;
}

.presenter-bubble .typing {
  background: rgba(28, 18, 3, 0.08);
}

.presenter-bubble .typing i {
  background: #8a5a00;
}

@media (min-width: 1024px) {
  .presenter-bubble { right: -2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root:not(.force-motion) {
    scroll-behavior: auto !important;
  }
  :root:not(.force-motion) *,
  :root:not(.force-motion) *::before,
  :root:not(.force-motion) *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  :root:not(.force-motion).js [data-reveal]:not(.is-visible) {
    opacity: 1;
    translate: none;
  }
}

