/* =========================================================
   CodeChaps — Construction Software Development page
   Page-specific styles (tablet dashboard + field phone hero).
   Shared styles live in codechaps-motion.css
   ========================================================= */
.hero-visual{min-height:520px;align-items:center}
.site-wrap{position:relative;width:540px;height:470px}
.js .site-wrap{opacity:0;transform:translateY(40px) scale(.96)}
.js.loaded .site-wrap{opacity:1;transform:none;transition:opacity 1s var(--ease) .35s,transform 1.2s var(--ease) .35s}

/* ---- tablet ---- */
.tablet{position:absolute;left:0;top:30px;width:500px;height:350px;border-radius:28px;background:#05070B;padding:12px;box-shadow:0 50px 90px rgba(0,0,0,.55),inset 0 0 0 1px #263244;animation:floatY 8s ease-in-out infinite}
.tab-screen{width:100%;height:100%;border-radius:18px;background:#F7F8FB;color:#0F172A;overflow:hidden;display:grid;grid-template-columns:60px minmax(0,1fr)}
.tab-side{background:#0F172A;display:flex;flex-direction:column;align-items:center;gap:14px;padding:14px 0;color:#64748B}
.tab-side .ico{width:18px;height:18px}
.tab-side .on{color:#fff;background:var(--blue);border-radius:10px;padding:7px;width:32px;height:32px}
.tab-logo{width:28px;height:28px;border-radius:8px;background:var(--amber);display:flex;align-items:center;justify-content:center;color:#0B111C;margin-bottom:6px}
.tab-logo .ico{width:16px;height:16px}
.tab-main{padding:14px 16px;display:flex;flex-direction:column;gap:10px;min-width:0}
.tab-head{display:flex;justify-content:space-between;align-items:center}
.tab-head b{font-size:14px}
.tab-head small{display:block;font-size:10.5px;color:#64748B}
.tab-pill{font-size:10.5px;font-weight:700;color:#15803D;background:#DCFCE7;padding:4px 9px;border-radius:999px}
.kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.kpi{background:#fff;border:1px solid #E2E8F0;border-radius:12px;padding:8px 10px}
.kpi small{display:block;font-size:9.5px;color:#64748B}
.kpi b{font-size:16px;font-variant-numeric:tabular-nums}
.kpi .meter{height:4px;border-radius:4px;background:#E2E8F0;margin-top:6px;overflow:hidden}
.kpi .meter i{display:block;height:100%;border-radius:4px;background:var(--c,var(--blue));width:var(--w);transform:scaleX(0);transform-origin:left}
.js.loaded .kpi .meter i{animation:grow 1.4s var(--ease) forwards;animation-delay:calc(1s + var(--i,0)*.15s)}
@keyframes grow{to{transform:scaleX(1)}}
.gantt{background:#fff;border:1px solid #E2E8F0;border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:7px;position:relative;flex:1}
.gantt-head{display:grid;grid-template-columns:78px repeat(6,minmax(0,1fr));font-size:9px;color:#94A3B8}
.g-row{display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;font-size:10px;color:#334155}
.g-track{position:relative;height:12px}
.g-bar{position:absolute;top:0;height:12px;border-radius:4px;left:var(--l);width:var(--w);background:var(--c,var(--blue));transform:scaleX(0);transform-origin:left}
.js.loaded .g-bar{animation:grow 1s var(--ease) forwards;animation-delay:calc(1.2s + var(--i,0)*.14s)}
.g-bar.risk{background:repeating-linear-gradient(45deg,#F59E0B 0 6px,#FBBF24 6px 12px)}
.today{position:absolute;top:24px;bottom:8px;left:calc(88px + 46%);width:2px;background:#EF4444;opacity:0}
.today::before{content:"Today";position:absolute;top:-14px;left:-14px;font-size:8.5px;font-weight:700;color:#EF4444}
.js.loaded .today{opacity:1;transition:opacity .6s 2.4s}

/* ---- field phone ---- */
.field-phone{position:absolute;right:-30px;bottom:0;width:170px;height:330px;border-radius:30px;background:#05070B;padding:8px;box-shadow:0 30px 60px rgba(0,0,0,.55),inset 0 0 0 1px #263244;animation:floatY 7s ease-in-out infinite reverse}
.field-screen{width:100%;height:100%;border-radius:23px;background:#fff;color:#0F172A;padding:14px 11px;display:flex;flex-direction:column;gap:8px;overflow:hidden}
.field-screen small{font-size:9px;color:#64748B}
.field-screen b{font-size:11.5px}
.f-photo{height:78px;border-radius:12px;background:linear-gradient(160deg,#BFDBFE,#93C5FD 60%,#FDE68A);position:relative;overflow:hidden}
.f-photo svg{position:absolute;inset:0;width:100%;height:100%}
.f-photo .crane{fill:none;stroke:#1E3A5F;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.f-photo .hook{transform-origin:66px 14px;animation:swing 3s ease-in-out infinite}
@keyframes swing{0%,100%{transform:rotate(-6deg)}50%{transform:rotate(6deg)}}
.f-check{display:flex;flex-direction:column;gap:5px}
.f-check span{display:flex;align-items:center;gap:6px;font-size:10px}
.f-check i{width:14px;height:14px;border-radius:4px;border:1.5px solid #CBD5E1;display:flex;align-items:center;justify-content:center;flex:none}
.f-check span.done i{background:var(--blue);border-color:var(--blue)}
.f-check span.done i::after{content:"";width:6px;height:3px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.js .f-check span.done i{background:#fff;border-color:#CBD5E1}
.js.loaded .f-check span.done i{background:var(--blue);border-color:var(--blue);transition:background-color .3s,border-color .3s}
.js.loaded .f-check span:nth-child(1) i{transition-delay:1.6s}.js.loaded .f-check span:nth-child(2) i{transition-delay:1.9s}.js.loaded .f-check span:nth-child(3) i{transition-delay:2.2s}
.f-btn{margin-top:auto;background:var(--blue);color:#fff;font-size:10.5px;font-weight:700;border-radius:10px;padding:8px;text-align:center}
.f-sync{font-size:9px;color:#15803D;display:flex;align-items:center;gap:5px}
.f-sync i{width:6px;height:6px;border-radius:50%;background:#22C55E;display:block;animation:blink 1.4s ease-in-out infinite}

.float--1{right:-60px;top:-10px}
.float--2{right:96px;top:auto;bottom:-34px}
.float--3{left:-60px;top:auto;bottom:-6px}
@media (max-width:1240px) and (min-width:961px){.site-wrap{transform-origin:left center;scale:.86}}
@media (max-width:960px){.hero-visual{min-height:0}.site-wrap{width:100%;max-width:520px;height:auto;display:flex;flex-direction:column;align-items:center;gap:20px}.tablet{position:relative;top:0;width:100%;height:auto;aspect-ratio:500/350}.field-phone{display:none}}
@media (max-width:560px){.tab-side{display:none}.tab-screen{grid-template-columns:1fr}.gantt-head span:nth-child(n+5),.kpi:nth-child(3){display:none}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.tab-main{padding:10px;gap:8px}.gantt{gap:5px;padding:8px}.g-row{grid-template-columns:64px minmax(0,1fr);font-size:9px}.gantt-head{grid-template-columns:64px repeat(4,minmax(0,1fr))}.today{left:calc(72px + 46%)}}
@media (prefers-reduced-motion:reduce){.kpi .meter i,.g-bar{transform:none}.today{opacity:1}}
