.inner-page {
  --content-ease: cubic-bezier(.18, .74, .24, 1);
}

@media (prefers-reduced-motion: no-preference) {
  /* Keep layout steady while each section reveals its own content. */
  .has-reveal .inner-page :is(.page-section-heading, .detail-grid, .page-links, .office-grid, .services-grid, .engagement, .page-prose, .page-cta-inner)[data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .has-reveal .inner-page .page-section-heading[data-reveal] {
    position: relative;
  }

  .has-reveal .inner-page .page-section-heading[data-reveal]::before {
    position: absolute;
    inset: -13px auto auto 1px;
    width: clamp(33px, 6vw, 91px);
    height: 1px;
    transform-origin: left center;
    background: linear-gradient(90deg, var(--page-heading), transparent);
    opacity: .42;
    transition: transform .85s var(--content-ease);
    pointer-events: none;
    content: "";
  }

  .has-reveal .inner-page .page-section-heading[data-reveal]:not(.is-revealed, :focus-within)::before {
    transform: scaleX(0);
  }

  .has-reveal .inner-page :is(.page-section-heading, .page-prose, .page-cta-inner)[data-reveal] > * {
    --content-delay: 0ms;
    clip-path: inset(-10px);
    translate: 0 0;
    opacity: 1;
    transition: clip-path .78s var(--content-ease) var(--content-delay),
      translate .78s var(--content-ease) var(--content-delay),
      opacity .48s ease-out var(--content-delay);
  }

  .has-reveal .inner-page :is(.page-section-heading, .page-cta-inner)[data-reveal] > :nth-child(2) {
    --content-delay: 105ms;
  }

  .has-reveal .inner-page :is(.page-section-heading, .page-prose, .page-cta-inner)[data-reveal]:not(.is-revealed, :focus-within) > * {
    clip-path: inset(100% -10px -10px);
    translate: 0 12px;
    opacity: 0;
  }

  .has-reveal .inner-page .has-inner-entry {
    --content-delay: 0ms;
  }

  .has-reveal .inner-page .has-inner-entry:nth-child(3n + 2) {
    --content-delay: 80ms;
  }

  .has-reveal .inner-page .has-inner-entry:nth-child(3n) {
    --content-delay: 155ms;
  }

  .has-reveal .inner-page .has-inner-entry:not(.is-revealed, :focus-within) {
    opacity: 0;
  }

  .has-reveal .inner-page .has-inner-entry.is-revealed:not(:focus-within) {
    animation: inner-card-entrance .72s var(--content-ease) var(--content-delay) backwards;
  }

  .has-reveal .inner-page .office.has-inner-entry {
    --photo-delay: 0ms;
    --photo-mask: inset(0 100% 0 0 round 18px);
  }

  .has-reveal .inner-page .office.has-inner-entry:nth-child(even) {
    --photo-delay: 140ms;
    --photo-mask: inset(0 0 0 100% round 18px);
  }

  .has-reveal .inner-page .office.has-inner-entry.is-revealed:not(:focus-within) {
    animation: inner-photo-entrance .96s var(--content-ease) var(--photo-delay) backwards;
  }

  .has-reveal .inner-page .office.has-inner-entry.is-revealed img {
    animation: inner-photo-scale 1.35s var(--content-ease) var(--photo-delay) backwards;
  }

  .has-reveal .inner-page .office.has-inner-entry.is-revealed > div {
    animation: inner-office-caption .65s var(--content-ease) calc(var(--photo-delay) + 220ms) backwards;
  }

  .has-reveal .inner-page :is(.page-section-heading, .page-prose, .page-cta-inner)[data-reveal]:focus-within > * {
    transition-duration: 0s;
    transition-delay: 0s;
  }

}

@keyframes inner-card-entrance {
  from {
    clip-path: inset(17% -10px 76%);
    opacity: 0;
    translate: 0 24px;
  }

  to {
    clip-path: inset(-10px);
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes inner-photo-entrance {
  from { clip-path: var(--photo-mask); }
  to { clip-path: inset(0 round 18px); }
}

@keyframes inner-photo-scale {
  from { scale: 1.15; }
  to { scale: 1; }
}

@keyframes inner-office-caption {
  from { opacity: 0; translate: 0 15px; }
  to { opacity: 1; translate: 0 0; }
}
