/* HL homepage — hero: text pack slides in from left (fast) + red line story.
 * Line: right → full under H1 → left vertical. No pre-flash (fill-mode both).
 * LCP: H1 opacity stays high; transform only. */

@media (prefers-reduced-motion: no-preference) {
  body#index .hl-home-hero__copy {
    position: relative;
    overflow: hidden;
  }

  body#index .hl-home-hero__title {
    position: relative;
    padding-left: 1.05rem;
  }

  body#index .hl-home-hero__lead,
  body#index .hl-home-hero__actions {
    padding-left: 1.05rem;
  }

  /* Whole copy block rides in together, quickly */
  body#index .hl-home-hero__title,
  body#index .hl-home-hero__lead,
  body#index .hl-home-hero__actions {
    will-change: transform, opacity;
    animation: hlHeroPackIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body#index .hl-home-hero__accent {
    position: absolute;
    left: 1.05rem;
    right: 0;
    bottom: 0.06em;
    top: auto;
    width: auto;
    height: 2.5px;
    border-radius: 2px;
    background: var(--hl-red, #d71920);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transform: translateX(105%);
    transform-origin: left center;
    animation: hlHeroLineDesk 0.95s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body#index .hl-home-hero__title-text::after {
    display: none !important;
  }

  @keyframes hlHeroPackIn {
    from {
      opacity: 0.9;
      transform: translate3d(-7.5rem, 0, 0);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes hlHeroLineDesk {
    0% {
      left: 1.05rem;
      right: 0;
      bottom: 0.06em;
      top: auto;
      width: auto;
      height: 2.5px;
      opacity: 0;
      transform: translateX(105%);
    }
    1% {
      opacity: 1;
      transform: translateX(105%);
    }
    36% {
      opacity: 1;
      transform: translateX(0);
      left: 1.05rem;
      right: 0;
      width: auto;
      height: 2.5px;
      bottom: 0.06em;
      top: auto;
    }
    48% {
      transform: translateX(0);
      left: 1.05rem;
      right: 0;
      width: auto;
      height: 2.5px;
      bottom: 0.06em;
      top: auto;
      opacity: 1;
    }
    64% {
      left: 0;
      right: auto;
      width: 3.5px;
      height: 2.5px;
      bottom: 0.06em;
      top: auto;
      transform: none;
      opacity: 1;
    }
    100% {
      left: 0;
      right: auto;
      width: 3.5px;
      height: calc(100% - 0.15em);
      bottom: auto;
      top: 0.12em;
      transform: none;
      opacity: 1;
    }
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 767.98px) {
  body#index .hl-home-hero__copy {
    overflow: visible;
  }

  body#index .hl-home-hero__title,
  body#index .hl-home-hero__lead,
  body#index .hl-home-hero__actions {
    padding-left: 0.85rem;
    animation: hlHeroPackInMob 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body#index .hl-home-hero__accent {
    left: 0.85rem;
    right: 0;
    bottom: -0.02em;
    height: 2px;
    opacity: 0;
    transform: translateX(110%);
    animation: hlHeroLineMob 0.88s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes hlHeroPackInMob {
    from {
      opacity: 0.92;
      transform: translate3d(-5rem, 0, 0);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes hlHeroLineMob {
    0% {
      left: 0.85rem;
      right: 0;
      bottom: -0.02em;
      top: auto;
      width: auto;
      height: 2px;
      opacity: 0;
      transform: translateX(110%);
    }
    1% {
      opacity: 1;
      transform: translateX(110%);
    }
    36% {
      opacity: 1;
      transform: translateX(0);
      left: 0.85rem;
      right: 0;
      width: auto;
      height: 2px;
      bottom: -0.02em;
      top: auto;
    }
    48% {
      transform: translateX(0);
      left: 0.85rem;
      right: 0;
      width: auto;
      height: 2px;
      opacity: 1;
    }
    64% {
      left: 0;
      right: auto;
      width: 3px;
      height: 2px;
      bottom: -0.02em;
      top: auto;
      transform: none;
      opacity: 1;
    }
    100% {
      left: 0;
      right: auto;
      width: 3px;
      height: calc(100% - 0.1em);
      bottom: auto;
      top: 0.1em;
      transform: none;
      opacity: 1;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  body#index .hl-home-hero__accent {
    display: none !important;
  }
}

body#index .hl-home-hero__accent {
  opacity: 0;
}
