/* ==== Motion, site builder (site.js; loop/tools/combined/motion/site.py) ====
   What every page shares. Every rule starts with html.m-on, so with motion off the page is the locked page.
   Durations are the shared tokens, divided by --motion-speed. */

/* ---- Buttons: press feedback only. The square buttons and the nav's Book a call block sink a little under the
   finger and come back (the animate skill's press: transform, ease-out, the press token). The hero and Speedrun
   buttons keep their own lift on hover and their background fade. */
html.m-on .btn, html.m-on header.nav a.nav__cta{transition:transform var(--dur-press) var(--ease-out)}
html.m-on .p-hero .btn, html.m-on .p-s4b .btn{transition:transform var(--dur-press) var(--ease-out),box-shadow .2s ease,background .2s ease}
html.m-on .btn:active, html.m-on header.nav a.nav__cta:active,
html.m-on .p-hero .btn:active, html.m-on .p-s4b .btn:active{transform:scale(.98)}

/* ---- Footer links: they underline on hover as locked (instant, which suits the pixel hand); a press dims them for
   as long as the finger is down, the way a key gives under it. */
html.m-on .p-close .close__index a, html.m-on .p-close .tb a{transition:opacity var(--dur-press) var(--ease-out)}
html.m-on .p-close .close__index a:active, html.m-on .p-close .tb a:active{opacity:.55}

/* ---- The nav's three menus (Product, Industries, Use cases): the panel comes out of its label, a few pixels down
   from the nav's rule, as it opens on hover or click (the dropdown recipe: opacity and a small scale from the
   trigger, ease-out). Closing is instant: the visitor has already moved on. An animation tied to the open state,
   not a transition from @starting-style: Chrome restarts that transition on every frame while the panel is opened
   by :hover, so the panel never appears. */
@keyframes m-menu-in{from{opacity:0;transform:translateY(-4px) scale(.98)}}
html.m-on .p-nav .nav__group > div{transform-origin:var(--space-3) 0}
html.m-on .p-nav .nav__group[open] > div{animation:m-menu-in calc(180ms / var(--motion-speed)) var(--ease-out)}
@media (hover:hover){html.m-on .p-nav .nav__group:hover > div{animation:m-menu-in calc(180ms / var(--motion-speed)) var(--ease-out)}}

/* ---- The menu at 1099px and under: the paper sheet drops in under the nav's rule (the drawer curve, a sheet's
   longer time; the fade on the shorter ease-out), and the three bars turn into the cross as it opens. */
@keyframes m-fade-in{from{opacity:0}}
@keyframes m-drop-in{from{transform:translateY(-10px)}}
@keyframes m-x-in{from{transform:rotate(0deg)}}
html.m-on .p-nav .nav__menu[open] > div{
  animation:m-fade-in calc(200ms / var(--motion-speed)) var(--ease-out),m-drop-in calc(280ms / var(--motion-speed)) var(--ease-drawer)}
html.m-on header.nav .nav__menu summary::before{transition:transform calc(200ms / var(--motion-speed)) var(--ease-out)}
html.m-on header.nav .nav__menu[open] summary::after{animation:m-x-in calc(200ms / var(--motion-speed)) var(--ease-out)}

/* ---- The pigeons in colour (site.js). The sprite sits exactly where the colour layer is drawn; the colour layer
   is hidden under it only once its sheet of frames and its plate are decoded. A frame is a window (m-pg__spr) over
   the sheet (m-pg__sheet), which steps sideways one frame at a time: a transform, held, never tweened. */
