/* Decorative zoomed mark. Behind everything, never interactive. One corner per
   page, so the set reads as designed rather than repeated. The outer element
   owns the corner and the entrance; the inner one owns the pointer drift.

   Note: it is fixed to the viewport, so a bottom corner only works on a page
   that fits the screen. Long pages take a top corner. */
.lb-accent {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  width: 42vw;
  min-width: 280px;
  aspect-ratio: 1 / 0.977;
  opacity: 0;
  will-change: transform, opacity;
  animation-duration: 1.1s, 1.25s;
  animation-timing-function: ease-out, cubic-bezier(.16,.84,.34,1);
  animation-delay: .06s, 0s;
  animation-fill-mode: forwards, forwards;
}
.lb-accent i {
  display: block;
  width: 100%;
  height: 100%;
  background: url("img/mark.svg") no-repeat center / contain;
  transform: translate3d(var(--dx, 0px), var(--dy, 0px), 0);
  transition: transform .8s cubic-bezier(.22,.61,.36,1);
}
body > * { position: relative; z-index: 1; }

@keyframes lb-fade { to { opacity: .55; } }

.lb-br .lb-accent { right: 0; bottom: 0; animation-name: lb-fade, lb-in-br; }
.lb-bl .lb-accent { left: 0;  bottom: 0; animation-name: lb-fade, lb-in-bl; }
.lb-tr .lb-accent { right: 0; top: 0;    animation-name: lb-fade, lb-in-tr; }
.lb-tl .lb-accent { left: 0;  top: 0;    animation-name: lb-fade, lb-in-tl; }

@keyframes lb-in-br { from { transform: translate(47%, 50%); }              to { transform: translate(40%, 42%); } }
@keyframes lb-in-bl { from { transform: translate(-47%, 50%) scaleX(-1); }  to { transform: translate(-40%, 42%) scaleX(-1); } }
@keyframes lb-in-tr { from { transform: translate(47%, -50%); }             to { transform: translate(40%, -42%); } }
@keyframes lb-in-tl { from { transform: translate(-47%, -50%) scaleX(-1); } to { transform: translate(-40%, -42%) scaleX(-1); } }

@media (max-width: 40rem) {
  .lb-accent { width: 56vw; min-width: 200px; }
  @keyframes lb-fade { to { opacity: .42; } }
  @keyframes lb-in-br { from { transform: translate(60%, 62%); }              to { transform: translate(52%, 54%); } }
  @keyframes lb-in-bl { from { transform: translate(-60%, 62%) scaleX(-1); }  to { transform: translate(-52%, 54%) scaleX(-1); } }
  @keyframes lb-in-tr { from { transform: translate(60%, -62%); }             to { transform: translate(52%, -54%); } }
  @keyframes lb-in-tl { from { transform: translate(-60%, -62%) scaleX(-1); } to { transform: translate(-52%, -54%) scaleX(-1); } }
}

@media (prefers-reduced-motion: reduce) {
  .lb-accent { animation: lb-fade .01s linear forwards; }
  .lb-br .lb-accent { transform: translate(40%, 42%); }
  .lb-bl .lb-accent { transform: translate(-40%, 42%) scaleX(-1); }
  .lb-tr .lb-accent { transform: translate(40%, -42%); }
  .lb-tl .lb-accent { transform: translate(-40%, -42%) scaleX(-1); }
  .lb-accent i { transition: none; }
}
