/* =====================================================================
   theme-home — الصفحة الرئيسية (النافذة F)
   تخطيط غير متماثل، رسم بطل متحرّك بـCSS فقط، شبكة Bento، بلا تدرّجات ملوّنة.
   كل الحركة تتوقّف مع prefers-reduced-motion (القاعدة العامّة في theme-base).
   ===================================================================== */

.hp { overflow-x: clip; }
.hp-ltr { direction: ltr; unicode-bidi: isolate; }
.hp-muted { color: var(--text-dim); }

/* ═════════ البطل ═════════ */
.hp-hero { padding: 56px 0 64px; position: relative; }
.hp-hero::before {   /* شبكة نقاط خفيفة بدل الوهج المعتاد */
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
            mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.hp-hero-grid {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 48px; align-items: center;
}
.hp-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .85rem; font-weight: 700; color: var(--text-dim);
    padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.hp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: hp-pulse 2s infinite; }
@keyframes hp-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

.hp-hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.12;
    margin: 18px 0 16px; letter-spacing: -.03em;
}
[dir="rtl"] .hp-hero h1 { letter-spacing: 0; line-height: 1.3; }
.hp-hero h1 mark {   /* تظليل بقلم — لون واحد، ليس تدرّجاً */
    background: none; color: inherit; position: relative; white-space: nowrap; z-index: 0;
}
.hp-hero h1 mark::after {
    content: ''; position: absolute; z-index: -1;
    inset-inline: -4px; bottom: .08em; height: .34em;
    background: var(--accent); opacity: .85; border-radius: 4px;
    transform: skewX(-12deg); transform-origin: left;
    animation: hp-mark .9s .3s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes hp-mark { from { transform: skewX(-12deg) scaleX(0); } to { transform: skewX(-12deg) scaleX(1); } }
[dir="rtl"] .hp-hero h1 mark::after { transform-origin: right; }

.hp-lead { font-size: 1.12rem; color: var(--text-dim); max-width: 56ch; margin: 0 0 28px; }
.hp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hp-trust { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hp-trust li { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; font-weight: 600; color: var(--text-dim); }
.hp-trust .ico { color: var(--ok); }

/* ── الرسم المتحرّك ── */
.hp-visual { position: relative; min-height: 470px; display: grid; place-items: center; }
.hp-phone {
    width: min(300px, 82%); padding: 14px 16px 18px;
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 30px; box-shadow: var(--shadow-lg);
    transform: rotate(-3deg);
    animation: hp-float 7s ease-in-out infinite;
}
[dir="rtl"] .hp-phone { transform: rotate(3deg); animation-name: hp-float-r; }
@keyframes hp-float   { 0%,100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-10px); } }
@keyframes hp-float-r { 0%,100% { transform: rotate(3deg) translateY(0); }  50% { transform: rotate(2deg) translateY(-10px); } }
.hp-phone-bar { display: grid; place-items: center; margin-bottom: 14px; }
.hp-phone-bar span { width: 64px; height: 6px; border-radius: 6px; background: var(--surface-2); }
.hp-profile { display: flex; align-items: center; gap: 12px; }
.hp-avatar {
    width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: var(--primary); color: var(--primary-ct);
    box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent);
}
.hp-handle { font-weight: 800; direction: ltr; text-align: start; }
.hp-bio { font-size: .8rem; color: var(--text-dim); }
.hp-pstats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin: 16px 0 12px; }
.hp-pstats b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.hp-pstats span { font-size: .72rem; color: var(--text-dim); }

/* عدّاد المتابعين يصعد (CSS @property). متصفّح قديم = الرقم النهائي ثابتاً */
@property --hp-n { syntax: '<integer>'; inherits: false; initial-value: 12480; }
.hp-count { --hp-n: 12480; counter-reset: hpn var(--hp-n); animation: hp-count 5.5s 1s cubic-bezier(.3,.7,.2,1) infinite; color: var(--primary); }
.hp-count::after { content: counter(hpn); }
@keyframes hp-count { 0% { --hp-n: 1240; } 70%, 100% { --hp-n: 12480; } }

