/* La scrivania rimane ferma; testa e busto hanno movimenti indipendenti. */
.motion-preview{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.motion-preview button{font-size:10px;padding:7px 11px;border:1px solid var(--border);border-radius:6px;color:var(--muted)}
.motion-preview button[aria-pressed=true]{background:var(--forest);border-color:var(--forest);color:white}
.motion-preview-note{font-size:9px;color:var(--muted)}
.office-display-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.motion-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 8px;
  min-height: 32px;
  border-radius: 6px;
  font-size: 10px;
  color: var(--muted);
}
.motion-toggle:hover {
  background: var(--sage);
}
.motion-toggle.active {
  color: var(--forest);
}
.station-figure {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.station-figure .sprite {
  position: absolute;
  inset: 0;
}
.figure-head {
  clip-path: polygon(0 0, 100% 0, 100% 29%, 0 29%);
  transform-origin: 45% 28%;
  z-index: 2;
}
.figure-body {
  clip-path: polygon(0 27%, 55% 27%, 55% 59%, 0 59%);
  transform-origin: 39% 59%;
  z-index: 1;
}
.figure-desk {
  clip-path: polygon(55% 27%, 100% 27%, 100% 100%, 0 100%, 0 59%, 55% 59%);
  z-index: 3;
}
.workstation {
  --motion-offset: 0s;
  --head-duration: 6.4s;
  --body-duration: 3.7s;
}
.workstation:nth-child(2) {
  --motion-offset: -1.3s;
}
.workstation:nth-child(3) {
  --motion-offset: -4.1s;
}
.workstation:nth-child(4) {
  --motion-offset: -2.4s;
}
.workstation:nth-child(5) {
  --motion-offset: -5.7s;
}
.workstation:nth-child(6) {
  --motion-offset: -0.9s;
}
.workstation:nth-child(7) {
  --motion-offset: -3.3s;
}
.workstation:nth-child(8) {
  --motion-offset: -6.2s;
}
.is-animating .figure-head {
  animation: office-look var(--head-duration) ease-in-out infinite;
  animation-delay: var(--motion-offset);
  will-change: transform;
}
.is-animating .figure-body {
  animation: office-breathe var(--body-duration) ease-in-out infinite;
  animation-delay: var(--motion-offset);
  will-change: transform;
}
.is-animating.role-copy .figure-body,
.is-animating.role-social .figure-body,
.is-animating.role-developer .figure-body {
  animation-name: office-type;
  animation-duration: 0.58s;
}
.is-animating.role-designer .figure-body {
  animation-name: office-draw;
  animation-duration: 2.5s;
}
.role-coordinator {
  --head-duration: 8.2s;
  --body-duration: 4.8s;
}
.role-seo {
  --head-duration: 7.4s;
  --body-duration: 5.4s;
}
.role-ads {
  --head-duration: 5.9s;
  --body-duration: 3.2s;
}
.role-developer {
  --head-duration: 6.8s;
}
.role-analyst {
  --head-duration: 7.1s;
  --body-duration: 4.1s;
}
.typing-marks {
  position: absolute;
  z-index: 4;
  left: 38%;
  top: 51%;
  width: 18%;
  height: 7%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  opacity: 0;
}
.typing-marks i {
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: #1e6948;
  opacity: 0.6;
  transform: rotate(-22deg);
}
.is-animating.role-copy .typing-marks,
.is-animating.role-social .typing-marks,
.is-animating.role-developer .typing-marks {
  animation: office-keystrokes 1.1s steps(3, end) infinite;
  animation-delay: var(--motion-offset);
}
.typing-marks i:nth-child(2) {
  height: 7px;
  transform: translateY(-2px) rotate(8deg);
}
.typing-marks i:nth-child(3) {
  transform: rotate(23deg);
}
.work-bubble {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, 3px);
  padding: 5px 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d6e0cd;
  background: #fffdfcf5;
  color: var(--forest);
  border-radius: 7px;
  box-shadow: 0 2px 8px #173d2912;
  font-size: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}
