/* Scroll-reveal on section entrance + smooth in-page scrolling. `.reveal`
   elements start faded/offset and get `.is-visible` added by js/reveal.js
   via IntersectionObserver the first time they enter the viewport (fires
   once, doesn't re-trigger on scroll back up). Fully respects
   prefers-reduced-motion. */
html {
  scroll-behavior: smooth;
}

.reveal {
  transition:
    opacity 0.6s cubic-bezier(0.16, 0.84, 0.44, 1),
    transform 0.6s cubic-bezier(0.16, 0.84, 0.44, 1);
}

/* Scoped with :not() rather than a plain `transform: none` on
   `.reveal.is-visible` — that would tie in specificity with e.g.
   `.content-card:hover` and, since this file loads last, silently cancel
   any hover-lift transform on cards after they've revealed. Once
   `.is-visible` is added this rule simply stops matching, so hover
   transforms elsewhere are free to apply with no competition. */
.reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(20px);
}

/* Drop `.reveal-group` on a parent of several `.reveal` children to cascade
   their entrance instead of them all animating in at once. */
.reveal-group > .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal-group > .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal-group > .reveal:nth-child(4) {
  transition-delay: 0.3s;
}

.reveal-group > .reveal:nth-child(5) {
  transition-delay: 0.4s;
}

.reveal-group > .reveal:nth-child(6) {
  transition-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal:not(.is-visible) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
