/* =========================================================
   J.S Technology — অ্যানিমেশন ও ডিজিটাল ইফেক্ট
   (reduce motion চালু থাকলে style.css-এর নিয়মে সব অ্যানিমেশন বন্ধ থাকে)
   ========================================================= */

@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-y-sm { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.9); opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes dash-run { to { background-position: 16px 0; } }
@keyframes stroke-run { to { stroke-dashoffset: -32; } }
@keyframes floor-run { to { background-position: 0 56px, 0 0; } }
@keyframes orb-drift { to { transform: translate(40px, 30px) scale(1.15); } }
@keyframes scan { from { top: -140px; } to { top: 100%; } }
@keyframes sweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes border-spin { to { --spin: 360deg; } }
@keyframes dot-ping { from { box-shadow: 0 0 0 0 rgba(61, 214, 140, .6); } to { box-shadow: 0 0 0 10px rgba(61, 214, 140, 0); } }

/* ---------- নেটওয়ার্ক ক্যানভাস ব্যাকগ্রাউন্ড ---------- */
.has-net { position: relative; overflow: hidden; isolation: isolate; }
.has-net > .container { position: relative; z-index: 2; }
.net-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }

/* ---------- হোম হিরো: ডিজিটাল ওয়ালপেপার ---------- */
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero__wave { z-index: 3; }
.orb { position: absolute; border-radius: 50%; animation: orb-drift 14s ease-in-out infinite alternate; }
.orb--1 { width: 460px; height: 460px; top: -160px; right: 4%; background: radial-gradient(circle, rgba(10, 116, 188, .55), transparent 70%); }
.orb--2 { width: 380px; height: 380px; bottom: -120px; left: -80px; background: radial-gradient(circle, rgba(36, 84, 168, .6), transparent 70%); animation-duration: 18s; }
.orb--3 { width: 240px; height: 240px; top: 38%; left: 42%; background: radial-gradient(circle, rgba(255, 138, 31, .16), transparent 70%); animation-duration: 11s; }
.digital-floor {
    position: absolute; left: -30%; right: -30%; bottom: 0; height: 55%;
    background-image:
        linear-gradient(rgba(79, 168, 224, .22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 168, 224, .22) 1px, transparent 1px);
    background-size: 56px 56px;
    transform: perspective(420px) rotateX(62deg); transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .85), transparent 80%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, .85), transparent 80%);
    animation: floor-run 2.4s linear infinite;
}
.scanline {
    position: absolute; left: 0; right: 0; top: -140px; height: 140px;
    background: linear-gradient(to bottom, transparent, rgba(79, 168, 224, .09), transparent);
    animation: scan 7s linear infinite;
}

.hero__intro > * { animation: rise-in .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero__intro > :nth-child(2) { animation-delay: .1s; }
.hero__intro > :nth-child(3) { animation-delay: .2s; }
.hero__intro > :nth-child(4) { animation-delay: .3s; }
.hero__intro > :nth-child(5) { animation-delay: .4s; }
.hero .eyebrow .dot { animation: dot-ping 1.8s ease-out infinite; }

/* স্পিড কার্ড ও ভাসমান ব্যাজ */
.speed-wrap { position: relative; padding: 36px 0 40px; animation: rise-in 1s .3s cubic-bezier(.2, .7, .2, 1) both; }
.speed-wrap .speed-card { animation: float-y-sm 7s ease-in-out infinite; }
.float-badge {
    position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 10px;
    padding: 9px 16px 9px 9px; border-radius: 14px; background: var(--white); color: var(--ink);
    font-family: var(--font-head); font-weight: 700; font-size: .92rem; line-height: 1.25;
    box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .55); white-space: nowrap;
    animation: float-y 5s ease-in-out infinite;
}
.float-badge > span:last-child { display: block; }
.float-badge small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .76rem; color: var(--muted); }
.float-badge .icon-box { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-brand); color: var(--white); }
.float-badge--tr { top: 0; right: -18px; animation-delay: -1.5s; }
.float-badge--bl { bottom: 0; left: -34px; animation-delay: -3s; }

/* ---------- ভেতরের পাতার হিরো: সিগন্যাল আর্ট ---------- */
.page-hero__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.page-hero__inner > div:first-child > * { animation: rise-in .8s cubic-bezier(.2, .7, .2, 1) both; }
.page-hero__inner > div:first-child > :nth-child(2) { animation-delay: .1s; }
.page-hero__inner > div:first-child > :nth-child(3) { animation-delay: .2s; }
.signal-art { position: relative; flex-shrink: 0; width: 230px; height: 230px; display: grid; place-items: center; margin: -24px 0; }
.signal-art img {
    position: relative; z-index: 2; width: 104px; height: 104px; padding: 10px;
    background: var(--white); border-radius: 28px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5);
    animation: float-y-sm 5s ease-in-out infinite;
}
.signal-art__ring {
    position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px;
    border-radius: 28px; border: 2px solid rgba(79, 168, 224, .6); animation: ripple 3.6s ease-out infinite;
}
.signal-art__ring:nth-child(2) { animation-delay: 1.2s; }
.signal-art__ring:nth-child(3) { animation-delay: 2.4s; }
.signal-art__orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(124, 196, 240, .3); animation: spin 22s linear infinite; }
.signal-art__orbit i {
    position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
    background: #7CC4F0; box-shadow: 0 0 12px 3px rgba(124, 196, 240, .7);
}
.signal-art__orbit--2 { inset: 34px; animation-duration: 14s; animation-direction: reverse; }
.signal-art__orbit--2 i { background: var(--accent); box-shadow: 0 0 12px 3px rgba(255, 138, 31, .6); }