.work-bubble small {
  font-size: 7px;
  color: #819177;
  border-left: 1px solid #dae1d3;
  padding-left: 4px;
}
.is-animating .work-bubble {
  animation: office-work-note 8s ease-in-out infinite;
  animation-delay: var(--motion-offset);
}
.work-bubble-dots {
  display: flex;
  gap: 2px;
  align-items: center;
}
.work-bubble-dots i {
  height: 3px;
  width: 3px;
  background: #688762;
  border-radius: 50%;
}
.is-animating .work-bubble-dots i {
  animation: office-dot 1s ease-in-out infinite;
}
.work-bubble-dots i:nth-child(2) {
  animation-delay: 0.18s;
}
.work-bubble-dots i:nth-child(3) {
  animation-delay: 0.36s;
}
.is-animating .station-caption .status-dot {
  animation: office-dot 2s ease-in-out infinite;
  animation-delay: var(--motion-offset);
}
.is-paused .figure-head,
.is-paused .figure-body {
  transform: translateY(2px);
}
@keyframes office-look {
  0%,
  10%,
  100% {
    transform: rotate(-1deg) translateY(0);
  }
  28%,
  42% {
    transform: rotate(4deg) translate(1px, 3px);
  }
  60%,
  69% {
    transform: rotate(-3deg) translate(-1px, 0);
  }
  82% {
    transform: rotate(1deg) translateY(2px);
  }
}
@keyframes office-breathe {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  48% {
    transform: translateY(-1.5px) rotate(0.8deg);
  }
}
@keyframes office-type {
  0%,
  100% {
    transform: translateY(0) rotate(-0.35deg);
  }
  25% {
    transform: translateY(0.8px) rotate(0.55deg);
  }
  55% {
    transform: translateY(-0.8px) rotate(-0.45deg);
  }
  78% {
    transform: translateY(0.5px) rotate(0.35deg);
  }
}
@keyframes office-draw {
  0%,
  100% {
    transform: rotate(-1deg) translateX(-1px);
  }
  25% {
    transform: rotate(0.6deg) translateX(1px);
  }
  60% {
    transform: rotate(1.7deg) translate(2px, 1px);
  }
}
@keyframes office-keystrokes {
  0%,
  45%,
  100% {
    opacity: 0;
    transform: translateY(1px);
  }
  20%,
  65% {
    opacity: 0.65;
    transform: translateY(-2px);
  }
}
@keyframes office-work-note {
  0%,
  12%,
  58%,
  100% {
    opacity: 0;
    transform: translate(-50%, 3px);
  }
  20%,
  49% {
    opacity: 1;
    transform: translate(-50%, -3px);
  }
}
@keyframes office-dot {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-1.5px);
  }
}
@media (max-width: 1150px) {
  .motion-toggle {
    font-size: 9px;
    padding: 6px;
  }
  .office-display-controls {
    gap: 4px;
  }
  .work-bubble {
    font-size: 7px;
    padding: 4px;
  }
  .work-bubble small {
    display: none;
  }
}
@media (max-width: 700px) {
  .office-instruction {
    max-width: 115px;
    line-height: 1.5;
  }
  .office-instruction > svg {
    display: none;
  }
  .office-display-controls {
    gap: 4px;
  }
  .motion-toggle {
    min-height: 36px;
    width: 31px;
    padding: 7px;
  }
  .motion-toggle > span {
    display: none;
  }
  .motion-toggle svg {
    width: 17px;
    height: 17px;
  }
  .work-bubble {
    font-size: 9px;
    top: 33%;
  }
  .station-caption small {
    font-size: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not(.explicit-motion) .station-figure *,
  :root:not(.explicit-motion) .work-bubble,
  :root:not(.explicit-motion) .work-bubble *,
  :root:not(.explicit-motion) .is-animating .status-dot {
    animation: none !important;
    will-change: auto !important;
  }
  :root:not(.explicit-motion) .work-bubble,
  :root:not(.explicit-motion) .typing-marks {
    display: none;
  }
}
