/* The control affects only scroll-driven frames; it never starts a timed film. */
.motion-control {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  min-height: 44px;
  max-width: calc(100% - 40px);
  padding: 10px 18px;
  border: 1px solid #d1d1d8;
  border-radius: 100px;
  background: #ffffffed;
  color: #202125;
  box-shadow: 0 2px 12px #20212512;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
}
.motion-control[hidden] { display: none; }
.motion-control[aria-pressed="false"] { border-color: #bd2535; background: #bd2535; color: #fff; }
.motion-control:hover { border-color: #202125; }
.motion-control:focus { outline: 3px solid #245ea8; outline-offset: 4px; }

html.motion-disabled .hero-scene { height: auto; min-height: 0; }
html.motion-disabled .hero-pin { position: relative; height: calc(100vh - var(--header)); height: calc(100svh - var(--header)); min-height: 620px; }
html.motion-disabled .hero-copy-reference { opacity: 1 !important; transform: none !important; }
html.motion-disabled .hero-wash { opacity: .92 !important; }
html.motion-disabled .hero-scroll-cue, html.motion-disabled .sequence-progress { display: none; }
html.motion-disabled .hero-still { opacity: 1 !important; }
html.motion-disabled .hero-media canvas { opacity: 0 !important; }
html.motion-disabled .scroll-film { height: auto; margin-bottom: 25px; }
html.motion-disabled .scroll-film-pin { position: relative; top: 0; height: auto; max-height: none; }
html.motion-disabled .scroll-film canvas, html.motion-disabled .film-progress, html.motion-disabled .film-label { display: none !important; }
html.motion-disabled .scroll-film .film-still { position: relative; height: auto; opacity: 1 !important; }

@media (max-width: 760px) {
  .motion-control { top: 14px; right: 14px; max-width: calc(100% - 28px); padding: 10px 14px; font-size: 14px; }
}
@media print { .motion-control { display: none !important; } }

/* Explicit activation uses the same compact-screen composition as the default. */
@media (max-height: 540px) and (prefers-reduced-motion: reduce) {
  html.motion-enabled { --header: 62px; }
  html.motion-enabled .hero-scene { height: 280vh; height: 280svh; min-height: 0; }
  html.motion-enabled .hero-media canvas, html.motion-enabled .hero-media .hero-still { object-position: 30% 100%; }
  html.motion-enabled .hero-copy-reference h1 { font-size: clamp(32px, 5vw, 54px); }
  html.motion-enabled .hero-copy-reference > p { margin-top: 14px; font-size: 16px; }
  html.motion-enabled .hero-scroll-cue { bottom: 14px; }
}
