/* Motion-only enhancement. Copy, typography, media and component layout are retained. */
html.health-motion-ready [data-motion-item="true"] {
  --motion-entry-x: -188px;
  opacity: 0;
  translate: none !important;
  transform: translate3d(var(--motion-entry-x),0,0) !important;
  transition-property: opacity,transform,border-color !important;
  transition-duration: 320ms,var(--motion-entry-duration,980ms),350ms !important;
  transition-timing-function: ease,cubic-bezier(.22,.65,.26,1),ease !important;
  transition-delay: var(--motion-entry-delay,0ms) !important;
}
html.health-motion-ready [data-motion-kind="container"] { --motion-entry-x: -112px; }
html.health-motion-ready [data-motion-item="true"][data-motion-direction="right"] { --motion-entry-x: 188px; }
html.health-motion-ready [data-motion-kind="container"][data-motion-direction="right"] { --motion-entry-x: 112px; }
html.health-motion-ready [data-motion-item="true"][data-motion-state="pending"] { transition: none !important; will-change: auto; }
html.health-motion-ready [data-motion-item="true"][data-motion-state="entering"],
html.health-motion-ready [data-motion-item="true"][data-motion-state="shown"] {
  opacity: 1;
  transform: translate3d(0,0,0) !important;
}
html.health-motion-ready [data-motion-item="true"][data-motion-state="entering"] { will-change: transform,opacity; }
html.health-motion-ready [data-motion-item="true"][data-motion-state="shown"] { will-change: auto; }
html.health-motion-ready [data-motion-item="true"][data-motion-instant="true"] { transition: none !important; }
html.health-motion-ready [data-motion-kind="card"] {
  animation: motionCardGlow 6s ease-in-out var(--breath-delay,0s) infinite;
}
html.health-motion-ready [data-motion-kind="card"][data-health-in-view="false"] { animation-play-state: paused !important; }
@keyframes motionCardGlow {
  0%,100% { box-shadow: 0 0 0 rgba(214,178,94,0); }
  50% { box-shadow: 0 4px 26px rgba(214,178,94,.11),inset 0 1px 0 rgba(241,217,138,.28); }
}

/* Continuous short rules and full-width dividers share one soft gold pulse. */
#root [data-motion-line="short"],
#root .health-section::before {
  height: 1px;
  background: linear-gradient(90deg,#b98c34,#ffe6a1 50%,#d6b25e) !important;
  animation: motionGoldPulse 4.2s ease-in-out infinite !important;
  filter: none !important;
}
#root [data-motion-line="short"] { transform: translate3d(var(--gold-short-drift,0px),0,0); }
#root .health-section::before { transform: translate3d(var(--gold-drift,0px),0,0); }
#root .health-section[data-direction="right"]::before { transform: translate3d(calc(-1 * var(--gold-drift,0px)),0,0); }
#root [data-direction="right"] [data-motion-line="short"] { transform: translate3d(calc(-1 * var(--gold-short-drift,0px)),0,0); }
#root [data-motion-border] { position: relative; }
#root [data-motion-border]::after {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 1px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg,#b98c34,#ffe6a1 50%,#d6b25e);
  animation: motionGoldPulse 4.2s ease-in-out infinite !important;
}
#root [data-motion-border="bottom"]::after { top: auto; bottom: -1px; }
@keyframes motionGoldPulse {
  0%,100% { opacity: .22; box-shadow: 0 0 2px rgba(214,178,94,.18); }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(255,221,133,.9),0 0 15px rgba(214,178,94,.3); }
}
#root [data-motion-border][data-motion-in-view="false"]::after,
#root .health-section:not(.health-in-view)::before,
#root .health-section:not(.health-in-view) [data-motion-line="short"] { animation-play-state: paused !important; }

/* Keep the existing floating button dimensions and links. */
#root #floating-whatsapp-btn {
  background: #25d366 !important;
  color: #fff !important;
  box-shadow: 0 6px 24px rgba(10,92,47,.4),0 0 16px rgba(37,211,102,.27);
}
#root #floating-whatsapp-btn::before,
#root #floating-whatsapp-btn::after {
  border: 3px solid #25d366;
  animation: motionWhatsAppRing 2s ease-out infinite !important;
}
#root #floating-whatsapp-btn::after { animation-delay: 1s !important; }
#root #floating-whatsapp-btn > span { border-color: rgba(80,243,140,.55); }
@keyframes motionWhatsAppRing {
  0% { opacity: 1; transform: scale(.96); box-shadow: 0 0 8px rgba(37,211,102,.65); }
  75% { opacity: .2; transform: scale(1.9); box-shadow: 0 0 12px rgba(37,211,102,.18); }
  100% { opacity: 0; transform: scale(2.1); box-shadow: 0 0 0 rgba(37,211,102,0); }
}

