/* =========================================================
   باي — الصفحة الرئيسية
   ========================================================= */

/* ---------- عام للأقسام ---------- */
.sec { position: relative; padding: clamp(72px, 11vw, 140px) 0; }
.sec-alt { background: var(--bg-alt); }
/* قسم أزرق: نص أبيض وكروت بيضاء */
.sec-blue { background: var(--blue); }
.sec-blue .sec-head h2, .sec-blue .sec-head h2 .grad { color: #fff; }
.sec-blue .eyebrow { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }
.sec-blue .promise { border-color: transparent; box-shadow: 0 24px 48px -24px rgba(11, 27, 77, .55); }
.sec-blue :focus-visible { outline-color: #fff; }
.sec-head { max-width: 720px; margin: 0 auto clamp(36px, 6vw, 64px); text-align: center; }
.sec-head h2, .moment-copy h2 { font-size: clamp(1.8rem, 4.4vw, 3.1rem); line-height: 1.3; margin-top: 18px; }
.sec-sub { margin: 14px auto 0; color: var(--muted); }
.sec-head-side .sec-sub { margin-inline: 0; }

/* ---------- إطار الهاتف ---------- */
.phone {
  position: relative; width: 100%; aspect-ratio: 1080 / 2208;
  padding: 9px; border-radius: 13% / 6.2%;
  background: var(--navy);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16) inset, var(--shadow-lg);
}
.phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 11% / 5.3%; background: #F4F6FB; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-cam { position: absolute; z-index: 2; top: 2.1%; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #06102E; box-shadow: 0 0 0 2px rgba(255, 255, 255, .08); }

/* ===================== 1) Hero ===================== */
.hero { position: relative; padding: calc(var(--hdr-h) + clamp(40px, 8vw, 96px)) 0 clamp(56px, 8vw, 110px); overflow: clip; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .34; will-change: transform; }
.a1 { width: 620px; height: 520px; top: -180px; inset-inline-start: -160px; background: radial-gradient(closest-side, var(--blue), transparent); animation: drift-a 18s ease-in-out infinite alternate; }
.a2 { width: 520px; height: 460px; top: 120px; inset-inline-end: -180px; background: radial-gradient(closest-side, var(--sky), transparent); opacity: .3; animation: drift-b 22s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(-90px, 70px, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(110px, -60px, 0) scale(.9); } }
.dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--blue) 26%, transparent) 1px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(120% 80% at 50% 20%, #000 20%, transparent 75%);
}
.ping { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--blue); opacity: 0; animation: ping 3.2s var(--ease-out) infinite; }
.p1 { top: 64%; left: 20%; } .p2 { top: 55%; left: 41%; animation-delay: .7s; background: var(--amber); } .p3 { top: 58%; left: 75%; animation-delay: 1.4s; }
.p4 { top: 22%; left: 72%; animation-delay: 2.1s; background: var(--amber); } .p5 { top: 16%; left: 15%; animation-delay: 2.6s; }
@keyframes ping { 0% { transform: scale(.6); opacity: 0; } 25% { opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
.hero-fade { position: absolute; inset-inline: 0; bottom: 0; height: 180px; background: linear-gradient(to bottom, transparent, var(--bg)); }

.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(24px, 5vw, 72px); }
/* الحجم يتبع عرض الشاشة حتى يبقى «صار بينك وبين الزبون» سطراً واحداً و«لحظة» تحته */
.hero-title { font-size: clamp(1.9rem, 10vw, 3.2rem); line-height: 1.3; margin: 20px 0 10px; text-wrap: wrap; }
@media (min-width: 900px) { .hero-title { font-size: clamp(2.4rem, 4.3vw, 4.2rem); } }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .08em .2em; margin-block: -.08em -.2em; }
.hero-title .w > span { display: inline-block; }
.hero-tag { font-size: clamp(1.1rem, 2.1vw, 1.45rem); font-weight: 600; line-height: 1.6; color: var(--ink); text-wrap: balance; }
.hero-tag::before { content: ""; display: inline-block; width: 28px; height: 4px; margin-inline-end: 12px; border-radius: 4px; background: var(--amber); vertical-align: middle; }
.hero-sub { margin-top: 14px; max-inline-size: 46ch; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 16px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: transform .35s var(--ease-out), border-color .3s;
}
a.store:hover { transform: translateY(-3px); border-color: var(--blue-400); }
.store svg { width: 24px; height: 24px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.25; text-align: start; }
.store small { font-size: .72rem; color: var(--muted); }
.store b { font-size: .98rem; font-weight: 600; }
.store-light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); color: #fff; }
.store-light small { color: #fff; }

/* دخول العنوان كلمة كلمة + صعود العناصر (CSS خالص فلا يتأخّر على JS) */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .w > span { transform: translate3d(0, 118%, 0); animation: word-rise 1s var(--ease-out) forwards; }
  .hero-title .w:nth-of-type(1) > span { animation-delay: .08s; }
  .hero-title .w:nth-of-type(2) > span { animation-delay: .17s; }
  .hero-title .w:nth-of-type(3) > span { animation-delay: .26s; }
  .hero-title .w:nth-of-type(4) > span { animation-delay: .35s; }
  .hero-title .w:nth-of-type(5) > span { animation-delay: .5s; animation-duration: 1.2s; }
  @keyframes word-rise { to { transform: none; } }
  .rise { opacity: 0; transform: translate3d(0, 16px, 0); animation: rise .9s var(--ease-out) forwards; }
  .r0 { animation-delay: 0s; } .r1 { animation-delay: .55s; } .r2 { animation-delay: .68s; } .r3 { animation-delay: .8s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .phone-3d { animation: phone-in 1.3s var(--ease-out) .15s backwards; }
  @keyframes phone-in { from { transform: translate3d(0, 46px, 0) rotateX(13deg) rotateY(-24deg) scale(.94); } }
}

/* الهاتف ثلاثي الأبعاد */
.hero-visual { perspective: 1400px; display: grid; place-items: center; }
.phone-3d {
  --rx: 6deg; --ry: -14deg;
  position: relative; width: min(300px, 58vw);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease-out);
}
.phone-3d.is-live { transition: transform .12s linear; }
.chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 16px; max-width: 250px;
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  font-size: .86rem; line-height: 1.45; color: var(--ink);
}
.chip b { display: block; font-weight: 600; }
.chip small { display: block; color: var(--muted); font-size: .76rem; }
.chip-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; }
.chip-ic svg { width: 18px; height: 18px; }
.ic-blue { background: var(--blue); } .ic-green { background: var(--green-deep); } .ic-amber { background: var(--amber); color: var(--navy); }
.chip-1 { top: 7%; inset-inline-start: -46%; transform: translateZ(70px); animation: bob 6s ease-in-out infinite alternate; }
.chip-2 { bottom: 13%; inset-inline-end: -36%; transform: translateZ(100px); animation: bob 7s ease-in-out -2s infinite alternate; }
@keyframes bob { from { translate: 0 -7px; } to { translate: 0 7px; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-copy { animation: hero-away linear both; animation-timeline: view(); animation-range: exit 10% exit 80%; }
    .hero-visual { animation: hero-lift linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes hero-away { to { opacity: 0; transform: translate3d(0, -50px, 0); } }
    @keyframes hero-lift { to { transform: translate3d(0, -90px, 0); } }
  }
}

@media (max-width: 899px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-cta, .stores { justify-content: center; }
  .hero-visual { margin-top: 26px; }
  .phone-3d { --rx: 4deg; --ry: -8deg; width: min(250px, 58vw); }
  .chip { font-size: .78rem; padding: 8px 11px; max-width: 200px; }
  .chip-1 { top: 34%; inset-inline-start: -26%; } .chip-2 { bottom: 9%; inset-inline-end: -24%; }
  .hero-cta .btn-ghost { display: none; }
  .hero-title { margin: 16px auto 8px; }
  .hero-tag::before { display: none; }
  .stores { margin-top: 14px; }
  .hero-cta { margin-top: 22px; }
}
@media (max-width: 420px) {
  .chip small { display: none; }
  .chip-1 { inset-inline-start: -16%; } .chip-2 { inset-inline-end: -14%; }
}

/* ===================== 2) اللحظة ===================== */
.moment { --muted: #55637A; position: relative; background: var(--bg-alt); }
.moment .eyebrow { background: #fff; }
.moment-track { height: 340vh; }
.moment-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.moment-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(20px, 5vw, 72px); }
.beats { margin-top: 30px; display: grid; gap: 6px; }
.beat {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 16px 18px; border-radius: var(--r);
  border: 1px solid transparent; opacity: .38; transform: translate3d(0, 0, 0) scale(.985);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out), background-color .4s, border-color .4s;
}
.beat.is-on { opacity: 1; transform: none; background: var(--card); border-color: var(--line); box-shadow: var(--shadow); }
.beat-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; font-weight: 700; color: var(--accent-text); background: #fff; }
.beat.is-on .beat-n { color: #fff; background: var(--blue); }
.beat h3 { font-size: 1.15rem; }
.beat p { color: var(--muted); font-size: var(--desc); line-height: 1.8; margin-top: 2px; }

.scene { justify-self: center; width: min(100%, 500px, 78svh); }
.scene svg { width: 100%; height: auto; overflow: visible; }
.route-base { stroke: color-mix(in srgb, var(--blue) 30%, transparent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 12; }
.route-live { stroke: url(#routeGrad); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.node-halo { fill: color-mix(in srgb, var(--blue) 14%, transparent); opacity: 0; transform: scale(.6); transform-box: fill-box; transform-origin: center; transition: opacity .5s, transform .7s var(--ease-out); }
.node-disc { fill: var(--card); stroke: var(--line); stroke-width: 2; transition: fill .4s, stroke .4s; }
.node-ic { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; transition: stroke .4s; }
.node text { fill: var(--muted); font-family: var(--font); font-size: 20px; font-weight: 600; transition: fill .4s; }
.node.is-on .node-halo { opacity: 1; transform: none; }
.node.is-on .node-disc { fill: var(--blue); stroke: var(--blue); }
.node[data-node="0"].is-on .node-disc { fill: var(--amber); stroke: var(--amber); }
.node[data-node="2"].is-on .node-disc { fill: var(--green-deep); stroke: var(--green-deep); }
.node.is-on .node-ic { stroke: #fff; }
.node[data-node="0"].is-on .node-ic { stroke: var(--navy); }
.node[data-node="0"].is-on .node-halo { fill: color-mix(in srgb, var(--amber) 28%, transparent); }
.node.is-on text { fill: var(--ink); }
.parcel rect { fill: #fff; stroke: var(--blue); stroke-width: 2.5; }
.parcel path { stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; }
.parcel-glow { fill: var(--sky); transform-box: fill-box; transform-origin: center; animation: halo 2s var(--ease-out) infinite; }
@keyframes halo { from { transform: scale(.7); opacity: .5; } to { transform: scale(1.7); opacity: 0; } }

@media (max-width: 899px) {
  .moment-track { height: 300vh; }
  .moment-grid { grid-template-columns: 1fr; gap: 6px; }
  .moment-copy h2 { font-size: 1.55rem; margin-top: 10px; }
  .moment-copy .eyebrow { display: none; }
  .scene { order: -1; width: min(62vw, 32svh, 270px); }
  .beats { margin-top: 14px; gap: 4px; }
  .beat { padding: 10px 12px; gap: 12px; }
  .beat-n { width: 32px; height: 32px; border-radius: 10px; font-size: .9rem; }
  .beat h3 { font-size: 1rem; }
  .beat p { line-height: 1.65; }
  .beat:not(.is-on) p { display: none; }
}
/* نسخة هادئة / بلا JS: قائمة ثابتة بلا تثبيت */
.calm .moment-track, html:not(.js) .moment-track { height: auto; }
.calm .moment-stage, html:not(.js) .moment-stage { position: static; height: auto; padding: 72px 0; }
.calm .beat, html:not(.js) .beat { opacity: 1; transform: none; }
.calm .beat p, html:not(.js) .beat p { display: block; }
.calm .route-live, html:not(.js) .route-live { stroke-dashoffset: 0; }
.calm .parcel, html:not(.js) .parcel { display: none; }

/* ===================== 3) Bento ===================== */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  --sx: 50%; --sy: 0%; --tx: 0deg; --ty: 0deg;
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden;
  transform: perspective(1000px) rotateX(var(--tx)) rotateY(var(--ty));
  transition: transform .5s var(--ease-out), border-color .3s;
}
.js .card[data-reveal] { transform: perspective(1000px) translate3d(0, 26px, 0); }
.js .card[data-reveal].in { transform: perspective(1000px) rotateX(var(--tx)) rotateY(var(--ty)); }
/* حدّ مضيء يتبع الماوس + وهج داخلي */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: radial-gradient(260px circle at var(--sx) var(--sy), var(--blue), color-mix(in srgb, var(--blue) 45%, transparent) 40%, transparent 70%);
  -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);
  opacity: 0; transition: opacity .4s;
}
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--sx) var(--sy), var(--glow), transparent 65%);
  opacity: 0; transition: opacity .4s;
}
@media (hover: hover) { .card:hover::before, .card:hover::after { opacity: 1; } }
.card-art { position: relative; flex: 1; min-height: 190px; display: grid; place-items: center; padding: 22px 22px 6px; overflow: hidden; }
.card-body { padding: 14px 24px 26px; }
.card-body h3 { font-size: 1.25rem; }
.card-body p { margin-top: 6px; color: var(--muted); }
.card-steps { grid-column: span 4; }
.card-earn { grid-column: span 2; }
.card-notif, .card-confirm { grid-column: span 3; }
.card-full, .card-pay { grid-column: span 3; }
@media (max-width: 899px) { .bento { grid-template-columns: 1fr 1fr; } .card { grid-column: span 2 !important; } .card-full, .card-pay { grid-column: span 1 !important; } }
@media (max-width: 560px) { .card-full, .card-pay { grid-column: span 2 !important; } }

/* الحركات داخل الكروت تعمل فقط والكرت ظاهر */
.card:not(.run) *, .card:not(.run) *::before, .card:not(.run) *::after { animation-play-state: paused !important; }

/* خريطة مصغّرة */

/* أرباح */
.earn { width: 100%; padding: 20px; border-radius: 22px; color: #fff; background: var(--blue); box-shadow: 0 18px 36px -18px rgba(37, 99, 235, .8); }
.earn-label { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: #fff; }
.earn-label em { font-style: normal; font-size: .7rem; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .55); }
.earn-num { display: block; margin-top: 4px; font-size: 1.15rem; font-weight: 600; }
.earn-num b { font-size: 2.1rem; font-weight: 700; }
.earn-bar { display: block; height: 5px; margin: 10px 0 12px; border-radius: 5px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.earn-bar i { display: block; height: 100%; border-radius: inherit; background: var(--amber); transform-origin: right center; animation: fill 4.5s var(--ease-out) infinite; }
@keyframes fill { 0% { transform: scaleX(.06); } 70%, 100% { transform: scaleX(1); } }
.earn-rows li { display: flex; justify-content: space-between; font-size: .84rem; color: #fff; padding-top: 4px; }
.earn-rows b { color: #fff; font-weight: 600; }

/* إشعارات */
.toasts { position: relative; width: 100%; max-width: 360px; height: 150px; }
.toast { position: absolute; inset-inline: 0; top: 34px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .9rem; line-height: 1.5; color: var(--ink); opacity: 0; animation: toast 9s var(--ease-out) infinite; }
.toast small { display: block; color: var(--muted); font-size: .78rem; }
.toast b { font-weight: 600; }
.t2 { animation-delay: 3s; } .t3 { animation-delay: 6s; }
@keyframes toast {
  0% { opacity: 0; transform: translate3d(0, 34px, 0) scale(.94); }
  6%, 30% { opacity: 1; transform: none; }
  36%, 60% { opacity: .55; transform: translate3d(0, -22px, 0) scale(.94); }
  66%, 100% { opacity: 0; transform: translate3d(0, -44px, 0) scale(.88); }
}

/* تأكيد مزدوج */
.handover { display: flex; align-items: flex-start; justify-content: center; width: 100%; max-width: 330px; }
.ho { position: relative; display: grid; justify-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.ho svg { width: 62px; height: 62px; padding: 17px; border-radius: 50%; color: #fff; background: var(--green-deep); animation: pop 5s var(--ease-out) infinite; }
.ho-b svg { animation-delay: 1.4s; background: var(--amber); color: var(--navy); }
.ho small { font-size: .9rem; }
.ho-line { flex: 1; height: 5px; margin-top: 29px; border-radius: 5px; background: var(--line); overflow: hidden; }
.ho-line i { display: block; height: 100%; background: var(--blue); transform-origin: right center; animation: link 5s var(--ease-out) infinite; }
@keyframes pop { 0%, 6% { transform: scale(.55); opacity: .25; } 16% { transform: scale(1.12); opacity: 1; } 22%, 100% { transform: none; opacity: 1; } }
@keyframes link { 0%, 14% { transform: scaleX(0); } 34%, 100% { transform: scaleX(1); } }

/* 100% + وسائل الدفع */
.big-num { font-size: clamp(3.6rem, 9vw, 5.6rem); font-weight: 700; line-height: 1; color: var(--blue); }
.paychips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.paychips li { padding: 12px 22px; border-radius: 14px; font-weight: 600; }
.pay-now { color: #fff; background: var(--blue); box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .7); animation: bob 5s ease-in-out infinite alternate; }
.pay-soon { color: var(--muted); border: 1.5px dashed color-mix(in srgb, var(--blue) 35%, transparent); font-size: .9375rem; }

/* ===================== 4) التبويب ===================== */
.tabs { max-width: 1000px; margin-inline: auto; }
.tablist { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 380px); margin: 0 auto 28px; padding: 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.tab { position: relative; z-index: 1; min-height: 48px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: color .3s; }
.tab[aria-selected="true"] { color: #fff; }
.tab-ink { position: absolute; top: 6px; bottom: 6px; inset-inline-start: 6px; width: calc(50% - 6px); border-radius: 999px; background: var(--blue); box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .7); transition: transform .5s var(--ease-out); }
.tablist[data-active="driver"] .tab-ink, .tablist:has(#tab-driver[aria-selected="true"]) .tab-ink { transform: translateX(-100%); }
.panel { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(24px, 5vw, 64px); padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); view-transition-name: join-panel; }
.panel[hidden] { display: none; }
.panel-copy h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
.ticks { margin: 20px 0 28px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-inline-start: 34px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .38em; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--green) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat; }
.panel-art { display: grid; place-items: center; }
.phone-sm { width: min(230px, 60vw); }
::view-transition-old(join-panel) { animation: vt-out .2s var(--ease) both; }
::view-transition-new(join-panel) { animation: vt-in .45s var(--ease-out) both; }
.panel.swap-in { animation: vt-in .45s var(--ease-out) both; }
@media (max-width: 760px) { .panel { grid-template-columns: 1fr; } .panel-art { order: -1; } .panel-copy .btn { width: 100%; } }

/* ===================== 5) كيف يعمل ===================== */
.how { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 6vw, 96px); align-items: start; }
.how-phone { position: sticky; top: calc(50vh - 290px); width: 270px; justify-self: center; }
.shot { position: absolute; inset: 0; opacity: 0; transform: scale(1.04); transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); }
.shot.is-on { opacity: 1; transform: none; }
.steps { display: grid; }
.step { min-height: 68vh; display: flex; flex-direction: column; justify-content: center; opacity: .35; transition: opacity .5s var(--ease-out); }
.step.is-on { opacity: 1; }
.step-n { font-size: 1rem; font-weight: 700; color: var(--accent-text); direction: ltr; text-align: end; }
.step h3 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); margin: 6px 0 10px; }
.step p { color: var(--muted); max-inline-size: 44ch; }
.step-shot { display: none; }
@media (max-width: 899px) {
  .how { grid-template-columns: 1fr; }
  .how-phone { display: none; }
  .step { min-height: 0; opacity: 1; padding: 22px 0; border-top: 1px solid var(--line); }
  .step-shot { display: block; width: min(62vw, 250px); margin: 20px auto 0; border-radius: 26px; overflow: hidden; border: 8px solid var(--navy); box-shadow: var(--shadow-lg); }
}
.calm .step { opacity: 1; }

/* ===================== 6) الوعود ===================== */
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.promise { padding: 26px 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.promise-n { display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.promise-n b { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.1; color: var(--blue); }
.promise-n span { font-weight: 600; color: var(--muted); }
.promise h3 { font-size: 1.08rem; margin-top: 8px; }
.promise > p:last-child { color: var(--muted); margin-top: 4px; }
@media (max-width: 899px) { .promises { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .promises { gap: 10px; } .promise { padding: 18px 14px; } }

/* ===================== 7) الأسئلة ===================== */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 6vw, 80px); align-items: start; }
.sec-head-side { text-align: start; margin: 0; position: sticky; top: 110px; }
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r); background: var(--card); border: 1px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.faq details[open] { border-color: color-mix(in srgb, var(--blue) 45%, transparent); box-shadow: var(--shadow); }
.faq summary { position: relative; display: block; cursor: pointer; padding: 18px 22px; padding-inline-end: 60px; font-weight: 600; font-size: 1.08rem; color: var(--ink); list-style: none; border-radius: var(--r); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; top: 50%; inset-inline-end: 24px; width: 16px; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--accent-text); transition: transform .4s var(--ease-out); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq-a { padding: 0 22px 20px; color: var(--muted); font-size: var(--desc); line-height: 1.8; }
.faq-a p { max-inline-size: 60ch; }
/* :has — السؤال المفتوح يتقدّم والبقية تهدأ */
.faq:has(details[open]) details:not([open]) summary { color: var(--ink-2); }
.faq details:has(summary:hover) { border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
/* فتح ناعم حيث يُدعم؛ وإلا فتح فوري */
@supports (interpolate-size: allow-keywords) {
  .faq details { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size .45s var(--ease-out), opacity .35s, content-visibility .45s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; opacity: 1; }
}
@media (max-width: 899px) { .faq-grid { grid-template-columns: 1fr; } .sec-head-side { position: static; text-align: center; margin-bottom: 8px; } }

/* ===================== 8) الدعوة الأخيرة ===================== */
.final { padding: clamp(40px, 7vw, 90px) 0 clamp(72px, 10vw, 120px); }
.final-card {
  --sx: 50%; --sy: 0%;
  position: relative; isolation: isolate; overflow: hidden; text-align: center; color: #fff;
  padding: clamp(40px, 7vw, 84px) clamp(20px, 5vw, 64px); border-radius: clamp(28px, 4vw, 44px);
  background: var(--blue);
  box-shadow: 0 40px 80px -36px rgba(37, 99, 235, .75);
}
.final-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(520px circle at var(--sx) var(--sy), rgba(255, 255, 255, .22), transparent 60%); }
.final-logo { height: 84px; width: auto; margin: 0 auto 22px; }
.final-card h2 { color: #fff; font-size: clamp(1.9rem, 5.6vw, 3.7rem); line-height: 1.3; }
.final-card > p { max-inline-size: 46ch; margin: 14px auto 0; color: #fff; }
.final-card :focus-visible { outline-color: #fff; }
.final-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ---------- أجهزة ضعيفة / نسخة هادئة ---------- */
.lite .aurora, .lite .ping, .lite .chip, .lite .pay-now { animation: none; }
.lite .aurora { filter: blur(50px); opacity: .25; }
.lite .chip { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg-2); }
@media (prefers-reduced-motion: reduce) {
  .toast { position: static; opacity: 1; margin-bottom: 8px; }
  .toasts { height: auto; }
  .t2, .t3 { display: none; }
  .earn-bar i { transform: none; }
}
/* الموبايل: خلفية ثابتة (الضبابية المتحرّكة مكلفة على المعالجات الضعيفة) */
@media (max-width: 899px) { .aurora { animation: none; filter: blur(48px); } .p4, .p5 { display: none; } }
/* الخلفية الحيّة تتوقّف عندما يغادر الـ Hero الشاشة */
.hero.is-away .aurora, .hero.is-away .ping, .hero.is-away .chip { animation-play-state: paused; }
.moment:not(.is-live) .parcel-glow { animation-play-state: paused; }
/* تأجيل رسم ما تحت الطيّ؛ يُلغى (cv-off) قبل القفز إلى رابط داخلي ليكون الموضع دقيقاً */
#features, #join, #how, #promises, #faq, .final, .ftr { content-visibility: auto; contain-intrinsic-size: auto 1100px; }
.cv-off #features, .cv-off #join, .cv-off #how, .cv-off #promises, .cv-off #faq, .cv-off .final, .cv-off .ftr { content-visibility: visible; }
@media (min-width: 600px) and (max-width: 899px) {
  .scene { width: min(48vw, 40svh, 380px); }
  .moment-copy h2 { font-size: 2rem; }
}
@media (max-width: 899px) { .aurora { opacity: .22; } }


/* ===================== شاشة التحميل الأولى ===================== */
.intro { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: #fff; pointer-events: none; animation: intro-out .3s ease .95s forwards; }
.intro .bmark { height: 92px; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }

/* ===================== تبديل لقطات الهاتف ===================== */
/* اللقطة الداخلة تبدأ أصغر من الأولى لا أكبر: حتى لا يحسبها المتصفّح «أكبر عنصر» فيتأخّر LCP */
.slides .slide { position: absolute; inset: 0; opacity: 0; transform: translate3d(-6%, 0, 0) scale(.97); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out); }
.slides .slide.is-on { opacity: 1; transform: none; }
.slides .slide.is-out { transform: translate3d(6%, 0, 0) scale(.98); }
.slide-tabs { display: flex; justify-content: center; gap: 6px; margin-top: 22px; padding: 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.slide-tab { position: relative; min-height: 40px; padding: 6px 14px; border-radius: 999px; font-size: .875rem; font-weight: 600; color: var(--muted); transition: color .3s, background-color .3s, transform .3s var(--ease-out); }
.slide-tab:hover { color: var(--ink); }
.slide-tab:active { transform: scale(.95); }
.slide-tab.is-on { color: #fff; background: var(--blue); }
.hero-visual { grid-auto-flow: row; }
@media (max-width: 420px) { .slide-tab { padding: 6px 10px; font-size: .8125rem; } }

/* ===================== الشعار الكبير في «اللحظة» ===================== */
.scene { position: relative; }
.scene svg { position: relative; z-index: 1; }
.bmark-scroll { position: absolute; z-index: 0; top: 50%; left: 50%; height: 78%; margin: 0; transform: translate(-50%, -50%); opacity: .13; }
.bmark-scroll .b-top { transform: translate3d(calc((1 - var(--p, 1)) * 62%), 0, 0); }
.bmark-scroll .b-bot { transform: translate3d(calc((1 - var(--p, 1)) * -62%), 0, 0); }
/* CSS فقط حيث يُدعم: الجزآن يقتربان على خط زمن تمرير القسم؛ وإلا يكتب JS المتغيّر --p */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .moment-track { view-timeline: --moment block; }
    .js .bmark-scroll .b-top { transform: none; animation: b-near-top linear both; animation-timeline: --moment; animation-range: contain 4% contain 92%; }
    .js .bmark-scroll .b-bot { transform: none; animation: b-near-bot linear both; animation-timeline: --moment; animation-range: contain 4% contain 92%; }
    .js .bmark-scroll { animation: b-near-fade linear both; animation-timeline: --moment; animation-range: contain 4% contain 92%; }
    @keyframes b-near-top { from { transform: translate3d(62%, 0, 0); } to { transform: none; } }
    @keyframes b-near-bot { from { transform: translate3d(-62%, 0, 0); } to { transform: none; } }
    @keyframes b-near-fade { from { opacity: .07; } to { opacity: .2; } }
  }
}
.calm .bmark-scroll .b-top, .calm .bmark-scroll .b-bot { transform: none; }

/* ===================== كرت خطوات الطلب ===================== */
.card-steps .card-art { container-type: inline-size; padding-block: 34px 14px; background: linear-gradient(180deg, var(--bg-alt), #fff); }
.flow { display: flex; align-items: flex-start; justify-content: center; width: 100%; max-width: 560px; }
.flow-step { display: grid; justify-items: center; gap: 10px; width: 132px; flex: none; text-align: center; }
.flow-step span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: var(--blue); box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .8); animation: flow-pop 7s var(--ease-out) infinite; }
.flow-step svg { width: 24px; height: 24px; }
.flow-step b { font-size: .9375rem; font-weight: 600; color: var(--ink); }
.flow-line { flex: 1; height: 5px; margin-top: 25px; margin-inline: -30px; border-radius: 5px; background: color-mix(in srgb, var(--blue) 16%, transparent); overflow: hidden; }
.flow-line i { display: block; height: 100%; border-radius: inherit; background: var(--blue); transform-origin: right center; animation: flow-fill 7s var(--ease-out) infinite; }
.f2 span { animation-delay: 1.6s; } .f3 span { animation-delay: 3.2s; background: var(--green-deep); box-shadow: 0 10px 22px -10px rgba(12, 122, 62, .8); }
.l1 i { animation-delay: .5s; } .l2 i { animation-delay: 2.1s; }
@keyframes flow-pop { 0% { transform: scale(.5); opacity: .25; } 8% { transform: scale(1.12); opacity: 1; } 13%, 100% { transform: none; opacity: 1; } }
@keyframes flow-fill { 0% { transform: scaleX(0); } 16%, 100% { transform: scaleX(1); } }
/* container query: الكرت الضيّق يرتّب الخطوات عمودياً */
@container (max-width: 430px) {
  .flow { flex-direction: column; align-items: stretch; gap: 0; max-width: 260px; }
  .flow-step { grid-template-columns: auto 1fr; justify-items: start; align-items: center; width: auto; text-align: start; gap: 14px; }
  .flow-step span { width: 44px; height: 44px; }
  .flow-line { flex: none; width: 5px; height: 26px; margin: 4px 19.5px; }
  .flow-line i { transform-origin: top center; animation-name: flow-fill-y; }
  @keyframes flow-fill-y { 0% { transform: scaleY(0); } 16%, 100% { transform: scaleY(1); } }
}
@media (prefers-reduced-motion: reduce) { .flow-step span { transform: none; opacity: 1; } .flow-line i { transform: none; } }

/* انتقال ناعم بين الأقسام: العنوان يصعد مع دخول القسم (scroll-driven حيث يُدعم) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
    .sec-head h2 { animation: head-drift linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    @keyframes head-drift { from { transform: translate3d(0, 22px, 0); } to { transform: none; } }
  }
}
