/* Scenes for the AI automation sample view (11 Nov 2026).
   Brand rules applied (ds/tokens): purple #6B00F6, yellow #FBDE37, ink, paper;
   squared geometry with tight radii, pills only on tags and buttons; near-flat,
   shadow only on things that float (alerts, toasts); motion long and eased,
   no bounce (see scenes.js). Every scene is drawn on a fixed 560 x 400 stage
   and scaled to its box, so the hero and the gallery show the same drawing. */

.sc-box { position: relative; width: 100%; aspect-ratio: 7 / 5; overflow: hidden; border-radius: var(--radius-md); background: var(--ink-900); }
.sc-stage { position: absolute; left: 0; top: 0; width: 560px; height: 400px; transform-origin: 0 0; font: var(--type-small); color: var(--ink-900); }
.sc-stage * { box-sizing: border-box; }

/* Shared pieces */
.sc-lbl { font: var(--type-label); letter-spacing: .12em; text-transform: uppercase; }
.sc-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: var(--radius-pill); font: 500 11px/1 var(--font-body); white-space: nowrap; }
.sc-tag--p { background: var(--ebr-purple); color: #fff; }
.sc-tag--y { background: var(--ebr-yellow); color: var(--ink-900); }
.sc-tag--w { background: var(--ebr-purple-wash); color: var(--ebr-purple); }
.sc-tag--g { background: var(--ink-100); color: var(--ink-700); }
.sc-tag--k { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
.sc-card { background: #fff; border-radius: var(--radius-md); }
.sc-float { box-shadow: var(--shadow-overlay); }
.sc-window { position: absolute; background: var(--paper); border-radius: var(--radius-md); overflow: hidden; }
.sc-window__bar { height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--ink-200); color: var(--ink-500); }
.sc-window__bar b { font: 500 12px/1 var(--font-body); color: var(--ink-900); }
.sc-phone { position: absolute; width: 196px; height: 360px; border-radius: var(--radius-lg); background: var(--ink-1000); padding: 8px; }
.sc-phone__screen { position: relative; width: 100%; height: 100%; border-radius: var(--radius-md); background: var(--paper); overflow: hidden; }
.sc-phone__head { height: 44px; padding: 14px 12px 0; display: flex; align-items: center; gap: 8px; background: #fff; border-bottom: 1px solid var(--ink-200); }
.sc-av { width: 22px; height: 22px; border-radius: 6px; background: var(--ebr-purple-wash); color: var(--ebr-purple); display: grid; place-items: center; font: 500 11px/1 var(--font-body); flex: none; }
.sc-bubble { max-width: 82%; padding: 8px 10px; border-radius: var(--radius-md); font: 400 12px/1.35 var(--font-body); }
.sc-bubble--in { background: #fff; border-top-left-radius: 2px; }
.sc-bubble--out { background: var(--ebr-purple); color: #fff; margin-left: auto; border-top-right-radius: 2px; }
.sc-dots { display: inline-flex; gap: 3px; padding: 10px; background: #fff; border-radius: var(--radius-md); }
.sc-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-400); }
.sc-ripple { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; border: 2px solid var(--ebr-purple); pointer-events: none; }
.sc-toast { position: absolute; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--radius-md); background: #fff; font: 500 12px/1.3 var(--font-body); }
.sc-toast b { flex: none; width: 18px; height: 18px; border-radius: 4px; background: var(--ebr-purple); color: #fff; display: grid; place-items: center; font-size: 11px; }
.sc-row { display: grid; align-items: center; gap: 8px; padding: 0 10px; height: 30px; border-bottom: 1px solid var(--ink-200); font: 400 11px/1 var(--font-body); }

/* 1 · WhatsApp lead desk: chat on a phone, a sheet row, a hand-off */
.sc-lead .sc-phone { left: 28px; top: 20px; }
.sc-lead__chat { display: flex; flex-direction: column; gap: 8px; padding: 12px 10px; }
.sc-lead__sheet { position: absolute; left: 248px; top: 92px; width: 286px; }
.sc-lead__sheet .sc-row { grid-template-columns: 1.2fr .5fr .8fr .7fr; }
.sc-lead__sheet .sc-row--h { color: var(--ink-500); font: var(--type-label); letter-spacing: .1em; }
.sc-lead__new { background: var(--ebr-yellow-wash); }

/* 2 · Outreach assistant: a buying signal becomes a drafted email */
.sc-out__sig { position: absolute; left: 24px; top: 40px; width: 190px; padding: 14px; color: #fff; background: var(--ink-700); border-radius: var(--radius-md); display: grid; gap: 8px; }
.sc-out__sig p { margin: 0; font: 500 14px/1.3 var(--font-body); }
.sc-out__mail { left: 232px; top: 24px; width: 304px; height: 352px; }
.sc-out__f { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--ink-200); font: 400 12px/1.3 var(--font-body); }
.sc-out__f span:first-child { color: var(--ink-500); }
.sc-out__body { padding: 12px; font: 400 12px/1.5 var(--font-body); min-height: 150px; white-space: pre-line; }
.sc-out__foot { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.sc-out__btn { padding: 8px 12px; border-radius: var(--radius-pill); background: var(--ink-200); color: var(--ink-500); font: 500 11px/1 var(--font-body); }

/* 3 · Inbox clean-up: rows file themselves into labelled folders */
.sc-inb { left: 24px; top: 24px; width: 512px; height: 352px; }
.sc-inb__wrap { display: grid; grid-template-columns: 132px 1fr; height: calc(100% - 30px); }
.sc-inb__side { padding: 10px; display: grid; align-content: start; gap: 4px; border-right: 1px solid var(--ink-200); background: #fff; }
.sc-inb__fold { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: var(--radius-sm); font: 500 12px/1 var(--font-body); }
.sc-inb__fold.is-on { background: var(--ebr-purple-wash); color: var(--ebr-purple); }
.sc-inb__list { position: relative; }
.sc-inb__list .sc-row { grid-template-columns: 1fr auto; height: 44px; background: var(--paper); overflow: hidden; }
.sc-inb__list .sc-row b { font: 500 12px/1.2 var(--font-body); display: block; }
.sc-inb__list .sc-row em { font-style: normal; color: var(--ink-500); }

/* 4 · Face check-in: a squared scan frame on a tablet */
.sc-face__tab { position: absolute; left: 24px; top: 24px; width: 512px; height: 352px; background: var(--ink-1000); border-radius: var(--radius-lg); padding: 12px; }
.sc-face__scr { position: relative; height: 100%; border-radius: 10px; background: var(--ink-900); display: grid; grid-template-columns: 1fr 190px; overflow: hidden; }
.sc-face__cam { position: relative; display: grid; place-items: center; }
.sc-face__frame { position: relative; width: 170px; height: 200px; }
.sc-face__frame i { position: absolute; width: 22px; height: 22px; border: 3px solid var(--ebr-yellow); }
.sc-face__frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.sc-face__frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.sc-face__frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.sc-face__frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.sc-face__frame svg { position: absolute; inset: 18px; }
.sc-face__scan { position: absolute; left: 10px; right: 10px; top: 10px; height: 2px; background: var(--ebr-yellow); }
.sc-face__hint { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); }
.sc-face__side { background: rgba(255,255,255,.04); border-left: 1px solid rgba(255,255,255,.1); padding: 14px; display: grid; align-content: start; gap: 10px; color: #fff; }
.sc-face__bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.sc-face__bar span { display: block; height: 100%; width: 0; background: var(--ebr-yellow); }
.sc-face__log { display: grid; gap: 6px; }
.sc-face__log div { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: var(--radius-sm); background: rgba(255,255,255,.06); font: 400 11px/1 var(--font-body); color: rgba(255,255,255,.8); }
.sc-face__log .is-new { background: var(--ebr-yellow); color: var(--ink-900); }

/* 5 · Reputation monitor: a feed, one post flagged, an alert on a phone */
.sc-rep__feed { left: 24px; top: 24px; width: 300px; height: 352px; }
.sc-rep__list { position: relative; padding: 10px; display: grid; gap: 8px; }
.sc-rep__post { background: #fff; border-radius: var(--radius-md); padding: 10px; display: grid; gap: 6px; border: 2px solid transparent; }
.sc-rep__post p { margin: 0; font: 400 12px/1.35 var(--font-body); }
.sc-rep__who { display: flex; gap: 6px; align-items: center; color: var(--ink-500); font: 400 11px/1 var(--font-body); }
.sc-rep__post.is-hit { border-color: var(--ebr-purple); }
.sc-rep__gauge { position: absolute; left: 340px; top: 40px; width: 196px; color: #fff; display: grid; gap: 8px; }
.sc-rep__scale { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--status-critical), var(--ink-500) 50%, var(--status-positive)); }
.sc-rep__needle { position: absolute; top: -5px; left: 50%; width: 4px; height: 18px; margin-left: -2px; background: #fff; border-radius: 1px; }
.sc-rep__ends { display: flex; justify-content: space-between; color: rgba(255,255,255,.6); }
.sc-rep .sc-phone { left: 352px; top: 150px; width: 168px; height: 236px; padding: 6px; }
.sc-rep .sc-phone__screen { background: var(--ink-700); }
.sc-rep__alert { position: absolute; left: 8px; right: 8px; top: 14px; padding: 10px; border-radius: var(--radius-md); background: #fff; display: grid; gap: 6px; font: 500 11px/1.3 var(--font-body); }

/* 6 · Team digest: three people tick tasks, the clock hits 7, one email */
.sc-dig__cols { position: absolute; left: 24px; top: 24px; width: 300px; display: grid; gap: 8px; }
.sc-dig__col { background: #fff; border-radius: var(--radius-md); padding: 10px; display: grid; gap: 6px; }
.sc-dig__t { display: flex; gap: 8px; align-items: center; font: 400 12px/1.2 var(--font-body); }
.sc-dig__box { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--ink-400); display: grid; place-items: center; font-size: 10px; color: #fff; flex: none; }
.sc-dig__box.is-done { background: var(--ebr-purple); border-color: var(--ebr-purple); }
.sc-dig__clock { position: absolute; left: 352px; top: 32px; color: #fff; display: grid; gap: 4px; }
.sc-dig__clock b { font: 500 40px/1 var(--font-display); letter-spacing: -.02em; }
.sc-dig__mail { position: absolute; left: 340px; top: 132px; width: 196px; padding: 14px; display: grid; gap: 8px; }
.sc-dig__mail .sc-row { padding: 0; height: 26px; grid-template-columns: 1fr auto; }

/* 7 · Invoice reader: a bill is scanned, fields lift into a draft entry */
.sc-inv__doc { position: absolute; left: 24px; top: 24px; width: 236px; height: 352px; overflow: hidden; padding: 18px; display: grid; align-content: start; gap: 10px; }
.sc-inv__doc h4 { margin: 0; font: 500 16px/1 var(--font-display); }
.sc-inv__ln { height: 7px; border-radius: 2px; background: var(--ink-200); }
.sc-inv__hl { padding: 3px 4px; margin: -3px -4px; border-radius: 3px; }
.sc-inv__scan { position: absolute; left: 0; right: 0; top: 0; height: 36px; background: linear-gradient(180deg, rgba(251,222,55,0), rgba(251,222,55,.45)); border-bottom: 2px solid var(--ebr-yellow); }
.sc-inv__form { left: 284px; top: 24px; width: 252px; height: 352px; }
.sc-inv__f { padding: 10px 12px; border-bottom: 1px solid var(--ink-200); display: grid; gap: 4px; }
.sc-inv__f span:first-child { color: var(--ink-500); }
.sc-inv__f span:last-child { font: 500 13px/1.2 var(--font-body); min-height: 16px; }

/* 8 · Clinic reminders: a slot, a reminder, a tap, a confirmed slot */
.sc-cli__cal { left: 24px; top: 24px; width: 280px; height: 352px; }
.sc-cli__slots { padding: 10px; display: grid; gap: 6px; }
.sc-cli__slot { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--radius-sm); background: #fff; font: 400 12px/1.2 var(--font-body); border-left: 3px solid var(--ink-300); }
.sc-cli__slot.is-key { border-left-color: var(--ebr-yellow); }
.sc-cli__slot.is-ok { border-left-color: var(--ebr-purple); }
.sc-cli .sc-phone { left: 330px; top: 20px; }
.sc-cli__msg { padding: 12px 10px; display: grid; gap: 8px; }
.sc-cli__btns { display: grid; gap: 6px; }
.sc-cli__btns span { padding: 8px; text-align: center; border-radius: var(--radius-pill); background: #fff; color: var(--ebr-purple); font: 500 11px/1 var(--font-body); border: 1px solid var(--ebr-purple-wash); }

/* 9 · Listing writer: a product becomes a listing draft */
.sc-lst__prod { position: absolute; left: 24px; top: 24px; width: 200px; padding: 12px; display: grid; gap: 10px; }
.sc-lst__img { height: 150px; border-radius: var(--radius-sm); background: var(--ebr-purple-wash); display: grid; place-items: center; }
.sc-lst__specs { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-lst__ed { left: 248px; top: 24px; width: 288px; height: 352px; }
.sc-lst__f { padding: 10px 12px; border-bottom: 1px solid var(--ink-200); display: grid; gap: 6px; }
.sc-lst__f > span:first-child { color: var(--ink-500); }
.sc-lst__title { font: 500 15px/1.25 var(--font-display); min-height: 19px; }
.sc-lst__desc { font: 400 12px/1.45 var(--font-body); min-height: 52px; }
.sc-lst__tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }

/* 10 · Review replies: a review, a drafted reply, an owner's tap */
.sc-rev__card { position: absolute; left: 24px; top: 24px; width: 300px; padding: 14px; display: grid; gap: 8px; }
.sc-rev__stars { color: var(--ebr-yellow-press); letter-spacing: 2px; font-size: 14px; }
.sc-rev__stars s { color: var(--ink-300); text-decoration: none; }
.sc-rev__card p { margin: 0; font: 400 12px/1.45 var(--font-body); }
.sc-rev__reply { border-left: 3px solid var(--ebr-purple); padding: 8px 10px; background: var(--ebr-purple-wash); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font: 400 12px/1.45 var(--font-body); min-height: 74px; }
.sc-rev .sc-phone { left: 352px; top: 24px; width: 172px; height: 300px; }
.sc-rev__ask { padding: 12px 10px; display: grid; gap: 8px; }

/* Snapshot gallery */
.s-gal { display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); margin-top: var(--space-8); }
.s-gal figure { margin: 0; display: grid; gap: var(--space-3); min-width: 0; }
.s-gal figcaption { display: flex; gap: var(--space-3); align-items: baseline; font: var(--type-small); color: var(--text-on-dark-muted); }
.s-gal figcaption b { font: 500 16px/1.3 var(--font-display); color: var(--text-on-dark); }
.s-gal figcaption .e-label { color: var(--ebr-yellow); flex: none; }
@media (max-width: 700px) { .s-gal { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } }

/* How it is built: the tools, drawn as a live wiring diagram */
.s-wire { position: relative; margin-top: var(--space-8); display: grid; grid-template-columns: 1fr 1.1fr 1fr; align-items: center; gap: var(--space-8); min-height: 300px; }
.s-wire svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.s-wire__col { position: relative; z-index: 1; display: grid; gap: var(--space-3); align-content: center; min-width: 0; }
.s-wire__col > .e-label { margin-bottom: var(--space-1); }
.s-node { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius-sm); font: 500 14px/1.2 var(--font-body); color: var(--ink-900); min-width: 0; }
.s-node i { flex: none; width: 10px; height: 10px; background: var(--ink-300); }
.s-node--hub { padding: 22px 20px; background: var(--ink-900); color: #fff; border-color: var(--ink-900); font: 500 20px/1.2 var(--font-display); flex-direction: column; align-items: flex-start; gap: 8px; }
.s-node--hub small { font: var(--type-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ebr-yellow); }
.s-node--model i { background: var(--ebr-purple); }
.s-node.is-on { border-color: var(--ebr-purple); }
.s-node.is-on i { background: var(--ebr-yellow); }
.s-wire__path { fill: none; stroke: var(--ink-300); stroke-width: 1.5; }
.s-wire__pulse { fill: var(--ebr-yellow); stroke: var(--ink-900); stroke-width: 1; }
@media (max-width: 900px) { .s-wire { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); } }

/* Phones: a 360 x 640 portrait stage, the same parts stacked (11 Nov 2026). */
.sc-box.is-tall { aspect-ratio: 9 / 16; }
.is-tall .sc-stage { width: 360px; height: 640px; }
.is-tall .sc-lead .sc-phone { left: 82px; top: 12px; }
.is-tall .sc-lead__sheet { left: 16px; top: 388px; width: 328px; }
.is-tall .sc-lead .sc-toast { left: 16px !important; top: 568px !important; width: 328px !important; }
.is-tall .sc-out__sig { left: 16px; top: 112px !important; width: 328px; }
.is-tall .sc-out__sig[data-a="know"] { top: 12px !important; }
.is-tall .sc-out__mail { left: 16px; top: 280px; width: 328px; height: 348px; }
.is-tall .sc-inb { left: 16px; top: 12px; width: 328px; height: 616px; }
.is-tall .sc-inb__wrap { grid-template-columns: 100px 1fr; }
.is-tall .sc-face__tab { left: 16px; top: 12px; width: 328px; height: 616px; }
.is-tall .sc-face__scr { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
.is-tall .sc-face__side { border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
.is-tall .sc-rep__feed { left: 16px; top: 12px; width: 328px; height: 352px; }
.is-tall .sc-rep__gauge { left: 16px; top: 384px; width: 164px; }
.is-tall .sc-rep .sc-phone { left: 192px; top: 384px; width: 152px; }
.is-tall .sc-dig__cols { left: 16px; top: 12px; width: 328px; }
.is-tall .sc-dig__clock { left: 16px; top: 330px; }
.is-tall .sc-dig__mail { left: 16px; top: 400px; width: 328px; }
.is-tall .sc-inv__doc { left: 16px; top: 12px; width: 328px; height: 300px; }
.is-tall .sc-inv__form { left: 16px; top: 324px; width: 328px; height: 304px; }
.is-tall .sc-cli__cal { left: 16px; top: 12px; width: 328px; height: 248px; }
.is-tall .sc-cli .sc-phone { left: 82px; top: 272px; }
.is-tall .sc-lst__prod { left: 16px; top: 12px; width: 328px; grid-template-columns: 120px 1fr; align-items: start; }
.is-tall .sc-lst__img { height: 120px; }
.is-tall .sc-lst__ed { left: 16px; top: 190px; width: 328px; height: 438px; }
.is-tall .sc-rev__card { left: 16px; top: 12px; width: 328px; }
.is-tall .sc-rev .sc-phone { left: 94px; top: 316px; }

/* Page parts shared with the sample view (11 Nov 2026). */
.s-hero .e-wd-open__head { align-items: center; }
.s-run { width: 100%; margin: 0; grid-column: 2; grid-row: 1; display: grid; gap: 10px; min-width: 0; }
@media (max-width: 960px) { .s-run { grid-column: 1; grid-row: auto; } }
.s-run figcaption { display: flex; justify-content: space-between; gap: 8px; font: var(--type-label); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.s-pipe { position: relative; }
.s-pipe__line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(251,222,55,.3); transform-origin: left center; pointer-events: none; z-index: 0; }
.s-pipe__dot { position: absolute; top: calc(50% - 5px); left: 0; width: 10px; height: 10px; background: var(--ebr-yellow); pointer-events: none; z-index: 0; }
.s-pipe .e-wd-pipe { position: relative; z-index: 1; }
.s-pipe .e-wd-pipe__step { background: var(--ink-1000); transition: border-color var(--dur-base, .42s) var(--ease-out, ease-out); }
.s-pipe .e-wd-pipe__step.is-lit { border-color: var(--ebr-yellow); }
.s-pipe .e-wd-pipe__step:not(:last-child)::after { display: none; }
@media (max-width: 900px) { .s-pipe__line, .s-pipe__dot { display: none; } }
.s-gal-head { margin-top: var(--space-9, 96px); display: grid; gap: var(--space-3); }
.s-gal-head p { margin: 0; color: var(--text-on-dark-muted); font: var(--type-small); max-width: 52ch; }
.s-strike { background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 55%; background-size: var(--s, 100%) 1px; color: var(--text-muted); }
.e-wd-stack__grid[hidden] { display: none !important; }

/* Without the scripts the scene boxes would be empty dark boxes: hide them
   until js/ai-page.js marks the page ready. The sample view always runs it. */
html:not(.ai-ready) .s-hero .s-run, html:not(.ai-ready) .s-gal, html:not(.ai-ready) .s-gal-head { display: none; }
.s-word { display: inline-block; }

/* Work page cards (11 Nov 2026): the scene fills the 4:3 slot over the grey
   placeholder, which still shows if the scripts don't run. */
.e-wkg__shot .sc-fill { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
html:not(.ai-ready) .e-wkg__shot .sc-fill { display: none; }

/* Service page case cards (11 Nov 2026): the scene fills the still slot. */
.e-pst-card__shot .sc-fill { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: var(--ink-900); }
html:not(.ai-ready) .e-pst-card__shot .sc-fill { display: none; }

/* Services page answer card (11 Nov 2026): the AI case plays its scene in the still slot. */
.e-svca__case .e-svca__shot:has(.sc-fill) { position: relative; }
.e-svca__shot .sc-fill { display: block; position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: var(--ink-900); }
html:not(.ai-ready) .e-svca__shot .sc-fill { display: none; }