.hp-followbtn {
    text-align: center; padding: 8px; border-radius: 10px; font-weight: 800; font-size: .9rem;
    background: var(--primary); color: var(--primary-ct);
}
.hp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 14px; }
.hp-tile { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); }
.hp-tile-1 { background: color-mix(in srgb, var(--primary) 22%, var(--surface-2)); }
.hp-tile-3 { background: color-mix(in srgb, var(--accent) 26%, var(--surface-2)); }
.hp-tile-5 { background: color-mix(in srgb, var(--ok) 22%, var(--surface-2)); }

.hp-toast {
    position: absolute; display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px 9px 10px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    font-size: .86rem; white-space: nowrap;
    opacity: 0; animation: hp-toast 6s infinite;
}
.hp-ti { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.hp-ti-o { background: var(--accent-soft); color: var(--accent); }
.hp-ti-r { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.hp-t1 { top: 8%;  inset-inline-start: 0;   animation-delay: .4s; }
.hp-t2 { top: 44%; inset-inline-end: -2%;   animation-delay: 2.4s; }
.hp-t3 { bottom: 12%; inset-inline-start: 4%; animation-delay: 4.4s; }
@keyframes hp-toast {
    0%   { opacity: 0; transform: translateY(12px) scale(.96); }
    8%, 38% { opacity: 1; transform: none; }
    48%, 100% { opacity: 0; transform: translateY(-8px); }
}

.hp-chart {
    position: absolute; bottom: 4%; inset-inline-end: 2%;
    width: 170px; padding: 10px 12px 6px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hp-chart-l { font-size: .72rem; font-weight: 700; color: var(--text-dim); }
.hp-chart svg { display: block; width: 100%; height: 48px; overflow: visible; }
.hp-line {
    fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 220; stroke-dashoffset: 220; animation: hp-draw 5.5s 1s ease-out infinite;
}
[dir="rtl"] .hp-chart svg { transform: scaleX(-1); }
@keyframes hp-draw { 0% { stroke-dashoffset: 220; } 60%, 100% { stroke-dashoffset: 0; } }

.hp-heart { position: absolute; color: var(--danger); opacity: 0; animation: hp-heart 4s infinite; }
.hp-h1 { top: 30%; inset-inline-start: 22%; animation-delay: .2s; }
.hp-h2 { top: 36%; inset-inline-start: 30%; animation-delay: 1.2s; }
.hp-h3 { top: 26%; inset-inline-end: 24%;   animation-delay: 2.1s; }
.hp-h4 { top: 34%; inset-inline-end: 30%;   animation-delay: 3.1s; }
.hp-heart .ico { fill: currentColor; }
@keyframes hp-heart {
    0%   { opacity: 0; transform: translateY(20px) scale(.6); }
    20%  { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-70px) scale(.9) rotate(12deg); }
}
.hp-note { position: absolute; top: 0; inset-inline-end: 0; font-size: .7rem; color: var(--text-dim); opacity: .7; }

/* ═════════ شريط المنصّات ═════════ */
.hp-platforms { border-block: 1px solid var(--border); background: var(--bg-elev); }
.hp-platforms-row { display: flex; align-items: center; gap: 24px; padding-block: 16px; }
.hp-platforms-l { font-size: .82rem; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.hp-platforms-list { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hp-platforms-list a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-dim); transition: color .15s; }
.hp-platforms-list a:hover { color: var(--text); }
.hp-platforms-list a:hover .ico { color: var(--primary); }

/* ═════════ الأقسام ═════════ */
.hp-sec { padding: 72px 0 0; content-visibility: auto; contain-intrinsic-size: auto 560px; }
.hp-head { margin-bottom: 26px; max-width: 640px; }
.hp-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 800; margin: 6px 0 8px; letter-spacing: -.02em; }
[dir="rtl"] .hp-head h2 { letter-spacing: 0; }
.hp-head p { margin: 0; color: var(--text-dim); }
.hp-eyebrow {
    font-weight: 800; font-size: .8rem; color: var(--accent); font-variant-numeric: tabular-nums;
    display: inline-flex; align-items: center; gap: 10px;
}
.hp-eyebrow::after { content: ''; width: 36px; height: 2px; background: currentColor; border-radius: 2px; }

/* الأرقام */
.hp-stats-sec { padding-top: 40px; }
.hp-stats {
    margin: 0; display: grid; grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden;
}
.hp-stats > div { padding: 22px 24px; display: grid; align-content: start; gap: 2px; }
.hp-stats > div + div { border-inline-start: 1px solid var(--border); }
.hp-stats dt { order: 2; font-size: .88rem; color: var(--text-dim); font-weight: 600; }
.hp-stats dd { order: 1; margin: 0; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hp-stats small { order: 3; font-size: .78rem; color: var(--text-dim); }
.hp-stats > div:nth-child(3) dd { color: var(--accent); }

/* الخدمات الشائعة */
.hp-svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hp-svc {
    position: relative; display: grid; gap: 6px; padding: 20px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.hp-svc:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.hp-svc-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); margin-bottom: 6px; }
.hp-svc:hover .hp-svc-ico { background: var(--primary); color: var(--primary-ct); }
.hp-svc strong { font-size: 1.02rem; }
.hp-svc-price { font-size: .88rem; color: var(--text-dim); }
.hp-svc-price b { color: var(--accent); font-weight: 800; }
.hp-svc-go { position: absolute; top: 20px; inset-inline-end: 18px; color: var(--text-dim); transition: transform .15s, color .15s; }
.hp-svc:hover .hp-svc-go { color: var(--primary); transform: translateX(3px); }
[dir="rtl"] .hp-svc:hover .hp-svc-go { transform: scaleX(-1) translateX(3px); }

/* الحاسبة */
.hp-calc-wrap, .hp-faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.hp-head-side { position: sticky; top: 90px; }
.hp-head-side .btn { margin-top: 18px; }
.hp-calc {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px;
    padding: 24px; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.hp-field { display: grid; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--text-dim); }
.hp-field select, .hp-field input {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
    font: inherit; font-weight: 600;
}
.hp-field select:focus, .hp-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.hp-calc-range { grid-column: 1 / -1; margin: -4px 0 0; font-size: .8rem; color: var(--text-dim); }
.hp-calc-out {
    grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2);
}
.hp-calc-out span { font-weight: 700; color: var(--text-dim); }
.hp-calc-out output { font-size: 2rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.hp-calc .btn { grid-column: 1 / -1; }
.hp-calc-note { grid-column: 1 / -1; margin: 0; font-size: .78rem; color: var(--text-dim); }

/* الخطوات: خطّ يصل بينها */
.hp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.hp-steps::before {
    content: ''; position: absolute; top: 22px; inset-inline: 22px; height: 2px;
    background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 14px);
}
.hp-steps li { position: relative; }
.hp-step-n {
    position: relative; z-index: 1;
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    background: var(--bg); border: 2px solid var(--primary); color: var(--primary); font-weight: 800;
}
.hp-step-ico { position: absolute; top: 10px; inset-inline-end: 0; color: var(--text-dim); }
.hp-steps h3 { margin: 16px 0 4px; font-size: 1.05rem; }
.hp-steps p { margin: 0; font-size: .92rem; color: var(--text-dim); }

