/* One motion language: soft entrances, restrained depth, native scrolling. */
.hero-copy { translate: 0 calc(var(--scroll-progress, 0) * -16px); }
.paper-scene { translate: 0 calc(var(--scroll-progress, 0) * 26px); }
.hero-line { animation: copy-enter 1s var(--ease) both; }
.hero-line:nth-child(2) { animation-delay: .12s; }
.hero-description { animation: copy-enter 1s .22s var(--ease) both; }
.hero-actions { animation: copy-enter 1s .32s var(--ease) both; }
.calendar-paper {
  animation: calendar-enter 1.3s .1s var(--ease) both,
    calendar-drift 9s 1.4s ease-in-out infinite;
}
.receipt-back { animation: back-enter 1.2s .18s var(--ease) both; }
.receipt {
  animation: receipt-enter 1.3s .25s var(--ease) both,
    receipt-drift 8s 1.55s ease-in-out infinite;
}
.hero-usage {
  animation: usage-enter 1s .65s var(--ease) both,
    usage-drift 7s 1.65s ease-in-out infinite;
}
.reminder-tag {
  animation: reminder-enter 1s .9s var(--ease) both,
    reminder-drift 8s 1.9s ease-in-out infinite;
}
.calendar-target ellipse { stroke-dasharray: 1; animation: circle-loop 10s 1.2s ease-in-out infinite; }
.receipt-due::after { animation: underline-loop 10s 1.2s var(--ease) infinite; }
.sparkline { stroke-dasharray: 1; animation: sparkline-draw 9s 1.4s var(--ease) infinite; }
.paper-scene[data-suspended="true"] .scene-art *,
.paper-scene[data-suspended="true"] .scene-art *::after { animation-play-state: paused; }

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .8s ease, transform 1.1s var(--ease);
}
.motion-ready [data-reveal].is-visible { opacity: 1; transform: none; }
.story-card:nth-child(2) { transition-delay: .1s; }
.home-card.is-visible .home-meter { animation: meter-enter 1.1s .18s var(--ease) both; }
.home-card.is-visible .dial-value { animation: dial-fill 1.5s .5s var(--ease) both; }
.reminders-card.is-visible .big-date { animation: calendar-card-enter 1.2s .1s var(--ease) both; }
.reminders-card.is-visible .big-date strong svg path { stroke-dasharray: 1; animation: circle-draw 1.5s .65s var(--ease) both; }
.reminders-card.is-visible .notification-example { animation: notification-enter 1s .55s var(--ease) both; }
.chart-month i { transform-origin: bottom; animation: bar-enter .9s var(--ease) both; }
.chart-month:nth-child(2) i { animation-delay: .06s; }
.chart-month:nth-child(3) i { animation-delay: .12s; }
.chart-month:nth-child(4) i { animation-delay: .18s; }
.chart-month:nth-child(5) i { animation-delay: .24s; }
.chart-month:nth-child(6) i { animation-delay: .3s; }
.balance.is-updated { animation: balance-flash .75s ease-out; }

@keyframes copy-enter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes calendar-enter { from { opacity: 0; translate: 40px 35px; rotate: 10deg; scale: .95; } to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; } }
@keyframes back-enter { from { opacity: 0; translate: -25px 35px; } to { opacity: 1; translate: 0 0; } }
@keyframes receipt-enter { from { opacity: 0; translate: -35px 50px; rotate: -10deg; scale: .94; } to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; } }
@keyframes usage-enter { from { opacity: 0; translate: 35px 22px; scale: .9; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes reminder-enter { from { opacity: 0; translate: 25px 30px; scale: .93; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes calendar-drift { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: 4px 11px; rotate: -1.5deg; } }
@keyframes receipt-drift { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: -3px -11px; rotate: 1.2deg; } }
@keyframes usage-drift { 0%,100% { translate: 0 0; } 50% { translate: -3px -8px; } }
@keyframes reminder-drift { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: 3px -7px; rotate: -1deg; } }
@keyframes circle-loop { 0%,5% { stroke-dashoffset: 1; opacity: 0; } 12% { opacity: 1; } 27%,85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes underline-loop { 0%,15% { transform: scaleX(0); opacity: 1; } 30%,85% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes sparkline-draw { 0%,5% { stroke-dashoffset: 1; opacity: 0; } 12% { opacity: 1; } 35%,90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes meter-enter { from { opacity: 0; translate: -12px 22px; rotate: -3deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes dial-fill { from { stroke-dasharray: 0 1; } to { stroke-dasharray: .72 1; } }
@keyframes calendar-card-enter { from { opacity: 0; translate: 20px 28px; rotate: 8deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes circle-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes notification-enter { from { opacity: 0; translate: -20px 25px; scale: .95; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes bar-enter { from { transform: scaleY(.02); } to { transform: scaleY(1); } }
@keyframes balance-flash { from { background: #ddf1e4; } to { background: #f0f3fd; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
  .scene-art { transform: none; }
  .hero-copy, .paper-scene { translate: none; }
  .home-photo { transform: none; scale: 1; }
}
