/* ============================================================
   Hero scene: realistic wall screen + presenter who "posts"
   each service onto the screen while the globe revolves.
   Additive only: sits between #hero-canvas and .container.
   ============================================================ */
.hs-stage {
  position: absolute;
  inset: 0;
  z-index: 0;              /* above canvas (0, earlier in DOM), below .container */
  pointer-events: none;
  overflow: hidden;
}
#top > .container { position: relative; z-index: 2; }
#top > .hero-foot { position: relative; z-index: 2; }

/* --- Realistic wall-mounted display --- */
.hs-screen {
  position: absolute;
  left: 29%;          /* fallback; hero-scene.js places it in the free space */
  top: 17%;
  width: 27%;
  height: 17vw;
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2a30 0%, #101014 45%, #050507 100%);  /* aluminium bezel */
  box-shadow:
    0 0 0 1px rgba(255,255,255,.07),
    0 30px 60px -20px rgba(0,0,0,.9),
    0 0 90px -10px rgba(0,163,255,.28);
  transform: perspective(1400px) rotateY(-10deg) rotateX(3deg);
  transform-origin: left center;
}
.hs-glass {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 70% 10%, rgba(0,163,255,.16), transparent 60%),
    radial-gradient(90% 90% at 10% 100%, rgba(57,255,20,.14), transparent 60%),
    #07070b;
  box-shadow: inset 0 0 40px rgba(0,0,0,.8);
}
/* glass reflection + scanlines for realism */
.hs-glass::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 70%, rgba(255,255,255,.05) 100%);
  z-index: 3;
}
.hs-glass::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  z-index: 3;
}
.hs-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 22px;
  display: flex; align-items: center; gap: 5px;
  padding: 0 10px;
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  color: rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(255,255,255,.06);
  z-index: 2;
}
.hs-bar i { width: 6px; height: 6px; border-radius: 50%; background: #ff5f57; }
.hs-bar i:nth-child(2) { background: #febc2e; }
.hs-bar i:nth-child(3) { background: #28c840; margin-right: 6px; }
.hs-bar b { margin-left: auto; color: #00a3ff; font-weight: 700; }
.hs-feed {
  position: absolute; top: 30px; left: 10px; right: 10px; bottom: 10px;
  display: flex; flex-direction: column; gap: 7px;
  z-index: 1;
}
.hs-post {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  font-size: 12px; font-weight: 600; line-height: 1.2;
  box-shadow: 0 8px 18px -10px rgba(0,0,0,.8);
  animation: hsPin .55s cubic-bezier(.2,.9,.3,1.25) both;
}
.hs-post:first-child { border-color: rgba(0,163,255,.6); box-shadow: 0 0 22px -6px rgba(0,163,255,.55); }
.hs-post .ic { font-size: 16px; }
.hs-post small { display: block; line-height: 1.25; font-weight: 400; font-size: 10px; color: rgba(255,255,255,.55); margin-top: 2px; }
.hs-post .tag { margin-left: auto; font-size: 9px; letter-spacing: .1em; color: #28c840; }
@keyframes hsPin {
  0%   { opacity: 0; transform: translateX(60%) scale(.6) rotate(6deg); }
  60%  { opacity: 1; transform: translateX(-3%) scale(1.03) rotate(-1deg); }
  100% { opacity: 1; transform: none; }
}
/* wall mount shadow / floor glow */
.hs-floor {
  position: absolute; left: 22%; right: 30%; bottom: -6%;
  height: 22%;
  background: radial-gradient(50% 60% at 50% 50%, rgba(0,163,255,.18), transparent 70%);
  filter: blur(10px);
}

/* --- Presenter --- */
.hs-person {
  position: absolute;
  bottom: 0;
  left: 50.5%;         /* fallback; hero-scene.js places it */
  height: 70%;
  transform-origin: 50% 100%;
  animation: hsBreath 5s ease-in-out infinite;
  filter: drop-shadow(-18px 10px 26px rgba(0,0,0,.65)) drop-shadow(0 0 1px rgba(0,163,255,.4));
}
.hs-person img { height: 100%; width: 100%; max-width: none; object-fit: contain; display: block; }
.hs-person::after {           /* contact shadow on floor */
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -8px; height: 18px;
  background: radial-gradient(closest-side, rgba(0,0,0,.75), transparent);
}
.hs-person.posting { animation: hsPost .7s ease-out, hsBreath 5s ease-in-out .7s infinite; }
@keyframes hsBreath {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-4px) rotate(-.4deg); }
}
@keyframes hsPost {
  0%   { transform: translateX(0) rotate(0); }
  35%  { transform: translateX(-10px) rotate(-1.6deg); }   /* lean into the screen */
  100% { transform: translateX(0) rotate(0); }
}
/* the card flying from his hand to the screen */
.hs-fly {
  position: absolute;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00a3ff, #39ff14);
  color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 24px -8px rgba(57,255,20,.8);
  transition: transform .55s cubic-bezier(.5,0,.3,1), opacity .55s;
  z-index: 1;
}

/* --- Responsive: phones get a lighter version --- */
.hs-stage.hs-compact .hs-person { display: none; }
.hs-stage.hs-compact .hs-screen, .hs-stage.hs-compact .hs-floor { display: none; }
@media (max-width: 760px) {
  .hs-person { display: none; }
  .hs-screen, .hs-floor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-person, .hs-post { animation: none !important; }
  .hs-fly { display: none; }
}

/* --- Walk + grab motion --- */
.hs-stage { z-index: 3; }   /* in front of the widget so he can reach over it; clicks pass through */
.hs-person { transition: translate .85s cubic-bezier(.4,0,.25,1); }
.hs-person.walking img { animation: hsStep .5s ease-in-out infinite; transform-origin: 50% 100%; }
/* natural gait: small up-down bob each step and a slight weight shift, no rocking */
@keyframes hsStep {
  0%,100% { transform: translate(0,0); }
  25%     { transform: translate(.6px,-2.5px); }
  50%     { transform: translate(0,0); }
  75%     { transform: translate(-.6px,-2.5px); }
}
.hs-grabbed { transform: scale(.94); box-shadow: 0 0 0 2px #00a3ff, 0 0 24px rgba(0,163,255,.6) !important; transition: transform .2s; }

/* --- Bend pose (swapped in while he picks up a box) --- */
.hs-person .hs-pose-bend { position: absolute; inset: 0; opacity: 0; translate: 0 5%; }   /* align feet with standing pose */
.hs-person img { transition: opacity .22s ease; }
.hs-person.bending .hs-pose-bend { animation: hsDip .4s cubic-bezier(.3,.7,.3,1); }
@keyframes hsDip { from { transform: translateY(-4%) scaleY(1.04); } to { transform: none; } }   /* settle down into the bend instead of snapping */
.hs-person.bending .hs-pose-bend { opacity: 1; }
.hs-person.bending .hs-pose-stand { opacity: 0; }

/* the revolving word box he picks up (styled like the globe's orbit labels) */
.hs-chip {
  position: absolute;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--c, #00a3ff);
  background: rgba(10,10,16,.82);
  color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 0 18px -2px var(--c, #00a3ff), inset 0 0 12px -4px var(--c, #00a3ff);
  text-shadow: 0 0 8px rgba(255,255,255,.5);
  z-index: 2;
}
