/* BuzzMyBite motion preview: CSS/SVG storytelling, no animation libraries.
   Loops only run inside a .live container (toggled by an IntersectionObserver)
   and stop entirely while the tab is hidden (body.paused). */
:root {
  --ease: cubic-bezier(.2, .9, .2, 1);
  --pop: cubic-bezier(.3, 1.6, .5, 1);
  --ready: #6fdc7c;
}
html, body { overflow-x: hidden; overflow-x: clip; }

/* ---------- Loop control ---------- */
.loop { animation-play-state: paused; }
.live .loop, .live.loop { animation-play-state: running; }
body.paused *, body.paused *::before, body.paused *::after { animation-play-state: paused !important; }

/* ---------- Nav ---------- */
nav.top { position: sticky; top: 0; z-index: 20; background: rgba(248,255,254,.82); backdrop-filter: blur(10px); }
nav.top .wrap { display: flex; align-items: center; gap: 22px; height: 68px; }
nav.top .links { margin-left: auto; display: flex; gap: 22px; align-items: center; font-weight: 500; font-size: 15px; }
nav.top .links a { text-decoration: none; }
@media (max-width: 760px) { nav.top .links a.hide-sm { display: none; } }
.preview-tag { font: 600 12px 'Work Sans'; background: var(--lemon); padding: 4px 10px; border-radius: 999px; }

/* ---------- Buttons: shine, hover, press ---------- */
.btn { position: relative; overflow: hidden; transition: transform .25s var(--ease), background .2s ease, box-shadow .25s var(--ease); }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg) translateX(0); opacity: 0; pointer-events: none; }
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { opacity: 1; transform: skewX(-18deg) translateX(420%); transition: transform .8s var(--ease), opacity .2s; }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; }

/* ---------- Reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Shared phone ---------- */
.ph { position: relative; width: 280px; height: 568px; background: var(--ink); border-radius: 46px; padding: 12px; box-shadow: 0 30px 70px rgba(10,60,60,.25), inset 0 0 0 2px #2b2b2b; flex: none; }
.ph-screen { position: relative; width: 100%; height: 100%; border-radius: 35px; overflow: hidden; background: var(--bg-grad); text-align: center; }
.ph-notch { position: absolute; top: 10px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 14px; background: var(--ink); z-index: 5; }
.ph-shop { display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 14px 'Work Sans'; padding-top: 50px; }
.ph-shop i { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--honey); display: grid; place-items: center; font: 800 13px Outfit; font-style: normal; }
.ph-label { font-size: 13px; color: var(--ink-2); margin-top: 18px; }
.ph-num { font: 900 56px/1 Outfit; letter-spacing: -.03em; margin-top: 2px; }

