/* ── The app, live (js/live-scene.js) ─────────────────────────────────────────
   One order told across three devices: the guest's phone, the watch on the bartender's
   wrist, and the Staff app (or, at home, the host's Solo app). Ofir 2026-11-22: show the
   app, and the watch alerts, in an attractive way on every page.
   Every screen is real: Staff app store screenshots, real guest footage, real Solo app
   recordings. The watch is drawn and only ever shows a push as the API words it.
   The stage is a size container; everything inside is sized in cqw so it scales as one. */

.ls-band {
    position: relative; overflow: hidden; color: #f4f1ea;
    background: radial-gradient(90% 70% at 50% 0%, #1d1a15 0%, #0b0b0e 62%);
    padding: clamp(72px, 10vw, 132px) 0 clamp(64px, 9vw, 112px);
}
.ls-band .hub-eyebrow { color: #c9a25a; }
.ls-band .hub-h2 { color: #fff; }
.ls-band .hub-h2 em { color: #d9b46a; }
.ls-band .hub-lede { color: rgba(244, 241, 234, .72); }
.ls-head { text-align: center; max-width: 760px; margin: 0 auto clamp(28px, 4vw, 48px); }
.ls-head .hub-lede { margin-left: auto; margin-right: auto; }

.ls { --gold: #d9b46a; max-width: 1180px; margin: 0 auto; }
.ls__stage {
    position: relative; container-type: inline-size; aspect-ratio: 16 / 8.6;
    border-radius: 28px; overflow: hidden;
    background:
        radial-gradient(40% 55% at 50% 48%, rgba(217, 180, 106, .16), transparent 70%),
        linear-gradient(180deg, #15141a, #0d0d11);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 60px 120px -60px rgba(0, 0, 0, .9);
}

/* The signal between the devices: a faint dashed line, and a lit run along it for the beat. */
.ls__wire { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ls__wire path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ls__wire .w-base { stroke: rgba(217, 180, 106, .22); stroke-dasharray: 3 7; }
.ls__wire .w-run { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; filter: drop-shadow(0 0 6px rgba(217, 180, 106, .8)); }
.ls[data-beat="1"] .w-a, .ls[data-beat="2"] .w-b, .ls[data-beat="4"] .w-c { animation: ls-run 1.1s cubic-bezier(.5, 0, .2, 1) forwards; }
.ls--solo[data-beat="1"] .w-b { animation: ls-run 1.1s .5s cubic-bezier(.5, 0, .2, 1) forwards; }
.ls--solo[data-beat="4"] .w-c { animation: none; }
@keyframes ls-run { 0% { opacity: 1; stroke-dashoffset: 1; } 80% { opacity: 1; stroke-dashoffset: 0; } 100% { opacity: .35; stroke-dashoffset: 0; } }

/* ── Devices ── */
.ls-dev { position: absolute; margin: 0; transition: transform .6s cubic-bezier(.3, .7, .2, 1), opacity .6s, filter .6s; }
.ls-dev figcaption {
    position: absolute; left: 50%; top: calc(100% + 1.4cqw); transform: translateX(-50%); white-space: nowrap;
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: max(10px, .82cqw); letter-spacing: .16em; text-transform: uppercase;
    color: rgba(244, 241, 234, .45); transition: color .4s;
}
.ls-dev.is-on figcaption { color: var(--gold); }
.ls-dev:not(.is-on) { filter: saturate(.75) brightness(.72); }
.ls-dev.is-on { transform: translateY(-.6cqw); }
.ls-dev--watch.is-on { transform: translateX(-50%) translateY(-.6cqw); }

/* The guest's phone: real footage in a rounded card (venues), or a phone frame (Solo). */
.ls-dev--guest { left: 8cqw; top: 10.5cqw; width: 21cqw; }
.ls-guest { position: relative; aspect-ratio: 3 / 4; border-radius: 1.6cqw; overflow: hidden; background: #000; box-shadow: 0 2cqw 4cqw -1.6cqw rgba(0, 0, 0, .8); }
.ls-guest > video, .ls-guest > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.ls-phone {
    --pw: 17cqw; position: relative; width: var(--pw); aspect-ratio: 1320 / 2868; padding: calc(var(--pw) * .028);
    border-radius: calc(var(--pw) * .15); background: #1a1a1f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 2.4cqw 4cqw -1.6cqw rgba(0, 0, 0, .85);
}
.ls-screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--pw) * .125); overflow: hidden; background: #000; }
.ls-screen > img, .ls-screen > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .45s; }
.ls-dev--guest .ls-phone { --pw: 17cqw; }
.ls--solo .ls-dev--guest { left: 10cqw; top: 4.5cqw; width: auto; }

.ls-dev--staff { right: 10cqw; top: 4.5cqw; }

/* The watch: the .sa-watch drawing from style.css, sized by --ww here. */
.ls-dev--watch { left: 50%; top: 15.5cqw; transform: translateX(-50%); width: 14cqw; --ww: 14cqw; }
.ls-dev--watch .sa-watch { position: relative; right: auto; bottom: auto; width: 100%; }
.ls-dev--watch .sa-watch__app span { font-size: calc(var(--ww) * .056); }
.ls-dev--watch .sa-watch__card b { font-size: calc(var(--ww) * .088); }
.ls-dev--watch .sa-watch__card span { font-size: calc(var(--ww) * .076); }
.ls-dev--watch .sa-watch__msg { min-height: 0; height: calc(var(--ww) * .42); }
/* Idle: the time, gold. Ringing: the push. */
.ls-face { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .35s; }
.ls-face b { font-family: -apple-system, 'SF Pro Rounded', 'Inter', system-ui, sans-serif; font-weight: 600; font-size: calc(var(--ww) * .25); letter-spacing: -.02em; color: var(--gold); }
.ls-face small { display: block; text-align: center; font-size: calc(var(--ww) * .07); color: #8d8d96; margin-top: -.4em; }
.ls-note { opacity: 0; transition: opacity .35s; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.ls-dev--watch .sa-watch__card { opacity: 1 !important; animation: none !important; position: static; }
.ls.is-ring .ls-face { opacity: 0; }
.ls.is-ring .ls-note { opacity: 1; }
.ls.is-ring .ls-dev--watch .sa-watch { animation: ls-buzz 1.6s linear infinite; }
.ls.is-ring .ls-dev--watch .sa-watch__case::after { animation: sa-tap 1.6s ease-out infinite; }
@keyframes ls-buzz {
    0%, 22%, 100% { transform: translateX(0); }
    3%, 9%, 15% { transform: translateX(-2px) rotate(-.6deg); }
    6%, 12%, 18% { transform: translateX(2px) rotate(.6deg); }
}

/* ── Things that happen on the screens ── */
/* A push banner, iOS-like, dropping in at the top of a screen. */
.ls-push {
    position: absolute; left: 4%; right: 4%; top: 5.5%; z-index: 3;
    display: grid; grid-template-columns: auto 1fr; column-gap: 6%; align-items: center;
    padding: 5% 5.5%; border-radius: calc(var(--pw) * .085);
    background: rgba(245, 243, 238, .93); color: #15151a; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1cqw 2.4cqw -1cqw rgba(0, 0, 0, .6);
    font-family: -apple-system, 'SF Pro Text', 'Inter', system-ui, sans-serif; text-align: left;
    opacity: 0; transform: translateY(-140%); transition: transform .55s cubic-bezier(.2, .9, .25, 1.15), opacity .3s;
}
.ls-push img { width: calc(var(--pw) * .13); aspect-ratio: 1; border-radius: 22%; grid-row: span 3; }
.ls-push i { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: calc(var(--pw) * .04); letter-spacing: .02em; text-transform: uppercase; color: #6d6d76; }
.ls-push b { font-size: calc(var(--pw) * .058); font-weight: 650; line-height: 1.2; }
.ls-push span { font-size: calc(var(--pw) * .054); line-height: 1.25; color: #34343c; }
.ls-push.is-on { opacity: 1; transform: none; }

/* A gold ring round the button the next tap goes to, then the tap itself. */
.ls-target {
    position: absolute; z-index: 2; border-radius: calc(var(--pw) * .035); pointer-events: none;
    box-shadow: 0 0 0 2px var(--gold), 0 0 18px 2px rgba(217, 180, 106, .55); opacity: 0; transition: opacity .3s;
}
.ls-target.is-on { opacity: 1; animation: ls-glow 1.2s ease-in-out infinite; }
.ls-target.is-tap::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--pw) * .16); aspect-ratio: 1; border-radius: 50%;
    background: rgba(255, 255, 255, .85); transform: translate(-50%, -50%) scale(.2); animation: ls-tap .7s ease-out forwards;
}
@keyframes ls-glow { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 28px 6px rgba(217, 180, 106, .75); } }
@keyframes ls-tap { 0% { opacity: .95; transform: translate(-50%, -50%) scale(.2); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } }

/* The staff phone shakes while it rings. */
.ls.is-ring .ls-dev--staff .ls-phone { animation: ls-buzz 1.6s linear infinite; }
.ls-swap { opacity: 0; }
.ls-swap.is-on { opacity: 1; }

/* ── The steps under the stage ── */
.ls__steps { list-style: none; margin: clamp(18px, 2.4vw, 28px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: clamp(10px, 1.4vw, 18px); }
.ls__step {
    width: 100%; text-align: left; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0;
}
.ls__bar { display: block; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; margin-bottom: 14px; }
.ls__bar i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }
.ls__step.is-done .ls__bar i { transform: scaleX(1); }
.ls__step.is-on .ls__bar i { animation: ls-fill var(--dur, 3s) linear forwards; }
.ls.is-paused .ls__step.is-on .ls__bar i { animation: none; transform: scaleX(1); }
@keyframes ls-fill { to { transform: scaleX(1); } }
.ls__n { display: block; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: .14em; color: rgba(244, 241, 234, .38); }
.ls__t { display: block; margin-top: 4px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(16px, 1.5vw, 19px); font-weight: 600; line-height: 1.25; color: rgba(244, 241, 234, .5); transition: color .3s; }
.ls__d { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; color: rgba(244, 241, 234, .42); transition: color .3s; }
.ls__step.is-on .ls__n { color: var(--gold); }
.ls__step.is-on .ls__t { color: #fff; }
.ls__step.is-on .ls__d { color: rgba(244, 241, 234, .78); }
.ls__step:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 4px; }
.ls__foot { margin: clamp(26px, 3vw, 40px) 0 0; text-align: center; font-size: 13.5px; color: rgba(244, 241, 234, .5); }
.ls__foot a { color: var(--gold); }

/* ── Phones: a taller stage, the devices overlap, one caption at a time ── */
@media (max-width: 700px) {
    .ls__stage { aspect-ratio: 3 / 4.1; border-radius: 22px; }
    .ls__wire { display: none; }
    .ls-dev figcaption { font-size: 9.5px; top: calc(100% + 2.4cqw); }
    .ls-dev--guest { left: 6cqw; top: 7cqw; width: 46cqw; }
    .ls--solo .ls-dev--guest { left: 6cqw; top: 6cqw; }
    .ls-dev--guest .ls-phone { --pw: 38cqw; }
    .ls-dev--staff { right: 6cqw; top: 26cqw; }
    .ls-dev--staff .ls-phone { --pw: 40cqw; }
    .ls-dev--watch { left: 30cqw; top: 84cqw; width: 30cqw; --ww: 30cqw; transform: none; }
    .ls-dev--watch.is-on { transform: translateY(-1cqw); }
    .ls--solo .ls-dev--watch { left: 14cqw; top: 96cqw; }
    .ls-dev.is-on { z-index: 4; }
    .ls-push b { font-size: calc(var(--pw) * .066); }
    .ls-push span { font-size: calc(var(--pw) * .06); }
    .ls-push i { font-size: calc(var(--pw) * .05); }
    /* Only the open step's words; the rest are just their bars. */
    .ls__steps { gap: 6px; }
    .ls__step .ls__n, .ls__step .ls__t, .ls__step .ls__d { display: none; }
    .ls__step.is-on .ls__t, .ls__step.is-on .ls__d { display: block; }
    .ls__steps li:has(.is-on) { grid-column: 1 / -1; order: 2; }
    .ls__bar { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .ls.is-ring .ls-dev--watch .sa-watch, .ls.is-ring .ls-dev--staff .ls-phone, .ls-target.is-on { animation: none; }
}