html.m-on .m-pg{position:absolute;overflow:hidden;pointer-events:none;visibility:hidden}
html.m-on .m-pg.m-pg--live{visibility:visible}
/* the guide's tip is drawn whole (no crop), so a head raised above the picture's edge may show in the padding above */
html.m-on .m-pg.m-pg--tip{overflow:visible}
html.m-on .m-pg__stage{position:absolute;left:0;top:0;transform-origin:0 0}
html.m-on .m-pg i{position:absolute;display:block;background-size:100% 100%;background-repeat:no-repeat}
html.m-on .m-pg i.m-pg__box{visibility:hidden}
html.m-on .m-pg i.m-pg__spr{overflow:hidden}
html.m-on .m-pg i.m-pg__sheet{left:0;top:0;transform:translateX(0)}
html.m-on .m-pg__plate{isolation:isolate;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
html.m-on .m-pg__plate::before{content:"";position:absolute;inset:0;background-size:100% 100%;background-repeat:no-repeat}
html.m-on .m-pg__plate--mul{background-color:var(--m-plate-bg)}
html.m-on .m-pg__plate--mul::before{mix-blend-mode:multiply}
html.m-on img.m-pg-live, html.m-on .m-pg-host::after{opacity:0 !important}
/* the hover area: over the bird only (site.js switches it off wherever the bird lies under text or a control) */
html.m-on .m-pg-hit{position:absolute;z-index:50;border-radius:32%;pointer-events:auto;-webkit-tap-highlight-color:transparent}
html.m-on.m-pg-debug .m-pg-hit{outline:2px dashed #e33;outline-offset:-2px}

/* PIGEON LAYERS (site_cut.py) */
html.m-on .m-pg--hero .m-pg__plate{-webkit-mask-image:url(site/hero-plate.webp);mask-image:url(site/hero-plate.webp)}
html.m-on .m-pg--hero .m-pg__plate::before{background-image:url(site/hero-plate.webp)}
html.m-on .m-pg--hero .m-pg__sheet{background-image:url(site/hero-frames.webp)}
html.m-on .m-pg--close .m-pg__plate{-webkit-mask-image:url(site/close-plate.webp);mask-image:url(site/close-plate.webp)}
html.m-on .m-pg--close .m-pg__plate::before{background-image:url(site/close-plate.webp)}
html.m-on .m-pg--close .m-pg__sheet{background-image:url(site/close-frames.webp)}
html.m-on .m-pg--about .m-pg__plate{-webkit-mask-image:url(site/about-plate.webp);mask-image:url(site/about-plate.webp)}
html.m-on .m-pg--about .m-pg__plate::before{background-image:url(site/about-plate.webp)}
html.m-on .m-pg--about .m-pg__sheet{background-image:url(site/about-frames.webp)}
html.m-on .m-pg--contact .m-pg__plate{-webkit-mask-image:url(site/contact-plate.webp);mask-image:url(site/contact-plate.webp)}
html.m-on .m-pg--contact .m-pg__plate::before{background-image:url(site/contact-plate.webp)}
html.m-on .m-pg--contact .m-pg__sheet{background-image:url(site/contact-frames.webp)}
html.m-on .m-pg--thanks .m-pg__plate{-webkit-mask-image:url(site/thanks-plate.webp);mask-image:url(site/thanks-plate.webp)}
html.m-on .m-pg--thanks .m-pg__plate::before{background-image:url(site/thanks-plate.webp)}
html.m-on .m-pg--thanks .m-pg__sheet{background-image:url(site/thanks-frames.webp)}
html.m-on .m-pg--road .m-pg__plate{-webkit-mask-image:url(site/road-plate.webp);mask-image:url(site/road-plate.webp)}
html.m-on .m-pg--road .m-pg__plate::before{background-image:url(site/road-plate.webp)}
html.m-on .m-pg--road .m-pg__sheet{background-image:url(site/road-frames.webp)}
html.m-on .m-pg--lost .m-pg__plate{-webkit-mask-image:url(site/lost-plate.webp);mask-image:url(site/lost-plate.webp)}
html.m-on .m-pg--lost .m-pg__plate::before{background-image:url(site/lost-plate.webp)}
html.m-on .m-pg--lost .m-pg__sheet{background-image:url(site/lost-frames.webp)}
html.m-on .m-pg--tip .m-pg__sheet{background-image:url(site/tip-frames.webp)}
/* END PIGEON LAYERS */

/* ---- data-m-window: the pixel-window entrance page builders opt into (site.js, top of file). Hidden only once
   site.js has run (html.m-win), and windows already on screen at load are never hidden. */
html.m-on.m-win [data-m-window]:not(.m-win-in){opacity:0}
html.m-on .m-zoom i{position:absolute;z-index:40;display:block;pointer-events:none;opacity:0;box-shadow:inset 0 0 0 2px var(--c)}
