/* Site craft - the two entrance mechanics that belong to every page.

   C0139 line-masked heading reveal and C0140 drawn rules were built on Home
   first. They are lifted here so Platform, Solutions, Industries, Customers,
   Pricing, Trust and Demo get the same entrance language, rather than Home
   being the only page that feels finished.

   Home-only components (the rail, solution card objects, the closing panel,
   hero chips, board tiles) stay in home-craft.css. */

/* ---------- C0139 Line-masked heading reveal -------------------------------
   Mohamed, after Radwan Studio: entrances should be dramatic, 600 to 800ms.
   A fade has no edge to travel past, so the eye reads it as already-there. A
   masked line climbs out from behind a hard edge at full opacity, and the edge
   is what makes the movement legible.

   The heading text is never rewritten: lines are measured from the real
   rendered layout with Range rects, so `text-wrap:balance` still decides where
   they break, and the rebuilt spans carry the identical characters. */

.rv-line{
  display:block;overflow:hidden;
  padding-bottom:.14em;margin-bottom:-.14em;   /* descenders must not be clipped */
}
.rv-line-i{
  display:block;transform:translateY(106%);
  transition:transform 800ms cubic-bezier(.19,1,.22,1) var(--rv-d,0ms);
  will-change:transform;
}
h2[data-home-in="true"] .rv-line-i{transform:translateY(0);will-change:auto}

/* The mask rides C0134's own arrival signal rather than replacing it, so the
   existing guarantee that a heading stays hidden until its chapter enters is
   still the thing driving this. C0134's fade is neutralised on split headings
   only, so the two never animate the same element at once. */
html.home-motion-active h2.h2[data-rv-text][data-home-reveal]{
  opacity:1;transform:none;transition:none;
}

/* ---------- C0140 Rules that draw ------------------------------------------
   The second Radwan mechanic. Hairlines and accent rules scale in from the
   left as their block arrives, so structure assembles rather than appearing. */

[data-draw-rule]{position:relative}
[data-draw-rule]::after{
  content:"";position:absolute;left:0;right:0;top:-1px;height:1px;
  background:var(--line-2);transform:scaleX(0);transform-origin:left center;
  transition:transform 800ms cubic-bezier(.19,1,.22,1);
  pointer-events:none;
}
[data-draw-rule][data-draw-in="true"]::after{transform:scaleX(1)}


@keyframes rule-draw{to{transform:scaleX(1)}}

/* ---------- C0161 Section arrival ------------------------------------------
   C0139 reaches a section only if it carries a splittable H2, C0140 only if it
   carries a hairline grid. Everything else (a statement band, a closing panel,
   an FAQ head, a plain two-column list) arrived already finished, which is
   what made those sections read as inert beside the ones that move.

   So the rows a section has left over rise as each of them reaches the reading
   zone, using C0134's duration, curve and travel so the movement is the same
   movement the homepage established. Travel is vertical only: every lateral
   entrance on this site is capped, because wider ones have produced measured
   horizontal-overflow bugs.

   The armed state is opt-in. Without `html.craft-armed` (JavaScript off,
   blocked, still parsing, or reduced motion) every row renders in its finished
   state, so no rule in this file can leave a section permanently invisible. */

html.craft-armed [data-craft-rise]{
  opacity:0;transform:translate3d(0,18px,0);
  will-change:opacity,transform;
}
html.craft-armed.craft-ready [data-craft-rise]{
  transition:opacity 700ms cubic-bezier(.19,1,.22,1),
             transform 700ms cubic-bezier(.19,1,.22,1);
}
html.craft-armed [data-craft-rise][data-home-in="true"]{
  opacity:1;transform:translate3d(0,0,0);will-change:auto;
}

@media (prefers-reduced-motion:reduce){
  .rv-line{overflow:visible;padding-bottom:0;margin-bottom:0}
  .rv-line-i{transform:none;transition:none}
  [data-draw-rule]::after{transform:scaleX(1);transition:none}
  html.craft-armed [data-craft-rise]{
    opacity:1;transform:none;transition:none;will-change:auto;
  }
}
@media print{
  .rv-line{overflow:visible}
  .rv-line-i{transform:none}
  [data-draw-rule]::after{display:none}
  [data-craft-rise]{opacity:1!important;transform:none!important}
}
