/* =========================================================
   HUMANBOTS — AI & AUTOMATION PAGE ONLY
   Loads after global.css and service.css. Labels, titles,
   buttons, word-fill, process timeline and inline CTAs come
   from service.css; this file only holds what is unique here:
   1. Hands hero   2. Stacking service cards
   3. Workflow demo canvas   4. Industry tabs
========================================================= */


/* =========================================================
   1. HANDS HERO (sticky, driven by automation.js)
========================================================= */

.hba-hero{
  position:relative;
  height:260vh;
}

.hba-stage{
  position:sticky;
  top:0;
  height:100svh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:radial-gradient(ellipse 60% 40% at 50% 78%, rgba(255,77,22,.09), transparent 70%), #000;
}
.hba-stage::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px);
  background-size:90px 90px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.6), transparent 85%);
}

.hba-copy{
  position:relative;
  z-index:3;
  padding-top:150px;
  text-align:center;
  will-change:transform;
}
.hba-copy .svc-h1{margin-bottom:22px}
.hba-copy .svc-hero-copy{max-width:640px;font-size:16px}
.hba-copy .svc-actions{margin-top:28px}

.hba-hands{
  position:relative;
  flex:1;
  min-height:180px;
  pointer-events:none;
}

.hba-hand{
  position:absolute;
  top:50%;
  width:clamp(380px, 42vw, 650px);
  opacity:0;
  will-change:transform, opacity;
}
.hba-hand img{
  width:100%;
  height:auto;
  filter:drop-shadow(0 0 30px rgba(255,77,22,.06));
}
.hba-hand--human{left:0;transform:translate(-115%,-50%)}
.hba-hand--robot{right:0;transform:translate(115%,-50%)}

.hba-spark{
  position:absolute;
  left:50%;
  top:50%;
  width:190px;
  height:190px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,77,22,.32), rgba(255,77,22,.10) 35%, transparent 70%);
  filter:blur(20px);
  opacity:0;
  transform:translate(-50%,-50%) scale(.3);
}

