/* /home-v5.css — تصميم الصفحة الرئيسية v5 "A+" (2026-11-13)
 *
 * ألوان A: أقسام بنفسجي ليلي بالتناوب مع أبيض (والباقات ليلكي)، على أرضية ليلية.
 * تنقّل C: كل قسم لوحة مدوّرة بتلزق فوق (sticky)، واللوحة اللي بعدها بتطلع فوقها
 *   واللي تحتها بتصغر شوي. ظهور العناصر بضباب خفيف لما توصلها.
 * النبرة بتنحط على كل قسم بـdata-tone بالـHTML، والحركة من سكربت آخر index.html.
 * بيتحمّل بعد design.css بالصفحة الرئيسية بس، وكل القواعد تحت body.v5.
 * مع prefers-reduced-motion: لا تلزيق ولا تصغير ولا ظهور — اللوحات بتضل بس بدون حركة.
 * للتراجع: شيل سطر home-v5.css وclass="v5" من index.html (أو snap/20261113-024450-قبل-تصميم-الموقع-v5).
 */

body.v5 {
  --night: #12072E;
  --night-2: #23105E;
  --night-base: #0B0420;
  --lilac: #F4EFFF;
  --soft: #B79BFF;
  --panel-gap: 12px;
  background: var(--night-base) !important;
}
[lang="ar"] body.v5 h1, [lang="ar"] body.v5 h2, [lang="ar"] body.v5 .section-title {
  font-family: 'Alexandria', 'Tajawal', sans-serif;
  font-weight: 800 !important;
}

