@keyframes float-in {
  from { transform: translateY(var(--motion-offset, 14px)); }
}

@keyframes track-in {
  from { transform: translateX(var(--track-offset, 14px)); }
}

@keyframes trace-line {
  from { transform: scaleX(0); }
}

@keyframes media-in {
  from { opacity: .82; transform: scale(.985); }
}

.event-grid .event-card.motion-entered {
  animation: float-in 380ms ease-out;
}

body[data-page] .event-hero .hero-photo {
  aspect-ratio: 16 / 9;
}

body[data-page="wyd"] .event-hero .hero-photo.motion-entered {
  animation: float-in 520ms ease-out;
}

body[data-page="chungcheong"] .event-hero .hero-photo.motion-entered {
  animation: track-in 360ms ease-out;
}

:root[dir="rtl"] .event-hero .hero-photo {
  --track-offset: -14px;
}

.standard-types > li,
.process-grid > article {
  position: relative;
}

.standard-types > li.motion-entered::before,
.process-grid > article.motion-entered::before {
  content: "";
  position: absolute;
  inset-block-start: -1px;
  inset-inline: 0;
  height: 2px;
  background: var(--yellow);
  pointer-events: none;
  transform-origin: left center;
  animation: trace-line 300ms ease-out backwards;
}

.standard-types > li.motion-entered::before {
  inset-inline: 9px;
  border-radius: 5px;
}

:root[dir="rtl"] :is(.standard-types > li, .process-grid > article).motion-entered::before {
  transform-origin: right center;
}

.store-media-dialog[open] {
  animation: media-in 200ms ease-out;
}

.store-media-dialog > img {
  display: block;
  width: min(100%, 600px);
  aspect-ratio: 600 / 338;
}

.inquiry-choice {
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

@media (min-width: 1051px) {
  .event-grid .event-card.motion-entered:nth-child(2),
  :is(.standard-types > li, .process-grid > article).motion-entered:nth-child(2)::before {
    animation-delay: 70ms;
    animation-fill-mode: backwards;
  }

  :is(.standard-types > li, .process-grid > article).motion-entered:nth-child(3)::before {
    animation-delay: 140ms;
  }

  .process-grid > article.motion-entered:nth-child(4)::before {
    animation-delay: 210ms;
  }
}

@media (max-width: 760px) {
  .event-grid .event-card,
  .event-hero .hero-photo {
    --motion-offset: 7px;
    --track-offset: 7px;
  }

  :root[dir="rtl"] .event-hero .hero-photo {
    --track-offset: -7px;
  }
}
