/* JMS apps motion (0.44): shared by BeNamed, MailSafe, ReviewRelay, TenderMatch, PayWatch and SiteLegal.
   Everything here sits inside prefers-reduced-motion: no-preference, so people who ask for less movement get the
   still pages exactly as before. The hero entrance is pure CSS (nothing hidden waiting for a script); scroll reveals,
   counters and the hero backdrop come from motion.js. */
:root { --mo-a: var(--brand, var(--green, #333)); --mo-b: var(--accent, var(--lime-d, #FFD166)); --mo-ease: cubic-bezier(.2, .7, .2, 1); }

@media (prefers-reduced-motion: no-preference) {
  /* Page to page: a soft cross-fade, with the header staying put (browsers that support it). */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: mo-fade-out .18s ease-in both; }
  ::view-transition-new(root) { animation: mo-fade-in .32s var(--mo-ease) both; }
  .top { view-transition-name: mo-top; }

  /* Hero: words rise in one after another, the tool card floats in. */
  .hero-copy > * { animation: mo-up .75s var(--mo-ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; } .hero-copy > :nth-child(3) { animation-delay: .16s; } .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-copy > :nth-child(5) { animation-delay: .32s; } .hero-copy > :nth-child(n+6) { animation-delay: .4s; }
  .hero-in > :not(.hero-copy) { animation: mo-card .95s .2s var(--mo-ease) both; }
  .hero .ticks li { animation: mo-left .6s var(--mo-ease) both; }
  .hero .ticks li:nth-child(1) { animation-delay: .45s; } .hero .ticks li:nth-child(2) { animation-delay: .55s; } .hero .ticks li:nth-child(n+3) { animation-delay: .65s; }
  .hero h1 em { background-size: 200% 100%; animation: mo-shimmer 6s ease-in-out infinite alternate; }
  .sl-body .hero h1 mark { background-size: 100% 100%; background-repeat: no-repeat; animation: mo-mark 1.1s .5s var(--mo-ease) both; }

  /* The hero backdrop: three soft colour fields drifting slowly behind everything. */
  .hero, .cta { position: relative; isolation: isolate; }
  .mo-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
  .mo-aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .22; will-change: transform; animation: mo-drift 22s ease-in-out infinite alternate; }
  .mo-aurora i:nth-child(1) { background: var(--mo-a); left: -12vmax; top: -22vmax; }
  .mo-aurora i:nth-child(2) { background: var(--mo-b); right: -14vmax; top: -10vmax; animation-duration: 27s; animation-delay: -6s; }
  .mo-aurora i:nth-child(3) { background: color-mix(in srgb, var(--mo-a) 50%, var(--mo-b)); left: 30%; bottom: -30vmax; animation-duration: 31s; animation-delay: -12s; opacity: .14; }
  .cta .mo-aurora i { opacity: .3; filter: blur(60px); }

  /* Scroll reveal (motion.js adds .mo-r below the fold, then .mo-in as each part comes into view). */
  .mo-r { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .7s var(--mo-ease), transform .7s var(--mo-ease); transition-delay: var(--mo-d, 0s); }
  .mo-r.mo-in { opacity: 1; transform: none; }

  /* Results: the verdict lands, then the findings deal out. */
  .verdict, .r-head { animation: mo-land .7s var(--mo-ease) both; }
  .verdict .shield, .verdict .seal-v { animation: mo-pop .6s .35s cubic-bezier(.3, 1.6, .5, 1) both; }
  .results > li, .findings > li, .engines > *, .matches > li { animation: mo-up .6s var(--mo-ease) both; }
  :is(.results, .findings, .engines, .matches) > :nth-child(1) { animation-delay: .25s; } :is(.results, .findings, .engines, .matches) > :nth-child(2) { animation-delay: .33s; }
  :is(.results, .findings, .engines, .matches) > :nth-child(3) { animation-delay: .41s; } :is(.results, .findings, .engines, .matches) > :nth-child(4) { animation-delay: .49s; }
  :is(.results, .findings, .engines, .matches) > :nth-child(5) { animation-delay: .57s; } :is(.results, .findings, .engines, .matches) > :nth-child(n+6) { animation-delay: .65s; }

  /* Cards lift a little, and a soft light follows the pointer (motion.js sets --mx/--my). */
  .mo-card { transition: transform .25s var(--mo-ease), box-shadow .25s var(--mo-ease), border-color .25s; }
  .mo-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px color-mix(in srgb, var(--mo-a) 16%, transparent); border-color: color-mix(in srgb, var(--mo-a) 35%, var(--line)); }
  .mo-spot { position: relative; }
  .mo-spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--mo-a) 12%, transparent), transparent 70%); }
  .mo-spot:hover::after { opacity: 1; }

  /* Buttons: a quick shine on hover and a press. */
  .btn.primary, .btn.accent { position: relative; overflow: hidden; isolation: isolate; }
  .btn.primary::after, .btn.accent::after { content: ""; position: absolute; inset: -2px; z-index: -1; pointer-events: none; transform: translateX(-120%) skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); }
  .btn.primary:hover::after, .btn.accent:hover::after { transform: translateX(120%) skewX(-18deg); transition: transform .7s var(--mo-ease); }
  .btn:active { transform: scale(.97); }
  .top { transition: box-shadow .25s, background .25s; }
  .top.mo-scrolled { box-shadow: 0 8px 24px rgba(15, 15, 30, .08); }
  .faq details[open] > :not(summary), details.mo-open > :not(summary) { animation: mo-up .35s var(--mo-ease) both; }

  /* Reading progress on guides (scroll-linked, where supported). */
  .mo-read { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 40; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--mo-a), var(--mo-b)); pointer-events: none; }
  @supports (animation-timeline: scroll()) { .mo-read { animation: mo-grow linear both; animation-timeline: scroll(root); } }

  /* Each app's signature touch. */
  .typing { display: inline-flex; gap: 5px; width: auto !important; justify-self: start; padding: 14px 16px !important; }
  .typing span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; animation: jp-type-mo 1.1s ease-in-out infinite; }
  .typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
  .mo-wait { display: none !important; } .mo-show { animation: mo-up .5s var(--mo-ease) both; }
  .bubble b.you { animation: mo-glow 2.4s 3.2s ease-in-out 3; }
  .mo-star { display: inline-block; animation: mo-twinkle 2.8s ease-in-out infinite; } .mo-star:nth-child(2) { animation-delay: .15s; } .mo-star:nth-child(3) { animation-delay: .3s; } .mo-star:nth-child(4) { animation-delay: .45s; } .mo-star:nth-child(5) { animation-delay: .6s; }
  .mo-caret::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.15em; background: currentColor; animation: mo-blink 1s steps(1) infinite; }
  .chip input:checked + span { animation: mo-pop .32s cubic-bezier(.3, 1.6, .5, 1); }
  .app-paywatch .hero { animation: mo-pan-pw 40s linear infinite; } .app-mailsafe .hero { animation: mo-pan-ms 30s linear infinite; } .app-tendermatch .hero { animation: mo-pan-tm 30s linear infinite; }
  .verdict-demo .vd { display: inline-block; animation: mo-pulse 2.4s 1.4s ease-in-out infinite; }
  .kicker .dot { animation: mo-ring 2s ease-out infinite; }
  .cc-list .tick { transition: background .3s, transform .3s; }
  .cc-list li.mo-ticked .tick { background: var(--green); transform: scale(1.1); }
  .cc-list li.mo-ticked .tick::after { content: ""; display: block; width: 4px; height: 7px; margin: 0 0 0 3px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
  .stamp { animation: mo-stamp .7s cubic-bezier(.3, 1.6, .5, 1) both; }
  .num, .checks5 .n { transition: transform .3s var(--mo-ease); } .mo-card:hover .num, .mo-card:hover .n { transform: scale(1.12) rotate(-6deg); }
}