/* Bento */
.hp-bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hp-b {
    padding: 22px; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border);
}
.hp-b-wide { grid-column: span 2; }
.hp-b-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.hp-b h3 { margin: 14px 0 6px; font-size: 1.08rem; }
.hp-b p { margin: 0; color: var(--text-dim); font-size: .93rem; }
.hp-b-refund { display: grid; grid-template-columns: 1fr minmax(0, 220px); column-gap: 20px; align-items: center; }
.hp-b-refund > :not(.hp-mini-order) { grid-column: 1; }
.hp-mini-order {
    grid-column: 2; grid-row: 1 / span 3;
    padding: 14px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border);
    display: grid; gap: 8px; font-size: .82rem;
}
.hp-mo-row { display: flex; justify-content: space-between; color: var(--text-dim); }
.hp-mo-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.hp-mo-bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.hp-mo-bar i { display: block; height: 100%; width: 82%; background: var(--primary); border-radius: inherit; }
.hp-mo-back { padding-top: 8px; border-top: 1px dashed var(--border); }
.hp-mo-back, .hp-mo-back b { color: var(--ok); font-weight: 700; }
.hp-b-dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.hp-b-dark p { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.hp-b-dark .hp-b-ico { background: color-mix(in srgb, var(--bg) 14%, transparent); color: var(--bg); }

/* طرق الدفع */
.hp-pay {
    display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px; align-items: center;
    padding: 28px; border-radius: var(--radius-lg); border: 1px dashed var(--border-strong);
}
.hp-pay h2 { margin: 0 0 6px; font-size: 1.4rem; }
.hp-pay p { margin: 0; color: var(--text-dim); }
.hp-pay-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hp-pay-list li {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
    font-weight: 700; font-size: .88rem;
}
.hp-pay-list .ico { color: var(--primary); }

/* الأسئلة */
.hp-faq .lp-faq-list { max-width: none; }

/* الدعوة الأخيرة */
.hp-final {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
    padding: 40px; border-radius: 24px;
    background: var(--primary); color: #fff; position: relative; overflow: hidden;
}
.hp-final::after {   /* دوائر زخرفية بنفس اللون — لا تدرّج */
    content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
    inset-inline-end: -90px; top: -150px; border: 40px solid rgba(255,255,255,.08);
}
.hp-final > * { position: relative; z-index: 1; }
.hp-final h2 { margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2.1rem); color: #fff; }
.hp-final p { margin: 0; opacity: .85; }
.hp-btn-inv { background: #fff; color: #0b1a33; border-color: #fff; }
.hp-btn-inv:hover { background: #eef3ff; transform: translateY(-1px); }
.hp-btn-line { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.hp-btn-line:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.hp > .hp-sec:last-child { padding-bottom: 56px; }

/* ═════════ الشاشات ═════════ */
@media (max-width: 980px) {
    .hp-hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .hp-visual { min-height: 420px; max-width: 460px; margin-inline: auto; width: 100%; }
    .hp-svc-grid { grid-template-columns: repeat(2, 1fr); }
    .hp-bento { grid-template-columns: repeat(2, 1fr); }
    .hp-calc-wrap, .hp-faq-wrap, .hp-pay { grid-template-columns: 1fr; gap: 20px; }
    .hp-head-side { position: static; }
    .hp-stats { grid-template-columns: repeat(2, 1fr); }
    .hp-stats > div:nth-child(3) { border-inline-start: 0; }
    .hp-stats > div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
    .hp-hero { padding: 32px 0 40px; }
    .hp-sec { padding-top: 52px; }
    .hp-actions .btn { flex: 1 1 auto; }
    .hp-visual { min-height: 380px; }
    .hp-chart { width: 140px; }
    .hp-svc-grid, .hp-bento { grid-template-columns: 1fr; }
    .hp-b-wide { grid-column: auto; }
    .hp-b-refund { grid-template-columns: 1fr; }
    .hp-mini-order { grid-column: 1; grid-row: auto; margin-top: 14px; }
    .hp-steps { grid-template-columns: 1fr 1fr; row-gap: 24px; }
    .hp-steps::before { display: none; }
    .hp-calc { grid-template-columns: 1fr; padding: 18px; }
    .hp-platforms-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .hp-final { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .hp-toast, .hp-heart { animation: none; opacity: 1; }
    .hp-heart { display: none; }
    .hp-count { animation: none; }
    .hp-line { animation: none; stroke-dashoffset: 0; }
}
