.boop-brand {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  flex: none;
  width: clamp(164px, 15vw, 194px);
}

.boop-home, .boop-nose { grid-area: 1 / 1; }
.boop-home { display: block; border-radius: 5px; }
.boop-art {
  position: relative;
  display: block;
  aspect-ratio: 15 / 4;
  background: url("/assets/boop-base.webp") center / contain no-repeat;
}
.boop-head, .boop-eye {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}
.boop-head {
  background-image: url("/assets/boop-head.webp");
  transform-origin: 62.7% 36%;
}
.boop-eye { background-image: url("/assets/boop-blink.webp"); opacity: 0; }
.boop-tagline {
  grid-area: 2 / 1;
  justify-self: center;
  margin-top: -1px;
  color: #4b4030;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

/* The hit area stays still while the dog's head moves around the collar. */
.boop-nose {
  position: relative;
  z-index: 1;
  align-self: start;
  justify-self: start;
  left: 56.85%;
  top: 18.2%;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  touch-action: manipulation;
}
.boop-nose:focus-visible { outline: 2px solid #7156a0; outline-offset: 2px; }
.boop-brand[data-booping] .boop-head { animation: boop-recoil 720ms both; }
.boop-brand[data-booping] .boop-eye { animation: boop-blink 720ms both; }

@keyframes boop-recoil {
  0%, 100% { transform: none; }
  16% { transform: translate(1.3%, .8%) rotate(9deg); animation-timing-function: ease-out; }
  36% { transform: translate(.9%, .5%) rotate(5deg); }
  63% { transform: translate(-.35%, 0) rotate(-2.4deg); }
  82% { transform: rotate(.8deg); }
}
@keyframes boop-blink {
  0%, 5%, 33%, 100% { opacity: 0; }
  11%, 24% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .boop-brand[data-booping] .boop-head { animation: none; }
  .boop-brand[data-booping] .boop-eye { animation: boop-still-blink 230ms step-end; }
  @keyframes boop-still-blink { from { opacity: 1; } to { opacity: 0; } }
}
@media (pointer: coarse) {
  .boop-nose { width: 36px; height: 36px; }
}
@media (max-width: 670px) {
  .boop-brand { width: clamp(117px, 33vw, 160px); }
  .boop-tagline { font-size: 11px; }
}
@media (max-width: 410px) {
  .site-header .nav { column-gap: 4px; }
  .site-header .user-nav { gap: 8px; font-size: 12px; }
  .site-header .bag-link { gap: 4px; padding-left: 6px; }
}
