/* Subtle motion for sslslaw.com.
   Everything here only applies when motion.js has added .motion to <html>,
   so visitors without JavaScript (and search engines) always see the full page,
   and visitors who ask their device to reduce motion get no animation at all. */

/* ---------- Page titles rise in (homepage and every other page alike) ---------- */
.motion .hero-inner { animation: none; }
.motion .hero-inner > *,
.motion .page-hero > * { opacity: 0; transform: translateY(12px); transition: opacity .9s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.motion .hero.play .hero-inner > *,
.motion .page-hero.play > * { opacity: 1; transform: none; }
.motion .hero.play .hero-inner > :nth-child(2), .motion .page-hero.play > :nth-child(2) { transition-delay: .12s; }
.motion .hero.play .hero-inner > :nth-child(3), .motion .page-hero.play > :nth-child(3) { transition-delay: .24s; }
.motion .hero.play .hero-inner > :nth-child(4), .motion .page-hero.play > :nth-child(4) { transition-delay: .32s; }
.motion .hero.play .hero-inner > :nth-child(5), .motion .page-hero.play > :nth-child(5) { transition-delay: .4s; }
.motion .hero.play .hero-inner > :nth-child(6) { transition-delay: .48s; }

/* ---------- Sections fade up as they scroll into view ---------- */
.motion .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform 1s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rv-delay, 0s); }
.motion .rv.in { opacity: 1; transform: none; }

/* ---------- Small responses to the pointer ---------- */
.practice-card { transition: background .3s ease, transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
@media (hover: hover) {
  .practice-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.18); }
  .button span[aria-hidden], .text-link span { display: inline-block; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
  .button:hover span[aria-hidden], .text-link:hover span { transform: translateX(4px); }
  nav a:not(.nav-contact) { position: relative; }
  nav a:not(.nav-contact):after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
  nav a:not(.nav-contact):hover:after, nav a.active:not(.nav-contact):after { transform: scaleX(1); }
  nav .nav-contact { transition: background .25s ease, color .25s ease; }
  nav .nav-contact:hover { background: #fff; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  .practice-card:hover { transform: none; }
}
