/* Motion, loaded last. Only opacity, transform, colour, shadow, filter are animated;
 * the first screen does not animate in (LCP); end state is the resting layout. */

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-group] > * { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
[data-reveal-group].is-in > * { opacity: 1; transform: none; }
[data-reveal-group].is-in > *:nth-child(2) { transition-delay: 60ms; }
[data-reveal-group].is-in > *:nth-child(3) { transition-delay: 120ms; }
[data-reveal-group].is-in > *:nth-child(4) { transition-delay: 180ms; }
[data-reveal-group].is-in > *:nth-child(5) { transition-delay: 240ms; }
[data-reveal-group].is-in > *:nth-child(6) { transition-delay: 300ms; }
[data-reveal-group].is-in > *:nth-child(n+7) { transition-delay: 340ms; }

/* scroll-driven progress on modern engines (fallback: none needed, purely decorative) */
@supports (animation-timeline: view()) {
  .sp > picture img { animation: parallax linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes parallax { from { transform: translateY(-4%) scale(1.08); } to { transform: translateY(4%) scale(1.08); } }
}

/* 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; }
.collapsible > * { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s var(--dur-base); }
.collapsible.is-open > * { visibility: visible; transition-delay: 0s; }

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], [data-reveal-group] > * { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  ::view-transition-group(*) { animation: none; }
}
