/*
 * Motion
 * Hover, scroll reveal, ticker, and form feedback.
 */

.rc-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(11, 58, 21, 0.1);
}

.has-js .rc-hero {
  display: grid;
}

.has-js .rc-slide {
  grid-area: 1 / 1;
  display: grid;
  overflow: hidden;
  isolation: isolate;
  background: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 1.2s;
}

.has-js .rc-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.has-js .rc-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--rc-hero-image) center / cover no-repeat;
  transform: scale(1.12);
}

.has-js .rc-slide.is-active::after {
  animation: rc-kenburns 7s ease-out forwards;
}

@keyframes rc-kenburns {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1);
  }
}

.has-js .rc-slide .rc-hero-tag,
.has-js .rc-slide .rc-hero-title,
.has-js .rc-slide .rc-hero-lead,
.has-js .rc-slide .rc-actions {
  opacity: 0;
  transform: translateY(26px);
}

.has-js .rc-slide.is-active .rc-hero-tag,
.has-js .rc-slide.is-active .rc-hero-title,
.has-js .rc-slide.is-active .rc-hero-lead,
.has-js .rc-slide.is-active .rc-actions {
  animation: rc-rise 0.9s ease forwards;
}

.has-js .rc-slide.is-active .rc-hero-title { animation-delay: 0.15s; }
.has-js .rc-slide.is-active .rc-hero-lead { animation-delay: 0.3s; }
.has-js .rc-slide.is-active .rc-actions { animation-delay: 0.45s; }

@keyframes rc-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.rc-slide-dots button.is-active {
  transition: width 0.3s ease;
}

.rc-card-media {
  transition: transform 0.6s ease;
}

.rc-card a:hover .rc-card-media {
  transform: scale(1.06);
}

.rc-card a:hover .rc-card-link,
.rc-project a:hover .rc-card-link {
  gap: 0.6rem;
}

.rc-plan {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rc-plan:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(11, 58, 21, 0.14);
}

.rc-step-photo {
  transition: transform 0.35s ease;
}

.rc-steps li:hover .rc-step-photo {
  transform: scale(1.04);
}

.rc-step-icon {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.rc-steps li:hover .rc-step-icon {
  border-color: var(--rc-green);
  background: var(--rc-green);
  color: var(--rc-white);
}

.rc-sub {
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

.rc-desktop-nav > ul > li > a {
  position: relative;
}

.rc-desktop-nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  height: 2px;
  background: var(--rc-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.rc-desktop-nav > ul > li > a:hover::after,
.rc-desktop-nav > ul > li.is-current > a::after {
  transform: scaleX(1);
}

.rc-desktop-nav > ul > li.is-current > a {
  color: var(--rc-accent);
}

.rc-has-sub > a .rc-icon {
  transition: transform 0.3s ease;
}

.rc-has-sub:hover > a .rc-icon,
.rc-has-sub:focus-within > a .rc-icon {
  transform: rotate(180deg);
}

.rc-sub a {
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.rc-sub a:hover,
.rc-sub a[aria-current="page"] {
  padding-left: 1rem;
}

.rc-nav.is-open .rc-menu > li {
  animation: rc-nav-in 0.4s ease both;
}

.rc-nav.is-open .rc-menu > li:nth-child(2) { animation-delay: 0.04s; }
.rc-nav.is-open .rc-menu > li:nth-child(3) { animation-delay: 0.08s; }
.rc-nav.is-open .rc-menu > li:nth-child(4) { animation-delay: 0.12s; }
.rc-nav.is-open .rc-menu > li:nth-child(5) { animation-delay: 0.16s; }
.rc-nav.is-open .rc-menu > li:nth-child(6) { animation-delay: 0.2s; }
.rc-nav.is-open .rc-menu > li:nth-child(7) { animation-delay: 0.24s; }
.rc-nav.is-open .rc-menu > li:nth-child(8) { animation-delay: 0.28s; }

@keyframes rc-nav-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rc-socials a {
  transition: transform 0.25s ease, background 0.25s ease;
}

.rc-socials a:hover {
  transform: translateY(-3px);
}

.rc-button,
.rc-filter button,
.rc-desktop-nav a,
.rc-footer a {
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rc-button .rc-icon {
  transition: transform 0.2s ease;
}

.rc-button:hover .rc-icon {
  transform: translateX(3px);
}

.rc-ticker-track {
  animation: rc-ticker 32s linear infinite;
}

.rc-review-track {
  animation: rc-reviews 42s linear infinite;
}

.rc-review-marquee:hover .rc-review-track,
.rc-review-marquee:active .rc-review-track,
.rc-review-marquee:focus-within .rc-review-track {
  animation-play-state: paused;
}

@keyframes rc-reviews {
  to {
    transform: translateX(-50%);
  }
}

.rc-ticker:hover .rc-ticker-track {
  animation-play-state: paused;
}

@keyframes rc-ticker {
  to {
    transform: translateX(-50%);
  }
}

.rc-card.is-filtering {
  animation: rc-pop 0.35s ease;
}

@keyframes rc-pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

.has-js .rc-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.has-js .rc-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.rc-form.is-invalid input:invalid,
.rc-form.is-invalid textarea:invalid {
  border-color: #b42318;
  box-shadow: 0 0 0 1px #b42318;
}

.rc-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
  .has-js .rc-reveal,
  .rc-card-media,
  .rc-plan,
  .rc-steps li,
  .rc-sub,
  .rc-button .rc-icon {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rc-ticker-track,
  .rc-review-track,
  .rc-card.is-filtering,
  .rc-nav.is-open .rc-menu > li,
  .has-js .rc-slide.is-active::after {
    animation: none;
  }

  .has-js .rc-slide .rc-hero-tag,
  .has-js .rc-slide .rc-hero-title,
  .has-js .rc-slide .rc-hero-lead,
  .has-js .rc-slide .rc-actions {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .rc-desktop-nav > ul > li > a::after,
  .rc-has-sub > a .rc-icon,
  .rc-socials a {
    transition: none;
  }
}
