/* Berlin Music Tech · motion layer styles (Nov 2026). Works with /motion/motion.js.
   Nothing here hides content unless motion.js is running; reduced motion and print switch it all off. */

/* Hero is held back for a moment so the intro can play; a CSS timer shows it anyway after 2.4 s. */
html.mx-pre main > section:first-of-type :is(h1, h1 ~ *, :has(+ h1)),
html.mx-pre main > section:first-of-type .mt-vis,
html.mx-pre main > section:first-of-type .mt-patchbar {
  visibility: hidden;
  animation: mx-failsafe 0s 2.4s forwards;
}
@keyframes mx-failsafe { to { visibility: visible; } }

/* GSAP takes over the scroll reveals from the CSS ones. */
html.mx .mt-reveal { animation: none !important; }

/* Split headlines: every word sits in a mask and rises into place. */
/* clip-path, not overflow: the mask must not change line height or line breaks by a single pixel. */
.mx-wo { display: inline-block; clip-path: inset(-0.4em -0.3em -0.24em -0.3em); }
.mx-wi { display: inline-block; }

/* Signal strips: the oscilloscope traces that run along the section lines (one thin canvas per line). */
.mx-signal { position: absolute; left: 0; top: 0; z-index: 40; pointer-events: none; display: block; }

/* Level meter: scroll progress as a segmented LED strip at the very top. */
.mx-meter { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 130; pointer-events: none;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 13px);
          mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 13px); }
.mx-meter i { position: absolute; inset: 0; display: block; }
.mx-meter .f { background: linear-gradient(90deg, #14E475 0%, #14E475 55%, #14E4DD 78%, #E41483 100%);
  clip-path: inset(0 100% 0 0); }
.mx-meter .k { right: auto; width: 13px; background: #fff; box-shadow: 0 0 10px #fff; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html.mx-pre main > section:first-of-type * { visibility: visible !important; animation: none !important; }
  .mx-signal, .mx-meter { display: none !important; }
}
@media print {
  .mx-signal, .mx-meter { display: none !important; }
  .mx-wi { transform: none !important; }
  html.mx-pre main * { visibility: visible !important; }
}
