/* Shared by the React site, cinematic homepage and static About preview. */
.tkh-glow {
  position: relative;
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
}

.tkh-glow::before,
.tkh-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--tkh-glow-image) center / contain no-repeat;
  opacity: 0;
  pointer-events: none;
}

.tkh-glow::before {
  filter: blur(9px) brightness(1.5) saturate(1.35);
}

.tkh-glow::after {
  filter: blur(2.5px) brightness(1.7) saturate(1.2);
}

.tkh-glow > img {
  position: relative;
  z-index: 2;
}

.tkh-glow.brand-motion > .brand-motion-glint {
  z-index: 3;
}

.word-shine {
  --shine-base: #c5b394;
  --shine-soft: #f3dfb9;
  --shine-peak: #ffffff;
  display: inline-block;
  max-width: 100%;
  color: inherit;
}

.word-shine[data-shine-tone="light"] {
  --shine-base: #211d17;
  --shine-soft: #72562f;
  --shine-peak: #927043;
}

.two-ways-home .word-shine {
  --shine-base: #e4d0b0;
  --shine-soft: #fff5df;
  --shine-peak: #ffffff;
}

.tkh-glow::before {
  animation: tkh-logo-glow 4.8s ease-in-out infinite;
  animation-delay: -1.2s;
  animation-play-state: paused;
}

.tkh-glow::after {
  animation: tkh-logo-inner-glow 4.8s ease-in-out infinite;
  animation-delay: -1.2s;
  animation-play-state: paused;
}

.tkh-glow[data-effect-motion="playing"]::before,
.tkh-glow[data-effect-motion="playing"]::after {
  animation-play-state: running;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .word-shine {
    background-image: linear-gradient(
      110deg,
      var(--shine-base) 42%,
      var(--shine-soft) 47%,
      var(--shine-peak) 49.5%,
      var(--shine-peak) 50.5%,
      var(--shine-soft) 53%,
      var(--shine-base) 58%
    );
    background-size: 220% 100%;
    background-position: 100% 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: tkh-word-shine 5.2s cubic-bezier(0.45, 0, 0.25, 1) infinite;
    animation-play-state: paused;
  }

  .word-shine[data-effect-motion="playing"] {
    animation-play-state: running;
  }
}

@keyframes tkh-logo-glow {
  0%,
  100% {
    opacity: 0.46;
    transform: scale(1.06);
  }
  48% {
    opacity: 1;
    transform: scale(1.13);
  }
}

@keyframes tkh-logo-inner-glow {
  0%,
  100% {
    opacity: 0.24;
    transform: scale(1.015);
  }
  48% {
    opacity: 0.78;
    transform: scale(1.035);
  }
}

@keyframes tkh-word-shine {
  0%,
  7% {
    background-position: 100% 0;
  }
  82%,
  100% {
    background-position: 0% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(html:not([data-site-motion="playing"])) .tkh-glow:where(:not(.two-ways-home.twh-motion-enabled *))::before,
  :where(html:not([data-site-motion="playing"])) .tkh-glow:where(:not(.two-ways-home.twh-motion-enabled *))::after {
    display: none;
    animation: none;
  }
  :where(html:not([data-site-motion="playing"])) .word-shine:where(:not(.two-ways-home.twh-motion-enabled *)) {
    background: none;
    -webkit-text-fill-color: currentColor;
    animation: none;
  }
}

@media print {
  .tkh-glow::before,
  .tkh-glow::after {
    display: none;
    animation: none;
  }
  .word-shine {
    background: none;
    -webkit-text-fill-color: currentColor;
    animation: none;
  }
}

@media (forced-colors: active) {
  .tkh-glow::before,
  .tkh-glow::after {
    display: none;
  }
  .word-shine {
    background: none;
    -webkit-text-fill-color: CanvasText;
    animation: none;
  }
}
