/* Hand-written additions on top of the Webflow export (style.css).
   Replaces the Webflow "scroll into view" interaction used on the home page. */

.w-mod-js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  filter: blur(5px);
}

.w-mod-js [data-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0px);
  transition:
    opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* After the animation has finished main.js adds .is-done: back to the plain element
   (no transform/filter left behind, so no extra GPU layers and no stacking-context side effects). */
.w-mod-js [data-reveal].is-done {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
}

/* If main.js never runs (blocked / failed to load), the <head> failsafe adds this class after 4s
   so that nothing stays invisible. */
.reveal-failsafe [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .w-mod-js [data-reveal],
  .w-mod-js [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* "Up" button on case pages: starts hidden below its place (main.js slides it in on scroll). */
.w-mod-js .up {
  transform: translate3d(0, 121px, 0);
}

.reveal-failsafe .up {
  transform: none !important;
}

/* keep the button above the ripple layer */
.up {
  z-index: 10001;
}

@media (prefers-reduced-motion: reduce) {
  .w-mod-js .up { transform: none; }
}

/* Side navigation on case pages: the link of the section being read is white (.w--current is set by
   main.js; its colour comes from style.css). Webflow only animates the change TO white,
   so give the links the same 0.2s transition for fading back to grey too. */
.sticky .h3-low._50 {
  transition: color 0.2s ease-in;
}

/* ---- Thin stroke around pictures and videos --------------------------------------------
   1px, white at 10% opacity, drawn INSIDE the edge (like an inside stroke in Figma), so sizes and
   layout do not change. Change the colour/opacity here. To switch the stroke off for videos,
   delete `.video-con::after` and `.w-background-video::after` from the selector lists. */
:root {
  --media-stroke: rgba(255, 255, 255, 0.1);
}

/* pictures placed directly on the page (case pages): outline follows the 16px corner radius */
img.image,
img.image-13,
img.image-half,
img.image-9 {
  outline: 1px solid var(--media-stroke);
  outline-offset: -1px;
}

/* case cards and videos clip their content (overflow: hidden, hover zoom, object-fit),
   so the stroke is an overlay that stays put while the picture inside moves */
.project-image,
.video-con,
.w-background-video {
  position: relative;
}

.project-image::after,
.video-con::after,
.w-background-video::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--media-stroke);
  border-radius: inherit;
  pointer-events: none;
}
