/* Scroll-scrubbed 3-card menu fan. Timing lives in js/menu-fan.js */

html:has([data-menu-fan]) {
  scroll-behavior: auto;
}

.menu-fan-flow {
  position: relative;
  width: 100%;
  min-height: 100svh;
  margin: 8px 0 56px;
  background: var(--ww-bg, #fff);
}

.menu-fan {
  --menu-page-w: 560;
  --menu-page-h: 794;
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
  margin: 0;
  overflow: visible;
  background: var(--ww-bg, #fff);
}

.menu-fan__stage {
  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  box-sizing: border-box;
  overflow: hidden;
  touch-action: pan-y;
  background: transparent;
}

.menu-fan__backdrop {
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  left: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: var(--ww-radius, 5px);
  pointer-events: none;
}

.menu-fan__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.menu-fan__scene {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.menu-fan__slot {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.menu-fan__card {
  position: absolute;
  left: 50%;
  top: 50%;
  overflow: hidden;
  border-radius: 0;
  background: #f4f1ea;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.084),
    0 0 2px rgba(0, 0, 0, 0.044);
}

.menu-fan__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 0;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.menu-fan--reduced {
  margin-bottom: 48px;
}

.menu-fan--reduced .menu-fan__backdrop {
  display: none;
}

.menu-fan--reduced .menu-fan__stage {
  display: none;
}

.menu-fan__reduced {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.menu-fan__reduced-page {
  margin: 0;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.menu-fan__reduced-page.is-in {
  opacity: 1;
  transform: none;
}

.menu-fan__reduced-frame {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 560 / 794;
  margin: 0 auto;
  overflow: hidden;
  background: #f4f1ea;
  border-radius: 0;
}

.menu-fan__reduced-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 0;
  display: block;
}

.menu-fan__reduced-page figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ww-muted);
}

@media (max-width: 809px) {
  .menu-fan__stage {
    padding: 8px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-fan__reduced-page {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
