/* Motion enhances visible content; nothing waits for an animation to become usable. */
.hero-word {
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  .motion-ready .hero-copy > .eyebrow {
    animation: ce-arrive 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .motion-ready .hero-word {
    animation: ce-word 950ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .motion-ready .hero-word-accent {
    animation-delay: 100ms;
  }
  .motion-ready .hero-period {
    display: inline-block;
    animation: ce-word 950ms 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .motion-ready .hero-copy > h2,
  .motion-ready .hero-copy > p,
  .motion-ready .hero-actions > a,
  .motion-ready .hero-directions,
  .motion-ready .hero-caption {
    animation: ce-arrive 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .motion-ready .hero-copy > h2 {
    animation-delay: 120ms;
  }
  .motion-ready .hero-copy > p {
    animation-delay: 180ms;
  }
  .motion-ready .hero-actions > a:first-child {
    animation-delay: 240ms;
  }
  .motion-ready .hero-actions > a:nth-child(2) {
    animation-delay: 310ms;
  }
  .motion-ready .hero-directions {
    animation-delay: 370ms;
  }
  .motion-ready .hero-caption {
    animation-delay: 420ms;
  }
  .motion-ready .hero-photo img {
    animation: ce-photo 1800ms cubic-bezier(0.2, 0.65, 0.3, 1) both;
  }
  .motion-ready .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at 75% 10%, #c8102e30, transparent 60%);
    animation: ce-light 1800ms ease-out both;
  }
  .motion-ready .hero::after {
    transform-origin: left;
    animation: ce-line 1000ms 100ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .motion-ready .scroll-cue > span {
    animation: ce-cue 900ms 300ms ease-in-out 3;
  }
  .motion-ready .page-intro h1 {
    animation: ce-arrive 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .motion-ready .page-intro .eyebrow,
  .motion-ready .page-intro .wrap > p {
    animation: ce-arrive 800ms 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .reading-progress {
    position: fixed;
    inset: 0 0 auto;
    height: 3px;
    background: var(--red-light);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 60;
    pointer-events: none;
  }
  .motion-ready .site-header {
    transition: box-shadow 250ms ease;
  }
  .motion-ready .site-header.is-scrolled {
    box-shadow: 0 6px 26px #17191d12;
  }
  .motion-ready .lightbox[open] {
    animation: ce-dialog 250ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  @media (hover: hover) and (pointer: fine) {
    .motion-ready .hero-photo {
      top: -22px;
      bottom: -22px;
      transform: translate3d(0, var(--hero-shift, 0px), 0);
    }
    .motion-ready .btn {
      position: relative;
      overflow: hidden;
    }
    .motion-ready .btn::after {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 50%;
      pointer-events: none;
      background: linear-gradient(100deg, transparent, #ffffff25, transparent);
      transform: translateX(-150%) skewX(-15deg);
    }
    .motion-ready .btn:hover::after {
      animation: ce-shine 600ms ease-out both;
    }
    .motion-ready .btn > .icon {
      transition: transform 250ms ease;
    }
    .motion-ready .btn:hover > .icon {
      transform: translateX(3px);
    }
    .motion-ready .article-card,
    .motion-ready .service-card {
      transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    .motion-ready .article-card:hover,
    .motion-ready .service-card:hover {
      transform: translateY(-5px);
    }
  }
}

/* Transform-only text animation keeps contrast and the first meaningful paint intact. */
@keyframes ce-word {
  from {
    transform: translate3d(0, 0.18em, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}
@keyframes ce-arrive {
  from {
    transform: translate3d(0, 20px, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}
@keyframes ce-photo {
  from {
    transform: scale(1.045);
  }
  to {
    transform: scale(1);
  }
}
@keyframes ce-light {
  from {
    opacity: 0.15;
    transform: translateX(8%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes ce-line {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes ce-cue {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}
@keyframes ce-shine {
  from {
    transform: translateX(-150%) skewX(-15deg);
  }
  to {
    transform: translateX(350%) skewX(-15deg);
  }
}
@keyframes ce-dialog {
  from {
    transform: translateY(10px) scale(0.985);
  }
  to {
    transform: translateY(0) scale(1);
  }
}
@media print {
  .reading-progress {
    display: none;
  }
}
