:root {
  --spear-motion-google: cubic-bezier(0.4, 0, 0.2, 1);
}

.spear-project-detail.has-spear-detail-motion .spear-project-detail__enter,
.spear-project-detail.has-spear-detail-motion .spear-project-detail__reveal {
  opacity: 1;
  transform: none;
  transition: none;
  animation: none;
}

.spear-detail-motion__unit.is-motion-pending {
  visibility: hidden;
}

.spear-detail-motion__unit.is-motion-entering,
.spear-detail-motion__unit.is-motion-complete {
  visibility: visible;
}

.spear-detail-motion__word {
  position: relative;
  display: inline-block;
  overflow: clip;
  vertical-align: baseline;
}

.spear-detail-motion__unit.is-motion-pending .spear-detail-motion__word,
.spear-detail-motion__unit.is-motion-entering .spear-detail-motion__word {
  -webkit-text-fill-color: transparent;
}

.spear-detail-motion__unit.is-motion-pending .spear-detail-motion__word--simple,
.spear-detail-motion__unit.is-motion-entering .spear-detail-motion__word--simple {
  -webkit-text-fill-color: currentColor;
  opacity: 0;
}

.spear-detail-motion__word::before {
  content: attr(data-motion-text);
  position: absolute;
  inset: 0 auto auto 0;
  color: currentColor;
  -webkit-text-fill-color: currentColor;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  white-space: nowrap;
  opacity: 0;
  transform-origin: 50% 70%;
  backface-visibility: hidden;
  pointer-events: none;
}

.spear-detail-motion__word.is-motion-item-entering::before {
  animation-duration: var(--spear-motion-duration, 640ms);
  animation-delay: 0ms;
  animation-timing-function: var(--spear-motion-google);
  animation-fill-mode: both;
}

.spear-detail-motion__word--rise.is-motion-item-entering::before {
  animation-name: spear-motion-word-rise;
}

.spear-detail-motion__word--slide-left.is-motion-item-entering::before {
  animation-name: spear-motion-word-slide-left;
}

.spear-detail-motion__word--slide-right.is-motion-item-entering::before {
  animation-name: spear-motion-word-slide-right;
}

.spear-detail-motion__word--shutter.is-motion-item-entering::before {
  animation-name: spear-motion-word-shutter;
}

.spear-detail-motion__word--drop.is-motion-item-entering::before {
  animation-name: spear-motion-word-drop;
}

.spear-detail-motion__word--pixel.is-motion-item-entering::before {
  animation-name: spear-motion-word-pixel;
}

.spear-detail-motion__word--pixel::after {
  content: attr(data-motion-text);
  position: absolute;
  inset: 0;
  color: transparent;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  white-space: nowrap;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(237, 246, 250, 0.92) 0 3px, rgba(148, 196, 216, 0.28) 3px 6px),
    repeating-linear-gradient(0deg, rgba(237, 246, 250, 0.72) 0 2px, transparent 2px 5px);
  background-clip: text;
  -webkit-background-clip: text;
  opacity: 0;
}

.spear-detail-motion__word--simple::before,
.spear-detail-motion__word--simple::after {
  content: none;
  display: none;
}

.spear-detail-motion__word--simple.is-motion-item-entering {
  animation-duration: var(--spear-motion-duration, 640ms);
  animation-delay: 0ms;
  animation-timing-function: var(--spear-motion-google);
  animation-fill-mode: both;
}

.spear-detail-motion__word--simple.spear-detail-motion__word--rise.is-motion-item-entering {
  animation-name: spear-motion-simple-soft;
}

.spear-detail-motion__word--simple.spear-detail-motion__word--slide-left.is-motion-item-entering {
  animation-name: spear-motion-simple-late;
}

.spear-detail-motion__word--simple.spear-detail-motion__word--slide-right.is-motion-item-entering {
  animation-name: spear-motion-simple-early;
}

.spear-detail-motion__word--simple.spear-detail-motion__word--shutter.is-motion-item-entering {
  animation-name: spear-motion-simple-shutter;
}

.spear-detail-motion__word--simple.spear-detail-motion__word--drop.is-motion-item-entering {
  animation-name: spear-motion-simple-pulse;
}

.spear-detail-motion__word--pixel.is-motion-item-entering::after {
  animation: spear-motion-pixel-blocks var(--spear-motion-duration, 640ms) steps(7, end)
    0ms both;
}

.spear-detail-motion__line {
  transform-box: fill-box;
  transform-origin: center;
}

.spear-detail-motion__unit.is-motion-pending .spear-detail-motion__line {
  opacity: 0 !important;
}

.spear-detail-motion__unit.is-motion-entering
  .spear-detail-motion__line:not(.is-motion-item-entering) {
  opacity: 0 !important;
}

.spear-detail-motion__line.is-motion-item-entering {
  animation-duration: var(--spear-motion-duration, 620ms);
  animation-delay: 0ms;
  animation-timing-function: var(--spear-motion-google);
  animation-fill-mode: both;
}

.spear-detail-motion__line--draw.is-motion-item-entering {
  animation-name: spear-motion-line-draw;
  stroke-dasharray: var(--spear-motion-line-length);
}

.spear-detail-motion__line--slide.is-motion-item-entering {
  animation-name: spear-motion-line-slide-x;
}

.spear-detail-motion__line--slide.is-vertical.is-motion-item-entering {
  animation-name: spear-motion-line-slide-y;
}

