/*
 * Interior-page motion pre-states (inc/inner-motion.php, gw-inner-motion.js).
 * html.gw-im is set from wp_head before paint and only when motion is allowed; every hidden
 * state also sits inside prefers-reduced-motion: no-preference, so reduced motion, no JS and a
 * failed engine all render the complete static page.
 * .gw-in = revealed (the pre-hide must not re-apply once a tween clears its inline props).
 * [data-gw-im-owned] = a page module in assets/js/motion/ conducts this node itself.
 */
@media (prefers-reduced-motion: no-preference) {
  html.gw-im [data-gw-reveal]:not(.gw-in):not([data-gw-im-owned]) { opacity: 0; transform: translate3d(0, 40px, 0); }
  html.gw-im [data-gw-reveal="mask"]:not(.gw-in):not([data-gw-im-owned]) { transform: none; clip-path: inset(10% 6% 10% 6%); }
  html.gw-im [data-gw-reveal="marker"]:not(.gw-in):not([data-gw-im-owned]) { opacity: 0; transform: scale(0.6); }
  /* Module-conducted nodes that must not flash before their module runs. */
  html.gw-im [data-gw-im-hide]:not(.gw-in) { opacity: 0; }
  /* Hero entrances (api.curtain): header chrome drops in with the hero tail. */
  html.gw-im .gw-header__pill:not(.gw-in), html.gw-im .gw-header__lockup:not(.gw-in) { opacity: 0; }
}

/* Entrance layers: injected by JS only, removed when the entrance ends. The host is the hero
   stage / inner wrapper, never transformed; it clips only while a layer is in it. */
.gw-im-host { overflow: clip !important; }
.gw-im-host--rel { position: relative; }
.gw-im-veil { position: absolute; inset: 0; z-index: 6; pointer-events: none; will-change: transform; }
.gw-im-veil { background: var(--gw-im-veil); }
.gw-im-veil__edge { position: absolute; left: 0; top: 100%; width: 100%; height: 11vw; overflow: visible; display: block; }
.gw-im-veil__fill { fill: var(--gw-im-veil); }
.gw-im-veil__line { fill: none; stroke: var(--gw-citron-400); stroke-width: 6; vector-effect: non-scaling-stroke; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Authored heading lines rise through a mask (same recipe as Home: the flex column keeps the
   negative margins from collapsing, so the line pitch stays the token line-height). */
.gw-line-mask { display: block; overflow: clip; padding-block: .22em; margin-block: -.22em; }
:is(h1, h2, h3, h4):has(> .gw-line-mask) { display: flex; flex-direction: column; }
.gw-line-rise { display: block; transform-origin: left bottom; }
/* Parallax float layer: the outer anchor keeps its layout box, only this moves. */
.gw-im-float { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  .gw-line-rise, .gw-im-float { transform: none !important; }
}
