.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  transform: scaleX(var(--reading-progress, 0));
  transform-origin: left center;
  pointer-events: none;
}

@media (min-width: 801px) {
  #navigation > a {
    position: relative;
  }

  #navigation > a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -7px;
    left: 0;
    height: 1px;
    background: var(--teal);
    opacity: 0;
    scale: 0 1;
    transform-origin: left center;
    pointer-events: none;
  }

  #navigation > a[aria-current="location"] {
    color: var(--teal);
  }

  #navigation > a[aria-current="location"]::after {
    opacity: 1;
    scale: 1 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .site-header {
    transition: box-shadow 220ms ease, border-color 220ms ease;
  }

  .site-header.is-scrolled {
    border-bottom-color: #dce5d6;
    box-shadow: 0 7px 22px #153d320b;
  }

  .menu-toggle > span {
    transition: transform 200ms ease, opacity 200ms ease;
  }

  dialog[open] {
    animation: optibill-dialog-enter 220ms cubic-bezier(.2, .7, .2, 1);
  }

  dialog[open]::backdrop {
    animation: optibill-backdrop-enter 220ms ease;
  }

  .faq-list details[open] > p {
    animation: optibill-detail-enter 200ms ease;
  }

  @media (min-width: 801px) {
    #navigation > a::after {
      transition: opacity 180ms ease, scale 220ms ease;
    }
  }

  @media (max-width: 800px) {
    #navigation.is-open {
      animation: optibill-menu-enter 220ms ease;
    }
  }

  @media (hover: hover) and (pointer: fine) {
    .button > .icon:last-child,
    .text-link > .icon:last-child,
    .text-link > span:last-child,
    .pricing-plan-cta > .icon:last-child,
    .module-rail > a > .icon,
    #navigation > a > .icon,
    .login-link > span,
    .offline-download-link > span {
      transition: translate 180ms ease;
    }

    .button:hover > .icon:last-child,
    .text-link:hover > .icon:last-child,
    .text-link:hover > span:last-child,
    .pricing-plan-cta:hover > .icon:last-child,
    #navigation > a:hover > .icon,
    .login-link:hover > span,
    .offline-download-link:hover > span {
      translate: 3px 0;
    }

    .module-rail > a:hover > .icon {
      translate: 0 -2px;
    }

    .pricing-card,
    .journey-grid article {
      transition: box-shadow 220ms ease, border-color 220ms ease,
        translate 220ms cubic-bezier(.2, .7, .2, 1);
    }

    .pricing-card:hover {
      border-color: #9ab28b;
      box-shadow: 0 12px 25px #153d3210;
      translate: 0 -4px;
    }

    .pricing-card.is-featured:hover {
      border-color: #4c7654;
      box-shadow: 0 12px 25px #153d3220;
    }

    .journey-grid article:hover {
      border-top-color: #8aa978;
      box-shadow: 0 12px 22px -16px #153d3233;
      translate: 0 -3px;
    }

    .showcase-image,
    .offline-showcase-image {
      transition: scale 400ms cubic-bezier(.2, .7, .2, 1);
    }

    .showcase-image:hover,
    .offline-showcase-image:hover {
      scale: 1.015;
    }

    .bot-float {
      transition: translate 300ms cubic-bezier(.2, .7, .2, 1);
    }

    .bot-phone-scene:hover .bot-float-top {
      translate: 0 -3px;
    }

    .bot-phone-scene:hover .bot-float-bottom {
      translate: 0 3px;
    }

    @media (min-width: 801px) {
      #navigation > a:hover::after {
        opacity: 1;
        scale: 1 1;
      }
    }
  }

  @keyframes optibill-menu-enter {
    from {
      opacity: 0;
      translate: 0 6px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }

  @keyframes optibill-dialog-enter {
    from {
      opacity: 0;
      translate: 0 8px;
      scale: .985;
    }
    to {
      opacity: 1;
      translate: 0 0;
      scale: 1;
    }
  }

  @keyframes optibill-backdrop-enter {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes optibill-detail-enter {
    from {
      opacity: 0;
      translate: 0 3px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .button:hover,
  .bot-player > button:hover {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  .site-header,
  #navigation,
  #navigation > a::after,
  .menu-toggle > span,
  .pricing-card,
  .journey-grid article,
  .showcase-image,
  .offline-showcase-image,
  .bot-float,
  dialog,
  dialog::backdrop,
  .faq-list details > p {
    animation: none !important;
    transition: none !important;
  }

  .button > .icon:last-child,
  .text-link > .icon:last-child,
  .text-link > span:last-child,
  .pricing-plan-cta > .icon:last-child,
  .module-rail > a > .icon,
  #navigation > a > .icon,
  .login-link > span,
  .offline-download-link > span,
  .pricing-card,
  .journey-grid article,
  .showcase-image,
  .offline-showcase-image,
  .bot-float,
  dialog,
  .faq-list details > p {
    translate: none !important;
    scale: none !important;
  }
}
