/* Mascot placements (Sabrina, 2026-10-03).
   The page dog is placed by mascot-placements.js on a real edge. It sits
   below the site chrome and menu, never takes pointer events, and peeks in
   once when it scrolls into view. Nothing loops. */
.mbm-dog {
  position: absolute;
  z-index: 6;
  left: 0;
  top: 0;
  width: 120px;
  pointer-events: none;
  user-select: none;
}
.mbm-dog img { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
  /* Top-edge dogs rise out from behind the edge; the part below the edge
     stays clipped until the end, so nothing shows through the section. */
  .mbm-dog--edge-top.is-waiting { opacity: 0; }
  .mbm-dog--edge-top.is-in { animation: mbmDogRise 640ms var(--ease-enter, cubic-bezier(0.22, 1, 0.36, 1)) both; }
  /* Card-edge dogs lean out from behind the card's left edge. */
  .mbm-dog--edge-left.is-waiting { opacity: 0; }
  .mbm-dog--edge-left.is-in { animation: mbmDogLean 640ms var(--ease-enter, cubic-bezier(0.22, 1, 0.36, 1)) both; }
}
/* Job K3 (2026-10-12): the entrance moves with transform, so a position and size set in the editor
   (the individual translate and scale properties) still apply during and after it. */
@keyframes mbmDogRise {
  from { opacity: 0; transform: translateY(28%); clip-path: inset(0 0 calc((1 - var(--mbm-dog-cut, 1) + 0.28) * 100%) 0); }
  30% { opacity: 1; }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
@keyframes mbmDogLean {
  from { opacity: 0; transform: translateX(24%); clip-path: inset(0 calc((1 - var(--mbm-dog-cut, 1) + 0.24) * 100%) 0 0); }
  30% { opacity: 1; }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}

/* ---- Existing dogs on phones (390, 375, 430) ---------------------------- */
@media (max-width: 767px) {
  /* Footer dog: the sleeping dog's ledge line (58.5% down the art) sits
     exactly on the footer's top edge, its back paws tucked behind the footer. */
  body .closing__dog { transform: translateY(-58.5%); right: 14px; width: 120px; }
  /* The homepage reviews dog floated over the reviews widget with its cut
     line on no edge and its cape past the screen edge. On phones the page
     dog now peeks over the top of the band below, inside the same padding. */
  body .reviews .mascot-trust-edge { display: none; }
}
