/* Motion, loaded last: transitions, keyframes, and the reduced-motion block.
 *
 * Rules that do not bend (F5-tech, "Движение"):
 *   · only opacity, transform, colour, shadow and filter are animated;
 *   · the first screen does not animate in — that is a direct hit on LCP;
 *   · the end state matches the mockup exactly, or the fidelity check is measuring
 *     a paused animation instead of the layout.
 */

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Staggering by nth-child costs nothing and reads as intentional. */
[data-reveal-group] > * { transition-delay: 0ms; }
[data-reveal-group] > *:nth-child(2) { transition-delay: 60ms; }
[data-reveal-group] > *:nth-child(3) { transition-delay: 120ms; }
[data-reveal-group] > *:nth-child(4) { transition-delay: 180ms; }

/* Height is never animated: a row expands through grid-template-rows. */
.collapsible { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-base) var(--ease); }
.collapsible.is-open { grid-template-rows: 1fr; }
/* min-height: 0 as well as overflow — an item in a 0fr track keeps its automatic
   minimum size otherwise, and a "closed" panel still takes up its content height. */
.collapsible > * { overflow: hidden; min-height: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
