.site-scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  background: #bd8257;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
  z-index: 100;
}

html[lang=ru] .hero h1 { white-space: normal; text-wrap: balance; }

@media (prefers-reduced-motion: no-preference) {
  .template-page main { animation: page-in 520ms cubic-bezier(.22,1,.36,1) both; }
  .hero h1, .templates-title { animation: title-enter 1.1s cubic-bezier(.22,1,.36,1) both; }
  .hero-description { animation: section-enter .85s .22s cubic-bezier(.22,1,.36,1) both; }
  .hero-actions { animation: section-enter .85s .34s cubic-bezier(.22,1,.36,1) both; }
  .hero-bottom { animation: section-enter .85s .44s cubic-bezier(.22,1,.36,1) both; }

  .motion-ready [data-motion]:not([data-arrived]):not(:focus-within) {
    opacity: 0;
  }
  [data-motion="section"][data-arrived], [data-motion="item"][data-arrived] {
    animation: section-enter .78s var(--arrival-delay, 0ms) cubic-bezier(.22,1,.36,1) both;
  }

  .showcase-card {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .showcase-card[data-arrived] .showcase-image {
    animation: gallery-enter .95s cubic-bezier(.22,1,.36,1) both;
  }
  .showcase-card[data-arrived] figcaption {
    animation: section-enter .76s .14s cubic-bezier(.22,1,.36,1) both;
  }
  .showcase-card[data-arrived] .showcase-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #241d18;
    pointer-events: none;
    transform-origin: right;
    animation: shutter .95s cubic-bezier(.7,0,.24,1) both;
  }
  .project > span, .platforms article .platform-logo {
    transition: transform .45s cubic-bezier(.22,1,.36,1);
  }
  .project:hover > span:first-child, .project:focus-visible > span:first-child {
    transform: translateX(5px);
  }
  .platforms article:hover .platform-logo {
    transform: translateY(-6px) scale(1.08);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .showcase-image:hover img {
    transform: translate(var(--motion-x, 0px), var(--motion-y, 0px)) scale(1.075);
  }
}

@keyframes section-enter {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
@keyframes title-enter {
  from { opacity: 0; transform: translateY(36px); clip-path: inset(0 0 100%); }
  to { opacity: 1; transform: none; clip-path: inset(-18% -12%); }
}
@keyframes gallery-enter {
  from { opacity: .5; transform: translateY(24px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes shutter {
  0%, 12% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}
@keyframes page-in {
  from { opacity: .35; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-scroll-progress { display: none; }
}

