/* Animasi 4 langkah berlangganan (28 Nov 2026). Langkah aktif bergantian (langkah.js menulis --fill pada .steps dan kelas .play pada <li> aktif); hanya adegan langkah aktif yang bergerak.
   data-on pada .steps dan kelas .play pada <li> aktif); hanya adegan langkah aktif yang bergerak.
   Keadaan dasar setiap adegan = bingkai akhir, jadi langkah lain tampil diam & lengkap. */
.steps.anim { --fill: 0%; }
.steps.anim::after { content: ""; position: absolute; top: 28px; left: 12%; height: 2px; width: var(--fill); border-radius: 2px;
  background: linear-gradient(90deg, #2ea3dd, #7dd3fc); box-shadow: 0 0 12px rgb(125 211 252 / .7); transition: width .9s cubic-bezier(.4, 0, .2, 1); }
.steps.anim li .num { transition: transform .4s, box-shadow .4s, filter .4s; filter: saturate(.5) brightness(.75); }
.steps.anim li.reached .num { filter: none; }
.steps.anim li.play .num { transform: scale(1.12); box-shadow: 0 0 0 8px var(--bg), 0 0 0 11px rgb(125 211 252 / .35), 0 14px 28px -8px rgb(46 163 221 / .8); }
.steps.anim li { transition: opacity .4s; opacity: .55; }
.steps.anim li.reached { opacity: 1; }

/* panggung adegan */
.stage { position: relative; height: 132px; margin: 20px 4px 0; border-radius: 18px; overflow: hidden; text-align: left;
  background: radial-gradient(90% 90% at 50% 0%, rgb(0 85 165 / .25), transparent 70%), var(--card);
  border: 1px solid var(--line); transition: border-color .4s, box-shadow .4s; }
.steps.anim li.play .stage { border-color: rgb(125 211 252 / .45); box-shadow: 0 20px 40px -24px rgb(46 163 221 / .6); }
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* 1. Chat CS */
.s-chat { display: flex; flex-direction: column; gap: 6px; padding: 14px; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.bub { max-width: 82%; padding: 6px 10px; border-radius: 12px; }
.bub.me { align-self: flex-end; background: #0b5f3c; color: #e7fff1; border-bottom-right-radius: 4px; }
.bub.me .i { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.bub.cs, .typing { align-self: flex-start; background: #23232a; color: var(--ink); border-bottom-left-radius: 4px; }
.cs-slot { display: grid; }
.cs-slot > * { grid-area: 1 / 1; }
.typing { display: inline-flex; gap: 4px; padding: 9px 11px; border-radius: 12px; opacity: 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.play .bub.me:nth-child(1) { animation: popIn .4s .1s both; }
.play .bub.me:nth-child(2) { animation: popIn .4s .7s both; }
.play .typing { animation: typingShow 2.6s 1.2s both; }
.play .typing i { animation: dot .9s infinite; }
.play .typing i:nth-child(2) { animation-delay: .15s; } .play .typing i:nth-child(3) { animation-delay: .3s; }
.play .bub.cs { animation: popIn .4s 2.4s both; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes typingShow { 0% { opacity: 0; } 8%, 40% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-3px); opacity: 1; } }

/* 2. Cek jangkauan */
.s-map { background: radial-gradient(rgb(255 255 255 / .09) 1px, transparent 1.2px) 0 0 / 14px 14px, radial-gradient(90% 90% at 50% 0%, rgb(0 85 165 / .25), transparent 70%), var(--card); }
.m-road { stroke: rgb(255 255 255 / .1); stroke-width: 7; fill: none; }
.m-home { fill: #7dd3fc; }
.m-odp { fill: #2ea3dd; } .m-odp.far { fill: rgb(255 255 255 / .25); }
.m-ring { fill: none; stroke: #7dd3fc; stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.m-link { fill: none; stroke: #7dd3fc; stroke-width: 2; stroke-dasharray: 4 4; }
.m-chip { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgb(34 197 94 / .14); color: #86efac; border: 1px solid rgb(34 197 94 / .3); }
.m-chip i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.play .m-ring { animation: ring 1.4s ease-out 2 both; }
.play .m-ring.r2 { animation-delay: .45s; }
.play .m-link { animation: linkIn .8s 1.6s both; }
.play .m-odp.near { animation: odpOn .5s 1.5s both; }
.play .m-chip { animation: popIn .4s 2.3s both; }
@keyframes ring { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(2.6); } }
@keyframes linkIn { from { stroke-dashoffset: 60; opacity: 0; } 20% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes odpOn { 0% { r: 4; } 50% { r: 8; } 100% { r: 5; } }

/* 3. Pemasangan */
.p-pole { stroke: rgb(255 255 255 / .45); stroke-width: 4; stroke-linecap: round; }
.p-odp { fill: #fff; } .p-odp-t { fill: var(--brand); font-size: 8px; font-weight: 800; }
.p-house { fill: rgb(255 255 255 / .1); stroke: rgb(255 255 255 / .4); stroke-width: 1.5; }
.p-roof { fill: rgb(255 255 255 / .85); }
.p-ont { fill: #fff; } .p-led { fill: #22c55e; }
.p-cable { fill: none; stroke: #e2f3ff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; }
.p-glow { fill: none; stroke: #7dd3fc; stroke-width: 5; stroke-linecap: round; stroke-dasharray: .12 1.2; opacity: 0; filter: drop-shadow(0 0 4px #7dd3fc); }
.p-wrench { transform-box: fill-box; transform-origin: 20% 80%; }
.p-wrench .i { color: #fde047; }
.play .p-cable { animation: drawC 1.6s .2s ease-in-out both; }
.play .p-glow { animation: glowC 1s 1.8s linear both; }
.play .p-wrench { animation: wiggle .5s .1s 4 both; }
.play .p-led { animation: ledOn .3s 2.6s both; }
@keyframes drawC { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes glowC { 0% { stroke-dashoffset: .12; opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-22deg); } }
@keyframes ledOn { from { fill: rgb(255 255 255 / .3); } to { fill: #22c55e; } }

/* 4. Internet aktif */
@property --spd { syntax: "<integer>"; initial-value: 100; inherits: false; }
.s-on { display: flex; align-items: center; justify-content: center; gap: 18px; }
.w-ic { position: relative; width: 64px; height: 52px; }
.w-arc { fill: none; stroke: #7dd3fc; stroke-width: 5; stroke-linecap: round; }
.w-dot { fill: #7dd3fc; }
.spd { --spd: 100; counter-reset: s var(--spd); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: -0.03em; }
.spd::before { content: counter(s); }
.spd small { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.ok { position: absolute; right: 10px; top: 10px; display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: #22c55e; color: #fff; }
.ok .i { width: 15px; height: 15px; stroke-width: 3; fill: none; }
.play .w-arc { animation: arcOn .35s both; }
.play .w-arc.a1 { animation-delay: .2s; } .play .w-arc.a2 { animation-delay: .5s; } .play .w-arc.a3 { animation-delay: .8s; }
.play .spd { animation: count 1.6s .9s cubic-bezier(.2, .7, .2, 1) both; }
.play .ok { animation: okPop .45s 2.5s both; }
@keyframes arcOn { from { stroke: rgb(255 255 255 / .15); } to { stroke: #7dd3fc; } }
@keyframes count { from { --spd: 0; } to { --spd: 100; } }
@keyframes okPop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { .steps.anim li { opacity: 1; } .steps.anim li .num { filter: none; } }
/* penyesuaian: redup hanya setelah muncul (menimpa .js [data-reveal].in), ikon WiFi tidak absolut, garis isi hilang di layar kecil */
.steps.anim li { opacity: initial; }
.steps.anim li.in:not(.reached) { opacity: .55; }
.cs-slot { align-self: flex-start; }
.s-on svg { position: static; width: 64px; height: 52px; }
@media (max-width: 1020px) { .steps.anim::after { display: none; } }
/* ikon kecil di dalam gelembung/centang tidak ikut aturan svg panggung */
.stage .bub svg, .stage .ok svg { position: static; inset: auto; }
.stage .bub svg { width: 13px; height: 13px; display: inline-block; }
.stage .ok svg { width: 15px; height: 15px; }
