/* AutoContent — shared page transitions & entrance motion (Direction C) */
@media (prefers-reduced-motion: no-preference) {

  @keyframes ptRise  { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes ptLeft  { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
  @keyframes ptDown  { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

  /* ── Leaving a page (navigation fade-out) ── */
  body.pt-leaving { opacity: 0; transform: translateY(-4px); transition: opacity .26s ease, transform .26s ease; }

  /* ── App layout entrance (dashboard / content / schedule / article / n8n / settings) ── */
  .side   { animation: ptLeft .55s cubic-bezier(.22,.61,.36,1) both; }
  .topbar { animation: ptDown .45s ease both; animation-delay: .05s; }

  .scroll > * { animation: ptRise .55s cubic-bezier(.22,.61,.36,1) both; }
  .scroll > *:nth-child(1) { animation-delay: .08s; }
  .scroll > *:nth-child(2) { animation-delay: .17s; }
  .scroll > *:nth-child(3) { animation-delay: .26s; }
  .scroll > *:nth-child(4) { animation-delay: .35s; }

  /* content page (no .scroll wrapper) */
  .filters { animation: ptDown .45s ease both; animation-delay: .08s; }
  .split   { animation: ptRise .55s cubic-bezier(.22,.61,.36,1) both; animation-delay: .16s; }

  /* settings page */
  .body > .subnav   { animation: ptLeft .55s cubic-bezier(.22,.61,.36,1) both; animation-delay: .06s; }
  .content > .card  { animation: ptRise .55s cubic-bezier(.22,.61,.36,1) both; }
  .content > .card:nth-child(1) { animation-delay: .12s; }
  .content > .card:nth-child(2) { animation-delay: .20s; }
  .content > .card:nth-child(3) { animation-delay: .28s; }
  .content > .card:nth-child(4) { animation-delay: .36s; }
  .content > .card:nth-child(5) { animation-delay: .44s; }

  /* ── Auth pages (login / register) ── */
  .brandside { animation: ptLeft .6s cubic-bezier(.22,.61,.36,1) both; }
  .form > *  { animation: ptRise .5s cubic-bezier(.22,.61,.36,1) both; }
  .form > *:nth-child(1)  { animation-delay: .10s; }
  .form > *:nth-child(2)  { animation-delay: .16s; }
  .form > *:nth-child(3)  { animation-delay: .22s; }
  .form > *:nth-child(4)  { animation-delay: .28s; }
  .form > *:nth-child(5)  { animation-delay: .34s; }
  .form > *:nth-child(6)  { animation-delay: .40s; }
  .form > *:nth-child(7)  { animation-delay: .46s; }
  .form > *:nth-child(8)  { animation-delay: .52s; }
  .form > *:nth-child(9)  { animation-delay: .58s; }
  .form > *:nth-child(10) { animation-delay: .64s; }
  .form > *:nth-child(11) { animation-delay: .70s; }
  .form > *:nth-child(12) { animation-delay: .76s; }

  /* ── Landing hero (above the fold) ── */
  .hero-in > * { animation: ptRise .6s cubic-bezier(.22,.61,.36,1) both; }
  .hero-in > *:nth-child(1) { animation-delay: .05s; }
  .hero-in > *:nth-child(2) { animation-delay: .13s; }
  .hero-in > *:nth-child(3) { animation-delay: .21s; }
  .hero-in > *:nth-child(4) { animation-delay: .29s; }
  .hero-in > *:nth-child(5) { animation-delay: .37s; }
  .preview-stage { animation: ptRise .7s cubic-bezier(.22,.61,.36,1) both; animation-delay: .44s; }

  /* ── Scroll-reveal (assigned by transitions.js on long pages) ── */
  .pt-reveal { opacity: 0; transform: translateY(28px); }
  .pt-reveal.pt-show { opacity: 1; transform: none; transition: opacity .6s ease, transform .65s cubic-bezier(.22,.61,.36,1); }
}
