/*
  Replaces styles that Next.js wrote inline on elements. Inline styles are blocked by our
  Content-Security-Policy, so they live here instead. Phase 6 will merge this into global.css.
*/

/* Next.js "fill" images (project hero image): stretch to the container. */
.image-highlight > img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
}

/* Text that only search engines and screen readers see (used for each page's <h1>,
   which the legacy design did not have). Standard "visually hidden" pattern. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- States set by the browser JavaScript (src/client/). Legacy React wrote these inline. --- */

/* Vimeo videos fade in once loaded (client/vimeo.js). */
iframe {
  transition: opacity 600ms;
}
iframe.vimeo-pending {
  opacity: 0;
}

/* Images blur in from the placeholder (client/imageFade.js). */
.img-fade {
  transition: filter 300ms ease-in-out, opacity 300ms ease;
}
.img-fade.img-loading {
  opacity: 0;
  filter: blur(24px);
}

/* Works page filter (client/worksFilter.js). */
.filtered-out {
  display: none;
}

/* People who ask their system for less motion (e.g. Windows "Animation effects" off) get no
   sliding navbar. Fades are not motion, so videos and images still fade in. */
@media (prefers-reduced-motion: reduce) {
  .header {
    transition: none;
  }
}
