/* Soft, subtle motion for the whole site.
   Hidden-until-revealed state only applies when JS is running (html.js-anim),
   so the site stays fully visible without JS. Disabled for reduced-motion users. */

@keyframes hw-up   { from { opacity: 0; transform: translate3d(0, 22px, 0); } }
@keyframes hw-fade { from { opacity: 0; } }
@keyframes hw-pop  { from { opacity: 0; transform: scale(.96); } }

/* page + hero entrance (pure CSS) */
body { animation: hw-fade .5s ease both; }
.hero .container .row > *:first-child > *,
.pg-hero .container .row > div > *,
.bl-hero .container > *,
.bd-hero .container > * { animation: hw-up .9s cubic-bezier(.22,.61,.36,1) backwards; }
.hero .container .row > *:first-child > *:nth-child(2),
.pg-hero .container .row > div > *:nth-child(2),
.bl-hero .container > *:nth-child(2) { animation-delay: .08s; }
.hero .container .row > *:first-child > *:nth-child(3),
.pg-hero .container .row > div > *:nth-child(3),
.bl-hero .container > *:nth-child(3) { animation-delay: .16s; }
.hero .container .row > *:first-child > *:nth-child(n+4),
.pg-hero .container .row > div > *:nth-child(n+4) { animation-delay: .24s; }
.hero__fig, .pg-glance { animation: hw-pop 1s cubic-bezier(.22,.61,.36,1) .2s backwards; }

/* scroll reveal */
.js-anim [data-reveal]:not(.is-in) { opacity: 0; }
[data-reveal].is-in { animation: hw-up .85s cubic-bezier(.22,.61,.36,1) var(--rd, 0s) backwards; }
[data-reveal="fade"].is-in { animation-name: hw-fade; animation-duration: 1s; }

/* gentle hover feedback */
.btn-hw, .sv-card, .pg-card, .cond, .pg-side-links a, .accordion-item { transition-timing-function: cubic-bezier(.22,.61,.36,1); }
.sv-card .pg-ic, .pg-card .pg-ic { transition: transform .45s cubic-bezier(.22,.61,.36,1); }
.sv-card:hover .pg-ic, .pg-card:hover .pg-ic { transform: translateY(-3px) scale(1.06); }
.pg-side-links a i { transition: transform .3s ease; }
.pg-side-links a:hover i { transform: translate(2px, -2px); }
img { transition: opacity .6s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-anim [data-reveal]:not(.is-in) { opacity: 1; }
}
