/* Card motion: a calm entrance sequence, a living header and scroll reveals.
   Everything is transform / opacity only (cheap on phones) and switched off for visitors who ask for reduced motion.
   The html.vp-motion class is added by motion.js, so without JavaScript the card simply shows as designed. */

@keyframes vp-rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes vp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vp-pop { 0% { opacity: 0; transform: scale(.55); } 60% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes vp-dock { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes vp-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes vp-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes vp-pan { from { background-position: 50% 30%; } to { background-position: 50% 70%; } }
@keyframes vp-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 18px color-mix(in srgb, var(--accent) 0%, transparent); } }
@keyframes vp-sheen { 0% { transform: translateX(-120%) skewX(-18deg); } 55%, 100% { transform: translateX(260%) skewX(-18deg); } }
@keyframes vp-spin { to { transform: rotate(360deg); } }
@keyframes vp-drift-a { 0% { transform: translate3d(-8%, -6%, 0) scale(1); } 50% { transform: translate3d(10%, 8%, 0) scale(1.18); } 100% { transform: translate3d(-8%, -6%, 0) scale(1); } }
@keyframes vp-drift-b { 0% { transform: translate3d(12%, 6%, 0) scale(1.1); } 50% { transform: translate3d(-10%, -8%, 0) scale(.95); } 100% { transform: translate3d(12%, 6%, 0) scale(1.1); } }
@keyframes vp-reveal-line { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: no-preference) {
  /* ---- entrance sequence (all templates) ---- */
  html.vp-motion .profile-wrap { animation: vp-pop .75s cubic-bezier(.2, .9, .3, 1.15) .05s both; }
  html.vp-motion .qr-block { animation: vp-rise .6s ease .45s both; }
  html.vp-motion .identity .brand { animation: vp-rise .65s cubic-bezier(.2, .8, .2, 1) .2s both; }
  html.vp-motion .identity .tagline { animation: vp-rise .65s cubic-bezier(.2, .8, .2, 1) .3s both; }
  html.vp-motion .identity .location { animation: vp-rise .65s cubic-bezier(.2, .8, .2, 1) .38s both; }
  html.vp-motion .contacts .contact-item { animation: vp-rise .55s cubic-bezier(.2, .8, .2, 1) both; }
  html.vp-motion .contacts .contact-item:nth-child(1) { animation-delay: .42s; }
  html.vp-motion .contacts .contact-item:nth-child(2) { animation-delay: .5s; }
  html.vp-motion .contacts .contact-item:nth-child(3) { animation-delay: .58s; }
  html.vp-motion .contacts .contact-item:nth-child(4) { animation-delay: .66s; }
  html.vp-motion .contacts .contact-item:nth-child(n+5) { animation-delay: .74s; }
  html.vp-motion .add-contact-wrap, html.vp-motion .smart-connect-wrap { animation: vp-rise .55s cubic-bezier(.2, .8, .2, 1) .78s both; }
  html.vp-motion .smart-connect-wrap { animation-delay: .86s; }
  html.vp-motion .socials a { animation: vp-pop .5s cubic-bezier(.2, .9, .3, 1.15) both; }
  html.vp-motion .socials a:nth-child(1) { animation-delay: .95s; }
  html.vp-motion .socials a:nth-child(2) { animation-delay: 1.02s; }
  html.vp-motion .socials a:nth-child(3) { animation-delay: 1.09s; }
  html.vp-motion .socials a:nth-child(n+4) { animation-delay: 1.16s; }
  html.vp-motion .section-nav { animation: vp-fade .6s ease 1.1s both; }
  html.vp-motion .fixed-cta { animation: vp-dock .6s cubic-bezier(.2, .8, .2, 1) 1.2s both; }

  /* ---- living header: the cover drifts slowly, the Smart Connect button gets a soft sheen ---- */
  html.vp-motion .cover { animation: vp-pan 22s ease-in-out infinite alternate; background-size: cover; }
  html.vp-motion .smart-connect-btn { position: relative; overflow: hidden; }
  html.vp-motion .smart-connect-btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); transform: translateX(-120%) skewX(-18deg); animation: vp-sheen 5.5s ease-in-out 2.2s infinite; }
  html.vp-motion .add-contact-btn { transition: transform .18s ease, filter .18s ease; }
  html.vp-motion .add-contact-btn:active, html.vp-motion .smart-connect-btn:active, html.vp-motion .fixed-cta-btn:active { transform: scale(.97); }

  /* ---- scroll reveals (classes added by motion.js only for blocks below the fold) ---- */
  html.vp-motion .vp-rv { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); will-change: opacity, transform; }
  html.vp-motion .vp-rv.vp-in { opacity: 1; transform: none; will-change: auto; }

}

/* the dashboard's live preview shows only the card itself */
body.is-embed .card-chat-dock, body.is-embed .fixed-cta { display: none !important; }
body.is-embed { overflow-x: hidden; }

html:has(body.is-embed) { overflow: hidden; }
