/* Scene build (owner, Nov 15, 2026): the use-case pattern on Service Calls, Safety, Inspections,
   Surveys and Estimates, Work Instructions and Training. Site Walks runs the same idea with its own
   sort and send (dist/walk-build.css). One report stays pinned beside the copy. It opens finished in
   the hero and clears as the hero leaves (a phone opens it empty: owner, Nov 15). Then each of the three modules is its own scene: when its
   copy arrives the scene plays through on a clock and holds until the visitor scrolls to the next.
   In a scene the tech's line streams in a bubble off the card's top corner, the field it fills comes
   in, and the foot of the card shows what Blue did and said. The last scene ends on the report's own
   action (Sync, Submit, Send, Release): a copy of the report flies off and the chip turns.
   Every field has a reserved place, so the card never changes size. Without the script, or with
   reduced motion, the finished report shows. Script: dist/scene-build.js. Guide: docs/style-guide.md. */
.sb{--sb-ink:#142b49;--sb-muted:#536b87;--sb-blue:#165bc4;--sb-line:#e4eaf1;--sb-hl:#e8f1fd;--sb-ok:#1a7a43;--sb-warn:#9a5b00;--sb-ease:cubic-bezier(.22,.7,.2,1);
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:72px;max-width:1280px;margin:0 auto;padding:0 48px;
  font-family:var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-ink)}
body[data-brand] main section.sb,section.sb{padding-top:0!important;padding-bottom:0!important}

/* The copy column */
.sb-text{padding:0 0 22vh}
.sb-hero{min-height:min(720px,calc(100vh - var(--site-header-height,78px) - 32px));margin-top:24px;display:flex;flex-direction:column;justify-content:center}
.sb-step{min-height:92vh;display:flex;flex-direction:column;justify-content:center}
body[data-brand] main .sb-step h2{margin:0 0 14px}
body[data-brand] main .sb-step p{margin:0;max-width:30em;color:var(--sb-muted)}

/* The pinned report */
.sb-vis{order:2;position:sticky;top:calc(var(--site-header-height,78px) + 16px);height:min(720px,calc(100vh - var(--site-header-height,78px) - 32px));
  align-self:start;margin:24px 0 0;display:flex;align-items:center;justify-content:center}
.sb-stage{position:relative;z-index:1;width:100%;max-width:540px;padding-top:46px;box-sizing:border-box;transform:scale(var(--sb-fit,1));transform-origin:center}
.sb-doc{position:relative;background:#fff;border:1px solid var(--sb-line);border-radius:12px;box-shadow:0 22px 48px #142b491f;padding:18px 24px 0;box-sizing:border-box}
.sb-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.sb-title{font:700 20px/1.2 var(--aw-font,"Fira Sans",sans-serif)}
.sb-job{margin-top:2px;padding-bottom:10px;border-bottom:1px solid var(--sb-line);font:400 14px/1.45 var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-muted)}
.sb-job b{color:var(--sb-ink);font-weight:700}
.sb-chips{position:relative;flex:none;height:24px;min-width:112px}
.sb-chip{position:absolute;right:0;top:0;white-space:nowrap;font:700 12px/22px var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-blue);border:1px solid var(--sb-blue);border-radius:999px;padding:0 10px;opacity:0}
.sb-chip[data-c=final]{color:var(--sb-ok);border-color:var(--sb-ok);opacity:1}