@keyframes mo-up { from { opacity: 0; transform: translateY(20px); } }
@keyframes mo-left { from { opacity: 0; transform: translateX(-14px); } }
@keyframes mo-card { from { opacity: 0; transform: translateY(34px) rotateX(8deg) scale(.96); } }
@keyframes mo-land { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes mo-pop { 0% { transform: scale(.5); } 100% { transform: scale(1); } }
@keyframes mo-fade-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes mo-fade-out { to { opacity: 0; } }
@keyframes mo-shimmer { to { background-position: 100% 0; } }
@keyframes mo-mark { from { background-size: 0 100%; } }
@keyframes mo-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vmax, 4vmax) scale(1.12); } 100% { transform: translate(-4vmax, 7vmax) scale(.94); } }
@keyframes mo-grow { to { transform: scaleX(1); } }
@keyframes jp-type-mo { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes mo-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--mo-b) 35%, transparent); } }
@keyframes mo-twinkle { 0%, 70%, 100% { transform: scale(1); opacity: 1; } 80% { transform: scale(1.35) rotate(12deg); opacity: .8; } }
@keyframes mo-blink { 50% { opacity: 0; } }
@keyframes mo-pan-pw { to { background-position: 120px 0, 0 0; } }
@keyframes mo-pan-ms { to { background-position: 0 64px, 64px 0, 0 0; } }
@keyframes mo-pan-tm { to { background-position: 0 72px, 0 0; } }
@keyframes mo-pulse { 50% { transform: scale(1.06); } }
@keyframes mo-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green, var(--mo-a)) 45%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
@keyframes mo-stamp { from { opacity: 0; transform: rotate(-30deg) scale(1.6); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
