/* Pizza Hut demo: the arrival (tools/builder/kits/ph_arrive.py). His Universal App Showcase, laid out from his frames in
   points (his 886px recording over a 393pt phone) and moved by assets/js/ph-arrive.js from his frames
   (tools/pizzahut/motion/arrive.md). Every moving part starts where his first frame has it; GSAP owns the motion, so
   nothing here transitions. The copy sits beside the phone so the heading and the phone share the first screen. */
.pha-stage { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: center; gap: clamp(48px, calc(var(--cw, 1150px) * 0.08), 120px); }
.pha-copy .ph-head { margin-bottom: 0; }
.pha-copy .pha-steps { display: grid; gap: 18px; margin: 36px 0 0; padding: 0; list-style: none; counter-reset: pha; }
.pha-steps li { position: relative; padding-left: 38px; color: var(--ph-soft, #555); counter-increment: pha; }
.pha-steps li::before { content: counter(pha, decimal-leading-zero); position: absolute; left: 0; top: 0; color: var(--ph-red, #C8102E); font-weight: 600; font-variant-numeric: tabular-nums; }
.pha-steps b { display: block; color: var(--ph-ink, #111); font-weight: 600; }
.pha-stage .pa-phone { width: 330px; }

/* the screen: his start screen, the keyboard, the menu with its sheet, the wait, and the splash on top */
.pha { --u: var(--p); position: absolute; inset: 0; overflow: hidden; background: #fff; color: var(--pa-ink); }
.pha > * { position: absolute; inset: 0; }
.pha-start { background: #fff; }
.pha .pha-film { position: absolute; left: 0; top: calc(300 * var(--u)); width: 100%; height: calc(552 * var(--u)); object-fit: cover; }
.pha-fade { position: absolute; inset: 0; pointer-events: none;
  /* his fade, measured row by row on his Universal App Showcase (8s): white to 378pt, then the food comes through,
     full and vivid from about 700pt (it was held at 60% white to the bottom, which washed the shot out) */
  background: linear-gradient(180deg, #fff calc(378 * var(--u)), rgba(255, 255, 255, 0.87) calc(420 * var(--u)), rgba(255, 255, 255, 0.74) calc(460 * var(--u)),
    rgba(255, 255, 255, 0.6) calc(500 * var(--u)), rgba(255, 255, 255, 0.5) calc(540 * var(--u)), rgba(255, 255, 255, 0.42) calc(580 * var(--u)),
    rgba(255, 255, 255, 0.32) calc(620 * var(--u)), rgba(255, 255, 255, 0.22) calc(660 * var(--u)), rgba(255, 255, 255, 0) calc(705 * var(--u))); }
.pha-copy-in { position: absolute; inset: 0; }
.pha .pha-hut { position: absolute; left: calc(19.5 * var(--u)); top: calc(61.2 * var(--u)); width: calc(110.9 * var(--u)); height: auto; }
.pha .pha-hungry { position: absolute; left: calc(18.6 * var(--u)); top: calc(123.3 * var(--u)); width: calc(250.2 * var(--u)); height: auto; }
.pha-sub { position: absolute; left: calc(20.4 * var(--u)); top: calc(216.6 * var(--u)); color: #000; font-size: calc(var(--a-title-l) * var(--u)); font-weight: 800; line-height: calc(33.5 * var(--u)); letter-spacing: -0.026em; white-space: nowrap; }
.pha-field { position: absolute; left: calc(17 * var(--u)); top: calc(317.2 * var(--u)); width: calc(359.4 * var(--u)); height: calc(62.5 * var(--u)); border-radius: calc(6.7 * var(--u)); background: #F8F7FC; }
.pha-ph, .pha-lab { position: absolute; left: calc(17 * var(--u)); color: #AEADB5; white-space: nowrap; transform-origin: 0 50%; }
.pha-ph { top: calc(19.5 * var(--u)); font-size: calc(var(--a-callout) * var(--u)); }
.pha-lab { top: calc(11.2 * var(--u)); font-size: calc(var(--a-caption) * var(--u)); font-weight: 500; }
.pha-val { position: absolute; left: calc(17 * var(--u)); top: calc(31.5 * var(--u)); display: flex; align-items: center; height: calc(20 * var(--u)); color: #000; font-size: calc(var(--a-callout) * var(--u)); font-weight: 500; white-space: pre; }
.pha-caret { width: calc(2 * var(--u)); height: calc(19 * var(--u)); margin-left: calc(1 * var(--u)); border-radius: 1px; background: #D10024; opacity: 0; }
.pha .pha-loc { position: absolute; left: calc(318.3 * var(--u)); top: calc(20.8 * var(--u)); width: calc(22.6 * var(--u)); height: auto; }
/* his three ways in, on a white panel that rises over the film */
.pha-panel { position: absolute; left: 0; right: 0; top: calc(552.7 * var(--u)); bottom: 0; inset: calc(552.7 * var(--u)) 0 0; border-radius: calc(20 * var(--u)) calc(20 * var(--u)) 0 0; background: #fff; }
.pha-opt { position: absolute; left: calc(17.7 * var(--u)); width: calc(358.4 * var(--u)); height: calc(62 * var(--u)); display: flex; align-items: center; justify-content: flex-end;
  padding-right: calc(24.6 * var(--u)); border-radius: calc(8 * var(--u)); background: #CB0F31; color: #fff; font-size: calc(var(--a-body) * var(--u)); font-weight: 700; letter-spacing: -0.01em; }
.pha-opt[data-o="delivery"] { top: calc(23.5 * var(--u)); }
.pha-opt[data-o="walkin"] { top: calc(101.1 * var(--u)); }
.pha-opt[data-o="car"] { top: calc(179.2 * var(--u)); }
.pha .pha-opt img { position: absolute; top: calc(14.2 * var(--u)); left: calc(16.5 * var(--u)); width: calc(41.3 * var(--u)); height: auto; }
.pha .pha-opt[data-o="walkin"] img { top: calc(13.3 * var(--u)); left: calc(13.8 * var(--u)); }
.pha .pha-opt[data-o="car"] img { top: calc(12.8 * var(--u)); left: calc(15.1 * var(--u)); width: calc(43.9 * var(--u)); }

/* the iOS keyboard from his Location recording */
.pha-kb { inset: auto 0 0; height: calc(291 * var(--u)); padding-top: calc(7.5 * var(--u)); background: #D1D3D9; font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif; color: #000; }
.kb-r { display: flex; justify-content: center; gap: calc(6.3 * var(--u)); padding: 0 calc(3.1 * var(--u)); margin-bottom: calc(12 * var(--u)) !important; }
.kb-k { position: relative; flex: 0 0 calc(33 * var(--u)); height: calc(42 * var(--u)); display: grid; place-items: center; border-radius: calc(5 * var(--u)); background: #fff;
  box-shadow: 0 calc(1 * var(--u)) 0 #898A8D; font-size: calc(var(--a-title-m) * var(--u)); line-height: 1; }
.kb-k b { grid-area: 1 / 1; font-weight: 400; }
.kb-n { opacity: 0; }
.pha-kb.num .kb-a { opacity: 0; }
.pha-kb.num .kb-n { opacity: 1; }
.kb-fn { flex-basis: calc(44 * var(--u)); background: #ABB0BA; }
.kb-r2 .kb-fn { margin: 0 calc(7.5 * var(--u)); }
.kb-r2 .kb-shift { margin-left: 0; } .kb-r2 .kb-del { margin-right: 0; }
.kb-fn svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.kb-shift .kb-sym { font-size: calc(var(--a-callout) * var(--u)); }
.pha-kb.num .kb-shift svg { opacity: 0; }
.kb-r3 .kb-k { font-size: calc(var(--a-callout) * var(--u)); }
.kb-123 { flex-basis: calc(91 * var(--u)); }
.kb-space { flex-basis: calc(190.5 * var(--u)); }
.kb-go { flex-basis: calc(91 * var(--u)); background: #0A7AFF; color: #fff; }
.kb-k.down { background: #ABB0BA; }
.kb-go.down { background: #0060D6; }
.kb-bot { display: flex; justify-content: space-between; padding: calc(14 * var(--u)) calc(28 * var(--u)) 0; color: #50555C; }
.kb-bot svg { width: calc(30 * var(--u)); height: calc(30 * var(--u)); }
/* the key's balloon: the letter rises above the finger, as iOS draws it */
.kb-pop { position: absolute; z-index: 2; left: 0; top: 0; width: calc(48 * var(--u)); height: calc(104 * var(--u)); padding-top: calc(10 * var(--u));
  border-radius: calc(10 * var(--u)) calc(10 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)); background: #fff; box-shadow: 0 calc(1 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.28);
  font-size: calc(var(--a-large) * var(--u)); text-align: center; clip-path: polygon(0 0, 100% 0, 100% 50%, 85% 58%, 85% 100%, 15% 100%, 15% 58%, 0 50%); opacity: 0; pointer-events: none; }

/* his home screen comes up under the sheet; the sheet: Delivery, Pick up, Curbside, each with his map */
.pha-menu { visibility: hidden; isolation: isolate; }   /* its chips, dim and sheet stack inside it, never over the splash */
.pas-dim { position: absolute; z-index: 5; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.pas { position: absolute; z-index: 6; left: 0; right: 0; top: calc(108.2 * var(--u)); height: calc(766 * var(--u)); border-radius: calc(17 * var(--u)) calc(17 * var(--u)) 0 0; background: #fff; }
.pas-tabs { position: absolute; left: calc(36.4 * var(--u)); top: calc(29.3 * var(--u)); display: flex; gap: calc(15.6 * var(--u)); }
.pas-tabs span { position: relative; display: grid; place-items: center; height: calc(42.6 * var(--u)); padding: 0 calc(16.2 * var(--u)); border-radius: calc(6 * var(--u)); background: #FCF8FC; color: #000; font-size: calc(var(--a-body) * var(--u)); font-weight: 500; }
.pas-tabs span::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #CB0F31; opacity: var(--on, 0); }
.pas-tabs span > * , .pas-tabs span { isolation: isolate; }
.pas-tabs b { position: relative; font-weight: inherit; }
.pas-maps { position: absolute; left: 0; right: 0; top: calc(102.9 * var(--u)); height: calc(155.2 * var(--u)); overflow: hidden; background: #8B878B; }
.pas .pas-map, .pas .pas-veil { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.pas .pas-pin { position: absolute; left: calc(180.1 * var(--u)); top: calc(44.4 * var(--u)); width: calc(33.7 * var(--u)); height: auto; }
.pas-body { position: absolute; left: calc(42 * var(--u)); right: calc(37.4 * var(--u)); top: calc(258.1 * var(--u)); font-size: calc(var(--a-body) * var(--u)); line-height: calc(20.7 * var(--u)); color: #000; }
.pas-blk, .pas-row, .pas-park { position: relative; }
.pas-k { font-weight: 700; font-size: calc(var(--a-callout) * var(--u)); }
.pas-row { display: flex; justify-content: space-between; align-items: flex-start; }
.pas-act { color: #CB0F31; white-space: nowrap; }
.pas-soft { color: #A8A7AF; }
.pas-blk .pas-k { padding-top: calc(33 * var(--u)); }
.pas-blk .pas-row:first-of-type { padding-top: calc(22 * var(--u)); padding-bottom: calc(20.5 * var(--u)); border-bottom: calc(0.9 * var(--u)) solid #F5E6EA; }
.pas-note { padding: calc(18.5 * var(--u)) 0 calc(20.5 * var(--u)); border-bottom: calc(0.9 * var(--u)) solid #F5E6EA; }
.pas-when { padding-top: calc(21.4 * var(--u)); }
.pas-when > span:first-child { display: flex; align-items: center; gap: calc(9.5 * var(--u)); margin-left: calc(-1.3 * var(--u)); }
.pas-clock { width: calc(21 * var(--u)); height: calc(21 * var(--u)); color: #000; }
.pas-clock * { stroke-width: 2.1; }
.pas-park { padding-top: calc(50.4 * var(--u)); }
.pas:not([data-m="delivery"]) .pas-when { padding-top: calc(18.2 * var(--u)); }
.pas-spots { display: flex; gap: calc(17.7 * var(--u)); margin: calc(27.3 * var(--u)) 0 0 calc(-3 * var(--u)) !important; }
.pas-spot { position: relative; display: grid; place-items: center; width: calc(42 * var(--u)); height: calc(42 * var(--u)); border-radius: calc(6 * var(--u)); background: #FCF8FC; font-size: calc(var(--a-body) * var(--u)); }
.pas-spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #CB0F31; opacity: var(--on, 0); }
.pas-spot b { position: relative; font-weight: 400; }
.pas .pas-ok { position: absolute; left: calc(16.9 * var(--u)); right: calc(16.9 * var(--u)); top: calc(634.8 * var(--u)); height: calc(62 * var(--u)); border-radius: calc(8 * var(--u)); background: #CB0F31; font-size: calc(var(--a-body) * var(--u)); }
/* which blocks each way in shows */
.pas-from, .pas-park { display: none; }
.pas[data-m="pickup"] .pas-to, .pas[data-m="curbside"] .pas-to { display: none; }
.pas[data-m="pickup"] .pas-from, .pas[data-m="curbside"] .pas-from, .pas[data-m="curbside"] .pas-park { display: block; }

/* the wait: his dim and his loading pulse */
.pha-wait { background: #000; opacity: 0; pointer-events: none; }
.pha-wait i { position: absolute; left: 50%; top: 50%; width: calc(44 * var(--u)); height: calc(44 * var(--u)); margin: calc(-22 * var(--u)) 0 0 calc(-22 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.5); transform: scale(0); }
/* the splash: his roundel on his red, two swooshes, the white flash */
.pha-splash { background: #CB0F31; }
.pha-burst { position: absolute; left: 50%; top: calc(425.4 * var(--u)); width: 0; height: 0; }
.pha .pha-roundel { position: absolute; left: calc(-70 * var(--u)); top: calc(-69.6 * var(--u)); width: calc(140.2 * var(--u)); height: auto; }
.pha-sw { position: absolute; left: calc(-196.5 * var(--u)); top: calc(-425.4 * var(--u)); width: calc(393 * var(--u)); height: calc(852 * var(--u)); fill: #fff; opacity: 0; }
.pha-white { background: #FFFDFF; opacity: 0; pointer-events: none; }
.pha:not(.live) :is(.pha-splash, .pha-kb, .pha-wait, .pas, .pas-dim) { display: none; }   /* without the script: his start screen, settled */
.pha-menu .pa-pill { position: relative; }
.pa-roll { display: inline-grid; overflow: hidden; vertical-align: top; }
.pa-roll > span { grid-area: 1 / 1; white-space: nowrap; }

@media (max-width: 999px) {
  .pha-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 36px; }
  .pha-copy { justify-self: stretch; }
  .pha-stage .pa-phone { width: min(320px, 82%); }
  .pha-copy .pha-steps { gap: 10px; margin-top: 24px; }
  .pha-steps li span { display: none; }   /* phones: stage beats keep titles only */
}