.sb-body{position:relative;padding:2px 0 6px}
.sb-gh{margin-top:8px;padding-bottom:2px;font:700 13px/1.3 var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-ink)}
.sb-f{position:relative;display:grid;grid-template-columns:minmax(0,1fr);padding:4px 10px;margin:0 -10px;border-radius:8px}
.sb-f>i{position:absolute;inset:1px 0;border-radius:8px;background:var(--sb-hl);opacity:0}
.sb-f>*{position:relative}
.sb-k{font:700 13px/1.3 var(--aw-font,"Fira Sans",sans-serif);color:#1a4b8c}
.sb-v{font:400 13.5px/1.4 var(--aw-font,"Fira Sans",sans-serif);color:#3d5674}
.sb-v::after{content:"";display:block;clear:both}
.sb-v>img{float:left;width:46px;height:34px;object-fit:cover;border-radius:4px;margin:2px 9px 0 0}
.sb-v small{display:inline-block;margin-left:2px;font:700 12px/1.4 var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-warn)}
.sb-v small.ok{color:var(--sb-ok)}
.sb-media{display:flex;gap:8px;margin-top:2px}
.sb-media figure{margin:0}.sb-media img{display:block;width:64px;height:44px;object-fit:cover;border-radius:4px}
.sb-media figcaption{font:700 11px/1.3 var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-muted);margin-top:2px}
.sb-media .vid{position:relative}.sb-media .vid::after{content:"▶";position:absolute;left:25px;top:12px;color:#fff;font-size:15px;text-shadow:0 1px 4px #0008}
.sb-final{display:flex;align-items:center;gap:12px;padding-top:9px}
.sb-btn{font:700 13px/1 var(--aw-font,"Fira Sans",sans-serif);color:#fff;background:var(--sb-ok);border-radius:6px;padding:9px 14px;white-space:nowrap}
.sb-done{font:700 12px/1.4 var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-ok)}
.sb-center{display:none}

/* The foot of the card: what Blue did, and what it said. One reserved strip. */
.sb-foot{position:relative;height:68px;margin:0 -24px;padding:0 24px;border-top:1px solid var(--sb-line);background:#f6f9fc;border-radius:0 0 12px 12px;display:flex;flex-direction:column;justify-content:center;gap:2px;overflow:hidden}
.sb-did{font:700 13px/1.35 var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-ok)}
.sb-did::before{content:"✓ "}
.sb-did:empty::before{content:""}
.sb-said{font:400 13.5px/1.35 var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-ink)}
.sb-wave{flex:none;display:inline-flex;gap:2px;align-items:center;height:16px}
.sb-wave b{display:block;width:2px;height:8px;border-radius:2px;background:#8fc0ff}
.sb-wave b:nth-child(2){height:14px}.sb-wave b:nth-child(3){height:10px}.sb-wave b:nth-child(4){height:6px}

/* What the tech says: a bubble off the card's top corner. Words stream in. Script only. */
.sb-voice{display:none}
.sb.is-on .sb-voice{display:flex;position:absolute;z-index:4;right:-22px;bottom:calc(100% - 60px);align-items:flex-start;gap:9px;max-width:min(480px,calc(100% + 16px));box-sizing:border-box;
  padding:9px 16px 9px 9px;border-radius:22px 22px 6px 22px;background:#142b49;color:#fff;box-shadow:0 12px 28px #142b4940;
  font:400 15px/1.35 var(--aw-font,"Fira Sans",sans-serif);opacity:0;transform:translate3d(0,6px,0);transition:opacity .22s ease,transform .22s ease;pointer-events:none}
.sb.is-on .sb-voice.is-up{opacity:1;transform:none}
.sb-who{flex:none;width:30px;height:30px;border-radius:50%;background:#c9d3df url(/assets/abstractions/avatar-marshall.jpg) center/cover;box-shadow:0 0 0 2px #ffffff40}
.sb-voice .sb-wave{margin-top:7px}
.sb-voice.is-quiet .sb-wave b{animation-play-state:paused!important}
.sb-words{padding-top:5px}
.sb-words span{opacity:0;transition:opacity .16s linear}
.sb-words span.on{opacity:1}
.sb-words span.m{color:#a9d0ff;font-weight:700}

/* Script on: fields wait in their reserved places and the script brings them in. */
.sb.is-on .sb-f,.sb.is-on .sb-gh{opacity:0;transform:translate3d(0,8px,0);transition:opacity .45s ease,transform .6s var(--sb-ease);will-change:transform,opacity}
.sb.is-on .sb-f.is-in,.sb.is-on .sb-gh.is-in{opacity:1;transform:none}
.sb.is-on .sb-f>i,.sb.is-on .sb-chip,.sb.is-on .sb-foot>*,.sb.is-on .sb-center,.sb.is-on .sb-done,.sb.is-on .sb-btn{transition:opacity .4s ease,transform .4s var(--sb-ease),background-color .4s ease}
.sb.is-on .sb-f.is-live>i{opacity:1}
.sb.is-on .sb-chip{opacity:0}.sb.is-on .sb-chip.is-in{opacity:1}
.sb.is-on .sb-foot>*{opacity:0}.sb.is-on .sb-foot.is-in>*{opacity:1}
.sb.is-on .sb-final .sb-btn{background:var(--sb-blue)}.sb.is-on .sb-final .sb-done{opacity:0}
.sb.is-on .sb-final.is-done .sb-btn{background:var(--sb-ok)}.sb.is-on .sb-final.is-done .sb-done{opacity:1}
.sb.is-on .sb-doc.is-away{opacity:.35}
.sb.is-on .sb-doc{transition:opacity .4s ease}
.sb.is-on .sb-center{display:block;position:absolute;left:0;right:0;top:38%;text-align:center;font:700 18px/1.3 var(--aw-font,"Fira Sans",sans-serif);color:var(--sb-ink);opacity:0;transform:translate3d(0,6px,0)}
.sb.is-on .sb-center.is-up{opacity:1;transform:none}
.sb-center span{display:inline-block;width:1.2em;text-align:left}
.sb-center span::after{content:"";animation:sb-dots 1.2s steps(1) infinite}
@keyframes sb-dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}}
.sb.is-snap .sb-f,.sb.is-snap .sb-gh{transition-duration:.25s!important}

/* The last action: a copy of the report lifts off the card and flies away. */
.sb-fly{position:absolute;left:0;right:0;top:46px;z-index:3;pointer-events:none;will-change:transform,opacity;transform-origin:70% 20%}
.sb-fly .sb-doc{opacity:1!important;box-shadow:0 18px 40px #142b4940;border-color:#bcd3f5}
.sb-fly .sb-f,.sb-fly .sb-gh{opacity:1!important;transform:none!important;transition:none!important}
.sb-fly .sb-chip{transition:none!important}

/* The waveform moves while the tech talks. */
.sb.is-on .sb-wave b{transform-origin:center;animation:sb-talk .9s ease-in-out infinite alternate}
.sb.is-on .sb-wave b:nth-child(2){animation-duration:.62s;animation-delay:-.3s}
.sb.is-on .sb-wave b:nth-child(3){animation-duration:.78s;animation-delay:-.55s}
.sb.is-on .sb-wave b:nth-child(4){animation-duration:.54s;animation-delay:-.15s}
@keyframes sb-talk{0%{transform:scaleY(.35)}45%{transform:scaleY(1.5)}100%{transform:scaleY(.7)}}

.sb-caps{display:none}
/* Snapping was tried and removed (owner, Nov 15): use-case pages scroll plainly on every width. */
/* No snapping on any width (owner, Nov 15): the page scrolls plainly. */
@media (max-width:1080px){.sb{gap:40px;padding:0 24px}.sb.is-on .sb-voice{right:-10px}}
@media (max-width:760px){
  .sb{grid-template-columns:minmax(0,1fr);gap:0;padding:0 16px}
  .sb-hero{order:0;min-height:0;margin-top:0;padding:28px 0 8px}
  .sb-text{display:contents}
  .sb-vis{order:1;top:var(--uc-head,0px);height:calc(100svh - var(--uc-head,0px));margin:0 -16px;padding:0 16px;z-index:2;background:#fff;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;overflow:hidden}
  /* On a phone the card and the module's copy are one pinned screen. The steps in the page are spacers
     that give each module a swipe; their copy shows in .sb-caps above the card (owner, Nov 15) and crossfades. The script sets the block's height to the longest copy. */
  .sb-step{order:2;position:relative;min-height:0;height:calc((100svh - var(--uc-head,0px)) * .38);padding:0;opacity:0;pointer-events:none}
  .sb.is-on .sb-step>*{position:absolute!important;width:1px;height:1px;margin:0!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  /* The snap point for a module is where the pinned screen sits at the top: one screen above its spacer. */
  .sb.is-on .sb-step::before{content:"";position:absolute;left:0;top:calc(-1 * (100svh - var(--uc-head,0px)));width:1px;height:1px;scroll-snap-align:start;scroll-snap-stop:always}
  .sb-step:last-child{height:2px;padding:0}
  .sb.is-on .sb-caps{display:block;position:relative;order:-1;flex:none;min-height:0;margin:18px 0 10px}
  .sb-cap{position:absolute;left:0;right:0;top:0;opacity:0;transform:translate3d(0,10px,0);transition:opacity .35s ease,transform .45s var(--sb-ease)}
  .sb-cap.is-now{opacity:1;transform:none}
  body[data-brand] main .sb-cap h2{margin:0 0 8px!important;font-size:22px!important;line-height:1.2!important}
  body[data-brand] main .sb-cap p{margin:0;max-width:none;font-size:15.5px!important;line-height:1.45!important;color:var(--sb-muted)}
  .sb:not(.is-on) .sb-step{height:auto;opacity:1;padding:24px 0}
  .sb:not(.is-on) .sb-vis{position:static;height:auto;display:block}
  .sb-stage{max-width:none;padding-top:54px;flex:none;transform-origin:top center}
  .sb-fly{top:54px}
  .sb-fly{top:40px}
  .sb-doc{padding:12px 16px 0;box-shadow:0 10px 26px #142b491a}
  .sb-title{font-size:17px}.sb-job{font-size:13px;padding-bottom:8px}
  .sb-foot{height:66px;margin:0 -16px;padding:0 16px}.sb-did{font-size:12px}.sb-said{font-size:12.5px}
  .sb-k{font-size:12.5px}.sb-v{font-size:13px}.sb-f{padding:4px 10px}
  /* Back up the page the section changes with a short fade, not a cut (owner, Nov 15). */
  .sb.is-on .sb-body{transition:opacity .16s ease}.sb.is-on .sb-body.is-swap{opacity:0}
  /* A phone has room for one section at a time: the one its module is about. */
  .sb.is-on .sb-grp{display:none}.sb.is-on .sb-grp.is-now{display:block}
  .sb.is-on .sb-body{min-height:var(--sb-tall,0px)}
  .sb.is-on .sb-voice{right:-4px;bottom:calc(100% - 52px);padding:6px 12px 6px 6px;font-size:13px;gap:7px;max-width:100%}
  .sb-who{width:24px;height:24px}.sb-voice .sb-wave{margin-top:4px}.sb-words{padding-top:3px}
}
@media (max-width:760px) and (max-height:700px){body[data-brand] main .sb-cap h2{font-size:19px!important;margin-bottom:6px!important}body[data-brand] main .sb-cap p{font-size:14px!important;line-height:1.4!important}}
/* Room under the report before the closing quote (owner, Nov 15). */
html body[data-brand] main section.sb{padding-bottom:120px!important}
@media (max-width:760px){html body[data-brand] main section.sb{padding-bottom:0!important}}   /* a phone already has room under the pinned screen */

/* Hero photos around the report (owner, Nov 15): the same three as Site Walks (dist/walk-build.css), from each
   page's own job. They drift out as the hero leaves (scene-build.js); phones hide them. */
.sb-photos{position:absolute;inset:0;pointer-events:none}
.sb-photos figure{position:absolute;margin:0;border-radius:10px;overflow:hidden;box-shadow:0 14px 32px #142b4926;will-change:transform,opacity}
.sb-photos img{display:block;width:100%;height:100%;object-fit:cover}
.sb-photos .p1{right:-48px;top:-3%;width:56%;height:64%;transform:rotate(2deg)}
.sb-photos .p2{left:-64px;top:24%;width:32%;height:56%;transform:rotate(-2.5deg)}
.sb-photos .p3{right:-24px;bottom:4%;width:27%;height:30%;border:4px solid #142b49;background:#142b49}
.sb-photos .p3 b{position:absolute;left:8px;top:8px;font:700 12px/1 var(--aw-font,"Fira Sans",sans-serif);color:#fff;background:#c62828;border-radius:999px;padding:4px 8px}
.sb-photos .p3 b::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#fff;margin-right:5px;vertical-align:1px}
@media (max-width:1080px){.sb-photos .p1{right:-16px}.sb-photos .p2{left:-16px}.sb-photos .p3{right:-12px}}
@media (max-width:760px){.sb-photos{display:none}}

/* Tablets held upright (QA, Nov 15): the two-column layout stays, but the screen is taller than the 720px report
   frame, so the hero and the pinned report take the full height and the report sits level with the copy
   instead of leaving the lower third of the screen empty. The photos keep their 720px frame. */
@media (min-width:761px) and (max-width:1080px) and (min-height:900px){
  .sb-hero{min-height:calc(100vh - var(--site-header-height,78px) - 32px)}
  .sb-vis{height:calc(100vh - var(--site-header-height,78px) - 32px)}
  .sb-vis>.sb-photos{top:calc(50% - 360px);bottom:auto;height:720px}
}
/* A 48px module headline and a 56px hero headline break words in a half-width tablet column ("recommendatio/ns", "documentatio/n"). */
@media (min-width:761px) and (max-width:900px){html body[data-brand] main .sb-step h2{font-size:36px!important;line-height:1.15!important}html body[data-brand] main .sb-hero h1{font-size:46px!important;line-height:1.1!important}}
