/* Journey map · the "Found" illustration.
   The old map was decoration: fixed pins, a search string cycling above it.
   This one tells a story. Each pin is one pet owner moving through a journey
   in the same place — searched, opened your site, booked, gone — and at most
   two run at once so a glance is readable.

   Configured entirely through custom properties so the module can be reused
   at other sizes without touching this file. */
.pmap {
  --pm-bg: var(--paper-2);
  --pm-road: var(--paper);
  --pm-park: #cfd9c8;
  --pm-you: var(--slate);
  --pm-ink: var(--ink);
  --pm-h: clamp(270px, 32vw, 330px);

  position: relative;
  height: var(--pm-h);
  border-radius: var(--r);
  background: var(--pm-bg);
  overflow: hidden;
  isolation: isolate;
}
/* inside a petrol section the map stays a map, just a darker-toned one */
.sec--ink .pmap { --pm-bg: #1d3d49; --pm-road: #24495708; --pm-road: #244957; --pm-park: #2a4a44; --pm-ink: var(--paper); --pm-you: var(--slate-light); }

/* ---- the ground: roads drawn as gradients, no image request ---- */
.pmap__ground { position: absolute; inset: 0; }
.pmap__ground::before,
.pmap__ground::after {
  content: "";
  position: absolute;
  inset: -20%;
  background-repeat: repeat;
}
.pmap__ground::before {
  background-image:
    linear-gradient(90deg, transparent 0 46px, var(--pm-road) 46px 56px, transparent 56px 100%),
    linear-gradient(0deg, transparent 0 58px, var(--pm-road) 58px 67px, transparent 67px 100%);
  background-size: 118px 118px, 118px 118px;
  opacity: .9;
}
.pmap__ground::after {
  background-image: linear-gradient(26deg, transparent 0 49.2%, var(--pm-road) 49.2% 50.8%, transparent 50.8% 100%);
  background-size: 100% 100%;
  opacity: .8;
}
.pmap__park { position: absolute; background: var(--pm-park); border-radius: 10px; opacity: .55; }

/* ---- the clinic, and the reach around it ---- */
.pmap__you {
  position: absolute;
  left: 50%;
  top: 54%;
  translate: -50% -50%;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 7px;
}
.pmap__you i {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--pm-you);
  color: var(--paper);
  display: grid;
  place-items: center;
  box-shadow: 0 3px 12px rgba(22, 21, 19, .3);
}
.pmap__you svg { width: 23px; height: 23px; }
.pmap__you small {
  font: 600 11px/1 var(--f-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--pm-ink);
  color: var(--pm-bg);
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pmap__ring {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 1.5px solid var(--pm-you);
  border-radius: 999px;
  opacity: 0;
  z-index: 2;
  animation: pm-ring 4.4s ease-out infinite;
}
.pmap__ring:nth-of-type(2) { animation-delay: 1.45s; }
.pmap__ring:nth-of-type(3) { animation-delay: 2.9s; }
@keyframes pm-ring {
  0% { transform: scale(.4); opacity: 0; }
  12% { opacity: .5; }
  100% { transform: scale(5.6); opacity: 0; }
}

/* ---- a journey ---- */
.pm-j {
  position: absolute;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 6px;
  translate: -50% -100%;
  opacity: 0;
  animation: pm-in .45s cubic-bezier(.3, 1.5, .5, 1) forwards;
}
.pm-j.is-out { animation: pm-out .4s ease-in forwards; }
@keyframes pm-in { from { opacity: 0; transform: translateY(-12px) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes pm-out { to { opacity: 0; transform: translateY(-10px) scale(.92); } }

.pm-j__lab {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 225px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(22, 21, 19, .16);
  font: 600 12.5px/1.25 var(--f-body);
  white-space: nowrap;
}
.pm-j__lab svg { width: 14px; height: 14px; flex: none; }
.pm-j__lab span { overflow: hidden; text-overflow: ellipsis; }
.pm-j__lab.is-swap { animation: pm-swap .42s var(--ease); }
@keyframes pm-swap { 0% { transform: translateY(-5px); opacity: .25; } }

.pm-j__pin {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 3px solid var(--paper);
  background: var(--slate-deep);
  box-shadow: 0 2px 7px rgba(22, 21, 19, .35);
  transition: background-color .3s;
}
.pm-j[data-stage="2"] .pm-j__pin { background: #c98f4f; }
.pm-j[data-stage="3"] .pm-j__pin { background: var(--ok); animation: pm-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pm-pop { 40% { transform: scale(1.5); } }

/* the booked pin sends one ripple back toward the clinic */
.pm-j__wave {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border: 2px solid var(--ok);
  border-radius: 999px;
  opacity: 0;
}
.pm-j[data-stage="3"] .pm-j__wave { animation: pm-wave .9s ease-out 2; }
@keyframes pm-wave { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(3.4); opacity: 0; } }

/* ---- the tally: what the map is actually claiming ---- */
.pmap__tally {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font: 600 12px/1 var(--f-mono);
  color: var(--ink);
}
.pmap__tally b { font-variant-numeric: tabular-nums; font-size: 14px; }
.pmap__tally .d { width: 7px; height: 7px; border-radius: 999px; background: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  .pmap__ring { animation: none; opacity: .3; transform: scale(2.4); }
  .pmap__ring:nth-of-type(2) { transform: scale(3.9); }
  .pmap__ring:nth-of-type(3) { transform: scale(5.2); }
  .pm-j { animation: none; opacity: 1; }
  .pm-j__lab.is-swap, .pm-j[data-stage="3"] .pm-j__pin, .pm-j[data-stage="3"] .pm-j__wave { animation: none; }
}
@media (max-width: 520px) {
  .pm-j__lab { max-width: 175px; font-size: 11.5px; padding: 6px 9px; }
}
