/* Движение: появление первого экрана, смена шага, «ручка»; режим без анимации и режим снимков (.shot). */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
}

@keyframes journal-in {
  from {
    opacity: 0;
    transform: translateY(2.5rem) rotate(-5deg);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

@keyframes pen-write {
  from {
    clip-path: inset(-0.3em 100% -0.3em 0);
  }

  to {
    clip-path: inset(-0.3em -0.3em -0.3em 0);
  }
}

.hero-copy > * {
  animation: rise var(--duration-slow) var(--ease-out) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 80ms;
}

.hero-copy > :nth-child(3) {
  animation-delay: 160ms;
}

.hero-copy > :nth-child(4) {
  animation-delay: 240ms;
}

.journal {
  animation: journal-in 1000ms var(--ease-out) 200ms both;
}

.panel.is-entering {
  animation: panel-in var(--duration-base) var(--ease-out) both;
}

.pen.is-writing {
  animation: pen-write var(--duration-slow) var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* На снимке раздел встаёт вплотную под шапку: полоска соседнего раздела над ним не видна. */
.shot {
  scroll-behavior: auto;
  scroll-padding-top: var(--header-height);
  scrollbar-width: none;
}

/* На телефоне снимают саму запись: между шапкой и карточкой оставляем просвет. */
.shot .booking {
  scroll-margin-top: var(--space-md);
}

.shot *,
.shot *::before,
.shot *::after {
  animation: none !important;
  transition: none !important;
}
