/* ==========================================================================
   MPLink animated hero cards (hero-anim.css + hero-anim.js)
   Replaces the static "bringyourideas.online / PageSpeed" card on product pages,
   animates the terminal cards on developer pages. Pure CSS animation.
   - Runs only while on screen (.hv-on set by JS); respects prefers-reduced-motion
   ========================================================================== */
.hv{position:absolute;inset:0;padding:16px 18px;color:#fff;font-size:12.5px;line-height:1.35;overflow:hidden;display:flex;flex-direction:column;gap:10px;user-select:none;-webkit-user-select:none}
.hv *{box-sizing:border-box;animation-play-state:paused}
.hv-on .hv *,.hv-on.hv *{animation-play-state:running}
.hv b{font-weight:800}
.hv-a{animation:hvIn 9s ease both infinite;animation-delay:var(--d,0s)}
.hv-url{align-self:flex-start;display:inline-flex;align-items:center;gap:7px;background:#fff;color:#111;border-radius:999px;padding:7px 14px;font-size:13px;font-weight:700;box-shadow:0 4px 14px rgba(0,0,0,.12)}
.hv-url i{width:9px;height:9px;border-radius:50%;background:#12B76A;animation:hvPulse 1.8s ease-out infinite}
.hv-split{display:grid;grid-template-columns:1.1fr 1fr;gap:14px;flex:1;min-height:0;align-items:center}
.hv-h{display:grid;gap:2px;font-size:26px;line-height:1.05;font-weight:800;color:rgba(255,255,255,.92);letter-spacing:-.5px}
.hv-stack{display:grid;gap:8px;align-content:center}
.hv-chip{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.88);color:#0C2340;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:700;width:fit-content;box-shadow:0 3px 10px rgba(0,0,0,.1)}
.hv-card{background:#fff;color:#0C2340;border-radius:12px;padding:10px 12px;box-shadow:0 6px 18px rgba(12,35,64,.16);display:grid;gap:6px}
.hv-card small{color:#5B6B77;font-size:11px}
.hv-track{height:7px;border-radius:99px;background:#E4EEEE;overflow:hidden}
.hv-track u{display:block;height:100%;width:var(--w,100%);background:#005A5B;border-radius:99px;transform-origin:left;animation:hvFill 9s ease both infinite;animation-delay:var(--d,0s)}
.hv-live{color:#12B76A;font-size:12px}
.hv-toast{position:absolute;left:16px;bottom:14px;background:#0C2340;color:#fff;border-radius:10px;padding:8px 12px;font-size:12px;font-weight:700;box-shadow:0 8px 22px rgba(0,0,0,.28);display:flex;gap:7px;align-items:center;z-index:3;animation:hvIn 9s ease both infinite;animation-delay:var(--d,4s)}
.hv-toast i{color:#6EE7B7;font-style:normal}
.hv-row{display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center;background:#fff;color:#0C2340;border-radius:10px;padding:7px 10px;font-size:12px;box-shadow:0 4px 12px rgba(12,35,64,.12)}
.hv-row em{font-style:normal;font-size:11px;font-weight:800}
.hv-row .ok{color:#12B76A}.hv-row .no{color:#B42318}
.hv-av{width:22px;height:22px;border-radius:50%;background:var(--c,#005A5B);flex:none}
.hv-sk{height:6px;border-radius:4px;background:#DCE7E7;display:block}
.hv-list{display:grid;gap:7px}

/* typed text */
.hv-input{background:#fff;color:#0C2340;border-radius:11px;padding:10px 13px;font-weight:700;font-size:13px;display:flex;align-items:center;box-shadow:0 5px 16px rgba(12,35,64,.16)}
.hv-typed{display:inline-block;overflow:hidden;white-space:nowrap;vertical-align:bottom;max-width:100%;animation:hvType 9s steps(var(--n,22),end) both infinite;animation-delay:var(--d,.4s)}
.hv-input:after{content:"";width:2px;height:15px;background:#005A5B;margin-left:2px;animation:hvBlink 1s steps(1) infinite}

/* tiles / shop */
.hv-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;flex:1;min-height:0;align-items:start}
.hv-tile{background:#fff;color:#0C2340;border-radius:11px;padding:8px;display:grid;gap:5px;align-content:start;box-shadow:0 6px 16px rgba(12,35,64,.14);animation:hvPop 9s ease both infinite;animation-delay:var(--d,0s)}
.hv-tile i{display:block;aspect-ratio:4/3;border-radius:8px;background:var(--c,#A8D3D3)}
.hv-tile span{font-size:11px;font-weight:700}
.hv-tile em{font-style:normal;font-size:11px;color:#005A5B;font-weight:800}
.hv-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.hv-cart{background:#fff;color:#0C2340;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:800;position:relative;box-shadow:0 4px 12px rgba(0,0,0,.14)}
.hv-cart:after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 0 0 rgba(255,255,255,.7);animation:hvRipple 3s ease-out infinite;animation-delay:3.3s}

/* editor / builder */
.hv-ed{display:grid;grid-template-columns:34px 1fr;gap:10px;flex:1;min-height:0}
.hv-side{display:grid;gap:7px;align-content:start}
.hv-side i{height:30px;border-radius:9px;background:rgba(255,255,255,.85);display:block}
.hv-page{background:#fff;border-radius:12px;padding:12px 14px;display:grid;gap:8px;align-content:start;color:#0C2340;box-shadow:0 8px 22px rgba(12,35,64,.16);overflow:hidden}
.hv-title{font-size:17px;font-weight:800;overflow:hidden;white-space:nowrap;animation:hvType 9s steps(14,end) both infinite;animation-delay:.6s;width:fit-content;max-width:100%}
.hv-img{height:46px;border-radius:9px;background:linear-gradient(135deg,#A8D3D3,#5FA6A6)}
.hv-btn{display:inline-block;background:#005A5B;color:#fff;border-radius:8px;padding:6px 12px;font-size:11.5px;font-weight:800;animation:hvClick 9s ease infinite;animation-delay:var(--d,3s)}
.hv-bld-nav{height:14px;border-radius:5px;background:#E4EEEE}
.hv-bld-hero{height:54px;border-radius:9px;background:linear-gradient(135deg,#0C2340,#005A5B);color:#fff;font-weight:800;display:flex;align-items:center;padding:0 12px;font-size:15px}
.hv-3{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.hv-3 i{height:34px;border-radius:8px;background:#E4EEEE;display:block;animation:hvPop 9s ease both infinite;animation-delay:var(--d,0s)}

/* terminal */
.hv-term{background:#0C2340;color:#D7EEF0;border-radius:11px;padding:11px 13px;font:11.5px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;flex:1;overflow:hidden;box-shadow:0 8px 22px rgba(0,0,0,.25)}
.hv-term div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;animation:hvLine 9s steps(1,end) both infinite;animation-delay:var(--d,0s)}
.hv-term .ok{color:#6EE7B7}.hv-term .wn{color:#FCD34D}.hv-term .dm{color:#8CA6B8}
.hv-term div:last-child:after{content:"▍";color:#6EE7B7;margin-left:2px;animation:hvBlink 1s steps(1) infinite}
.hv-spark{width:100%;height:30px;display:block}
.hv-spark path{fill:none;stroke:#6EE7B7;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;animation:hvDraw 9s ease infinite;animation-delay:1s}

/* meters */
.hv-meter{display:grid;grid-template-columns:62px 1fr 38px;gap:8px;align-items:center;font-size:11.5px;font-weight:700}
.hv-meter div{height:9px;border-radius:99px;background:rgba(255,255,255,.35);overflow:hidden}
.hv-meter u{display:block;height:100%;border-radius:99px;background:#fff;animation:hvMeter 9s ease-in-out infinite;animation-delay:var(--d,0s)}
.hv-nodes{display:flex;gap:7px}
.hv-nodes i{flex:1;height:26px;border-radius:8px;background:rgba(255,255,255,.35);animation:hvNode 9s ease infinite;animation-delay:var(--d,0s)}

/* flow */
.hv-flow{position:relative;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:8px;margin-top:8px}
.hv-flow:before{content:"";position:absolute;left:10%;right:10%;top:26px;height:2px;background:repeating-linear-gradient(90deg,rgba(255,255,255,.7) 0 6px,transparent 6px 11px)}
.hv-dot{position:absolute;top:22px;left:10%;width:10px;height:10px;border-radius:50%;background:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.3);animation:hvTravel 3s linear infinite;z-index:1}
.hv-node{position:relative;z-index:2;text-align:center;font-size:11px;font-weight:800}
.hv-node i{display:flex;width:52px;height:52px;margin:0 auto 6px;border-radius:14px;background:#fff;color:#0C2340;align-items:center;justify-content:center;font-style:normal;font-size:19px;box-shadow:0 6px 16px rgba(12,35,64,.2);animation:hvGlow 9s ease infinite;animation-delay:var(--g,0s)}

/* chat */
.hv-msg{max-width:84%;padding:8px 11px;border-radius:12px;font-size:12px;font-weight:600}
.hv-msg.me{align-self:flex-end;background:#0C2340;color:#fff;border-bottom-right-radius:4px}
.hv-msg.ai{align-self:flex-start;background:#fff;color:#0C2340;border-bottom-left-radius:4px;box-shadow:0 4px 12px rgba(12,35,64,.14)}
.hv-tools{display:flex;gap:7px;flex-wrap:wrap}

/* mc */
.hv-world{display:grid;grid-template-columns:repeat(12,1fr);gap:2px;flex:1;min-height:0;position:relative;border-radius:10px;overflow:hidden;background:#8FD3F4;padding-top:34px}
.hv-world i{aspect-ratio:1;display:block;background:#8B5E3C}
.hv-world i.g{background:#5BA83B}.hv-world i.s{background:#8E9498}
.hv-steve{position:absolute;top:8px;left:0;width:18px;height:26px;background:#3D8EA6;border:3px solid #E7B98F;border-radius:3px;animation:hvWalk 9s linear infinite}
.hv-steve.b{background:#C94C4C;animation-duration:12s;animation-delay:-4s;top:10px}

/* tee */
.hv-tee{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:18px}
.hv-tee svg{height:100%;max-height:170px;filter:drop-shadow(0 10px 14px rgba(0,0,0,.22))}
.hv-tee .shirt{animation:hvTee 9s ease infinite}
.hv-sw{display:grid;gap:8px}
.hv-sw i{width:22px;height:22px;border-radius:50%;background:var(--c);border:2px solid #fff;display:block;animation:hvSw 9s ease infinite;animation-delay:var(--d,0s)}

/* migrate */
.hv-mig{display:grid;grid-template-columns:1fr 60px 1fr;gap:6px;align-items:center;flex:1;min-height:0}
.hv-box{background:rgba(255,255,255,.9);color:#0C2340;border-radius:12px;padding:10px;display:grid;gap:6px;align-content:center;height:100%;font-size:11.5px;font-weight:800}
.hv-box i{height:9px;border-radius:5px;background:#CFE0E0;display:block}
.hv-box.to i{animation:hvPop 9s ease both infinite;animation-delay:var(--d,0s);background:#12B76A}
.hv-pipe{position:relative;height:100%}
.hv-pipe b{position:absolute;left:0;top:calc(var(--y,30%));width:16px;height:11px;border-radius:3px;background:#fff;animation:hvMove 2.4s linear infinite;animation-delay:var(--d,0s);opacity:0}

/* floating metric card (replaces the PageSpeed card) */
.wh-pagespeed{animation:hvFloat 5s ease-in-out infinite}
.hv-ring{position:relative;width:70px;height:70px;margin:6px auto 0}
.hv-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.hv-ring circle{fill:none;stroke-width:6}
.hv-ring .bg{stroke:#E1F3E8}
.hv-ring .fg{stroke:#16a34a;stroke-linecap:round;stroke-dasharray:188.5;stroke-dashoffset:188.5;animation:hvRing 9s ease infinite;animation-delay:.5s}
.hv-ring b{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:800;color:#16a34a;letter-spacing:-.3px}
.hv-ring b small{font-size:10px;margin-left:1px}

/* developer cards */
.hv-solo{width:100%;position:relative;border-radius:16px;overflow:hidden;background:#050f1d;border:1px solid rgba(255,255,255,.12);height:270px;box-shadow:0 18px 44px rgba(0,0,0,.28)}
.hv-solo--light{background:linear-gradient(135deg,#0C2340,#005A5B);border:0}
.hv-solo .hv{padding:44px 18px 14px}
.hv-solo:before{content:"";position:absolute;left:16px;top:15px;width:10px;height:10px;border-radius:50%;background:#ff5f57;box-shadow:17px 0 #febc2e,34px 0 #28c840;z-index:5}
.hv-route{margin-top:14px;background:#050f1d;border:1px solid rgba(255,255,255,.12);border-radius:14px;height:158px;position:relative;overflow:hidden}
.hv-route .hv{padding:12px 16px}
.hv-r{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:12px;align-items:center;flex:1}
.hv-r .col{display:grid;gap:7px}
.hv-r .pill{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);border-radius:9px;padding:6px 9px;font-size:11.5px;font-weight:700;color:#E5E7EB;animation:hvModel 9s ease infinite;animation-delay:var(--d,0s)}
.hv-r .hub{background:#005A5B;border-radius:12px;padding:12px 8px;text-align:center;font-weight:800;position:relative}
.hv-r .hub:after{content:"";position:absolute;inset:-4px;border-radius:15px;border:2px solid rgba(94,234,212,.5);animation:hvRipple 2.4s ease-out infinite}
.hv-r .you{background:#fff;color:#0C2340;border-radius:9px;padding:9px;text-align:center;font-weight:800;font-size:12px}
.hv-api{font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace;color:#E5E7EB}
.hv-api .m{color:#5eead4;font-weight:800}.hv-api .k{color:#93c5fd}.hv-api .s{color:#fcd34d}.hv-api .g{color:#6EE7B7;font-weight:800}
.hv-api div{white-space:nowrap;overflow:hidden;animation:hvLine 9s steps(1,end) both infinite;animation-delay:var(--d,0s)}
.ty-l{display:block;animation:hvLine 10s steps(1,end) both infinite;animation-delay:var(--d,0s)}
pre[data-hv-term] .ty-l:last-child:after{content:"▍";color:#5eead4;margin-left:2px;animation:hvBlink 1s steps(1) infinite}

/* knowledge-base search + status page */
.kb-type{border-right:2px solid #005A5B;padding-right:2px;animation:hvBlink 1s steps(1) infinite}
.st-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#16a34a;margin-right:7px;animation:hvPulse 2s ease-out infinite}
.st-hero{animation:hvHalo 2.6s ease-out infinite}
.hv-grid2{display:grid;grid-template-columns:1.05fr .95fr;gap:48px;align-items:center}

@keyframes hvIn{0%{opacity:0;transform:translateY(8px)}6%{opacity:1;transform:none}88%{opacity:1;transform:none}96%,100%{opacity:0;transform:translateY(-4px)}}
@keyframes hvPop{0%{opacity:0;transform:scale(.85)}7%{opacity:1;transform:scale(1.04)}10%{transform:scale(1)}88%{opacity:1}96%,100%{opacity:0}}
@keyframes hvFill{0%{transform:scaleX(0)}22%{transform:scaleX(1)}100%{transform:scaleX(1)}}
@keyframes hvType{0%{width:0}22%,88%{width:100%}96%,100%{width:100%;opacity:0}}
@keyframes hvBlink{0%,100%{opacity:1}50%{opacity:.1}}
@keyframes hvPulse{0%{box-shadow:0 0 0 0 rgba(18,183,106,.55)}100%{box-shadow:0 0 0 8px rgba(18,183,106,0)}}
@keyframes hvRipple{0%{box-shadow:0 0 0 0 rgba(255,255,255,.6)}100%{box-shadow:0 0 0 12px rgba(255,255,255,0)}}
@keyframes hvHalo{0%{box-shadow:0 0 0 0 rgba(22,163,74,.4)}100%{box-shadow:0 0 0 18px rgba(22,163,74,0)}}
@keyframes hvLine{0%{opacity:0;clip-path:inset(0 100% 0 0)}1%{opacity:1;clip-path:inset(0 100% 0 0)}8%{clip-path:inset(0 0 0 0)}90%{opacity:1;clip-path:inset(0 0 0 0)}97%,100%{opacity:0;clip-path:inset(0 0 0 0)}}
@keyframes hvDraw{0%{stroke-dashoffset:1}25%{stroke-dashoffset:0}90%{stroke-dashoffset:0;opacity:1}98%,100%{stroke-dashoffset:0;opacity:0}}
@keyframes hvClick{0%,50%,100%{transform:none;box-shadow:none}56%{transform:scale(.92);box-shadow:0 0 0 7px rgba(0,90,91,.25)}64%{transform:none;box-shadow:0 0 0 0 rgba(0,90,91,0)}}
@keyframes hvMeter{0%{width:22%}28%{width:var(--a,60%)}55%{width:var(--b,86%)}80%{width:var(--c,40%)}100%{width:22%}}
@keyframes hvNode{0%,40%{background:rgba(255,255,255,.35)}50%,86%{background:#fff}96%,100%{background:rgba(255,255,255,.35)}}
@keyframes hvTravel{0%{left:10%}100%{left:calc(90% - 10px)}}
@keyframes hvGlow{0%,100%{background:#fff;color:#0C2340;transform:none}5%,18%{background:#005A5B;color:#fff;transform:scale(1.08)}26%{background:#fff;color:#0C2340;transform:none}}
@keyframes hvWalk{0%{transform:translateX(0)}100%{transform:translateX(520px)}}
@keyframes hvTee{0%,100%{fill:#fff}22%{fill:#0C2340}44%{fill:#005A5B}66%{fill:#F4A261}85%{fill:#fff}}
@keyframes hvSw{0%,100%{transform:scale(1);box-shadow:none}10%,20%{transform:scale(1.25);box-shadow:0 0 0 3px rgba(255,255,255,.6)}30%{transform:none;box-shadow:none}}
@keyframes hvMove{0%{transform:translateX(-4px);opacity:0}12%{opacity:1}88%{opacity:1}100%{transform:translateX(34px);opacity:0}}
@keyframes hvRing{0%{stroke-dashoffset:188.5}22%,88%{stroke-dashoffset:calc(188.5 * (1 - var(--f,99) / 100))}98%,100%{stroke-dashoffset:188.5}}
@keyframes hvFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes hvModel{0%,38%{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.18);color:#E5E7EB}46%,70%{background:#fff;border-color:#fff;color:#0C2340}80%,100%{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.18);color:#E5E7EB}}

@media(max-width:900px){.hv-grid2{grid-template-columns:1fr}.hv-solo{height:250px}}
@media(max-width:520px){.hv{font-size:11.5px;padding:12px 12px}.hv-h{font-size:21px}.hv-split{grid-template-columns:1fr}.hv-stack{display:none}.hv-tile em{display:none}}
@media(prefers-reduced-motion:reduce){.hv *,.wh-pagespeed,.st-dot,.st-hero,.kb-type,.ty-l{animation:none!important}.hv-ring .fg{stroke-dashoffset:calc(188.5 * (1 - var(--f,99) / 100))}.hv-typed,.hv-title{width:auto}.hv-meter u{width:60%}.hv-toast{display:none}}
