/* Gentle effects are driven only by scroll updates from hero-motion.js. */
.dish-photo[data-menu-category="tacos"] > img { object-position: 35% 50%; }

.hero-motion {
  --scroll-tilt-x: 0deg;
  --scroll-tilt-y: 0deg;
  --scroll-lift: 0px;
  --scroll-pan: 0px;
  --scroll-zoom: 1;
  min-width: 0;
}

.hero-motion-viewport {
  padding: 12px;
  margin: -12px;
  overflow: hidden;
  isolation: isolate;
}

.hero-motion-stage {
  position: relative;
  perspective: 1100px;
  perspective-origin: 50% 45%;
}

.hero-depth-scene {
  position: relative;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transform: translateY(var(--scroll-lift)) rotateX(var(--scroll-tilt-x)) rotateY(var(--scroll-tilt-y));
  animation: none;
  transition: none;
}

.hero-depth-scene::before,
.hero-depth-scene::after,
.hero-motion .hero-image-wrap::before,
.hero-motion .hero-image-wrap::after {
  content: none;
  display: none;
}

.hero-motion .hero-image-wrap {
  position: relative;
  transform: translateZ(0);
  backface-visibility: hidden;
  box-shadow: 0 10px 22px -16px rgba(16, 50, 34, .3);
  border: 1px solid rgba(255, 253, 250, .7);
}

.hero-motion .hero-image-wrap > img {
  position: relative;
  /* A small overscan prevents a blank edge at either end of the 6.5px pan. */
  top: -7px;
  width: 100%;
  height: calc(100% + 14px);
  object-fit: cover;
  object-position: 50% 0%;
  transform-origin: 50% 0%;
  transform: translateY(var(--scroll-pan)) scale(var(--scroll-zoom));
  backface-visibility: hidden;
  animation: none;
  transition: none;
}

.hero-depth-scene > .image-label {
  bottom: 22px;
  left: 22px;
  transform: translateZ(8px);
  backface-visibility: hidden;
  box-shadow: 0 2px 6px rgba(16, 50, 34, .1);
}

.hero-motion[data-motion="off"] .hero-depth-scene,
.hero-motion[data-motion="off"] .hero-image-wrap,
.hero-motion[data-motion="off"] .hero-image-wrap > img,
.hero-motion[data-motion="off"] .image-label {
  transform: none;
}

.hero-motion[data-motion="off"] .hero-image-wrap > img {
  top: 0;
  height: 100%;
}

.hero-motion-toggle {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 61, 45, .16);
  border-radius: 4px;
  background: rgba(255, 253, 250, .97);
  color: var(--green);
  box-shadow: 0 3px 12px rgba(16, 50, 34, .1);
  font: 600 10px/1.4 var(--body);
  white-space: nowrap;
}

.hero-motion-toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.hero-motion-toggle svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-motion-toggle .motion-play-icon,
.hero-motion-toggle[aria-pressed="false"] .motion-pause-icon { display: none; }
.hero-motion-toggle[aria-pressed="false"] .motion-play-icon { display: block; }

.scroll-accents {
  --accents-top: calc(var(--language-strip-height, 56px) + var(--header-row-height, 99px) + 1px);
  position: fixed;
  z-index: 5;
  top: var(--accents-top);
  left: 0;
  right: 0;
  height: calc(100vh - var(--accents-top));
  height: calc(100dvh - var(--accents-top));
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.scroll-lime {
  position: absolute;
  top: 0;
  display: block;
  max-width: none;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  animation: none;
  transition: none;
}

@media (max-width: 800px) {
  .hero-motion-stage { perspective: 1000px; }
  .hero-depth-scene > .image-label { left: 15px; bottom: 15px; }
}

@media (max-width: 640px) {
  .hero-motion-stage { perspective: 900px; }
  .hero-motion .hero-image-wrap { height: max(315px, calc(80vw - 32px)); }
  .hero-motion-toggle { width: 44px; padding: 10px; right: 13px; bottom: 17px; }
  .hero-motion-toggle > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 360px) {
  .hero-motion .hero-image-wrap { height: 275px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-motion-stage { perspective: none; }
  .hero-motion .hero-depth-scene,
  .hero-motion .hero-image-wrap,
  .hero-motion .hero-image-wrap > img,
  .hero-motion .image-label,
  .scroll-lime {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .hero-motion .hero-image-wrap > img { top: 0; height: 100%; }
  .hero-depth-scene > .image-label { box-shadow: none; }
  .scroll-accents,
  .hero-motion-toggle { display: none !important; }
}
