/* =========================================================
   CodeChaps — Food Delivery App Development page
   Page-specific styles (live tracking phone + dispatch card).
   Shared styles live in codechaps-motion.css
   ========================================================= */
.hero-visual{min-height:540px;align-items:center}
.fd-wrap{position:relative;width:520px;height:520px}
.js .fd-wrap{opacity:0;transform:translateY(40px) scale(.96)}
.js.loaded .fd-wrap{opacity:1;transform:none;transition:opacity 1s var(--ease) .35s,transform 1.2s var(--ease) .35s}
.fd-wrap .float{z-index:4}

/* ---- tracking phone ---- */
.trk-phone{position:absolute;left:20px;top:0;width:250px;height:510px;border-radius:40px;background:#05070B;padding:10px;box-shadow:0 50px 90px rgba(0,0,0,.55),inset 0 0 0 1px #263244;animation:floatY 8s ease-in-out infinite;z-index:2}
.trk-phone::before{content:"";position:absolute;top:18px;left:50%;width:70px;height:18px;margin-left:-35px;border-radius:12px;background:#05070B;z-index:3}
.trk-screen{position:relative;width:100%;height:100%;border-radius:31px;overflow:hidden;background:#F1F5F9;color:#0F172A}
.map{position:absolute;left:0;top:0;width:230px;height:300px;background:#E8EEF5}
.map svg{position:absolute;inset:0;width:100%;height:100%}
.map .blk{fill:#DCE5EF}
.map .park{fill:#C7EBD3}
.map .water{fill:#BFDBFE}
.map .road{fill:none;stroke:#fff;stroke-width:9;stroke-linecap:round}
.map .road.sm{stroke-width:5}
.map .route-bg{fill:none;stroke:#93C5FD;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2 6}
.map .route{fill:none;stroke:var(--blue);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1}
.js.loaded .map .route{animation:routeDraw 9s linear infinite}
@keyframes routeDraw{0%{stroke-dashoffset:1}85%,100%{stroke-dashoffset:0}}
.pin{position:absolute;width:30px;height:30px;margin:-30px 0 0 -15px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);display:flex;align-items:center;justify-content:center;box-shadow:0 6px 14px rgba(15,23,42,.25)}
.pin>span{transform:rotate(45deg);display:flex;color:#fff}
.pin .ico{width:14px;height:14px}
.pin--shop{left:44px;top:100px;background:#F59E0B}
.pin--home{left:186px;top:236px;background:#16A34A}
.pin--home::after{content:"";position:absolute;inset:-8px;border-radius:50%;border:2px solid rgba(22,163,74,.45);animation:homePulse 2s ease-out infinite}
@keyframes homePulse{from{transform:scale(.6);opacity:1}to{transform:scale(1.5);opacity:0}}
.rider{position:absolute;left:0;top:0;width:28px;height:28px;margin:-14px 0 0 -14px;border-radius:50%;background:var(--blue);border:3px solid #fff;box-shadow:0 4px 12px rgba(37,99,235,.5);display:flex;align-items:center;justify-content:center;color:#fff;offset-path:path("M44 100 L44 128 L120 128 L120 196 L186 196 L186 236");offset-rotate:0deg;offset-distance:0%}
.rider .ico{width:14px;height:14px}
.js.loaded .rider{animation:ride 9s linear infinite}
@keyframes ride{0%{offset-distance:0%}85%,100%{offset-distance:100%}}
.map-top{position:absolute;left:12px;right:12px;top:40px;display:flex;justify-content:space-between;z-index:1}
.map-top span{background:#fff;border-radius:999px;padding:4px 9px;font-size:9.5px;font-weight:700;box-shadow:0 4px 10px rgba(15,23,42,.12)}
.map-top .eta{background:#0F172A;color:#fff}
.sheet{position:absolute;left:0;right:0;bottom:0;height:218px;background:#fff;border-radius:22px 22px 0 0;box-shadow:0 -10px 24px rgba(15,23,42,.1);padding:10px 14px 14px;display:flex;flex-direction:column;gap:9px}
.sheet::before{content:"";align-self:center;width:36px;height:4px;border-radius:4px;background:#E2E8F0}
.sheet-head{display:flex;justify-content:space-between;align-items:flex-end}
.sheet-head small{display:block;font-size:9.5px;color:#64748B}
.sheet-head b{font-family:var(--display);font-weight:900;font-size:20px;line-height:1.05}
.sheet-head .order{font-size:9.5px;font-weight:700;color:#15803D;background:#DCFCE7;padding:3px 8px;border-radius:999px}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;position:relative}
.steps span{font-size:8.5px;color:#94A3B8;text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px}
.steps i{position:relative;width:100%;height:4px;border-radius:4px;background:#E2E8F0;overflow:hidden}
.steps i::after{content:"";position:absolute;inset:0;border-radius:4px;background:var(--blue);transform:scaleX(0);transform-origin:left}
.steps span.done{color:#0F172A;font-weight:700}
.js.loaded .steps span.done i::after{animation:grow .7s var(--ease) forwards}
.js.loaded .steps span:nth-child(1) i::after{animation-delay:1.1s}
.js.loaded .steps span:nth-child(2) i::after{animation-delay:1.6s}
.steps span.now{color:var(--blue);font-weight:700}
.steps span.now i::after{transform:scaleX(1);animation:loadbar 1.6s ease-in-out infinite}
@keyframes loadbar{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}
@keyframes grow{to{transform:scaleX(1)}}
.rider-card{display:flex;align-items:center;gap:9px;background:#F8FAFC;border:1px solid #E2E8F0;border-radius:14px;padding:8px 10px}
.rider-card .av{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#F59E0B,#EF4444);color:#fff;font-weight:700;font-size:12px;display:flex;align-items:center;justify-content:center;flex:none}
.rider-card b{display:block;font-size:11px;white-space:nowrap}
.rider-card small{font-size:9px;color:#64748B}
.rider-card .acts{margin-left:auto;display:flex;gap:6px}
.rider-card .acts span{width:26px;height:26px;border-radius:50%;background:#EFF6FF;color:var(--blue);display:flex;align-items:center;justify-content:center}
.rider-card .acts .ico{width:13px;height:13px}
.items{font-size:9.5px;color:#475569;display:flex;justify-content:space-between}
.items b{color:#0F172A}

/* ---- dispatch card ---- */
.dispatch{position:absolute;right:-10px;top:84px;width:236px;border-radius:22px;background:linear-gradient(160deg,#111A2B,#0B111C);border:1px solid #263244;padding:16px;color:#fff;box-shadow:0 30px 60px rgba(0,0,0,.5);animation:floatY 7s ease-in-out infinite reverse;z-index:1}
.dsp-top{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#94A3B8}
.dsp-top .live{display:flex;align-items:center;gap:5px;color:#86EFAC;font-weight:700;letter-spacing:.08em}
.dsp-top .live i{width:7px;height:7px;border-radius:50%;background:#22C55E;animation:blink 1.4s ease-in-out infinite}
.dsp-kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.dsp-kpis div{background:rgba(255,255,255,.05);border:1px solid #1F2A3D;border-radius:12px;padding:8px 10px}
.dsp-kpis small{display:block;font-size:9px;color:#94A3B8}
.dsp-kpis b{font-size:17px;font-variant-numeric:tabular-nums}
.dsp-bars{display:flex;align-items:flex-end;gap:4px;height:46px;padding:0 2px}
.dsp-bars i{flex:1;border-radius:3px 3px 0 0;background:linear-gradient(180deg,#60A5FA,#2563EB);height:var(--h);transform-origin:bottom;transform:scaleY(.1)}
.dsp-bars i.pk{background:linear-gradient(180deg,#FBBF24,#F59E0B)}
.js.loaded .dsp-bars i{animation:barUp 1s var(--ease) forwards;animation-delay:calc(1.2s + var(--i)*.06s)}
@keyframes barUp{to{transform:scaleY(1)}}
.dsp-axis{display:flex;justify-content:space-between;font-size:8.5px;color:#64748B;margin-top:4px}
.dsp-list{margin-top:10px;display:flex;flex-direction:column;gap:6px}
.dsp-row{display:flex;align-items:center;gap:8px;font-size:10px}
.dsp-row .dot{width:22px;height:22px;border-radius:50%;background:var(--c);display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;color:#0B111C;flex:none}
.dsp-row b{display:block;font-size:10.5px}
.dsp-row small{font-size:9px;color:#94A3B8}
.dsp-row .st{margin-left:auto;font-size:8.5px;font-weight:700;padding:2px 7px;border-radius:999px;background:var(--bg);color:var(--fg)}

.float--1{right:-60px;top:-12px}
.float--2{right:-40px;top:auto;bottom:20px}
.float--3{left:-60px;top:auto;bottom:-34px}
@media (max-width:1240px) and (min-width:961px){.fd-wrap{transform-origin:left center;scale:.9}.float--1{right:-20px}.float--2{right:-10px}.float--3{left:-40px}}
@media (max-width:960px){.hero-visual{min-height:0}.fd-wrap{width:100%;max-width:520px;height:auto;display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:20px}.trk-phone,.dispatch{position:relative;left:auto;right:auto;top:auto}.dispatch{margin-top:60px}}
@media (max-width:560px){.dispatch{display:none}}
@media (prefers-reduced-motion:reduce){.rider{offset-distance:55%}.map .route{stroke-dashoffset:.45}.dsp-bars i{transform:none}}
