/* Content is visible at rest. JavaScript adds only bounded, once-only reveals. */
:root {
  --zh-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --zh-motion-distance: 35px;
  --zh-motion-duration: 750ms;
  --zh-motion-stagger: 100ms;
  --zh-motion-image-duration: 1050ms;
  --zh-motion-image-from: 1.06;
  --zh-motion-lift: -5px;
  --zh-motion-hover-duration: 400ms;
  --zh-motion-image-hover: 1.05;
  --zh-motion-image-hover-duration: 650ms;
}

.zh-motion-card {
  transition: transform var(--zh-motion-hover-duration) var(--zh-motion-ease),
    box-shadow var(--zh-motion-hover-duration) var(--zh-motion-ease);
}

/* Added only after the observer is ready; never applied to initial visible cards. */
.zh-motion-pending {
  opacity: 0;
  translate: 0 var(--zh-motion-distance);
}

.zh-motion-frame {
  overflow: hidden;
}

/* A direct photograph gets a frame without changing its existing image sizing. */
.feature-card > .zh-motion-frame {
  padding: 0;
}

/* Move the existing gallery-photo shadow to its clipping frame. */
.zh-motion-frame.experience-main-image {
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(22, 32, 30, 0.16);
}

.zh-motion-frame.experience-main-image > img {
  box-shadow: none;
}

.zh-motion-image {
  transition: transform var(--zh-motion-image-hover-duration) var(--zh-motion-ease);
}

.zh-motion-card:focus-within,
.zh-motion-frame:focus-visible {
  outline: 2px solid var(--reef);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .zh-motion-card:hover,
  .zh-motion-card:focus-within {
    transform: translateY(var(--zh-motion-lift));
    box-shadow: 0 22px 56px rgba(20, 39, 35, 0.15);
  }

  .zh-motion-card:hover .zh-motion-image,
  .zh-motion-card:focus-within .zh-motion-image,
  .experience-main-image.zh-motion-frame:hover .zh-motion-image,
  .experience-main-image.zh-motion-frame:focus-visible .zh-motion-image {
    transform: scale(var(--zh-motion-image-hover));
  }
}

@media (max-width: 680px) {
  :root {
    --zh-motion-distance: 22px;
    --zh-motion-stagger: 0ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zh-motion-card,
  .zh-motion-section,
  .zh-motion-image {
    opacity: 1 !important;
    translate: none !important;
    scale: none !important;
    transform: none !important;
    transition: none;
  }
}

@media print {
  .zh-motion-card,
  .zh-motion-section,
  .zh-motion-image {
    opacity: 1 !important;
    translate: none !important;
    scale: none !important;
    transform: none !important;
  }
}