.hba-message,
.hba-hint{
  position:absolute;
  z-index:3;
  left:50%;
  bottom:100px; /* sits above the floating nav */
  transform:translateX(-50%);
  white-space:nowrap;
  color:#666;
  text-transform:uppercase;
}
.hba-message{opacity:0}
.hba-message span{color:var(--orange)}
.hba-hint{color:#444;font-size:10px}


/* =========================================================
   2. WHAT WE AUTOMATE (stacking cards; layout from .svc-split)
========================================================= */

.hba-cards{
  display:flex;
  flex-direction:column;
  gap:80px;
}

.hba-card{
  position:sticky;
  top:calc(120px + var(--i, 0) * 12px);
  min-height:320px;
  padding:36px;
  display:flex;
  flex-direction:column;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--card);
  box-shadow:0 -14px 40px rgba(0,0,0,.5);
  overflow:hidden;
  transition:border-color .3s ease;
}
.hba-card::before{
  content:"";
  position:absolute;
  right:-210px;
  top:-210px;
  width:420px;
  height:420px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,77,22,.09), transparent 68%);
  opacity:0;
  transition:opacity .4s ease;
  pointer-events:none;
}
.hba-card:hover{border-color:rgba(255,77,22,.35)}
.hba-card:hover::before{opacity:1}
.hba-card:hover .svc-tags span{color:#999;border-color:rgba(255,77,22,.18)}

.hba-card-top{
  display:flex;
  justify-content:space-between;
  gap:20px;
  color:#555;
  text-transform:uppercase;
}
.hba-card-top span:first-child{color:var(--orange)}

.hba-card h3{
  margin:auto 0 12px;
  padding-top:48px;
  color:#fff;
  font-size:clamp(28px, 3.2vw, 42px);
  line-height:1;
  font-weight:600;
  letter-spacing:-.045em;
}
.hba-card p{max-width:640px;color:var(--dim);font-size:14px;line-height:1.7}
.hba-card .svc-tags{margin-top:24px;padding-top:20px;border-top:1px solid rgba(255,255,255,.06)}


/* =========================================================
   3. WORKFLOW DEMO CANVAS
========================================================= */

.hba-canvas{
  border:1px solid var(--line);
  border-radius:18px;
  background:#030303;
  overflow:hidden;
  box-shadow:0 30px 90px rgba(0,0,0,.45);
}

.hba-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  height:56px;
  padding:0 18px;
  border-bottom:1px solid var(--soft-line);
  color:#999;
  text-transform:uppercase;
}
.hba-toolbar-title{display:flex;align-items:center;gap:10px}
.hba-toolbar-title::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--orange);
  box-shadow:0 0 0 5px rgba(255,77,22,.08);
}
.hba-toolbar-hint{color:#555}

.hba-workspace{
  position:relative;
  height:560px;
  overflow:hidden;
  background:
    radial-gradient(ellipse at center, rgba(255,77,22,.05), transparent 60%),
    radial-gradient(circle, rgba(255,255,255,.11) 1px, transparent 1.4px) 0 0 / 24px 24px,
    #020202;
}

.hba-lines{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  overflow:visible;
}
.hba-line{fill:none;stroke:rgba(255,255,255,.12);stroke-width:1.5}
.hba-flow{
  fill:none;
  stroke:var(--orange);
  stroke-width:1.5;
  stroke-dasharray:5 10;
  opacity:.6;
  animation:hbaFlow 1.8s linear infinite;
  transition:opacity .3s ease, stroke-width .3s ease;
}
.hba-flow.is-live{opacity:1;stroke-width:2.2;stroke-dasharray:none}
@keyframes hbaFlow{to{stroke-dashoffset:-30}}

.hba-node{
  position:absolute;
  z-index:2;
  width:178px;
  padding:15px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:14px;
  background:#080808;
  box-shadow:0 12px 35px rgba(0,0,0,.35);
  cursor:grab;
  user-select:none;
  touch-action:none;
  transition:border-color .25s ease, box-shadow .25s ease;
}
.hba-node:hover{border-color:rgba(255,77,22,.42)}
.hba-node.is-dragging{cursor:grabbing;z-index:3}
.hba-node.is-active{
  border-color:var(--orange);
  box-shadow:0 0 0 4px rgba(255,77,22,.08), 0 15px 40px rgba(0,0,0,.4);
}

.hba-node-icon{
  width:34px;
  height:34px;
  margin-bottom:14px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.08);
  border-radius:9px;
  background:#0c0c0c;
  color:var(--orange);
  font-size:14px;
}
.hba-node small{display:block;margin-bottom:5px;color:#555;font-size:9px;text-transform:uppercase}
.hba-node strong{display:block;color:#e2e2e2;font-size:14px;font-weight:500}
.hba-node-foot{
  display:flex;
  justify-content:space-between;
  margin-top:13px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.05);
  color:#555;
  font-size:9px;
  text-transform:uppercase;
}

.hba-port{
  position:absolute;
  top:50%;
  width:10px;
  height:10px;
  margin-top:-5px;
  border:2px solid #030303;
  border-radius:50%;
  background:#555;
}
.hba-port.in{left:-6px}
.hba-port.out{right:-6px;background:var(--orange);box-shadow:0 0 8px rgba(255,77,22,.35)}

/* starting positions (desktop) */
.hba-node[data-node="1"]{left:4%;top:215px}
.hba-node[data-node="2"]{left:24%;top:95px}
.hba-node[data-node="3"]{left:44%;top:230px}
.hba-node[data-node="4"]{left:63%;top:90px}
.hba-node[data-node="5"]{left:80%;top:270px}

.hba-run{
  position:absolute;
  z-index:4;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  background:rgba(6,6,6,.92);
}
.hba-run:hover{transform:translateX(-50%) translateY(-2px)}
.hba-run:disabled{cursor:default;opacity:.85}


/* =========================================================
   4. INDUSTRY TABS (tabs themselves come from .svc-tabs)
========================================================= */

.hba-ind-what{
  margin-top:38px;
  padding-top:20px;
  border-top:1px solid var(--soft-line);
  color:#555;
  text-transform:uppercase;
}

.hba-ind-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  margin:14px 0 0;
  padding:0;
  list-style:none;
}
.hba-ind-grid li{
  display:flex;
  align-items:center;
  gap:13px;
  min-height:72px;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:12px;
  background:var(--card);
  color:#9a9a9a;
  font-size:13px;
}
.hba-ind-grid li::before{
  content:attr(data-icon);
  flex:0 0 34px;
  height:34px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,77,22,.18);
  border-radius:9px;
  background:rgba(255,77,22,.04);
  color:var(--orange);
  font-size:12px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width:1000px){

  .hba-node{width:150px}
  .hba-node[data-node="5"]{left:76%}

}

@media (max-width:700px){
  .hba-hero{height:220vh}
  .hba-copy{padding-top:125px}
  .hba-copy .svc-hero-copy{font-size:14px}
  .hba-hand{width:clamp(260px, 74vw, 360px)}
  .hba-message{font-size:9px}

  .hba-card{top:calc(90px + var(--i, 0) * 8px);min-height:300px;padding:26px 22px}
  .hba-cards{gap:60px}

  .hba-toolbar-hint{display:none}
  .hba-workspace{height:640px}
  .hba-node{width:136px;padding:11px}
  .hba-node-icon{width:28px;height:28px;margin-bottom:10px}
  .hba-node strong{font-size:12px}
  .hba-node[data-node="1"]{left:4%;top:40px}
  .hba-node[data-node="2"]{left:auto;right:4%;top:110px}
  .hba-node[data-node="3"]{left:4%;top:225px}
  .hba-node[data-node="4"]{left:auto;right:4%;top:300px}
  .hba-node[data-node="5"]{left:28%;top:400px}

  .hba-ind-grid{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  .hba-hero{height:auto}
  .hba-stage{position:relative;height:auto;min-height:100svh}
  .hba-hands{min-height:340px}
  .hba-hand{opacity:1}
  .hba-hand--human{transform:translate(-8%,-50%)}
  .hba-hand--robot{transform:translate(8%,-50%)}
  .hba-message{opacity:1}
  .hba-hint{display:none}
}
