/* E7 — opening a case study from the homepage, after plus-ex.com/experience:
   a thin loading line runs across the top; when the case study has loaded it slides up from the
   bottom over the homepage (0.8s, their curve, after a 0.4s beat); ⌄ slides it back down. */

.cs7-load { position: fixed; left: 0; top: 0; width: 100%; height: 3px; z-index: 60; pointer-events: none; overflow: hidden; }
.cs7-load > span {
  position: absolute; inset: 0; background: #000; transform: translateX(-100%);
  transition: transform 0s;
}
.cs7-load.show > span { transform: translateX(-12%); transition: transform 2.9s cubic-bezier(.1, .6, .3, 1); }   /* creeps while loading */
.cs7-load.ready > span { transform: translateX(0); transition: transform .3s ease-out; }                         /* finishes when loaded */
.cs7-load.done { opacity: 0; transition: opacity .3s .5s; }

.cs7-view {
  position: fixed; inset: 0; z-index: 50; background: #fff;
  transform: translateY(100%); visibility: hidden;
  transition: transform .8s cubic-bezier(.77, 0, .175, 1), visibility 0s .8s;
}
.cs7-view.on { transform: none; visibility: visible; transition: transform .8s cubic-bezier(.77, 0, .175, 1) .4s, visibility 0s; }
.cs7-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

/* ⌄ top-right, a small square like theirs; visible on photo or on white */
.cs7-x {
  position: absolute; top: 22px; right: 36px; width: 36px; height: 36px; z-index: 2;
  display: grid; place-items: center; background: #fff; color: #000;
  border: 1px solid #000; border-radius: 6px; cursor: pointer; transition: background .2s, color .2s;
}
.cs7-x:hover { background: #000; color: #fff; }
.cs7-view.lb .cs7-x { visibility: hidden; }   /* the picture viewer's × stands in its place */
.cs7-x svg { width: 16px; height: 16px; }
@media (max-width: 700px) { .cs7-x { top: 14px; right: 18px; } }

@media (prefers-reduced-motion: reduce) {
  .cs7-view, .cs7-view.on { transition: none; }
}
