/* Motion specified in the XD pasteboard and instruction artboard. */

.motion-enabled .hero__tile {
  opacity: 0;
  transform: translateY(30px) scale(.28);
  transform-box: fill-box;
  transform-origin: center;
}

.motion-enabled .motion-hero-ready .hero__tile {
  animation: hero-tile-pop .58s cubic-bezier(.2, .85, .28, 1.35) both;
  animation-delay: calc(.18s + var(--tile-index, 0) * .085s);
}

.motion-enabled .motion-heading .motion-char {
  display: inline;
  opacity: 0;
}

/* These four glyphs are already individual transformed design elements.
   Keep their authored inline-block boxes while the rest of the heading stays
   inline so the completed animation cannot change line boxes or baselines. */
.motion-enabled .motion-heading .hero__accent > .motion-char {
  display: inline-block;
}

.motion-heading {
  overflow-wrap: normal;
  word-break: normal;
}

.motion-enabled .motion-heading.is-motion-visible .motion-char {
  animation: motion-character-in .54s cubic-bezier(.2, .72, .3, 1) both;
  animation-delay: calc(var(--char-index, 0) * var(--char-step, .052s) + var(--motion-delay, 0s));
}

.motion-enabled .motion-reveal {
  opacity: 0;
  translate: 0 30px;
  transition:
    opacity .72s ease var(--motion-delay, 0s),
    translate .72s cubic-bezier(.22, .61, .36, 1) var(--motion-delay, 0s);
}

.motion-enabled .motion-reveal.is-motion-visible {
  opacity: 1;
  translate: 0 0;
}

.motion-enabled .motion-motif {
  opacity: 0;
  scale: .84;
  transition:
    opacity .7s ease var(--motion-delay, 0s),
    scale .7s cubic-bezier(.18, .8, .25, 1.15) var(--motion-delay, 0s);
}

.motion-enabled .motion-motif.is-motion-visible {
  opacity: 1;
  scale: 1;
}

.motion-enabled .motion-float.is-motion-visible {
  animation: motion-float var(--float-duration, 2.8s) ease-in-out infinite;
  animation-delay: calc(var(--motion-delay, 0s) + .72s + var(--float-offset, 0s));
}

.motion-enabled .hero__characters.motion-float {
  animation-delay: 1.35s;
}

@keyframes hero-tile-pop {
  0% { opacity: 0; transform: translateY(30px) scale(.28); }
  72% { opacity: 1; transform: translateY(-3px) scale(1.08); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes motion-character-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes motion-float {
  0%, 50%, 100% { translate: 0 0; }
  25% { translate: 0 calc(var(--float-distance, 3px) * -1); }
  75% { translate: 0 var(--float-distance, 3px); }
}

@media (hover:hover) and (pointer:fine) {
  .text-link,
  .pill-cta,
  .button,
  .business-card a,
  .news-listing__filters button,
  .news-listing__filters a {
    transition: color .3s ease-out, background-color .3s ease-out, border-color .3s ease-out, opacity .3s ease-out, translate .3s ease-out;
  }

  .text-link:hover,
  .pill-cta:hover,
  .button:hover,
  .business-card a:hover {
    translate: 0 -3px;
  }

  .text-link svg,
  .pill-cta svg,
  .button svg,
  .business-card a svg {
    transition: transform .3s ease-out;
  }

  .text-link:hover svg,
  .pill-cta:hover svg,
  .button:hover svg,
  .business-card a:hover svg {
    transform: translateX(4px);
  }

  .news-listing__filters button:hover,
  .news-listing__filters a:hover {
    color: #fff;
    background: #ca0033;
    border-color: #ca0033;
  }
}

@media (max-width:768px) {
  .hero {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .hero__tiles--bottom {
    top: auto !important;
    bottom: clamp(18px, 10dvh, 87px) !important;
  }

  section.intro > .hero__characters {
    top: auto !important;
    bottom: 100% !important;
  }

}

@media (max-width:389px) {
  .hero__tiles--bottom {
    bottom: 67px !important;
  }

  section.intro > .hero__characters {
    bottom:calc(100% - 13px) !important;
  }

}

@media (min-width:390px) and (max-width:390px) {
  .hero__tiles--bottom {
    bottom:8px !important;
    transform:rotate(180deg) scaleY(.9872611465) !important;
  }

  section.intro > .hero__characters {
    top:-44px !important;
    bottom:auto !important;
  }
}

@media (max-width:768px) and (max-height:720px) {
  .hero__content {
    padding-top: clamp(180px, 36dvh, 250px) !important;
  }

  .hero h1 {
    font-size: clamp(20px, 6.15vw, 24px) !important;
    line-height: 1.35 !important;
  }

  .hero__lead {
    margin-top: 13px !important;
    font-size: clamp(9px, 2.8vw, 12px) !important;
    line-height: 1.45 !important;
  }

  .hero__tiles--bottom {
    top: auto !important;
    bottom: calc(min(245px, 64vw) * 143 / 564 + 8px) !important;
    width: clamp(104px, 34vw, 132px) !important;
    height: auto !important;
  }

  section.intro > .hero__characters {
    top: auto !important;
    bottom: 100% !important;
    width: min(245px, 64vw) !important;
    height: auto !important;
  }

  .intro .hero__characters img {
    width: 100% !important;
    height: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-heading .motion-char,
  .motion-reveal,
  .motion-motif,
  .motion-float,
  .hero__tile {
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* The mobile parade uses five independent XD resources.  Keep the wrapper's
   real geometry and scale each original from the 390px source proportions. */
@media (max-width:389px), (min-width:391px) and (max-width:768px) {
  section.intro > .hero__characters {
    height:calc(min(245px, 64vw) * 57 / 245) !important;
  }

  .intro .hero__character--sp {
    position:absolute !important;
    top:0 !important;
    display:block !important;
    max-width:none !important;
    height:auto !important;
  }

  .intro .hero__character--sp-01 { left:0 !important; width:15.918367% !important; }
  .intro .hero__character--sp-02 { left:14.285714% !important; width:15.918367% !important; }
  .intro .hero__character--sp-03 { left:27.755102% !important; width:29.795918% !important; }
  .intro .hero__character--sp-04 { left:55.510204% !important; width:17.959184% !important; }
  .intro .hero__character--sp-05 { left:70.204082% !important; width:29.795918% !important; }
}

@media (min-width:391px) and (max-width:768px) {
  section.intro > .hero__characters {
    height:var(--hero-character-height) !important;
  }
}

/* The supplied 390px XD artboard defines a stable 844px Hero.  Do not let
   dynamic viewport units move the Hero→Service boundary on real devices. */
@media (min-width:390px) and (max-width:390px) {
  .hero {
    height:844px !important;
    min-height:844px !important;
    max-height:844px !important;
  }

  section.intro > .hero__characters {
    top:-44px !important;
    bottom:auto !important;
  }
}
