/* ============ Home hero — "What is Cyber Square" motion panel ============
   Right side of the home hero (resources/views/home/hero.blade.php), animated by
   public/js/home/hero-motion.js. Ported from the "From Users to Creators" landing
   page design; every rule is scoped under .home-v2 .hero-motion. */

/* The design assumes a zero margin/padding reset. :where() keeps this weak enough for every rule below to win. */
.home-v2 .hero-motion :where(*){margin:0;padding:0;box-sizing:border-box;}
.home-v2 .hero-motion{line-height:normal;text-align:left;}

.home-v2 .hero-motion .tm{position:relative;width:100%;max-width:460px;aspect-ratio:4/5;margin:auto;font-family:var(--sans,'Geist',sans-serif);color:#1A1A1A;}
.home-v2 .hero-motion .tm-in{position:absolute;left:0;top:0;width:440px;height:550px;transform-origin:0 0;}
.home-v2 .hero-motion .tm-s{position:absolute;inset:0;padding:34px 26px 40px;opacity:0;visibility:hidden;transition:opacity .45s ease,visibility 0s linear .45s;}
.home-v2 .hero-motion .tm-s.on{opacity:1;visibility:visible;transition:opacity .45s ease;}
.home-v2 .hero-motion .tm-r{opacity:0;transform:translateY(14px);transition:opacity .5s ease,transform .5s cubic-bezier(.2,.8,.2,1);}
.home-v2 .hero-motion .tm-r.in{opacity:1;transform:none;}
.home-v2 .hero-motion .tm-h{font-size:27px;font-weight:800;line-height:1.18;letter-spacing:-.4px;margin:8px 0 22px;color:#1A1A1A;}
.home-v2 .hero-motion .tm-h em{font-style:normal;color:#E96358;}
.home-v2 .hero-motion .tm-c{background:#fff;border:1px solid #E0E0E0;border-radius:12px;box-shadow:0 14px 34px -20px rgba(20,22,26,.3);padding:14px 16px;}
.home-v2 .hero-motion .tm-row{display:flex;align-items:center;gap:8px;}
.home-v2 .hero-motion .tm-sp{flex:1;}
.home-v2 .hero-motion .tm-b{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:7px;font-size:11.5px;font-weight:600;white-space:nowrap;transition:background .2s,color .2s,transform .12s;}
.home-v2 .hero-motion .tm-b svg{width:13px;height:13px;}
.home-v2 .hero-motion .tm-b.pri{background:#E96358;color:#fff;}
.home-v2 .hero-motion .tm-b.sec{background:#fff;color:#E96358;border:1px solid #E96358;}
.home-v2 .hero-motion .tm-b.ok{background:#E6F4E6;color:#006400;}
.home-v2 .hero-motion .tm-b.press{transform:scale(.94);}
.home-v2 .hero-motion .tm-tag{font-size:9.5px;font-weight:600;color:#666;background:#F5F5F5;border-radius:5px;padding:2px 7px;}
.home-v2 .hero-motion .tm-cur{position:absolute;left:0;top:0;width:18px;height:22px;z-index:20;pointer-events:none;opacity:0;transition:transform .7s cubic-bezier(.45,0,.2,1),opacity .3s;}
.home-v2 .hero-motion .tm-cur svg{width:18px;height:22px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3));}
.home-v2 .hero-motion .tm-cur::after{content:"";position:absolute;left:-9px;top:-9px;width:18px;height:18px;border-radius:50%;background:rgba(233,99,88,.35);transform:scale(0);opacity:0;}
.home-v2 .hero-motion .tm-cur.clk::after{animation:tmClk .45s ease-out;}
@keyframes tmClk{0%{transform:scale(.3);opacity:1}100%{transform:scale(2.2);opacity:0}}
.home-v2 .hero-motion .tm-dots{position:absolute;left:0;right:0;bottom:12px;display:flex;justify-content:center;gap:6px;z-index:21;}
.home-v2 .hero-motion .tm-dots button{width:6px;height:6px;padding:0;border:none;border-radius:99px;background:#D1D5DB;cursor:pointer;transition:width .3s,background .3s;}
.home-v2 .hero-motion .tm-dots button.on{width:20px;background:#E96358;}
.home-v2 .hero-motion .tm-chip{display:inline-flex;align-self:flex-start;align-items:center;gap:6px;font-size:11px;font-weight:600;color:#E96358;background:#FDF0EF;border-radius:99px;padding:5px 11px;}
.home-v2 .hero-motion .tm-big{font-size:46px;font-weight:800;line-height:1.08;letter-spacing:-1.4px;}
.home-v2 .hero-motion .tm-hl{position:relative;display:inline-block;padding:0 10px;margin-left:-2px;color:#1A1A1A;transition:color .35s .25s;}
.home-v2 .hero-motion .tm-hl::before{content:"";position:absolute;inset:4px 0 2px;border-radius:10px;background:#E96358;z-index:-1;transform:scaleX(0);transform-origin:left;transition:transform .55s cubic-bezier(.2,.8,.2,1);box-shadow:0 10px 24px -10px rgba(233,99,88,.8);}
.home-v2 .hero-motion .tm-hl.in{color:#fff;}
.home-v2 .hero-motion .tm-hl.in::before{transform:none;}
.home-v2 .hero-motion .tm-hlw{position:relative;z-index:0;display:inline-block;}
.home-v2 .hero-motion .tm-g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px;}
.home-v2 .hero-motion .tm-k3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.home-v2 .hero-motion .tm-k3 .tm-c{padding:10px 12px;}
.home-v2 .hero-motion .tm-k3 small{display:block;font-size:10px;color:#808080;}
.home-v2 .hero-motion .tm-k3 b{display:block;font-size:22px;font-weight:800;margin-top:3px;letter-spacing:-.4px;}
.home-v2 .hero-motion .tm-k3 b.o{color:#E9761E;}
@media (prefers-reduced-motion:reduce){
  .home-v2 .hero-motion .tm *{transition:none!important;animation:none!important;}
}
.home-v2 .hero-motion .tm-chip svg{width:12px;height:12px;flex:none;}
.home-v2 .hero-motion .cm-host img{width:auto;max-width:none;}
.home-v2 .hero-motion .cm-wrap{height:100%;display:flex;flex-direction:column;justify-content:center;gap:18px;transform:translateY(-30px);}
.home-v2 .hero-motion .cm-orb{display:flex;flex-wrap:wrap;gap:7px;}
.home-v2 .hero-motion .cm-orb span,.home-v2 .hero-motion .cm-langs span{font-size:11.5px;font-weight:700;color:#fff;border-radius:999px;padding:5px 11px;}
.home-v2 .hero-motion .cm-sub{font-size:14px;line-height:1.5;color:#4D4D4D;margin:0;max-width:330px;}
.home-v2 .hero-motion .cm-role{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--rc);background:var(--rb);border-radius:999px;padding:5px 11px 5px 9px;}
.home-v2 .hero-motion .cm-role svg{width:14px;height:14px;}
.home-v2 .hero-motion .cm-langs{display:flex;flex-wrap:wrap;gap:6px;margin:-8px 0 14px;}
.home-v2 .hero-motion .cm-ic{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex:none;}
.home-v2 .hero-motion .cm-ic svg{width:15px;height:15px;}
.home-v2 .hero-motion .cm-t{font-size:13px;font-weight:700;color:#1A1A1A;}
.home-v2 .hero-motion .cm-l{display:block;font-size:10px;color:#808080;}
.home-v2 .hero-motion .cm-n{display:block;font-size:20px;font-weight:800;color:#1A1A1A;letter-spacing:-.3px;line-height:1.15;}
.home-v2 .hero-motion .cm-ed{padding:0!important;overflow:hidden;}
.home-v2 .hero-motion .cm-edh{display:flex;align-items:center;gap:5px;padding:9px 12px;border-bottom:1px solid #EBEBEB;}
.home-v2 .hero-motion .cm-edh i{width:8px;height:8px;border-radius:50%;background:#FF5F57;}
.home-v2 .hero-motion .cm-edh i:nth-child(2){background:#FEBC2E;}
.home-v2 .hero-motion .cm-edh i:nth-child(3){background:#28C840;}
.home-v2 .hero-motion .cm-edh b{font-size:11px;font-weight:600;color:#4D4D4D;margin-left:6px;}
.home-v2 .hero-motion .cm-edh .cm-run{margin-inline-start:auto;background:#0065F4;}
.home-v2 .hero-motion .cm-edh .tm-b svg,.home-v2 .hero-motion .tm-b svg{width:12px;height:12px;}
.home-v2 .hero-motion .cm-code{background:#1B1D24;padding:10px 12px;min-height:58px;}
.home-v2 .hero-motion .cm-ln{display:flex;gap:10px;font-family:ui-monospace,Menlo,monospace;font-size:12px;line-height:1.7;color:#E5E7EB;opacity:0;}
.home-v2 .hero-motion .cm-ln.in{opacity:1;}
.home-v2 .hero-motion .cm-ln u{text-decoration:none;color:#6B7280;width:10px;text-align:right;}
.home-v2 .hero-motion .cm-ln span{display:inline-block;white-space:pre;overflow:hidden;width:0;}
.home-v2 .hero-motion .cm-ln.in span{width:24ch;transition:width .5s steps(24,end);}
.home-v2 .hero-motion .cm-ln em{font-style:normal;}
.home-v2 .hero-motion .cm-ln .k{color:#93C5FD;}
.home-v2 .hero-motion .cm-ln .f{color:#FDE68A;}
.home-v2 .hero-motion .cm-ln .s{color:#86EFAC;}
.home-v2 .hero-motion .cm-out{font-family:ui-monospace,Menlo,monospace;font-size:11.5px;line-height:1.5;color:#15803D;background:#F0FDF4;padding:0 12px;max-height:0;overflow:hidden;transition:max-height .4s ease,padding .4s ease;}
.home-v2 .hero-motion .cm-out.in{max-height:70px;padding:8px 12px;}
.home-v2 .hero-motion .cm-prompt{display:flex;align-items:center;min-height:36px;padding:0 12px;border:1.5px solid #E96358;border-radius:8px;font-size:12.5px;color:#1A1A1A;box-shadow:0 0 0 3px rgba(233,99,88,.15);}
.home-v2 .hero-motion .cm-caret{width:1.5px;height:15px;background:#E96358;margin-left:1px;animation:cmBl 1s steps(2) infinite;}
@keyframes cmBl{50%{opacity:0}}
.home-v2 .hero-motion .cm-qs{display:flex;flex-direction:column;gap:6px;margin-top:10px;}
.home-v2 .hero-motion .cm-q{display:flex;align-items:center;gap:8px;font-size:11.5px;color:#1A1A1A;padding:7px 9px;border-radius:8px;background:#FAFAFA;border:1px solid #EBEBEB;opacity:0;transform:translateX(-10px);transition:opacity .35s,transform .35s cubic-bezier(.2,.8,.2,1);}
.home-v2 .hero-motion .cm-q.in{opacity:1;transform:none;}
.home-v2 .hero-motion .cm-q u{text-decoration:none;width:18px;height:18px;border-radius:5px;background:#FDF0EF;color:#E96358;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;flex:none;}
.home-v2 .hero-motion .cm-q .tm-tag{margin-inline-start:auto;}
.home-v2 .hero-motion .cm-bar{height:6px;border-radius:99px;background:#F0F0F0;margin-top:6px;overflow:hidden;}
.home-v2 .hero-motion .cm-bar i{display:block;height:100%;width:0;border-radius:99px;background:#008000;transition:width .9s cubic-bezier(.2,.8,.2,1);}
.home-v2 .hero-motion .cm-bar i.in{width:100%;}
.home-v2 .hero-motion .cm-save{flex:none;font-size:11px;font-weight:700;color:#fff;background:#E96358;border-radius:999px;padding:4px 9px;opacity:0;transform:scale(.6);transition:opacity .25s,transform .35s cubic-bezier(.34,1.56,.64,1);}
.home-v2 .hero-motion .cm-save.in{opacity:1;transform:none;}
.home-v2 .hero-motion .cm-k3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.home-v2 .hero-motion .cm-bars{display:flex;align-items:flex-end;gap:10px;height:92px;margin-top:12px;}
.home-v2 .hero-motion .cm-bars i{flex:1;height:var(--h);border-radius:5px 5px 2px 2px;background:#E9D5FF;transform:scaleY(0);transform-origin:bottom;transition:transform .5s cubic-bezier(.2,.8,.2,1);}
.home-v2 .hero-motion .cm-bars i:last-child{background:#7C3AED;}
.home-v2 .hero-motion .cm-bars i.in{transform:none;}
.home-v2 .hero-motion .cm-days{display:flex;gap:10px;margin-top:5px;}
.home-v2 .hero-motion .cm-days span{flex:1;text-align:center;font-size:9.5px;color:#808080;}
.home-v2 .hero-motion .cm-dev{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px;}
.home-v2 .hero-motion .cm-dev span{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:#1A1A1A;background:#fff;border:1px solid #E0E0E0;border-radius:8px;padding:6px 10px;}
.home-v2 .hero-motion .cm-dev svg{width:14px;height:14px;color:#7C3AED;}
.home-v2 .hero-motion .cm-cta{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;font-size:14px;font-weight:700;color:#fff;background:#E96358;border-radius:8px;padding:10px 16px;}
.home-v2 .hero-motion .cm-cta svg{width:16px;height:16px;animation:cmNudge 1.2s ease-in-out infinite;}
@keyframes cmNudge{50%{transform:translateX(4px)}}
@media (prefers-reduced-motion:reduce){
  .home-v2 .hero-motion .cm-caret,.home-v2 .hero-motion .cm-cta svg{animation:none;}
}
.home-v2 .hero-motion .tm.cm-host{max-width:min(460px,calc((100vh - 140px) * .8));margin-top:40px;}
.home-v2 .hero-motion .cm-t,.home-v2 .hero-motion .cm-cta,.home-v2 .hero-motion .cm-n{white-space:nowrap;}
.home-v2 .hero-motion .cm-n[style]{font-size:14px!important;}
.home-v2 .hero-motion .cs-hero-motion-stage .tm-s:not(.cm-s1):not(.cm-s6){display:flex;flex-direction:column;justify-content:center;padding-top:20px;padding-bottom:40px;}
.home-v2 .hero-motion .cs-hero-motion-stage .tm-s:not(.cm-s1):not(.cm-s6)>*{flex:none;}
.home-v2 .hero-motion .cs-hero-motion-stage .cm-role{align-self:flex-start;}
.home-v2 .hero-motion{width:618px;flex:0 0 618px;align-self:flex-start;margin-top:-34px;padding:8px 0; border-radius:20px;border:1.5px solid #F4C4BF; background:linear-gradient(180deg,#FFF1EE 0%,#fff 62%); box-shadow:0 30px 60px -40px rgba(233,99,88,.45);}
.home-v2 .hero-motion .tm.cm-host{max-width:440px;margin:0 auto;}
.home-v2 .hero-motion .pm-ag{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid #F0F0F0; opacity:0;transform:translateX(-10px);transition:opacity .35s,transform .35s cubic-bezier(.2,.8,.2,1);}
.home-v2 .hero-motion .pm-ag:first-child{border-top:none;padding-top:2px;}
.home-v2 .hero-motion .pm-ag:last-child{padding-bottom:2px;}
.home-v2 .hero-motion .pm-ag.in{opacity:1;transform:none;}
.home-v2 .hero-motion .pm-ag u{text-decoration:none;flex:none;width:46px;height:30px;border-radius:8px;background:var(--b);color:var(--c); font-size:11.5px;font-weight:700;display:flex;align-items:center;justify-content:center;}
.home-v2 .hero-motion .pm-ag div{flex:1;min-width:0;}
.home-v2 .hero-motion .pm-ag b{display:block;font-size:12.5px;font-weight:700;color:#1A1A1A;}
.home-v2 .hero-motion .pm-ag small{display:block;font-size:10.5px;color:#666;margin-top:1px;}
.home-v2 .hero-motion .pm-ag i{flex:none;width:62px;height:6px;border-radius:99px;background:#F0F0F0;position:relative;overflow:hidden;}
.home-v2 .hero-motion .pm-ag i::after{content:"";position:absolute;left:0;top:0;bottom:0;width:0;border-radius:99px;background:var(--c); transition:width .8s cubic-bezier(.2,.8,.2,1) .2s;}
.home-v2 .hero-motion .pm-ag.in i::after{width:var(--p);}
.home-v2 .hero-motion .pm-syl{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:12px;}
.home-v2 .hero-motion .pm-syl small{font-size:11px;color:#666;margin-right:2px;}
.home-v2 .hero-motion .pm-syl span{font-size:11.5px;font-weight:600;color:#1A1A1A;background:#fff;border:1px solid #E0E0E0;border-radius:8px;padding:6px 10px;}
.home-v2 .hero-motion .pm-st{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.home-v2 .hero-motion .pm-st .tm-c{padding:12px 12px;}
.home-v2 .hero-motion .pm-st small{display:block;font-size:10.5px;color:#666;margin-top:2px;}
.home-v2 .hero-motion .pm-st .cm-n{font-size:24px;color:#C8372B;}
@media (max-width:760px){
  .home-v2 .hero-motion{width:100%;flex:none;margin-top:0;}
  .home-v2 .hero-motion .tm.cm-host{max-width:min(440px,100%);}
}
@media (prefers-reduced-motion:reduce){
  .home-v2 .hero-motion .pm-ag,.home-v2 .hero-motion .pm-ag i::after{transition:none;}
}

/* ===== fit into the existing hero layout ===== */
.home-v2 .hero-motion{width:44%;max-width:618px;flex:0 1 auto;min-width:0;margin-top:0;}
/* between the stacked layout and wide desktop the big star would sit on the panel */
@media (min-width:951px) and (max-width:1250px){ .home-v2 .hero .star.s1{display:none;} }
@media (max-width:950px){
  .home-v2 .hero-motion{width:100%;max-width:618px;flex:none;margin:0 auto;}
}

/* ===== Arabic (RTL). Code stays left-to-right. ===== */
html[dir="rtl"] .home-v2 .hero-motion{text-align:right;}
html[dir="rtl"] .home-v2 .hero-motion .tm{font-family:var(--ar-font,'Geeza Pro','Noto Sans Arabic',Tahoma,sans-serif);}
html[dir="rtl"] .home-v2 .hero-motion :is(.tm-big,.tm-h,.cm-role,.cm-n){letter-spacing:0;}
html[dir="rtl"] .home-v2 .hero-motion .tm-big{line-height:1.3;}
html[dir="rtl"] .home-v2 .hero-motion :is(.cm-code,.cm-edh,.cm-out){direction:ltr;text-align:left;}
html[dir="rtl"] .home-v2 .hero-motion .cm-edh .cm-run{margin-left:auto;}
html[dir="rtl"] .home-v2 .hero-motion .cm-n{direction:ltr;unicode-bidi:isolate;}
html[dir="rtl"] .home-v2 .hero-motion .pm-ag i::after{left:auto;right:0;}
html[dir="rtl"] .home-v2 .hero-motion .pm-ag u{direction:ltr;}
html[dir="rtl"] .home-v2 .hero-motion .cm-cta svg{transform:scaleX(-1);animation:none;}
html[dir="rtl"] .home-v2 .hero .star.s2{left:12px;}
