/* 2.55 final pass (owner: "more special — add effects, animations, motion, things that attract the clients").
   One idea carried through the visit, not effects scattered over it — arrival and passage:
   · arrival — where a visit begins, the intro's cover closes into the page's own mark and the first screen
     assembles around it (js/motion.js picks the landing; the delays here hold the page's own entrances until then);
   · passage — one page hands over to the next: the bars hold still, the content changes beneath them and the mark
     of the current section glides to its new place; a thin line runs along the top while the next page is on its way;
   · touch — a soft ring from the finger on what can be pressed, a line along a button that is working, light across
     the one thing a page asks for.
   What belongs to one page lives with that page (css/kit-pages.css "2.55 final pass"; the account's bar in
   css/account-252.css).
   Every rule starts from the finished page: without js/fx.js, or on a device set to reduce motion, nothing moves
   and nothing is missing. */

/* arrival: the seal's landing dot and ring show only where the cover closes into them */
.oseal .lnd{stroke-opacity:0}.oseal .lnd-d{visibility:hidden}
.sp-land .oseal .lnd{stroke-opacity:1}.sp-land .oseal .lnd-d{visibility:visible}

/* passage: the line along the top (js/fx.js adds .fx-go when a link or a form leaves the page) */
.fx-line{position:fixed;top:0;left:0;right:0;z-index:130;height:3px;pointer-events:none;opacity:0;transform:scaleX(0);transform-origin:0 50%;
  background:linear-gradient(90deg,var(--tif),var(--tif2) 72%,#fff);box-shadow:0 0 10px var(--tif2);transition:opacity .25s}
[dir=rtl] .fx-line{transform-origin:100% 50%;background:linear-gradient(270deg,var(--tif),var(--tif2) 72%,#fff)}
.fx-go .fx-line{opacity:1;transform:scaleX(.7)}

/* touch: a button that is working says so along its lower edge (forms.js sets aria-busy); the ring from the finger */
.btn[aria-busy=true]{position:relative;overflow:hidden}
.btn[aria-busy=true]::before{content:"";position:absolute;bottom:0;left:0;width:100%;height:3px;background:currentColor;opacity:.45}
.fx-rel{position:relative}
.fx-rpw{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none;transform:translateZ(0)}
.fx-rp{position:absolute;border-radius:50%;background:currentColor;opacity:0}

/* the current section on the phone bar: a soft pill behind its icon */
.sh-tabbar a{position:relative}
.sh-tabbar a.sh-on{overflow:visible}
.sh-tabbar a.sh-on::after{content:"";position:absolute;z-index:-1;top:2px;left:50%;width:54px;height:30px;margin-left:-27px;border-radius:15px;background:color-mix(in srgb,currentColor 11%,transparent)}
.sh-tabbar.ma-tabbar a.sh-on::after{top:5px}

@media (prefers-reduced-motion:no-preference){
  /* arrival: the page's own entrances wait for the cover (public/base.html sets .sp-in with .sp-on; it stays) */
  .sp-in .ohead > *,.sp-in .ahero .atx > *{animation-delay:2.3s}
  .sp-in .ohead > :nth-child(2),.sp-in .ahero .atx > :nth-child(2){animation-delay:2.4s}
  .sp-in .ohead > :nth-child(3),.sp-in .ahero .atx > :nth-child(3){animation-delay:2.5s}
  .sp-in .ahero .atx > :nth-child(4),.sp-in .rooms-h{animation-delay:2.6s}
  .sp-in .ahero .atx > :nth-child(n+5){animation-delay:2.7s}
  .sp-in .hlt .sw path{animation-delay:3.15s}
  .sp-in .orb .olines{animation:fxOrbit .9s var(--ease) 2.35s backwards}
  .sp-in .orb .beam{animation-delay:2.95s}
  .sp-in .onode.tl{animation-delay:2.55s}.sp-in .onode.tr{animation-delay:2.65s}.sp-in .onode.bl{animation-delay:2.75s}.sp-in .onode.br{animation-delay:2.85s}
  /* the landing runs on the cover's own clock (.sp-in is set with .sp-on, before the first paint) */
  .sp-in .oseal .lnd{animation:spRipple .8s ease-out 2.76s}
  .sp-in .oseal .lnd-d{animation:spPop .4s cubic-bezier(.3,1.6,.5,1) 2.74s}
  .oseal .lnd,.oseal .lnd-d{transform-box:fill-box;transform-origin:center}

  /* passage: page to page. The account's own colour reveal (js/customer.js, html.th-vt) keeps the whole page. */
  @view-transition{navigation:auto}
  html:not(.th-vt) .gov{view-transition-name:fx-gov}
  html:not(.th-vt) header.top,html:not(.th-vt) .ma-bar{view-transition-name:fx-top}
  html:not(.th-vt) .sh-tabbar{view-transition-name:fx-tabs}
  html:not(.th-vt) .top nav a.on::after{view-transition-name:fx-nav}
  html:not(.th-vt) .sh-tabbar a.sh-on::after{view-transition-name:fx-tab}
  ::view-transition-old(root){animation:fxLeave .15s ease-in both}
  ::view-transition-new(root){animation:fxArrive .34s cubic-bezier(.2,.7,.2,1) both}
  ::view-transition-group(fx-nav),::view-transition-group(fx-tab){animation-duration:.4s;animation-timing-function:cubic-bezier(.5,0,.15,1)}
  .fx-go .fx-line{transform:scaleX(.9);transition:transform 8s cubic-bezier(.1,.6,.1,1),opacity .15s}

  /* touch */
  .fx-rp{animation:fxRipple .6s cubic-bezier(.2,.6,.3,1) both}
  .btn[aria-busy=true]::before{width:38%;border-radius:3px;animation:fxBusy 1.05s ease-in-out infinite}
  [dir=rtl] .btn[aria-busy=true]::before{left:auto;right:0;animation-name:fxBusyR}
  /* the home's own call catches the light now and then (a phone has no hover) */
  .sh-page header.top .btn.tif::after{animation:fxSweep 6s var(--ease) 3.4s infinite}
  /* the live board's meters grow as the board arrives */
  .bpanel.rv .mtr b{transform-origin:0 50%;animation:fxGrowX .9s var(--ease) .35s backwards}
  [dir=rtl] .bpanel.rv .mtr b{transform-origin:100% 50%}
}
/* with a mouse: a soft light in the card's own colour follows the pointer over the home's cards (js/fx.js) */
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .kng li,.ft{background-image:radial-gradient(230px circle at var(--mx,50%) var(--my,-60%),color-mix(in srgb,var(--kc,var(--fc,var(--tif))) 11%,transparent),transparent 72%);background-repeat:no-repeat}
}
/* on a wide screen the four rooms come out from the mark to their places */
@media (min-width:901px) and (prefers-reduced-motion:no-preference){
  .sp-in .onode.tl{--nx:64px;--ny:54px}.sp-in .onode.tr{--nx:-64px;--ny:54px}.sp-in .onode.bl{--nx:64px;--ny:-54px}.sp-in .onode.br{--nx:-64px;--ny:-54px}
  [dir=rtl].sp-in .onode.tl,[dir=rtl].sp-in .onode.bl{--nx:-64px}[dir=rtl].sp-in .onode.tr,[dir=rtl].sp-in .onode.br{--nx:64px}
}
@keyframes fxOrbit{from{opacity:0;transform:scale(.84)}}
@keyframes fxLeave{to{opacity:0}}
@keyframes fxArrive{from{opacity:0;transform:translateY(8px)}}
@keyframes fxRipple{from{opacity:.2;transform:scale(0)}to{opacity:0;transform:scale(1)}}
@keyframes fxBusy{from{transform:translateX(-110%)}to{transform:translateX(275%)}}
@keyframes fxBusyR{from{transform:translateX(110%)}to{transform:translateX(-275%)}}
@keyframes fxSweep{0%,78%{transform:translateX(-160%) skewX(-20deg)}100%{transform:translateX(260%) skewX(-20deg)}}
@keyframes fxGrowX{from{transform:scaleX(0)}}
