/* Loaded after mobile.css: homepage motion follows the visitor's explicit choice. */
.hero-motion-toggle {
  position: absolute;
  right: 0;
  bottom: 10px;
  z-index: 4;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(163, 218, 239, .3);
  border-radius: 4px;
  background: rgba(3, 14, 22, .78);
  color: #c2dce8;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}
.hero-motion-toggle[hidden] { display: none; }
.hero-motion-toggle:hover { border-color: #7dd9f6; color: #fff; }
.hero-motion-toggle:focus-visible { outline: 2px solid #7dd9f6; outline-offset: 3px; }

.home-page .hero[data-background-motion='on'] .hero-emc-field {
  display: block;
  opacity: .72;
}
.home-page .hero[data-background-motion='on'] .hero-ecg-monitor svg { opacity: .75; }
.home-page .hero[data-background-motion='on'] .hero-device-leds { display: flex; }
.home-page .hero[data-background-motion='on'] .hero-ecg-base { stroke: transparent; }
.home-page .hero[data-background-motion='on'] .hero-ecg-path:not(.hero-ecg-base) {
  display: inline;
  animation: var(--hero-path-animation) 5.3s linear infinite !important;
}
.hero-ecg-fade { --hero-path-animation: hero-ecg-fade; }
.hero-ecg-afterglow { --hero-path-animation: hero-ecg-afterglow; }
.hero-ecg-trail-soft { --hero-path-animation: hero-ecg-trail-soft; }
.hero-ecg-trail { --hero-path-animation: hero-ecg-trail; }
.hero-ecg-live { --hero-path-animation: hero-ecg-live; }
.home-page .hero[data-background-motion='on'] .hero-device-led-sys {
  animation: hero-device-sys-led 1.8s cubic-bezier(.4, 0, .2, 1) infinite !important;
}
.home-page .hero[data-background-motion='off'] .hero-ecg-path:not(.hero-ecg-base) {
  animation: none !important;
  display: none;
}
.home-page .hero[data-background-motion='off'] .hero-ecg-base { stroke: rgba(94, 208, 247, .12); }
.home-page .hero[data-background-motion='off'] .hero-device-led-sys {
  animation: none !important;
  opacity: .72;
}

/* Keep the original three-line sequence, including narrow desktop windows.
   Explicit opt-in also overrides reduced-motion's static text rules. */
.home-page .hero[data-motion-available='true'] .hero-story-sequence { display: grid; }
.home-page .hero[data-background-motion='on'] .hero-flow-line {
  opacity: 0 !important;
  filter: blur(4px) !important;
  transform: translateX(-10px) !important;
  transition: none !important;
}
.home-page .hero[data-background-motion='on'] .hero-flow-line.is-visible {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: opacity .52s ease, filter .7s ease, transform .72s cubic-bezier(.16,1,.3,1) !important;
}
.home-page .hero[data-background-motion='on'] .hero-story-summary :is(strong, span) {
  opacity: 0 !important;
  filter: blur(2px) !important;
  transform: translateY(7px) !important;
  transition: none !important;
}
.home-page .hero[data-background-motion='on'] .hero-story-summary.is-visible :is(strong, span) {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: opacity .56s ease, filter .68s ease, transform .72s cubic-bezier(.16,1,.3,1) !important;
}
.home-page .hero[data-background-motion='on'] .hero-story-summary.is-visible span { transition-delay: .16s !important; }
.home-page .hero[data-background-motion='on'] .hero-story-summary::before {
  opacity: 0;
  transform: scaleY(0);
  transition: none;
}
.home-page .hero[data-background-motion='on'] .hero-story-summary.is-visible::before {
  opacity: 1;
  transform: scaleY(1);
  transition: opacity .38s ease, transform .78s cubic-bezier(.16,1,.3,1);
}
.home-page .hero[data-background-motion='off'] .hero-flow-line,
.home-page .hero[data-background-motion='off'] .hero-story-summary :is(strong, span),
.home-page .hero[data-background-motion='off'] .hero-story-summary::before {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: none !important;
}
