/* Licensed to account 52c7da1aea3f, 2026-10-19. Moving parts. */
/* Page wipe, the mechanics.
   Moving parts. The script adds the sheet itself; this lays it over the window and sets the name on it.
   Readable source: components/page-wipe/page-wipe.css */

/* File layout: required mechanics, then the optional look.
   The rules before the line "look, left out of the Webflow Embed" are what
   the effect needs: the layer over the window, the sheet, the name set on
   it, and the states of the links. What only reads as a look sits in
   :where(), which carries no specificity, so a single class from the page
   wins over it without !important. */

/* The layer over the whole window, while a pass is on screen.
   It takes the pointer, so nothing under the sheet is clicked twice. It
   runs past the window by the depth of the shadow on every side, so the
   shadow of the sheet is even from one side of the window to the other. */
.page-wipe-layer {
  --page-wipe-shade: clamp(40px, 7vw, 110px);
  position: fixed;
  top: calc(var(--page-wipe-shade) * -1);
  left: calc(var(--page-wipe-shade) * -1);
  z-index: 2147483000;
  width: calc(100% + var(--page-wipe-shade) * 2);
  height: calc(100% + var(--page-wipe-shade) * 2);
  overflow: hidden;
  overflow: clip;
  pointer-events: auto;
  animation: page-wipe-release 0.01s linear var(--page-wipe-limit, 8s) forwards;
}

/* Safety: the sheet lets go by itself.
   A script that never ran to its end must not keep the page hidden. */
@keyframes page-wipe-release {
  to { visibility: hidden; }
}

/* A held picture, for a thumbnail: it stays, and lets the pointer through. */
.page-wipe-layer[data-page-wipe-layer="held"] {
  pointer-events: none;
  animation: none;
}

/* The sheet. At rest it covers the window: the script moves it in and out.
   Its soft shadow falls on the page along the edge that travels. */
.page-wipe-sheet {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--page-wipe-background, #15100c);
  box-shadow: 0 0 var(--page-wipe-shade) rgba(21, 16, 12, 0.34);
  will-change: transform;
}

/* The stage: what is set on the sheet, standing still in the window.
   The name sits at its foot, on the left, with the margins of a page. */
.page-wipe-stage {
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  padding: calc(var(--page-wipe-shade) + clamp(20px, 3.4vh, 40px)) calc(var(--page-wipe-shade) + clamp(20px, 3.2vw, 44px));
  will-change: transform;
}

/* The window the name rises through, one line high. */
.page-wipe-window {
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
  padding: 0.08em 0 0.14em;
}

.page-wipe-name {
  display: inline-block;
  color: var(--page-wipe-color, #f4ece0);
  font-size: var(--page-wipe-size, clamp(44px, 9vw, 136px));
  line-height: 1;
  white-space: nowrap;
  will-change: transform;
}

/* Typeface of the name: the one the script hands the layer, the one of the
   marked element, unless a rule on the name says otherwise. */
:where(.page-wipe-name) {
  font-family: inherit;
  font-weight: 400;
  letter-spacing: -0.045em;
}

/* Links under the pointer: one dims, the arrow steps on. */
:where([data-pw-link]) {
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

:where([data-pw-arrow]) {
  transition: translate 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  :where([data-pw-link]:hover) {
    opacity: 0.5;
  }

  :where([data-pw-next]:hover [data-pw-arrow]) {
    translate: 0.22em 0;
  }
}

:where([data-pw-link]:focus-visible),
:where([data-pw-next]:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
  :where([data-pw-link]),
  :where([data-pw-arrow]) {
    transition: none;
  }
}

/* ---------- look, left out of the Webflow Embed ---------- */

/* Clinix Studio: the look of the preview (the page-wipe-* classes of the
   two demo pages, set in Instrument Sans and Geist Mono on #f4ece0) is left
   out of this copy on purpose. The site's own pages are the pages; the name
   on the sheet takes the site's display face through a rule on
   .page-wipe-name in src/styles/global.css, and the colours come from the
   tokens in BaseLayout.astro. The mechanics above are the file as shipped. */
