/* ===========================================================================
   statement-field.css — MOTION LAYER 5. The hero statement's glyph field.

   Pairs with js/statement-field.js. Loaded BEFORE motion.css, which stays
   last because it owns the other four layers.

   ---------------------------------------------------------------------------
   WHAT THIS IS

   The hero statement is split into two- and three-character clusters. While a
   fine pointer is inside the hero, each cluster leans a few pixels toward the
   cursor, grows fractionally, and comes up to full strength — while every
   cluster away from the cursor recedes. Move the pointer out and the whole
   field returns to rest and the animation loop cancels itself.

   That is all of it. No idle wander, no jitter, no glow. WITH THE POINTER
   STILL, THE PAGE IS STILL — which is the difference between this and the
   screensaver it could easily have become. The showreel sits directly beneath
   the hero and has to be the thing that moves.

   ---------------------------------------------------------------------------
   THERE IS ALMOST NOTHING IN THIS FILE, AND THAT IS THE DESIGN

   Every per-frame value — transform, opacity — is written inline by the
   script. CSS declaring them too would mean two owners for one property, and
   a transition on `transform` would fight the script's own easing: the script
   lerps toward a target, and a transition would then ease toward the lerped
   value, producing a lag nobody asked for and a second interpolation on every
   frame. So this file sets the BOX and the REST STATE only.

   ---------------------------------------------------------------------------
   TRANSFORM OWNERSHIP — see the motion.css header for the full table

     .panel--hero .panel__inner   scroll departure       (layer 3, CSS)
     .statement                   NO transform           (deliberate)
     .word                        entrance rise + fade   (layer 1, reveal.js)
     .statement__cluster          the field              (layer 5, THIS)

   Four levels, one property each. Do not add a fifth without checking that
   table — an animation beats a transition on the same property, silently, and
   this project has already lost an hour to exactly that.

   ---------------------------------------------------------------------------
   FAIL-VISIBLE — DO NOT INVERT THIS

   `js-field` is added to <html> by the script AFTER every cluster is in
   place. Nothing here hides, dims or shrinks anything without that class, and
   the resting state under it is identical to the page without it. Delete the
   class in devtools and every cluster computes to `opacity: 1` and
   `transform: none` — that is the assertion, and it is cheap to re-run.

   The script also returns before touching the DOM under reduced motion or a
   coarse pointer, so on a phone this file styles nothing that exists.
   =========================================================================== */

/* The cluster box.

   inline-block is REQUIRED, not stylistic: transforms do not apply to
   non-replaced inline boxes, so an inline cluster would silently ignore every
   translate the script writes. It is also what stops a word breaking across
   lines mid-cluster — the browser can only break at the real space text nodes
   reveal.js left between words, which is the behaviour the unsplit sentence
   had.

   THE COST, AND WHY IT IS ACCEPTABLE. inline-block drops the kerning pair at
   each cluster seam. Measured on this sentence at 360/768/1280/1920px: line
   count, line-break positions and rendered height all unchanged. If a future
   type change makes that stop being true, the effect goes before the
   typography does. */
.js-field .statement__cluster {
  display: inline-block;

  /* No transition — the script's per-frame lerp IS the easing. See the header.

     No will-change either. There are ~75 of these; hinting them all would ask
     the compositor for ~75 layers to save work that measures well under a
     millisecond a frame, and toggling the hint per cluster costs more than it
     saves. Layerisation is left to the browser. */
}

/* Belt and braces. The script never runs under either of these conditions, so
   `js-field` should never be on the page here at all — but if it arrives by
   some other route, this guarantees the statement is left exactly as it was.
   Same shape as the reduced-motion guard on the ticker in base.css. */
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .js-field .statement__cluster {
    transform: none !important;
    opacity: 1 !important;
  }
}
