* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: #e9efdf;
  color: #18382c;
  font-family: system-ui, sans-serif;
}
main {
  max-width: 46rem;
  margin: auto;
  padding: 3rem 1rem;
  text-align: center;
}
h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.6rem);
  letter-spacing: -0.05em;
}
p {
  line-height: 1.6;
}
.robot {
  width: 300px;
  max-width: 100%;
  margin: 3rem auto;
  padding-top: 2rem;
  outline-offset: 1rem;
}
.robot:focus-visible {
  outline: 3px solid #234e43;
  border-radius: 12px;
}
.head {
  position: relative;
  width: 180px;
  height: 115px;
  margin: auto auto 12px;
  background: #759c3a;
  border-radius: 95px 95px 0 0;
  transform-origin: bottom center;
}
.head::before,
.head::after {
  content: "";
  position: absolute;
  top: -20px;
  height: 42px;
  width: 7px;
  border-radius: 7px;
  background: #759c3a;
}
.head::before {
  left: 34px;
  transform: rotate(-30deg);
}
.head::after {
  right: 34px;
  transform: rotate(30deg);
}
.eye {
  position: absolute;
  top: 55px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: white;
}
.left-eye {
  left: 41px;
}
.right-eye {
  right: 41px;
}
.upper-body {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.torso {
  width: 180px;
  height: 155px;
  border-radius: 0 0 28px 28px;
  background: #759c3a;
}
.arm {
  width: 35px;
  height: 125px;
  background: #759c3a;
  border-radius: 30px;
  transform-origin: 50% 17px;
}
.lower-body {
  display: flex;
  justify-content: center;
  gap: 54px;
  margin-top: -15px;
  padding-top: 0;
}
.leg {
  width: 35px;
  height: 90px;
  background: #759c3a;
  border-radius: 0 0 25px 25px;
  transform-origin: top center;
}
.robot:is(:hover, :focus) .head {
  animation: nod 1.1s ease-in-out infinite alternate;
}
.robot:is(:hover, :focus) .right-arm {
  animation: wave 0.8s ease-in-out infinite alternate;
}
.robot:is(:hover, :focus) .left-leg {
  animation: step 0.8s ease-in-out infinite alternate;
}
.robot:is(:hover, :focus) .right-leg {
  animation: step 0.8s ease-in-out infinite alternate-reverse;
}
@keyframes nod {
  to {
    transform: rotate(8deg) scale(1.15);
  }
}
@keyframes wave {
  from {
    transform: rotate(80deg);
  }
  to {
    transform: rotate(145deg);
  }
}
@keyframes step {
  to {
    transform: rotate(18deg);
  }
}
.note {
  color: #48644f;
  font-size: 0.9rem;
}
@media (prefers-reduced-motion: reduce) {
  .robot * {
    animation: none !important;
  }
}