.spear-detail-motion__line--grow.is-horizontal.is-motion-item-entering {
  animation-name: spear-motion-line-grow-x;
}

.spear-detail-motion__line--grow.is-vertical.is-motion-item-entering {
  animation-name: spear-motion-line-grow-y;
}

.spear-detail-motion__line--fade.is-motion-item-entering {
  animation-name: spear-motion-line-fade;
}

.spear-project-detail__media-shell.is-motion-pending .spear-project-detail__checker-image {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}

.spear-project-detail__media-shell.is-motion-entering .spear-project-detail__checker-image {
  animation: spear-motion-media-expose 880ms var(--spear-motion-google) 180ms both;
}

@keyframes spear-motion-word-rise {
  0% { opacity: 0; transform: translate3d(0, var(--spear-motion-y), 0); }
  42% { opacity: 0.54; }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes spear-motion-word-slide-left {
  0% { opacity: 0; transform: translate3d(var(--spear-motion-x), 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes spear-motion-word-slide-right {
  0% { opacity: 0; transform: translate3d(calc(var(--spear-motion-x) * -1), 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes spear-motion-word-shutter {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); transform: translate3d(8px, 0, 0); }
  38% { opacity: 0.72; }
  100% { opacity: 1; clip-path: inset(0); transform: translate3d(0, 0, 0); }
}

@keyframes spear-motion-word-drop {
  0% { opacity: 0; transform: translate3d(0, calc(var(--spear-motion-y) * -1), 0); }
  58% { opacity: 0.8; transform: translate3d(0, 1px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes spear-motion-word-pixel {
  0% { opacity: 0; filter: blur(4px); transform: scale(1.08); }
  28% { opacity: 0.24; filter: blur(3px); }
  66% { opacity: 0.76; filter: blur(1px); }
  100% { opacity: 1; filter: blur(0); transform: scale(1); }
}

@keyframes spear-motion-simple-soft {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes spear-motion-simple-late {
  0%, 32% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes spear-motion-simple-early {
  0% { opacity: 0; }
  44% { opacity: 0.74; }
  100% { opacity: 1; }
}

@keyframes spear-motion-simple-shutter {
  0%, 48% { opacity: 0; }
  49% { opacity: 0.42; }
  100% { opacity: 1; }
}

@keyframes spear-motion-simple-pulse {
  0% { opacity: 0; }
  38% { opacity: 0.58; }
  52% { opacity: 0.2; }
  100% { opacity: 1; }
}

@keyframes spear-motion-pixel-blocks {
  0% { opacity: 0; transform: translate3d(7px, 0, 0) scaleX(1.12); }
  18% { opacity: 0.9; }
  42% { opacity: 0.62; transform: translate3d(-3px, 0, 0) scaleX(0.96); }
  72% { opacity: 0.28; transform: translate3d(1px, 0, 0) scaleX(1); }
  100% { opacity: 0; transform: translate3d(0, 0, 0) scaleX(1); }
}

@keyframes spear-motion-line-draw {
  0% { opacity: 0; stroke-dashoffset: var(--spear-motion-line-offset); }
  24% { opacity: calc(var(--spear-motion-line-peak-opacity, 1) * 0.52); }
  68% { opacity: var(--spear-motion-line-peak-opacity, 1); }
  100% { opacity: var(--spear-motion-line-opacity, 1); stroke-dashoffset: 0; }
}

@keyframes spear-motion-line-slide-x {
  0% { opacity: 0; transform: translate3d(var(--spear-motion-line-shift), 0, 0); }
  68% { opacity: var(--spear-motion-line-peak-opacity, 1); }
  100% { opacity: var(--spear-motion-line-opacity, 1); transform: translate3d(0, 0, 0); }
}

@keyframes spear-motion-line-slide-y {
  0% { opacity: 0; transform: translate3d(0, var(--spear-motion-line-shift), 0); }
  68% { opacity: var(--spear-motion-line-peak-opacity, 1); }
  100% { opacity: var(--spear-motion-line-opacity, 1); transform: translate3d(0, 0, 0); }
}

@keyframes spear-motion-line-grow-x {
  0% { opacity: 0; transform: scaleX(0); }
  68% { opacity: var(--spear-motion-line-peak-opacity, 1); }
  100% { opacity: var(--spear-motion-line-opacity, 1); transform: scaleX(1); }
}

@keyframes spear-motion-line-grow-y {
  0% { opacity: 0; transform: scaleY(0); }
  68% { opacity: var(--spear-motion-line-peak-opacity, 1); }
  100% { opacity: var(--spear-motion-line-opacity, 1); transform: scaleY(1); }
}

@keyframes spear-motion-line-fade {
  0% { opacity: 0; }
  68% { opacity: var(--spear-motion-line-peak-opacity, 1); }
  100% { opacity: var(--spear-motion-line-opacity, 1); }
}

@keyframes spear-motion-media-expose {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); }
  100% { opacity: 1; clip-path: inset(0); }
}

@media (prefers-reduced-motion: reduce) {
  .spear-detail-motion__unit,
  .spear-detail-motion__word,
  .spear-detail-motion__line,
  .spear-project-detail__checker-image {
    -webkit-text-fill-color: currentColor !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
    animation: none !important;
    transition: none !important;
  }

  .spear-detail-motion__word::before,
  .spear-detail-motion__word::after {
    content: none !important;
    display: none !important;
  }
}
