/* Button motion for Sam Sam. Three moves, each tied to the brand:
   - .btn: a round "plate" fills the button from the icon side, like a plate being served.
   - .arrow: the arrow slides out while its twin slides in from the other side (.arrow-down does it downwards).
   - .pin: the location pin drops in, as if you stick it on the map.
   Without motion everything still works: the fill just appears, icons stay put.
   Every button move shares one speed and one curve, so they all feel the same. */

:root { --btn-duration: .45s; --btn-curve: cubic-bezier(.22, 1, .36, 1); }

.btn { position: relative; isolation: isolate; overflow: hidden; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill, var(--color-ink));
  clip-path: circle(0% at var(--fill-x, 88%) 50%);
}
.btn:hover::before,
.btn:focus-visible::before { clip-path: circle(140% at var(--fill-x, 88%) 50%); }

.arrow { display: inline-grid; overflow: hidden; }
.arrow > i { grid-area: 1 / 1; }
.arrow > i + i { transform: translateX(-160%); }
.arrow-down > i + i { transform: translateY(-160%); }
.btn:hover .arrow > i:first-child,
.group:hover .arrow > i:first-child { transform: translateX(160%); }
.btn:hover .arrow-down > i:first-child { transform: translateY(160%); }
.btn:hover .arrow > i + i,
.group:hover .arrow > i + i { transform: none; }

/* Dish row button: stays the same size; it darkens and only the arrow moves. */
.group:hover .row-btn,
.group:focus-visible .row-btn { background-color: var(--color-olive); color: #fff; }
.pin { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .btn::before { transition: clip-path var(--btn-duration) var(--btn-curve); }
  .row-btn { transition: background-color var(--btn-duration) var(--btn-curve), color var(--btn-duration) var(--btn-curve); }

  .arrow > i { transition: transform var(--btn-duration) var(--btn-curve); }

  .btn:hover .pin,
  [data-pick]:hover .pin { animation: pin-drop var(--btn-duration) var(--btn-curve); }

  .external { transition: transform var(--btn-duration) var(--btn-curve); }
  .btn-color { transition: background-color var(--btn-duration) var(--btn-curve), color var(--btn-duration) var(--btn-curve), border-color var(--btn-duration) var(--btn-curve); }
  .nav-link::after { transition: transform var(--btn-duration) var(--btn-curve); }
  .btn:hover .external { transform: translate(2px, -2px); }
}

@keyframes pin-drop {
  0% { transform: translateY(0); }
  30% { transform: translateY(-7px); }
  65% { transform: translateY(1px); }
  100% { transform: translateY(0); }
}
