/* Pizza Hut demo: the menu (tools/builder/kits/ph_menu.py). Everything is placed in his 375 x 812 frame: --q is one of
   his points, so every left/top/width below is read straight off his recordings (tools/pizzahut/motion/menu.md). The
   motion lives in assets/js/ph-menu.js; this file only holds the resting layout and the start states. */
.phm-stage { display: grid; grid-template-columns: 330px minmax(0, 1fr); align-items: center; gap: clamp(48px, calc(var(--cw, 1150px) * 0.08), 120px); }
.phm-copy { order: 2; }
.phm-copy .ph-head { margin-bottom: 0; }   /* the phone sits left here, so the arrival and the menu alternate sides */
.phm-copy .phm-switch { margin-top: 32px; }
.phm-stage .pa-phone { width: 330px; }
@media (max-width: 999px) { .phm-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 32px; } .phm-copy { order: 0; justify-self: stretch; } .phm-stage .pa-phone { width: min(320px, 82%); } }

.phm { --q: calc(100cqw / 375); position: absolute; inset: 0; overflow: hidden; background: #fff; }
.phm img { display: block; max-width: none; }
.phm :where(button) { all: unset; box-sizing: border-box; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.phm :where(button):focus-visible { outline: 2px solid var(--pa-red); outline-offset: 2px; }

/* the two views share one window under his chips bar */
.phm-win { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.phm-grid, .phm-one { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform, opacity; }
.phm-grid { background: #fff; }
.phm-gl { position: absolute; inset: 0; }
/* his Cards 1 board: cards 164 x 216 on a 232 pitch, columns at 14 and 193; each image carries 10 of shadow round it */
.phm-c { position: absolute; width: calc(184 * var(--q)); height: calc(236 * var(--q)); }
.phm .phm-c img { width: 100%; height: 100%; }
.phm-one { background: #E6EAF0; opacity: 0; visibility: hidden; }
.phm-sc { position: absolute; left: 0; top: 0; width: calc(375 * var(--q)); will-change: transform; }
.phm .phm-stone { width: 100%; height: auto; }
/* the Meat Feast on his stone (centre 185.75, 463.75; radius 125.75): the one pizza that opens */
.phm-pz { position: absolute; left: calc(60 * var(--q)); top: calc(338 * var(--q)); width: calc(251.5 * var(--q)); height: calc(251.5 * var(--q)); border-radius: 50%; }

.phm-bar { position: absolute; z-index: 3; inset: 0 0 auto; height: calc(98.75 * var(--q)); background: #fff; box-shadow: 0 calc(1 * var(--q)) calc(4 * var(--q)) rgba(0, 0, 0, 0.16); }
.phm .phm-bar img { position: absolute; left: 0; bottom: 0; width: calc(375 * var(--q)); height: calc(55 * var(--q)); }

/* his round button: a white disc, the yum face (grid) or the grid (one at a time) in his red */
.phm-tog { position: absolute; z-index: 4; left: calc(304 * var(--q)); top: calc(114 * var(--q)); width: calc(54 * var(--q)); height: calc(54 * var(--q));
  border-radius: 50%; background: #fff; color: #C8102E; box-shadow: 0 calc(3 * var(--q)) calc(10 * var(--q)) rgba(0, 0, 0, 0.16); }
.phm .phm-tog { display: grid; place-items: center; }
.phm-tog-bg { position: absolute; inset: 0; border-radius: 50%; background: #C8102E; opacity: 0; }
.phm-ic { position: absolute; left: 50%; top: 50%; width: calc(40 * var(--q)); height: calc(40 * var(--q)); margin: calc(-20 * var(--q)) 0 0 calc(-20 * var(--q)); }
.phm-ic-grid { opacity: 0; transform: scale(0.4); }

/* the product page: his frame, the pizza lifted out (it flies in as .phm-fly), his details board over it */
.phm-veil { position: absolute; z-index: 5; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.phm-pd { position: absolute; z-index: 6; inset: 0; visibility: hidden; }
.phm .phm-pd-bg { position: absolute; left: 0; top: 0; width: calc(375 * var(--q)); height: calc(464 * var(--q)); opacity: 0;
  -webkit-mask: linear-gradient(#000 92%, transparent); mask: linear-gradient(#000 92%, transparent); }
.phm .phm-pd-ui { position: absolute; left: calc(1 * var(--q)); top: calc(435 * var(--q)); width: calc(375 * var(--q)); height: calc(380 * var(--q)); opacity: 0; }
.phm-x { position: absolute; z-index: 10; left: calc(309.25 * var(--q)); top: calc(54.25 * var(--q)); width: calc(37.5 * var(--q)); height: calc(37.5 * var(--q)); border-radius: 50%;
  background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #111; opacity: 0; }
.phm .phm-x { display: grid; place-items: center; }
.phm-x svg { width: calc(14 * var(--q)); height: calc(14 * var(--q)); }
.phm-add { position: absolute; z-index: 10; left: calc(22 * var(--q)); top: calc(724 * var(--q)); width: calc(331 * var(--q)); height: calc(52 * var(--q)); border-radius: calc(10 * var(--q));
  transform: translateY(calc(100 * var(--q))); }
.phm .phm-add img { width: 100%; height: 100%; }

.phm:not([data-v="pd"]) .phm-x, .phm:not([data-v="pd"]) .phm-add, .phm:not([data-v="one"]) .phm-pz, .phm[data-v="pd"] .phm-tog { pointer-events: none; }
/* the shared pizza and the shared name: they leave the stone and become the page */
.phm .phm-fly { position: absolute; z-index: 7; left: 0; top: 0; width: calc(251.5 * var(--q)); height: calc(251.5 * var(--q)); opacity: 0; pointer-events: none; transform-origin: 50% 50%; will-change: transform; }
.phm .phm-title { position: absolute; z-index: 8; left: calc(131 * var(--q)); top: calc(370 * var(--q)); width: calc(115 * var(--q)); height: calc(25 * var(--q)); opacity: 0; pointer-events: none; transform-origin: 50% 50%; }

/* Review and Pay: his bar, rising once something is in the basket */
.phm-pay { position: absolute; z-index: 9; left: 0; bottom: 0; width: calc(375 * var(--q)); height: calc(91 * var(--q)); transform: translateY(101%); pointer-events: none; }
.phm .phm-pay img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.phm .phm-pay .phm-bag { left: calc(252 * var(--q)); top: calc(17 * var(--q)); width: calc(34 * var(--q)); height: calc(36 * var(--q)); transform-origin: 50% 100%; }

/* the switch beside the phone, in the site's own chips */
.phm-switch { display: inline-flex; gap: 6px; padding: 5px; border-radius: 99px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07); }
.phm-switch button { all: unset; cursor: pointer; padding: 9px 16px; border-radius: 99px; color: var(--ph-soft, #555); font-weight: 600; transition: background 0.25s ease, color 0.25s ease; }
.phm-switch button.on { background: var(--ph-red, #C8102E); color: #fff; }
.phm-switch button:focus-visible { outline: 2px solid var(--ph-red, #C8102E); outline-offset: 2px; }
