/* Landing hero "font loading" effect.
   Headline words rise out of a mask and sharpen from a blur, the eyebrow's letter-spacing tightens in,
   then the paragraph, buttons and gold rule follow. hero-fx.js starts it (adds .fx-go) once the web fonts
   are ready and the splash screen is leaving, so the text never swaps fonts mid-animation.
   Safety nets: every element also gets a delayed failsafe animation, so nothing can stay hidden. */

.hw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.hw-i { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .hero-fx .hw-i       { animation: hw-in 1s cubic-bezier(.2, .75, .2, 1) calc(.2s + var(--i, 0) * .09s) both, fx-failsafe 1ms 4.5s forwards; animation-play-state: paused, running; }
  .hero-fx .fx-eyebrow { animation: fx-track 1.3s cubic-bezier(.2, .75, .2, 1) 0s both, fx-failsafe-eb 1ms 4.5s forwards; animation-play-state: paused, running; }
  .hero-fx .fx-up      { animation: fx-up .9s cubic-bezier(.2, .75, .2, 1) var(--fx-d, 1s) both, fx-failsafe 1ms 4.5s forwards; animation-play-state: paused, running; }
  .hero-fx .fx-line    { transform-origin: left center; animation: fx-line 1.5s cubic-bezier(.65, 0, .35, 1) 1.4s both, fx-failsafe-line 1ms 4.5s forwards; animation-play-state: paused, running; }
  .hero-fx.fx-go .hw-i, .hero-fx.fx-go .fx-eyebrow, .hero-fx.fx-go .fx-up, .hero-fx.fx-go .fx-line { animation-play-state: running, running; }

  .hero-fx .hw:nth-child(1) { --i: 0; } .hero-fx .hw:nth-child(2) { --i: 1; } .hero-fx .hw:nth-child(3) { --i: 2; }
  .hero-fx .hw:nth-child(4) { --i: 3; } .hero-fx .hw:nth-child(5) { --i: 4; } .hero-fx .hw:nth-child(6) { --i: 5; }
  .hero-fx .hw:nth-child(7) { --i: 6; } .hero-fx .hw:nth-child(8) { --i: 7; }
  .hero-fx p.fx-up   { --fx-d: 1.05s; }
  .hero-fx div.fx-up { --fx-d: 1.25s; }

  @keyframes hw-in { from { transform: translateY(108%); opacity: 0; filter: blur(8px); } to { transform: none; opacity: 1; filter: blur(0); } }
  @keyframes fx-track { from { opacity: 0; letter-spacing: .6em; } to { opacity: 1; letter-spacing: .1em; } }
  @keyframes fx-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  @keyframes fx-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes fx-failsafe { to { opacity: 1; transform: none; filter: none; } }
  @keyframes fx-failsafe-eb { to { opacity: 1; letter-spacing: .1em; } }
  @keyframes fx-failsafe-line { to { transform: scaleX(1); } }
}