/* A stopped page always leaves all content readable. */
html[data-motion-paused="true"].health-motion-ready [data-motion-item="true"] {
  opacity: 1 !important;
  translate: none !important;
  transform: none !important;
  transition: none !important;
  animation-play-state: paused !important;
}
html[data-motion-paused="true"] #root [data-motion-line="short"],
html[data-motion-paused="true"] #root .health-section::before,
html[data-motion-paused="true"] #root [data-motion-border]::after,
html[data-motion-paused="true"] #root #floating-whatsapp-btn::before,
html[data-motion-paused="true"] #root #floating-whatsapp-btn::after {
  animation-play-state: paused !important;
}
html[data-motion-paused="true"] #root [data-motion-line="short"],
html[data-motion-paused="true"] #root .health-section::before { transform: none !important; }
html:not(.health-motion-ready) [data-motion-item="true"] { opacity: 1 !important; transform: none !important; }

@media(max-width:767px) {
  html.health-motion-ready [data-motion-item="true"] { --motion-entry-x: -122px; }
  html.health-motion-ready [data-motion-item="true"][data-motion-direction="right"] { --motion-entry-x: 122px; }
  html.health-motion-ready [data-motion-kind="container"] { --motion-entry-x: -76px; }
  html.health-motion-ready [data-motion-kind="container"][data-motion-direction="right"] { --motion-entry-x: 76px; }
  /* The mobile hero's photo, copy and CTAs remain fully visible and still. */
  #root #hero,
  #root #hero .hero-enter-1,#root #hero .hero-enter-2,#root #hero .hero-enter-3,
  #root #hero .hero-enter-4,#root #hero .hero-enter-5,#root #hero .hero-enter-photo {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  #root #hero [data-motion-item="true"] { opacity: 1 !important; transform: none !important; }
  #root #hero[data-motion-border]::after { display: none; }
}
@media(prefers-reduced-motion:reduce) {
  html:not([data-motion-override="true"]) #root [data-motion-item="true"] {
    opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important;
  }
  html:not([data-motion-override="true"]) #root [data-motion-line="short"],
  html:not([data-motion-override="true"]) #root .health-section::before,
  html:not([data-motion-override="true"]) #root [data-motion-border]::after,
  html:not([data-motion-override="true"]) #root #floating-whatsapp-btn::before,
  html:not([data-motion-override="true"]) #root #floating-whatsapp-btn::after { animation: none !important; transform: none !important; }
  /* An explicit press on Retomar can opt in, as in the retained video controller. */
  html[data-motion-override="true"].health-motion-ready #root [data-motion-item="true"] {
    opacity: 0 !important;
    transform: translate3d(var(--motion-entry-x),0,0) !important;
    transition-property: opacity,transform,border-color !important;
    transition-duration: 320ms,var(--motion-entry-duration,980ms),350ms !important;
    transition-timing-function: ease,cubic-bezier(.22,.65,.26,1),ease !important;
    transition-delay: var(--motion-entry-delay,0ms) !important;
  }
  html[data-motion-override="true"].health-motion-ready #root [data-motion-item="true"][data-motion-state="entering"],
  html[data-motion-override="true"].health-motion-ready #root [data-motion-item="true"][data-motion-state="shown"] { opacity: 1 !important; transform: none !important; }
  html[data-motion-override="true"].health-motion-ready #root [data-motion-item="true"][data-motion-instant="true"] { transition: none !important; }
  html[data-motion-override="true"].health-motion-ready #root [data-motion-item="true"][data-motion-state="pending"] { transition: none !important; }
  html[data-motion-override="true"] #root [data-motion-kind="card"] { animation: motionCardGlow 6s ease-in-out infinite !important; }
  html[data-motion-override="true"] #root [data-motion-line="short"],
  html[data-motion-override="true"] #root .health-section::before,
  html[data-motion-override="true"] #root [data-motion-border]::after { animation: motionGoldPulse 4.2s ease-in-out infinite !important; }
  html[data-motion-override="true"] #root #floating-whatsapp-btn::before,
  html[data-motion-override="true"] #root #floating-whatsapp-btn::after { animation: motionWhatsAppRing 2s ease-out infinite !important; }
  html[data-motion-override="true"] #root #floating-whatsapp-btn::after { animation-delay: 1s !important; }
}
