/**
 * DevQ Motion: first-paint states for devq-motion.js.
 *
 * html.devq-motion is added in <head> only when motion is allowed, and comes
 * off again if devq-motion.js never starts, so without it the page is static.
 */

/* Reveal targets wait, hidden, for their entrance. transition: none stops any
   AOS CSS a theme has bundled into its own stylesheet from fighting GSAP;
   the attribute is removed once the entrance ends, which frees hover again. */
.devq-motion [data-aos] {
  opacity: 0;
  visibility: hidden;
  transition: none !important;
}

/* SplitText lines. Display faces are often set tighter than their glyphs, so
   a mask the size of the line box cuts off descenders (g, y, p) and tall
   accents: grow the clip area and pull it back so the layout doesn't move. */
.dm-line {
  display: block;
  will-change: transform;
}

.dm-line-mask {
  position: relative;
  top: -0.1em;
  padding: 0.1em 0 0.24em;
  margin: 0 0 -0.34em;
}

/* Why not margin: -0.1em 0 -0.24em: adjacent negative margins collapse to the
   most negative one, not their sum, so every line break gained 0.1em and split
   headings grew ~3px a line (thedevq.com, 2026-11-02). One margin per mask plus
   a relative offset can't collapse. The heading becomes a BFC (when it is a
   plain block) so the last mask's margin can't collapse through its bottom
   margin either. */
.dm-split {
  display: flow-root;
}

/* The hero text lifts on `translate`, leaving `transform` to its entrance. */
[data-dm-lift] {
  translate: 0 var(--dm-lift, 0px);
}

@media (prefers-reduced-motion: reduce) {
  .devq-motion [data-aos] {
    opacity: 1;
    visibility: visible;
  }
}