/* ---------- অ্যানিমেটেড নেটওয়ার্ক চিত্র ---------- */
.illus-panel { position: relative; border-radius: var(--radius-lg); background: var(--grad-dark); padding: 24px 24px 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.illus-panel::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(79, 168, 224, .25) 1px, transparent 1.5px); background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
    mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
}
.illus-panel__head { position: relative; display: flex; justify-content: space-between; align-items: center; font-size: .9rem; color: #9FB2CB; }
.illus-panel__head strong { color: var(--white); font-family: var(--font-head); font-weight: 600; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: #7EE2A8; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3DD68C; animation: dot-ping 1.8s ease-out infinite; }
.illus-svg { position: relative; display: block; width: 100%; height: auto; margin: 10px 0 4px; overflow: visible; }
.illus-svg text { font-family: var(--font-head); font-size: 15px; font-weight: 600; fill: #CFE0F2; }
.illus-svg .wire { fill: none; stroke: rgba(79, 168, 224, .2); stroke-width: 5; stroke-linecap: round; }
.illus-svg .flow { fill: none; stroke: #4FA8E0; stroke-width: 2; stroke-dasharray: 4 12; stroke-linecap: round; animation: stroke-run 1.2s linear infinite; }
.illus-svg .node-box { fill: #0F2B52; stroke: rgba(79, 168, 224, .55); stroke-width: 1.5; }
.illus-svg .slot { fill: #13355F; }
.illus-svg .packet { fill: #8ACDF4; }
.illus-svg .packet--warm { fill: #FF8A1F; }
.illus-svg .packet--up { fill: #3DD68C; }
.illus-panel__stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.illus-panel__stats div { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px 8px; text-align: center; }
.illus-panel__stats b { display: block; color: var(--white); font-family: var(--font-head); font-size: 1.25rem; line-height: 1.2; }
.illus-panel__stats small { color: #8FA6C2; font-size: .8rem; }

/* ---------- ভিজ্যুয়াল প্যানেলের লোগো ---------- */
.logo-orbit { position: relative; display: block; width: 120px; margin-bottom: 26px; animation: float-y-sm 5s ease-in-out infinite; }
/* shrink-to-fit wrapper-এর ভেতরে max-width:100% লোগোকে ছোট করে দেয়, তাই এখানে বন্ধ */
.logo-orbit .visual-panel__logo { position: relative; z-index: 1; width: 100%; max-width: none; margin-bottom: 0; }
.logo-orbit i { position: absolute; inset: 0; border-radius: 22px; border: 2px solid rgba(255, 255, 255, .55); animation: ripple 3s ease-out infinite; }
.logo-orbit i:nth-child(2) { animation-delay: 1s; }
.logo-orbit i:nth-child(3) { animation-delay: 2s; }
.visual-panel::after {
    content: ""; position: absolute; width: 280px; height: 280px; right: -90px; top: -110px;
    border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .22); animation: spin 40s linear infinite;
}

/* ---------- কার্ড, ধাপ ও প্রাইস কার্ড ---------- */
.card__icon { transition: transform .35s, background .35s, color .35s; }
.card:hover .card__icon { background: var(--grad-brand); color: var(--white); transform: rotate(-8deg) scale(1.06); }

.step:not(:last-child)::after {
    border-top: 0; height: 2px; top: 33px;
    background: linear-gradient(90deg, rgba(79, 168, 224, .75) 50%, transparent 50%);
    background-size: 16px 2px; animation: dash-run .9s linear infinite;
}
.step__num::before {
    content: ""; position: absolute; inset: -7px; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 55%, rgba(79, 168, 224, .25) 72%, var(--primary));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    animation: spin 2.8s linear infinite;
}
.step:nth-child(2) .step__num::before { animation-delay: -.7s; }
.step:nth-child(3) .step__num::before { animation-delay: -1.4s; }
.step:nth-child(4) .step__num::before { animation-delay: -2.1s; }

.price-card--popular {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        conic-gradient(from var(--spin), #4FA8E0, #0A74BC, #2454A8, #FF8A1F, #4FA8E0) border-box;
    animation: border-spin 5s linear infinite;
}

.chip { transition: transform .2s, border-color .2s, box-shadow .2s; }
.chip:hover { transform: translateY(-3px); border-color: var(--sky); box-shadow: var(--shadow-sm); }

/* ---------- আলোর ঝলক ---------- */
.cta-band::before, .pay-account::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent);
    animation: sweep 6s ease-in-out infinite;
}
.pay-account::before { animation-duration: 5s; }

.float-chat::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25D366; z-index: -1;
    animation: ripple 2.4s ease-out infinite;
}

/* ---------- রেসপন্সিভ ---------- */
@media (max-width: 960px) {
    .float-badge--tr { right: -6px; }
    .float-badge--bl { left: -6px; }
}

@media (max-width: 760px) {
    .signal-art { display: none; }
}

@media (max-width: 640px) {
    .float-badge { padding: 7px 12px 7px 7px; font-size: .82rem; }
    .float-badge .icon-box { width: 30px; height: 30px; }
    .speed-wrap { padding: 32px 0 36px; }
    .digital-floor { height: 40%; }
    .illus-panel { padding: 18px 14px; }
    .illus-panel__stats { gap: 8px; }
    .illus-panel__stats b { font-size: 1.05rem; }
}
