.active.fadeIn-top {
    animation: fadeIn-top 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes fadeIn-top {
    0% {
        transform: translateY(10%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =====================================================================
   Motion — minimal, slow, quiet.
   Active only when <html class="js-motion"> (set in the <head> on the
   homepage, never when the visitor prefers reduced motion). Without it
   every element renders instantly, exactly as before.
   ===================================================================== */
:root {
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-reveal: 1s;
}

/* ---- scroll reveal: a soft rise, staggered inside each group ---- */
html.js-motion .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--motion-reveal) var(--motion-ease),
    transform var(--motion-reveal) var(--motion-ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

html.js-motion .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- image unveil: the photo settles from a slight zoom ---- */
html.js-motion .reveal-img img {
  transform: scale(1.06);
  transition: transform 1.8s var(--motion-ease);
  transition-delay: var(--reveal-delay, 0s);
}

html.js-motion .reveal-img.is-visible img {
  transform: scale(1);
}

/* ---- hero entrance (pure CSS, runs on load) ---- */
@keyframes motion-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes motion-settle {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

html.js-motion .hero--content .title {
  animation: motion-rise 1.2s var(--motion-ease) 0.15s both;
}

html.js-motion .hero--content > .text {
  animation: motion-rise 1.2s var(--motion-ease) 0.45s both;
}

html.js-motion .hero--content .search-header {
  animation: motion-rise 1.2s var(--motion-ease) 0.75s both;
}

/* the background video drifts into place, very slowly */
html.js-motion .hero > video {
  animation: motion-settle 14s var(--motion-ease) both;
}

/* ---- hover: a quiet lift on blog cards and agent portraits ---- */
html.js-motion .featured--list li,
html.js-motion .agents--content ul li {
  transition: transform 0.6s var(--motion-ease);
}

html.js-motion .featured--list li:hover,
html.js-motion .agents--content ul li:hover {
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  html.js-motion .reveal,
  html.js-motion .reveal-img img,
  html.js-motion .hero--content__title h1,
  html.js-motion .hero--content__title ul,
  html.js-motion .hero--listing__search,
  html.js-motion .hero > video {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* =====================================================================
   Motion, second tier — still slow and quiet.
   ===================================================================== */

/* ---- hero: the film fades up out of black, the cue floats ---- */
@keyframes motion-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes motion-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

html.js-motion .hero > video,
html.js-motion .hero > .hero--poster {
  animation:
    motion-settle 14s var(--motion-ease) both,
    motion-fade 2.2s ease-out both;
}

html.js-motion .scrollTo img {
  animation:
    motion-fade 1s ease-out 1.4s both,
    motion-float 2.8s ease-in-out 2.4s infinite;
}

/* ---- headings: each line rises out of a mask ---- */
html.js-motion .reveal-mask .mask-line {
  display: block;
  overflow: hidden;
  padding-block-end: 0.14em;
  margin-block-end: -0.14em;
}

html.js-motion .reveal-mask .mask-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 1.3s var(--motion-ease);
  transition-delay: var(--reveal-delay, 0s);
}

html.js-motion .reveal-mask.is-visible .mask-inner {
  transform: none;
}

/* ---- images: a curtain lifts from the bottom edge ---- */
html.js-motion .reveal-img img,
html.js-motion .reveal-curtain img {
  clip-path: inset(100% 0 0 0);
  transition:
    clip-path 1.4s var(--motion-ease),
    transform 1.8s var(--motion-ease);
  transition-delay: var(--reveal-delay, 0s);
}

html.js-motion .reveal-img.is-visible img,
html.js-motion .reveal-curtain.is-visible img {
  clip-path: inset(0 0 0 0);
}

/* curtain-only images keep their own hover zoom */
html.js-motion .reveal-curtain.is-visible img {
  transition:
    clip-path 1.4s var(--motion-ease) var(--reveal-delay, 0s),
    transform 0.9s var(--motion-ease);
}

/* ---- hairline above the counters draws left to right, gold leads ---- */
html.js-motion .reveal-line {
  position: relative;
  border-top-color: transparent !important;
}

html.js-motion .reveal-line::before,
html.js-motion .reveal-line::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left center;
}

html.js-motion .reveal-line::before {
  right: 0;
  background: var(--border-color-1);
  transition: transform 1.6s var(--motion-ease);
}

html.js-motion .reveal-line::after {
  width: 64px;
  background: var(--primary-color);
  transition: transform 1s var(--motion-ease) 0.5s;
}

html.js-motion .reveal-line.is-visible::before,
html.js-motion .reveal-line.is-visible::after {
  transform: scaleX(1);
}

/* parallax target moves on the compositor */
html.js-motion .results--img picture {
  will-change: transform;
}

/* ---- hover details ---- */
.btn .btn--icon {
  transition: transform 0.5s var(--motion-ease);
}

.btn:hover .btn--icon {
  transform: translateX(4px);
}

ul.featured--list > li picture {
  display: block;
  overflow: hidden;
  border-radius: var(--border-radius15);
}

ul.featured--list > li picture > img {
  transition: transform 0.9s var(--motion-ease);
}

ul.featured--list > li:hover picture > img {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  html.js-motion .reveal-mask .mask-inner,
  html.js-motion .reveal-curtain img,
  html.js-motion .reveal-img img,
  html.js-motion .reveal-line::before,
  html.js-motion .reveal-line::after,
  html.js-motion .scrollTo img,
  html.js-motion .hero > .hero--poster {
    animation: none;
    transition: none;
    transform: none;
    clip-path: none;
  }
}
