/* Page-load stagger and scroll reveal. Transform and opacity only. Expo ease. */

[data-enter] {
  opacity: 0;
  transform: translateY(12px);
}

body.is-ready [data-enter] {
  animation: ladon-enter var(--fx-reveal) var(--ease-expo) both;
}

body.is-ready [data-enter="1"] { animation-delay: calc(var(--fx-stagger) * 1); }
body.is-ready [data-enter="2"] { animation-delay: calc(var(--fx-stagger) * 2); }
body.is-ready [data-enter="3"] { animation-delay: calc(var(--fx-stagger) * 3); }
body.is-ready [data-enter="4"] { animation-delay: calc(var(--fx-stagger) * 4); }
body.is-ready [data-enter="5"] { animation-delay: calc(var(--fx-stagger) * 5); }

@keyframes ladon-enter {
  from { opacity: 0; transform: translateY(12px); }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
  animation: ladon-enter var(--fx-reveal) var(--ease-expo) both;
}

.chamber-plan__ring {
  transform: scale(1);
  animation: ladon-ring 1.1s var(--ease-expo) both;
}

@keyframes ladon-ring {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Reveal links: matched masks share their height so no layout moves. */
.flow-mask > span { transition: transform 260ms var(--ease-expo), opacity 260ms var(--ease-expo); }
.flow-preview { transform: translateY(110%); opacity: 0; }
.flow-table tr.is-active .flow-label { transform: translateY(-110%); opacity: 0; }
.flow-table tr.is-active .flow-preview { transform: translateY(0); opacity: 1; }

.custody-tracking .custody-mask,
.custody-tracking .custody-content { transition: transform 900ms var(--ease-expo), opacity 900ms var(--ease-expo); }
.custody-tracking .custody-mask { transform: translateY(105%); opacity: 0; }
.custody-tracking .custody-content { transform: translateY(-105%); }
.custody-tracking .is-past .custody-mask { transform: translateY(-105%); }
.custody-tracking .is-past .custody-content { transform: translateY(105%); }
.custody-tracking .is-current .custody-mask,
.custody-tracking .is-current .custody-content { transform: translateY(0); opacity: 1; }

.headline-ready .headline-line {
  animation: ladon-headline var(--fx-reveal) var(--ease-expo) var(--line-delay, 0ms) both;
}
@keyframes ladon-headline {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  [data-enter],
  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .chamber-plan__ring {
    opacity: 1;
    transform: none;
  }
  .headline-ready .headline-line { transform: none; opacity: 1; }
  .custody-tracking .flow-station h3 { opacity: 1; }
  .custody-tracking .custody-mask, .custody-tracking .custody-content { transform: none; opacity: 1; }
  .flow-mask > span { transform: none !important; }
}
