/* Motion is progressive enhancement: content stays visible before JavaScript runs. */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  background: linear-gradient(90deg, #60dbcc, #b9adf7);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.motion-control {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  border: 1px solid #506478;
  border-radius: 99px;
  background: #101b2e;
  color: #fff;
  padding: 10px 15px;
  font: 700 12px 'DM Sans', sans-serif;
  box-shadow: 0 4px 16px #101b2e20;
  cursor: pointer;
}
.motion-control[aria-pressed="true"] { border-color: #60dbcc; }
.motion-control:focus-visible { outline: 3px solid #60dbcc; outline-offset: 3px; }
  .motion-enabled .motion-reveal {
    animation: pg-reveal 580ms cubic-bezier(.2, .75, .25, 1) var(--reveal-delay, 0ms) backwards;
  }

  .motion-enabled .hero .eyebrow {
    animation: pg-enter 480ms cubic-bezier(.2, .75, .25, 1) 30ms backwards;
  }

  .motion-enabled :is(.hero h1, .categoryhero h1) {
    animation: pg-enter 600ms cubic-bezier(.2, .75, .25, 1) 80ms backwards;
  }

  .motion-enabled :is(.hero .lead, .categoryhero p) {
    animation: pg-enter 600ms cubic-bezier(.2, .75, .25, 1) 140ms backwards;
  }

  .motion-enabled .hero .heroactions {
    animation: pg-enter 580ms cubic-bezier(.2, .75, .25, 1) 200ms backwards;
  }

  .motion-enabled .hero .herochips {
    animation: pg-enter 580ms cubic-bezier(.2, .75, .25, 1) 260ms backwards;
  }

  .motion-enabled .hero::before {
    animation: pg-hero-light 4600ms ease-in-out 1;
  }

  .motion-enabled .btn {
    transition: transform 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
  }

  .motion-enabled :is(.card, .categorytile, .storyvisual) {
    transition: transform 280ms cubic-bezier(.2, .75, .25, 1), box-shadow 280ms ease, border-color 280ms ease;
  }

  .motion-enabled .thumb img {
    transition: transform 420ms cubic-bezier(.2, .75, .25, 1);
  }

  .motion-enabled :is(.motion-arrow, .btn > span[aria-hidden="true"], .cardlink > span[aria-hidden="true"], .textlink > span[aria-hidden="true"]) {
    display: inline-block;
    transition: transform 220ms cubic-bezier(.2, .75, .25, 1);
  }

  .motion-enabled .navlinks a:not(.navcta) {
    position: relative;
  }

  .motion-enabled .navlinks a:not(.navcta)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 2px;
    border-radius: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 220ms ease;
  }

  .motion-enabled .navlinks a:not(.navcta):focus-visible::after {
    transform: scaleX(1);
  }

  .motion-enabled .faqlist summary::after {
    content: "+";
    flex: none;
    transform-origin: center;
    transition: transform 220ms ease;
  }

  .motion-enabled .faqlist details[open] summary::after {
    content: "+";
    transform: rotate(45deg);
  }

  @media (hover: hover) and (pointer: fine) {
    .motion-enabled .btn:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 22px #101b2e18;
    }

    .motion-enabled .card:hover {
      transform: translateY(-6px);
      box-shadow: 0 20px 45px #101b2e12;
    }

    .motion-enabled .card:hover .thumb img {
      transform: scale(1.035);
    }

    .motion-enabled :is(.categorytile, .storyvisual):hover {
      transform: translateY(-4px);
      border-color: #b6cfc8;
      box-shadow: 0 20px 45px #101b2e12;
    }

    .motion-enabled :is(.btn, .cardlink, .textlink):hover :is(.motion-arrow, span[aria-hidden="true"]) {
      transform: translate(3px, -2px);
    }

    .motion-enabled .navlinks a:not(.navcta):hover::after {
      transform: scaleX(1);
    }
  }

  @keyframes pg-reveal {
    from { opacity: .15; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes pg-enter {
    from { opacity: .2; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes pg-hero-light {
    0%, 100% { transform: scale(1); }
    50% { transform: translate(-1%, 1%) scale(1.045); }
  }
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-enabled) { scroll-behavior: auto; }

  html:not(.motion-enabled) :is(.motion-reveal, .hero .eyebrow, .hero h1, .hero .lead, .hero .heroactions, .hero .herochips, .hero::before) {
    animation: none;
  }

  html:not(.motion-enabled) :is(.btn, .card, .categorytile, .storyvisual, .thumb img, .motion-arrow, .btn > span[aria-hidden="true"], .cardlink > span[aria-hidden="true"], .textlink > span[aria-hidden="true"]) {
    transition: none;
  }

  html:not(.motion-enabled) :is(.btn:hover, .card:hover, .categorytile:hover, .storyvisual:hover, .card:hover .thumb img, .motion-arrow, .btn > span[aria-hidden="true"], .cardlink > span[aria-hidden="true"], .textlink > span[aria-hidden="true"]) {
    transform: none;
  }
}

/* The visitor can also pause motion on devices with no system preference. */
html:not(.motion-enabled) :is(.btn:hover, .card:hover, .categorytile:hover) { transform: none; }
html:not(.motion-enabled) :is(.btn, .card, .categorytile) { transition: none; }
