/* One continuous gold thread, clipped to the invitation rather than the desktop. */
.journey-thread {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 24;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 650ms ease;
  contain: strict;
}

.journey-thread,
.journey-thread * {
  pointer-events: none !important;
}

html.is-ready:not(.is-loading):not(.lacquer-loader-lock):not(.invitation-loading-lock) .journey-thread {
  opacity: 1;
}

.journey-thread svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.journey-thread path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.journey-thread__route {
  stroke: #ad844a;
  stroke-width: .7;
  opacity: .13;
}

.journey-thread__edge {
  stroke: #d9bd89;
  stroke-width: 1.65;
  opacity: .18;
}

.journey-thread__draw {
  stroke: url(#journeyThreadGold);
  stroke-width: 1.05;
}

.journey-thread__light {
  stroke: url(#journeyThreadTipGold);
  stroke-width: 1.05;
  opacity: .6;
}

.journey-thread__bead {
  filter: drop-shadow(0 1px 1px rgba(100, 59, 14, .18));
}

.journey-thread__finish {
  opacity: 0;
}

.journey-thread__finish-halo {
  stroke: #d8b46d;
  stroke-width: 4;
  opacity: .3;
  filter: blur(2px);
}

.journey-thread__finish-glint {
  stroke: #fff1bb;
  stroke-width: 1.8;
  filter: drop-shadow(0 0 3px rgba(177, 128, 48, .65));
}

.journey-thread.is-winking .journey-thread__finish {
  animation: journey-arrival-wink 820ms ease-out both;
}

@keyframes journey-arrival-wink {
  0% { opacity: 0; }
  32% { opacity: 1; }
  55% { opacity: .85; }
  100% { opacity: 0; }
}

html.is-ready [data-chapter-mark="before"].is-chapter-winking::before,
html.is-ready [data-chapter-mark="after"].is-chapter-winking::after {
  animation: journey-chapter-wink 2200ms cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes journey-chapter-wink {
  0%, 100% {
    filter: brightness(1);
    text-shadow: 0 0 0 rgba(106, 62, 31, 0);
    -webkit-text-stroke: 0 transparent;
  }
  18%, 65% {
    filter: brightness(.62) saturate(1.45);
    text-shadow: 0 0 .4px rgba(106, 62, 31, .35);
    -webkit-text-stroke: .25px currentColor;
  }
  82% {
    filter: brightness(.84) saturate(1.15);
    text-shadow: 0 0 .2px rgba(106, 62, 31, .15);
    -webkit-text-stroke: .1px currentColor;
  }
}

html.has-journey-thread #hero .lacquer-cover__stem::after {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .journey-thread { transition: none; }
  .journey-thread.is-winking .journey-thread__finish { animation: none; }
  html.is-ready [data-chapter-mark="before"].is-chapter-winking::before,
  html.is-ready [data-chapter-mark="after"].is-chapter-winking::after {
    animation: none !important;
  }
  .journey-thread__edge,
  .journey-thread__draw,
  .journey-thread__light,
  .journey-thread__bead { display: none; }
  html.has-journey-thread #hero .lacquer-cover__stem::after { visibility: visible; }
}