/* SVG progress ring (stroke-dashoffset driven) */
.ring { display: block; width: 168px; height: 168px; margin: 16px auto 10px; }
.ring .track { stroke: #dbeeee; }
.ring .bar { stroke: var(--ink); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 70px 70px; }
.ring text { font: 800 26px Outfit; fill: var(--ink); }

/* Ready layer */
.ph-ready { position: absolute; inset: 0; background: var(--honey); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transform: scale(1.04); transition: opacity .45s var(--ease), transform .6s var(--ease); z-index: 3; }
.is-ready .ph-ready { opacity: 1; transform: none; }
.bell { position: relative; width: 78px; height: 78px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.bell svg { width: 38px; height: 38px; stroke: var(--honey); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.is-ready .bell svg { animation: ring-bell .6s var(--ease) infinite; }
@keyframes ring-bell { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.waves { position: absolute; inset: 0; pointer-events: none; }
.waves span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; }
.is-ready .waves span { animation: wave 1.8s var(--ease) infinite; }
.is-ready .waves span:nth-child(2) { animation-delay: .6s; }
.is-ready .waves span:nth-child(3) { animation-delay: 1.2s; }
@keyframes wave { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.4); opacity: 0; } }
.ph-ready h3 { font-size: 30px; margin: 20px 0 0; }
.ph-ready .ph-num { margin: 0; }

/* ---------- Intro overlay ---------- */
#intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg-grad); transition: opacity .55s var(--ease), transform .7s var(--ease); }
#intro.leaving { opacity: 0; transform: translateY(-3%); pointer-events: none; }
#intro[hidden] { display: none; }
.intro-stage { position: relative; width: 340px; height: 420px; }
.intro-skip { position: absolute; top: 18px; right: 18px; z-index: 2; }
.intro-caption { position: absolute; left: 0; right: 0; bottom: 8vh; text-align: center; font: 700 22px Outfit; color: var(--ink); transition: opacity .5s; }
/* pager: tall black slab with a glowing orange number and a blue status light */
.pager { position: absolute; left: 50%; top: 50%; width: 124px; height: 224px; margin: -112px 0 0 -62px; border-radius: 26px; background: linear-gradient(160deg, #303338, #111214 70%); box-shadow: 0 24px 46px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.15); display: flex; flex-direction: column; align-items: center; padding-top: 20px; gap: 26px; transition: transform 1.2s var(--ease), opacity .9s; }
.pager-led { width: 10px; height: 10px; border-radius: 50%; background: #13234a; }
.pager-badge { width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ff9a4d, #e8651e); box-shadow: 0 0 0 5px rgba(255,140,60,.25); display: grid; place-items: center; font: 900 34px Outfit; color: #fff; }
.pager-slots { display: flex; flex-direction: column; gap: 6px; }
.pager-slots span { width: 50px; height: 3px; border-radius: 3px; background: #050506; }
.scene-1 .pager { animation: buzz .14s linear infinite; }
/* vibration signal: curved waves on both sides + soft ripples behind */
.vib { position: absolute; top: 50%; width: 60px; height: 120px; margin-top: -60px; pointer-events: none; }
.vib-l { right: 100%; margin-right: 6px; }
.vib-r { left: 100%; margin-left: 6px; }
.vib i { position: absolute; top: 50%; border-radius: 50%; border: 5px solid transparent; opacity: 0; }
.vib i:nth-child(1) { width: 34px; height: 54px; margin-top: -27px; }
.vib i:nth-child(2) { width: 58px; height: 86px; margin-top: -43px; }
.vib i:nth-child(3) { width: 82px; height: 118px; margin-top: -59px; }
.vib-l i { right: 0; border-left-color: #e8651e; }
.vib-r i { left: 0; border-right-color: #e8651e; }
.vib-l i:nth-child(1), .vib-r i:nth-child(1) { margin-right: 0; }
.vib-l i:nth-child(2) { right: -12px; } .vib-l i:nth-child(3) { right: -24px; }
.vib-r i:nth-child(2) { left: -12px; } .vib-r i:nth-child(3) { left: -24px; }
.scene-1 .vib i { animation: vib-wave .9s ease-out infinite; }
.scene-1 .vib i:nth-child(2) { animation-delay: .15s; }
.scene-1 .vib i:nth-child(3) { animation-delay: .3s; }
@keyframes vib-wave { 0% { opacity: 0; transform: scale(.85); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.12); } }
.pager-ripples { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.pager-ripples span { position: absolute; inset: 0; border-radius: 30px; border: 3px solid rgba(232,101,30,.55); opacity: 0; }
.scene-1 .pager-ripples span { animation: pager-ripple 1.6s ease-out infinite; }
.scene-1 .pager-ripples span:nth-child(2) { animation-delay: .8s; }
@keyframes pager-ripple { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5, 1.3); } }
.scene-1 .pager-led { animation: led-blue .4s steps(2) infinite; }
.scene-1 .pager-badge { animation: badge-glow .7s ease-in-out infinite; }
@keyframes buzz { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-3px, 1px) rotate(-2deg); } 75% { transform: translate(3px, -1px) rotate(2deg); } }
@keyframes led-blue { 100% { background: #4d8bff; box-shadow: 0 0 14px 3px #4d8bff; } }
@keyframes badge-glow { 50% { box-shadow: 0 0 0 5px rgba(255,140,60,.25), 0 0 24px 7px rgba(255,120,40,.6); } }
.scene-2 .pager, .scene-3 .pager, .scene-4 .pager, .scene-5 .pager { transform: scale(.85); opacity: 0; }
/* intro phone */
.intro-phone { position: absolute; left: 50%; top: 50%; width: 200px; height: 406px; margin: -203px 0 0 -100px; border-radius: 36px; padding: 9px; transform: translateY(120%) rotate(8deg); opacity: 0; transition: transform 1.2s var(--pop), opacity .6s; }
.intro-phone .ph-screen { border-radius: 28px; }
.intro-phone .ph-notch { width: 66px; margin-left: -33px; height: 20px; top: 8px; }
.intro-phone .ring { width: 120px; height: 120px; margin-top: 64px; }
.intro-phone .ph-ready h3 { font-size: 24px; }
.intro-phone .bell { width: 60px; height: 60px; }
.scene-2 .intro-phone, .scene-3 .intro-phone, .scene-4 .intro-phone { transform: none; opacity: 1; }
.scene-3 .intro-phone .bar { transition: stroke-dashoffset 2.2s linear; stroke-dashoffset: 0 !important; }
.scene-5 .intro-phone { transform: scale(.5) translateY(-30px); opacity: 0; transition: transform .6s var(--ease), opacity .4s; }
/* brand */
.intro-brand { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; opacity: 0; transform: scale(.6); transition: transform 1s var(--pop), opacity .6s; }
.intro-brand .mark { width: 84px; height: 84px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.intro-brand .mark svg { width: 42px; height: 42px; stroke: var(--honey); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.intro-brand strong { font: 900 40px Outfit; letter-spacing: -.03em; }
.scene-5 .intro-brand { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 48px 0 80px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 28px; } }
.hero h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 800; margin-top: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--honey) 62%) no-repeat; background-size: 0 100%; animation: mark-in 1s var(--ease) .5s forwards; }
@keyframes mark-in { to { background-size: 100% 100%; } }
.hero p.lead { font-size: 20px; color: var(--ink-2); max-width: 520px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.ticks { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.ticks span::before { content: '✓ '; color: var(--mint); font-weight: 700; }

.hero-stage { position: relative; height: 620px; display: grid; place-items: center; }
.blob { position: absolute; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, #9df0a6 0%, #9ef2ee 55%, transparent 72%); animation: breathe 9s ease-in-out infinite; animation-delay: -2s; }
@keyframes breathe { 50% { transform: scale(1.07); } }
.hero-stage .ph { animation: float 6s ease-in-out infinite; animation-delay: -1.5s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
.hero-stage.is-ready .ph-wrap { animation: phone-buzz .5s linear 2; }
.ph-wrap { position: relative; }
@keyframes phone-buzz { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px) rotate(-1deg); } 60% { transform: translateX(4px) rotate(1deg); } }
.hero-waves { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; pointer-events: none; }
.hero-waves span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ready); opacity: 0; }
.hero-stage.is-ready .hero-waves span { animation: wave 1.6s var(--ease) infinite; }
.hero-stage.is-ready .hero-waves span:nth-child(2) { animation-delay: .5s; }
.hero-stage.is-ready .hero-waves span:nth-child(3) { animation-delay: 1s; }
.toast { position: absolute; top: 70px; right: -6px; z-index: 6; display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: 0 16px 40px rgba(10,60,60,.18); font: 600 14px 'Work Sans'; text-align: left; opacity: 0; transform: translateY(-14px) scale(.92); transition: opacity .35s var(--ease), transform .55s var(--pop); }
.toast .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--honey); display: grid; place-items: center; }
.toast small { display: block; color: var(--ink-2); font-weight: 500; }
.hero-stage.is-ready .toast { opacity: 1; transform: none; }
.chip { position: absolute; left: -10px; bottom: 110px; background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); font: 600 14px 'Work Sans'; display: flex; gap: 8px; align-items: center; }
@media (max-width: 520px) {
  .hero-stage { height: 560px; }
  .toast { right: 4px; top: 40px; }
  .chip { left: 0; bottom: 70px; z-index: 6; padding: 8px 12px; font-size: 13px; }
  .blob { width: 330px; height: 330px; }
}

/* ---------- Sticky story ---------- */
.story-head { padding: 80px 0 10px; }
.eyebrow { font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; }
.story-head h2, .block h2 { font-size: clamp(32px, 4vw, 48px); max-width: 720px; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.story-sticky { position: sticky; top: 90px; height: calc(100vh - 110px); min-height: 600px; display: grid; place-items: center; }
.story-cards { padding: 18vh 0 30vh; }
.beat { min-height: 62vh; display: flex; align-items: center; }
.beat .card { width: 100%; border-left: 6px solid transparent; opacity: .45; transform: scale(.97); transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .5s; }
.beat.active .card { opacity: 1; transform: none; border-color: var(--ready); }
.beat .n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--honey); font: 800 16px Outfit; margin-bottom: 12px; }
.beat h3 { font-size: 26px; }
.beat p { color: var(--ink-2); margin: 0; font-size: 17px; }
.story-dots { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.story-dots i { width: 8px; height: 8px; border-radius: 99px; background: #b9d6d4; transition: width .4s var(--ease), background .3s; }
.story-dots i.on { width: 26px; background: var(--ink); }

/* the four screens */
.scr { position: absolute; inset: 0; padding-top: 50px; opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .45s var(--ease), transform .55s var(--ease); pointer-events: none; }
.scr.on { opacity: 1; transform: none; }
.scr h4 { font: 800 20px Outfit; margin: 14px 18px 4px; }
.scr p { font-size: 13px; color: var(--ink-2); margin: 0 22px; }
/* 1 scan */
.cam { position: relative; width: 196px; height: 196px; margin: 26px auto 0; border-radius: 22px; background: #fff; padding: 16px; box-shadow: var(--shadow); }
.cam svg.qr { width: 100%; height: 100%; display: block; }
.cam .corner { position: absolute; width: 26px; height: 26px; border: 4px solid var(--ink); }
.cam .c1 { top: -6px; left: -6px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.cam .c2 { top: -6px; right: -6px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.cam .c3 { bottom: -6px; left: -6px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.cam .c4 { bottom: -6px; right: -6px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.sweep { position: absolute; left: 10px; right: 10px; top: 14px; height: 3px; border-radius: 3px; background: var(--ready); box-shadow: 0 0 16px 4px rgba(111,220,124,.7); animation: sweep 2.2s ease-in-out infinite alternate; }
@keyframes sweep { to { transform: translateY(166px); } }
/* 2 waiting: countdown runs on CSS when the screen is on */
.scr-wait .bar { stroke-dashoffset: 377; }
.scr-wait.on .bar { animation: fill 6s linear infinite; }
@keyframes fill { from { stroke-dashoffset: 377; } to { stroke-dashoffset: 40; } }
/* 3 ready */
.scr-ready { background: var(--honey); display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 0; }
.scr-ready.on .bell svg { animation: ring-bell .6s var(--ease) infinite; }
.scr-ready.on .waves span { animation: wave 1.8s var(--ease) infinite; }
.scr-ready.on .waves span:nth-child(2) { animation-delay: .6s; }
.scr-ready.on .waves span:nth-child(3) { animation-delay: 1.2s; }
.scr-ready h4 { font-size: 28px; margin-top: 22px; }
/* 4 review */
.stars { display: flex; justify-content: center; gap: 6px; margin: 30px 0 18px; }
.stars svg { width: 34px; height: 34px; fill: #e3eeee; stroke: none; transform: scale(.4); opacity: 0; transition: transform .5s var(--pop), opacity .3s, fill .3s; transition-delay: calc(var(--i) * 110ms + 200ms); }
.scr-review.on .stars svg { transform: none; opacity: 1; fill: #f5b82e; }
.fake-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 14px 'Work Sans'; margin-top: 18px; }
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--honey); display: grid; place-items: center; margin: 0 auto; }

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; gap: 0; }
  .story-sticky { top: 72px; height: auto; min-height: 0; padding: 8px 0 10px; z-index: 2; background: linear-gradient(#effcfb 85%, rgba(239,252,251,0)); }
  .story-sticky .ph { transform: scale(.56); margin: -124px 0; }
  .story-dots { position: static; transform: none; justify-content: center; margin-top: 4px; }
  .story-cards { padding: 4vh 0 30vh; }
  .beat { min-height: 52vh; }
  .beat h3 { font-size: 22px; }
}

/* ---------- Lower sections ---------- */
section.block { padding: 80px 0; }
.panel { background: #fff; box-shadow: var(--shadow); border-radius: 32px; padding: 64px 48px; }
@media (max-width: 600px) { .panel { padding: 40px 22px; border-radius: 24px; } }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
@media (max-width: 900px) { .feat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feat { grid-template-columns: 1fr; } }
.feat > div { background: var(--bg); border-radius: var(--radius); padding: 22px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .7s var(--ease); }
.feat > div:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feat > div.rv:not(.in) { transform: translateY(26px); }
.feat > div:first-child { background: var(--honey); }
.feat > div:nth-child(4) { background: var(--lemon); }
.feat .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--honey); display: grid; place-items: center; margin-bottom: 12px; font-size: 20px; }
.feat h3 { font-size: 19px; }
.feat p { color: var(--ink-2); margin: 0; font-size: 15px; }

.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
@media (max-width: 760px) { .vs { grid-template-columns: 1fr; } }
.vs ul { list-style: none; padding: 0; margin: 14px 0 0; }
.vs li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.vs li:last-child { border: 0; }
.vs .old li::before { content: '✕'; color: var(--red); font-weight: 700; }
.vs .new { border: 2px solid var(--honey); }
.vs .new li::before { content: '✓'; color: var(--mint); font-weight: 700; }

/* pricing: rotating conic border */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.price-wrap { max-width: 520px; margin: 36px auto 0; padding: 3px; border-radius: 22px; background: conic-gradient(from var(--ang), var(--honey), #9ef2ee, var(--lemon), var(--honey)); animation: spin-border 8s linear infinite; }
@keyframes spin-border { to { --ang: 360deg; } }
.price { text-align: center; border-radius: 19px; }
.price .amt { font: 900 64px Outfit; }
.price ul { list-style: none; padding: 0; text-align: left; margin: 20px 0; }
.price li { padding: 8px 0; } .price li::before { content: '✓  '; color: var(--mint); font-weight: 700; }

details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; min-height: 44px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 24px; line-height: 1; color: var(--ink-2); transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-2); margin: 10px 0 0; }

.signup { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .signup { grid-template-columns: 1fr; } }
.done-box a { display: block; margin-top: 8px; font-weight: 600; }
footer { padding: 40px 0 60px; color: var(--ink-2); font-size: 14px; }

/* ---------- Reduced motion: everything final, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .hero h1 em { background-size: 100% 100%; }
  .scr-wait .bar { stroke-dashoffset: 150; }
  .stars svg { transform: none; opacity: 1; }
  #intro { display: none !important; }
  .story-sticky .ph { transform: scale(.56); }
}
@media (prefers-reduced-motion: reduce) and (min-width: 861px) { .story-sticky .ph { transform: none; } }
/* The owner asked for the top phone to keep floating even on phones set to less motion
   (Samsung power saving turns that on). It's a slow, small drift. */
@media (prefers-reduced-motion: reduce) {
  .hero-stage .ph { animation: float 6s ease-in-out infinite !important; animation-delay: -1.5s !important; }
  .hero-stage.is-ready .ph-wrap { animation: phone-buzz .5s linear 2 !important; }
}

/* skip link */
.sr-only { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; transition: top .2s; }
.sr-only:focus { top: 12px; }
.hero-stage:not(.live) *, .story-sticky:not(.live) * { animation-play-state: paused !important; }
/* outgoing screen leaves fast; incoming arrives after a beat, so they never overlap */
.scr { transition: opacity .18s ease, transform .3s var(--ease); }
.scr.on { transition: opacity .45s var(--ease) .14s, transform .55s var(--ease) .14s; }
/* phones: smaller sticky phone, cards activate low on screen so they stay fully readable */
@media (max-width: 860px) {
  .story-sticky .ph { transform: scale(.46); margin: -153px 0; }
  .beat { min-height: 44vh; }
}
@media (max-width: 520px) { .preview-tag { display: none; } }
@media (prefers-reduced-motion: reduce) and (max-width: 860px) { .story-sticky .ph { transform: scale(.46); } }
@media (max-width: 860px) {
  .story-sticky { transition: opacity .35s var(--ease), transform .35s var(--ease); }
  .story-sticky.away { opacity: 0; transform: translateY(-24px); pointer-events: none; }
  .story-cards { padding-bottom: 12vh; }
}

/* page can't scroll behind the intro */
html.intro-lock, html.intro-lock body { overflow: hidden !important; height: 100%; overscroll-behavior: none; touch-action: none; }
#intro { touch-action: none; overscroll-behavior: contain; }

/* ===== Phone screens = the real customer pages (track.html / scan.html), drawn at 375px and scaled to fit ===== */
.ph .rs { --s: .6827; }
.intro-phone .rs { --s: .4853; }
.rs { position: absolute; top: 0; left: 0; width: 375px; height: 812px; padding: 52px 16px 24px; transform: scale(var(--s)); transform-origin: 0 0; text-align: left; background: var(--bg-grad); font-family: 'Work Sans', sans-serif; color: var(--ink); line-height: 1.5; }
.rs .icon { width: 18px; height: 18px; }
.rs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rs-head b { font-size: 16px; }
.rs-head .rs-shop2 { font: 800 26px/1.05 Outfit; letter-spacing: -.03em; }
.rs-sound { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.rs-sound span { flex: 1; }
.rs-sound i { font-style: normal; background: var(--honey); color: var(--ink); font-weight: 600; border-radius: 999px; padding: 10px 16px; white-space: nowrap; }
.rs .rs-h1 { font: 800 40px/1.05 Outfit; letter-spacing: -.03em; margin: 6px 0 18px; }
.rs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rs-tile { border-radius: 16px; padding: 16px; background: #fff; box-shadow: var(--shadow); }
.rs-tile.mint { background: var(--honey); box-shadow: none; }
.rs-tile.full { grid-column: 1 / -1; }
.rs-cap { font: 800 12px 'Work Sans'; letter-spacing: .1em; text-transform: uppercase; }
.rs-num { font: 900 64px/.95 Outfit; letter-spacing: -.04em; margin-top: 8px; }
.rs-num.big { font-size: 110px; margin-top: 4px; }
.rs-muted { color: var(--ink-2); font-size: 14px; }
.rs-eta { display: block; margin: 14px 0 6px; font-size: 17px; line-height: 1.35; }
.rs-timer { display: flex; align-items: center; gap: 16px; }
.rs-timer svg { transform: rotate(-90deg); flex: none; }
.rs-t { font: 900 54px/1 Outfit; letter-spacing: -.04em; }
.rs-car { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.rs-car .box { width: 22px; height: 22px; border: 2px solid #8a9592; border-radius: 4px; margin-right: 4px; }
.rs-foot { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 28px; }
.rs-card { background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.rs-card.center { text-align: center; }
.rs-input { position: relative; height: 82px; border: 1px solid var(--line); border-radius: 14px; margin: 18px 0 32px; display: grid; place-items: center; font: 800 42px Outfit; }
.rs-input .ph { color: #8a8f8e; transition: opacity .2s; }
.rs-input .typed { position: absolute; display: flex; align-items: center; }
.rs-input .typed > span:not(.caret) { opacity: 0; }
.rs-input .caret { width: 3px; height: 44px; background: var(--ink); margin-left: 3px; opacity: 0; }
.rs-honey, .rs-black, .rs-btn { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; font-weight: 600; font-size: 16px; }
.rs-honey { background: var(--honey); }
.rs-black { background: var(--ink); color: #fff; margin-top: 14px; }
.rs-fork { width: 76px; height: 76px; border-radius: 50%; background: var(--honey); display: grid; place-items: center; margin: 0 auto 14px; }
.rs-fork .icon { width: 34px; height: 34px; }
.rs-stars { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.rs-stars .icon { width: 36px; height: 36px; fill: var(--honey); stroke: var(--ink); }
/* ready screen */
.rs-ready { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: var(--honey); opacity: 0; transition: opacity .45s var(--ease); z-index: 3; }
.is-ready .rs-ready, .scr-ready .rs-ready { opacity: 1; }
.is-ready .rs-ready, .scr-ready.on .rs-ready { animation: rs-flash .9s ease-in-out infinite alternate; }
@keyframes rs-flash { to { background: #c8f9cd; } }
.rs-bell { position: relative; width: 96px; height: 96px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.rs-bell svg { width: 50px; height: 50px; stroke: var(--honey); }
.is-ready .rs-bell, .scr-ready.on .rs-bell { animation: ring-bell .5s ease-in-out infinite; }
.is-ready .rs-bell .waves span, .scr-ready.on .rs-bell .waves span { animation: wave 1.8s var(--ease) infinite; }
.is-ready .rs-bell .waves span:nth-child(2), .scr-ready.on .rs-bell .waves span:nth-child(2) { animation-delay: .6s; }
.is-ready .rs-bell .waves span:nth-child(3), .scr-ready.on .rs-bell .waves span:nth-child(3) { animation-delay: 1.2s; }
.rs-msg { font-size: 19px; max-width: 320px; margin: 10px 0; }
.rs-btn { background: var(--ink); color: #fff; padding: 0 34px; margin-top: 12px; min-height: 52px; }
/* story overrides for the real screens */
.scr { padding-top: 0; }
.scr-ready { background: none; display: block; }
.scr-wait .arc { stroke-dashoffset: 0; }
.scr-wait.on .arc { animation: rs-drain 9s linear infinite; }
@keyframes rs-drain { to { stroke-dashoffset: 520; } }
.scr-scan.on .rs-input .ph { opacity: 0; transition-delay: .7s; }
.scr-scan.on .typed .d1 { animation: type-in .01s linear .9s forwards; }
.scr-scan.on .typed .d2 { animation: type-in .01s linear 1.3s forwards; }
.scr-scan.on .caret { animation: caret 1s steps(2) .7s infinite; }
@keyframes type-in { to { opacity: 1; } }
@keyframes caret { 0% { opacity: 1; } 100% { opacity: 0; } }
.scr-scan.on .rs-honey { animation: tap .5s var(--ease) 2.1s; }
@keyframes tap { 50% { transform: scale(.95); background: var(--honey-deep); } }
.rs-stars .icon { transform: scale(.4); opacity: 0; transition: transform .5s var(--pop), opacity .3s; transition-delay: calc(var(--i) * 110ms + 200ms); }
.scr-review.on .rs-stars .icon { transform: none; opacity: 1; }
/* intro phone uses the same real wait screen */
.scene-3 .intro-phone .arc { transition: stroke-dashoffset 2.4s linear; stroke-dashoffset: 420; }
@media (prefers-reduced-motion: reduce) {
  .rs-stars .icon, .rs-input .typed > span:not(.caret) { transform: none; opacity: 1; }
  .rs-input .ph { opacity: 0; }
}
.scr .rs p { margin: 12px 0; color: inherit; }
.scr .rs p.rs-muted { color: var(--ink-2); }
.scr .rs .rs-msg { font-size: 19px; margin: 10px 0; }
.scr .rs .rs-foot { margin-top: 28px; font-size: 13px; color: var(--ink-2); }

/* Desktop story: one step per screen, each card lines up with the phone, and the
   phone screen slides in the direction you scroll (up or down). */
@media (min-width: 861px) {
  .story-cards { padding: 0; }
  .beat { min-height: max(600px, calc(100vh - 110px)); }
  .beat .card { opacity: .28; transform: scale(.96); }
  .beat.active .card { opacity: 1; transform: none; }
  .story-sticky[data-dir="up"] .scr:not(.on) { transform: translateY(-18px) scale(.98); }
}
/* Phones: "How it works" as before-and-after panels. Each step compares the
   old pager way (left) with BuzzMyBite (right), split down the middle. */
.ba-story { display: none; }
@media (max-width: 860px) {
  .story { display: none; }
  .ba-story { display: block; padding: 4px 0 30px; }
}
.ba-step { margin-top: 26px; }
.ba-lab { font: 700 12px Outfit, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--ember, #ff8a2a); }
.ba-step h3 { font-size: 24px; margin: 4px 0 12px; }
.ba { position: relative; height: 240px; border-radius: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.ba-side { position: absolute; top: 0; bottom: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px 22px; text-align: center; }
.ba-cap { margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.ba-cap span { display: inline-block; font: 800 11px Outfit, sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; margin-right: 6px; vertical-align: 1px; }
.ba-cap .o { background: rgba(255,255,255,.08); color: #b5aba3; }
.ba-cap .n { background: rgba(255,138,42,.16); color: var(--ember, #ff8a2a); }
.ba-old { left: 0; width: var(--x); background: #1b1714; color: #9b918a; }
.ba-old svg { width: 110px; height: 110px; flex: none; }
.mini-ph { flex: none; }
.ba-new { background: linear-gradient(160deg, #2a1a10, #120c09); color: var(--ink); left: var(--x); right: 0; }
.ba-tag { position: absolute; top: 14px; white-space: nowrap; font: 800 11px Outfit, sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; }
.ba-old .ba-tag { left: 14px; background: rgba(255,255,255,.08); color: #b5aba3; }
.ba-new .ba-tag { right: 14px; background: rgba(255,138,42,.16); color: var(--ember, #ff8a2a); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 3px; margin-left: -1.5px; background: var(--ember, #ff8a2a); box-shadow: 0 0 18px rgba(255,138,42,.6); pointer-events: none; }
.mini-ph { width: 128px; height: 150px; border-radius: 22px; border: 3px solid #070505; background: #1c1411; box-shadow: 0 12px 30px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; }
.mini-ph b { font: 900 22px Outfit, sans-serif; line-height: 1; }
.mini-ph b.huge { font-size: 44px; }
.mini-ph small { font-size: 10px; color: var(--ink-2); }
.mini-ph.ready { background: linear-gradient(180deg, #ffa04a, #f2701a); color: #1b0f07; }
.mini-ph.ready small { color: rgba(27,15,7,.75); font-weight: 700; }
.mini-qr { width: 56px; height: 56px; border-radius: 8px; background: #fff; padding: 6px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin-bottom: 4px; }
.mini-qr i { background: #111; border-radius: 1px; } .mini-qr i:nth-child(3n) { background: transparent; }
.mini-ring { width: 52px; height: 52px; } .mini-ring circle { fill: none; stroke-width: 6; }
.mini-stars { color: #ffb53d; font-size: 16px; letter-spacing: 1px; }