/* ------------------------------------------------ الشعار: Alt + Shift */
body.v5 .logo .shift { color: var(--purple); }
html body.v5 nav[data-tone="dark"] .logo { color: #fff; }
html body.v5 nav[data-tone="dark"] .logo .shift { color: var(--soft); }
html body.v5 nav[data-tone="dark"] .logo-mark img { filter: drop-shadow(0 0 10px rgba(183,155,255,.55)); }

/* ------------------------------------------- النافبار بيتبع لون اللوحة */
html body.v5 nav { transition: background-color .35s, color .35s, border-color .35s; }
html body.v5 nav[data-tone="dark"] {
  background: rgba(14, 6, 36, 0.62) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  color: #fff;
}
html body.v5 nav[data-tone="dark"] .nav-links a { color: rgba(255,255,255,.75); }
html body.v5 nav[data-tone="dark"] .nav-links a:hover { color: #fff; }
html body.v5 nav[data-tone="dark"] .btn-nav-signin { color: #fff; }
html body.v5 nav[data-tone="dark"] .lang-toggle { color: #fff !important; border-color: rgba(255,255,255,.28) !important; }
html body.v5 nav[data-tone="dark"] .mobile-menu-btn svg { stroke: #fff; }

/* ------------------------------------------------------ اللوحات */
html body.v5 section.slide {
  --fg: var(--text); --sub: var(--text-secondary);
  position: relative; isolation: isolate; overflow: clip;
  display: flex; align-items: center;
  min-height: calc(100svh - 64px - 2 * var(--panel-gap));
  margin: 0 max(var(--panel-gap), env(safe-area-inset-right, 0px)) 18px max(var(--panel-gap), env(safe-area-inset-left, 0px));
  padding: 64px 0 !important;
  border-radius: 36px;
  background: #fff;
  color: var(--fg);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 0;
}
html body.v5 section.slide > .container { width: 100%; }
html body.v5 section.slide:first-of-type { margin-top: var(--panel-gap); }
html body.v5 section.slide[data-tone="lilac"] { background: var(--lilac); }
html body.v5 section.slide[data-tone="night"] {
  --fg: #fff; --sub: rgba(255, 255, 255, 0.74);
  background:
    radial-gradient(60% 55% at 85% 10%, rgba(123, 60, 255, 0.55), transparent 70%),
    radial-gradient(50% 50% at 5% 95%, rgba(99, 48, 232, 0.45), transparent 70%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(183, 155, 255, 0.18);
}
/* هالات v4 (::before/::after بالأقسام) مش لازمة فوق اللوحات الداكنة */
html body.v5 section.slide[data-tone="night"]::after,
html body.v5 section.slide[data-tone="night"].hero::before { display: none !important; }

/* التلزيق والتصغير (بس لما الحركة مسموحة — السكربت بيحط html.v5-stack) */
/* !important لأنه design.css بيحط position: relative على #channels و#trust... بالـID */
html.v5-stack body.v5 section.slide { position: sticky !important; transform: scale(calc(1 - var(--q, 0) * 0.07)); }
/* آخر لوحة (الدعوة الأخيرة) ما بتلزق، عشان الفوتر ما يغطي زرها */
html.v5-stack body.v5 section.slide#start { position: relative !important; }

/* ------------------------------------------- نصوص فوق اللوحات الداكنة */
html body.v5 .slide[data-tone="night"] h1,
html body.v5 .slide[data-tone="night"] h2,
html body.v5 .slide[data-tone="night"] .section-title,
html body.v5 .slide[data-tone="night"] .trust-band h2 > span:first-child { color: #fff !important; }
html body.v5 .slide[data-tone="night"] .hero h1 .accent,
html body.v5 .slide[data-tone="night"] .accent,
html body.v5 .slide[data-tone="night"] .section-title [style*="--purple"],
html body.v5 .slide[data-tone="night"] .trust-band h2 span:last-child {
  background: linear-gradient(90deg, #E2D6FF, #9E7BFF); -webkit-background-clip: text; background-clip: text;
  color: transparent !important; -webkit-text-fill-color: transparent;
}
html body.v5 .slide[data-tone="night"] .eyebrow { color: var(--soft); }
html body.v5 .slide[data-tone="night"] .hero-sub,
html body.v5 .slide[data-tone="night"] .section-sub,
html body.v5 .slide[data-tone="night"] .hero-trust,
html body.v5 .slide[data-tone="night"] .trust-band p.lead { color: var(--sub) !important; }
html body.v5 .slide[data-tone="night"] .hero-trust svg { color: var(--soft); }

/* أزرار فوق الداكن: أبيض ببنفسجي، والثانوي بخط أبيض */
html body.v5 .slide[data-tone="night"] .btn-primary,
html body.v5 .slide[data-tone="night"] .btn-cta-white {
  background: #fff !important; color: var(--purple) !important;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5) !important; filter: none;
}
html body.v5 .slide[data-tone="night"] .btn-secondary {
  background: transparent !important; color: #fff !important; border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
}
html body.v5 .slide[data-tone="night"] .btn-secondary:hover { background: rgba(255, 255, 255, 0.08) !important; }

/* ------------------------------------------------------- الهيرو */
html body.v5 .hero { padding-top: 56px !important; }
html body.v5 .slide[data-tone="night"] .stat-card {
  background: rgba(255, 255, 255, 0.07) !important; border-color: rgba(255, 255, 255, 0.14) !important; box-shadow: none !important;
}
html body.v5 .slide[data-tone="night"] .stat-num {
  background: none; -webkit-text-fill-color: #fff; color: #fff !important;
}
html body.v5 .slide[data-tone="night"] .stat-label { color: var(--sub); }
html body.v5 .slide[data-tone="night"] .chat-card { box-shadow: 0 40px 90px rgba(5, 0, 30, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.25) !important; }

/* ------------------------------------------------- الثقة (داكن) */
html body.v5 .slide[data-tone="night"] .trust-band {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
}
html body.v5 .slide[data-tone="night"] .trust-point {
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 20px;
  padding: 20px; border-inline-start-width: 1px;
}
html body.v5 .slide[data-tone="night"] .trust-point b { color: #fff; }
html body.v5 .slide[data-tone="night"] .trust-point span { color: var(--sub); }

/* --------------------------------------------- كيف يعمل (داكن) */
html body.v5 .steps-row { gap: 18px; align-items: stretch; }
html body.v5 .step-card-new { padding: 26px; border-radius: 20px; }
html body.v5 .slide[data-tone="night"] .step-card-new { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
html body.v5 .slide[data-tone="night"] .step-num-new { background: #fff !important; color: var(--purple); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08) !important; }
html body.v5 .slide[data-tone="night"] .step-title-new { color: #fff; }
html body.v5 .slide[data-tone="night"] .step-desc-new { color: var(--sub); }
html body.v5 .step-arrow { display: none; }

/* -------------------------------------------- الدعوة الأخيرة (داكن) */
html body.v5 .slide[data-tone="night"] .final-cta { background: transparent !important; box-shadow: none !important; padding: 24px 0; }
html body.v5 .slide[data-tone="night"] .final-cta h2 { font-size: clamp(28px, 3.8vw, 46px); }
html body.v5 .slide[data-tone="night"] .final-cta p { color: var(--sub); }

/* ------------------------------------------------------- الفوتر: لوحة بيضاء أخيرة */
html body.v5 footer {
  position: relative; z-index: 1;
  margin: 0 max(var(--panel-gap), env(safe-area-inset-right, 0px)) var(--panel-gap) max(var(--panel-gap), env(safe-area-inset-left, 0px));
  border-radius: 36px; background: #fff !important;
}

/* --------------------------------------------- الظهور عند الوصول */
html body.v5 .rv {
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1), filter .8s,
              box-shadow .35s, border-color .35s !important;
  transition-delay: var(--rv-d, 0ms) !important;
}
html body.v5 .rv.rv-pre { opacity: 0 !important; transform: translateY(42px) !important; filter: blur(10px); }

/* ------------------------------------------------ نقاط التنقل */
.v5-dots { position: fixed; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.v5-dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; padding: 0; cursor: pointer; background: rgba(120, 100, 170, 0.4); transition: height .3s, background-color .3s; }
.v5-dots button[aria-current="true"] { height: 28px; background: var(--purple); }
.v5-dots[data-tone="dark"] button { background: rgba(255, 255, 255, 0.4); }
.v5-dots[data-tone="dark"] button[aria-current="true"] { background: #fff; }
.v5-dots button:focus-visible { outline: 3px solid var(--soft, #B79BFF); outline-offset: 3px; }

/* ------------------------------------------------------- موبايل */
@media (max-width: 900px) {
  html body.v5 section.slide { padding: 44px 0 !important; border-radius: 28px; }
  html body.v5 .hero { padding-top: 40px !important; }
  html body.v5 footer { border-radius: 28px; }
  .v5-dots { display: none; }
}
@media (max-width: 480px) {
  body.v5 { --panel-gap: 8px; }
  html body.v5 section.slide { border-radius: 24px; }
  html body.v5 .container { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html body.v5 .rv.rv-pre { opacity: 1 !important; transform: none !important; filter: none; }
  html body.v5 section.slide { transform: none !important; }
}

/* =====================================================================
 * (2026-11-15) تعديلات: ترتيب حوالين محادثة الهيرو، حروف مقصوصة، ولوحة التقارير.
 * ===================================================================== */

/* ------------------------------------- حروف مقصوصة بالعناوين المتدرجة
   background-clip:text بيقص الحرف عند حدود صندوق السطر، فنقاط الياء وذيول الحروف
   بالعربي (Alexandria 800) كانت بتنقص. padding على inline بيكبّر مساحة الخلفية
   بدون ما يغيّر ارتفاع السطر، وbox-decoration-break بيكرّره على كل سطر لما يلتف. */
html body.v5 .hero h1 .accent,
html body.v5 .accent,
html body.v5 .section-title [style*="--purple"],
html body.v5 .trust-band h2 span:last-child,
html body.v5 .stat-num {
  padding: 0.12em 0.06em 0.3em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
[lang="ar"] body.v5 h1, [lang="ar"] body.v5 h2, [lang="ar"] body.v5 .section-title { line-height: 1.45; }
[lang="ar"] body.v5 .hero h1 { line-height: 1.38 !important; }
[lang="ar"] body.v5 .stat-num { line-height: 1.6; }

/* ---------------------------------------------- محادثة الهيرو: صف مرتب */
/* minmax(0,…) عشان العنوان الطويل ما ياكل عمود المحادثة ويضيّقها */
@media (min-width: 901px) { html body.v5 .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 900px) { html body.v5 .hero-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1081px) {
  html body.v5 .hero-grid { grid-template-columns: minmax(0, 1fr) 500px; gap: 56px; }
  /* سطور العنوان nowrap (design.css)، فالخط بيصغر مع الشاشة بدل ما يفوت على المحادثة */
  html body.v5 .hero h1 { font-size: clamp(30px, 3vw, 42px) !important; }
}
/* القنوات يسار والرموز يمين بالعربي والإنجليزي (زي قبل) */
[dir="rtl"] body.v5 .hv-rail-channels { order: 3; }
[dir="rtl"] body.v5 .hv-rail-skills { order: 1; }
[dir="rtl"] body.v5 .hero-visual .chat-card { order: 2; }
html body.v5 .hero-visual {
  display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 0;
}
html body.v5 .hero-visual .chat-card { flex: 0 1 344px; min-width: 0; margin: 0; }
html body.v5 .hero .chat-card-name { color: #1d1d1f; } /* كان بيورث الأبيض من اللوحة الداكنة فما بيبين */
.hv-rail {
  flex: none; display: flex; flex-direction: column; gap: 10px; padding: 8px;
  border-radius: 24px; background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -24px rgba(5, 0, 30, 0.7);
  animation: hvFloat 6s ease-in-out infinite; position: relative; z-index: 3;
}
.hv-rail-skills { animation-delay: -3s; }
@keyframes hvFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hv-tile {
  position: relative; width: 46px; height: 46px; border-radius: 16px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -10px rgba(5, 0, 30, 0.6);
}
.hv-tile svg { width: 26px; height: 26px; }
.hv-tile-brand {
  background: linear-gradient(135deg, #6330E8, #7B3CFF 55%, #A47BFF);
  box-shadow: 0 10px 22px -10px rgba(123, 60, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.hv-tile-brand svg { width: 22px; height: 22px; }
/* اسم الميزة جنب المربع لما تمرّق عليه */
.hv-tip {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%) translateX(6px); z-index: 5;
  white-space: nowrap; font-size: 12px; font-weight: 600; color: #1d1d1f; background: #fff;
  padding: 6px 10px; border-radius: 10px; box-shadow: 0 8px 20px -8px rgba(5, 0, 30, 0.5);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.hv-tile:hover .hv-tip { opacity: 1; transform: translateY(-50%); }
@media (max-width: 1080px) { .hv-rail { display: none; } }

/* ------------------------------------------------------- لوحة التقارير */
html body.v5 #reports .section-header { margin-bottom: 36px; }
.rp-window {
  max-width: 1040px; margin: 0 auto; background: #fff; color: #1d1d1f; border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(5, 0, 30, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
}
.rp-bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  border-bottom: 1px solid #EEEAF6; background: linear-gradient(180deg, #FBFAFF, #fff);
}
.rp-dots { display: flex; gap: 6px; }
.rp-dots i { width: 10px; height: 10px; border-radius: 50%; background: #E4DEF2; }
.rp-bar-title { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #4B4760; }
.rp-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); }
.rp-live .rp-live-dot { animation: rpPulse 1.8s ease-out infinite; }
@keyframes rpPulse { to { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } }
.rp-range {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #6330E8;
  border: 1px solid #E6DEFB; border-radius: 99px; padding: 5px 11px;
}
.rp-body { padding: 18px; background: #FAF9FD; display: grid; gap: 14px; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rp-kpi, .rp-card {
  background: #fff; border: 1px solid #EEEAF6; border-radius: 18px;
  box-shadow: 0 1px 2px rgba(17,17,17,.03), 0 12px 30px -24px rgba(99,48,232,.4);
}
.rp-kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.rp-kpi-label { font-size: 12.5px; color: #6B6880; font-weight: 500; }
.rp-kpi .rp-num {
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; font-family: 'Inter', sans-serif;
  background: linear-gradient(90deg, #6330E8, #9E7BFF); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; padding-bottom: .08em; font-variant-numeric: tabular-nums;
  align-self: flex-start;
}
.rp-trend { font-size: 11.5px; font-weight: 700; color: #16A34A; direction: ltr; align-self: flex-start; }
.rp-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; }
.rp-card { padding: 16px 18px; min-width: 0; }
.rp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.rp-card-head b { font-size: 14px; font-weight: 700; }
.rp-chip { font-size: 11px; font-weight: 600; color: #6B6880; border: 1px solid #E8E4F1; border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.rp-team { grid-column: 1 / -1; }

/* الرسم: الخط بينرسم والتعبئة بتطلع */
.rp-svg { width: 100%; height: 160px; display: block; overflow: visible; }
.rp-gridlines path { stroke: #EFEBF7; stroke-width: 1; stroke-dasharray: 4 6; }
.rp-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.9s cubic-bezier(.3,.7,.2,1) .3s; }
.rp-area { opacity: 0; transition: opacity 1.2s ease 1.1s; }
.rp-point { fill: #fff; stroke: #A47BFF; stroke-width: 3; opacity: 0; transition: opacity .4s ease 2.1s; }
.rp-live .rp-line { stroke-dashoffset: 0; }
.rp-live .rp-area, .rp-live .rp-point { opacity: 1; }

/* الأشرطة بتمتد من بداية السطر */
.rp-track { flex: 1; height: 8px; border-radius: 99px; background: #F1EEF8; overflow: hidden; display: block; min-width: 40px; }
.rp-track i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #6330E8, #A47BFF);
  transition: width 1.4s cubic-bezier(.25,.8,.25,1);
}
[dir="rtl"] .rp-track i { background: linear-gradient(270deg, #6330E8, #A47BFF); }
.rp-live .rp-track i { width: var(--w); }
.rp-bars, .rp-board { list-style: none; display: grid; gap: 12px; }
.rp-bars li, .rp-board li { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.rp-bar-name { width: 82px; flex: none; font-weight: 600; }
.rp-bars .rp-num, .rp-board .rp-num { width: 50px; flex: none; text-align: end; font-weight: 700; color: #6330E8; font-variant-numeric: tabular-nums; }
.rp-bars li:nth-child(2) i, .rp-board li:nth-child(2) i { transition-delay: .12s; }
.rp-bars li:nth-child(3) i, .rp-board li:nth-child(3) i { transition-delay: .24s; }
.rp-board li:nth-child(4) i { transition-delay: .36s; }
.rp-av {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6330E8, #A47BFF); color: #fff; font-size: 13px; font-weight: 700;
}
.rp-av-bot { background: linear-gradient(135deg, #10B981, #34D399); }
.rp-who { width: 110px; flex: none; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.6; }

/* الدونات */
.rp-donut-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed #ECE8F4; }
.rp-donut { width: 64px; height: 64px; flex: none; transform: rotate(-90deg); }
.rp-donut circle { fill: none; stroke-width: 6; }
.rp-donut-bg { stroke: #F1EEF8; }
.rp-donut-fg { stroke: #7B3CFF; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s cubic-bezier(.3,.7,.2,1) .4s; }
.rp-live .rp-donut-fg { stroke-dashoffset: calc(100 - var(--p)); }
.rp-donut-row b { display: block; font-size: 22px; font-weight: 800; color: #6330E8; line-height: 1.3; }
.rp-donut-row span { font-size: 12.5px; color: #6B6880; line-height: 1.5; }

@media (max-width: 900px) {
  .rp-kpis { grid-template-columns: repeat(2, 1fr); }
  .rp-grid { grid-template-columns: 1fr; }
  .rp-kpi .rp-num { font-size: 24px; }
  .rp-svg { height: 150px; }
}
@media (max-width: 480px) {
  .rp-body { padding: 12px; gap: 10px; }
  .rp-kpis { gap: 10px; }
  .rp-who { width: 84px; }
  .rp-range span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hv-rail { animation: none; }
  .rp-line, .rp-area, .rp-point, .rp-track i, .rp-donut-fg { transition: none !important; }
}
