/* Styles for the site motion layer (site-motion.js) and the theme reveal in theme.js on the work pages.
   Home has its own copy of these rules in home.css.
   theme.js adds js-motion only when motion may run, so print, reduced motion, and saved Pause never
   use these rules. */

/* Lenis drives the scroll. Native smooth scrolling would fight it. */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Each split piece is its own box, so it must not repeat the hanging indent of its paragraph. */
:is(.split-line, .split-word, .split-char) { text-indent: 0; }

/* A split line clips its text while it rises. The padding keeps descenders inside the clip. */
.split-line-mask {
  padding-block: .06em .14em;
  margin-block: -.06em -.14em;
}

.js-motion .editorial-home .highlight {
  background-repeat: no-repeat;
  background-position: left;
  background-size: 100% 100%;
}

/* Scroll position, as a green hairline along the top edge. */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 2px;
  background: var(--green);
  transform-origin: left;
  pointer-events: none;
}

/* Motion springs move these controls. A CSS transform transition would lag behind the spring. */
.js-motion :is(.button, .nav-links > a, .all-work, .theme-toggle, .motion-toggle, .brand-mark) {
  transition-property: color, background-color, border-color, text-decoration-color, opacity;
}

/* Theme reveal: the new theme grows in a circle over the old one. Named elements join the root
   snapshot so the header and titles do not fade on their own. */
.theme-transition::view-transition-old(root),
.theme-transition::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

.theme-transition * { view-transition-name: none !important; }

@media print {
  .scroll-progress, .choice-signal { display: none; }
}
