/* NevkaSystems: scroll flow (2026-11-28). The styles for assets/scroll-flow.js: what joins one section to the next
   while the page is being scrolled. Everything here sits under html.flow, which the script sets, so a page without the
   script (or with ?still, ?flow=0, reduced motion) is exactly as it was. */
.flow { --flow-r:clamp(20px, 2.1vw, 32px); }
.flow main > section { position:relative; }

/* the paper sections are one sheet lying over the opening and over the close: it has the page's colour, an edge of tiles
   where it begins and rounded corners where it ends */
.flow .said, .flow .big, .flow .svc, .flow .ways { z-index:1; background:var(--bg); }
.flow .ways { border-radius:0 0 var(--flow-r) var(--flow-r); }
.flow .end { z-index:0; will-change:translate; }
/* the close fills the screen, so the paper lifts right off it; its footer sits at the foot; and it reaches up behind
   the paper's rounded corners, so they stay cut against the dark once the page has come to rest */
.flow .end { min-height:100svh; display:flex; flex-direction:column; }
.flow .end .row { margin-bottom:clamp(90px, 14vh, 150px); }
.flow .end footer { margin-top:auto; }
.flow .end::before { content:""; position:absolute; left:0; right:0; bottom:100%; height:var(--flow-r); background:inherit; }

/* the opening stays behind while the sheet comes up over it: the picture falls back and dims, the words leave with the page */
.flow.reel-on .open { z-index:0; will-change:translate; }
.flow.reel-on .open::after { content:""; position:absolute; inset:0; z-index:1; background:#060607; opacity:var(--flow-dim, 0); pointer-events:none; }
.flow.reel-on .open-copy { z-index:2; will-change:translate, opacity; }
/* the paper's upper edge is a mosaic of tiles (drawn by the script) in the first stretch of the statement's own top
   space: there the section has no colour of its own, the tiles are its colour, and the opening shows between them.
   .fl-skirt is the opening's dark carried on below the picture, so that there is never bare page under the glass */
.flow.reel-on { --fl-band:clamp(190px, 33vh, 300px); }
.flow.reel-on .said { background:linear-gradient(to bottom, transparent calc(var(--fl-band) - 1px), var(--bg) calc(var(--fl-band) - 1px)); }
/* clear paper between the mosaic and the statement (the mosaic used up most of the section's own top space) */
.flow.reel-on .said { padding-top:calc(var(--fl-band) + clamp(140px, 24vh, 240px)); }
.flow .fl-edge { position:absolute; left:0; top:0; width:100%; height:var(--fl-band); overflow:hidden; pointer-events:none; }
.flow .fl-skirt { position:absolute; left:0; top:-80px; width:100%; height:calc(100% + 80px); background:linear-gradient(to bottom, rgba(6,6,7,0), #060607 80px); will-change:translate; }
/* (the canvas runs 2px past the clipped edge, so the edge never falls part-way through its last row of pixels) */
.flow .fl-tiles { position:absolute; left:0; top:0; width:100%; height:calc(100% + 2px); display:block; }

/* one large tile on the statement, showing the negative of what is under it (white, laid on with 'difference') */
.flow .said p[data-reveal] { position:relative; }
.flow .fl-gem { --gem:clamp(250px, 24.5vw, 390px); position:absolute; left:50%; top:50%; width:var(--gem); height:var(--gem); margin:calc(var(--gem) / -2) 0 0 calc(var(--gem) / -2);
  rotate:45deg; border-radius:calc(var(--gem) * .035); background:#fff; mix-blend-mode:difference; pointer-events:none; will-change:translate; }

/* a rule is drawn from the left as its row arrives (--rule, set by the script) */
.flow .cols, .flow .way { border-top-color:transparent; background:linear-gradient(var(--line), var(--line)) no-repeat 0 0 / var(--rule, 100%) 1px; background-origin:border-box; }
.flow .way:last-child { border-bottom-color:transparent;
  background:linear-gradient(var(--line), var(--line)) no-repeat 0 0 / var(--rule, 100%) 1px, linear-gradient(var(--line), var(--line)) no-repeat 0 100% / var(--rule, 100%) 1px; background-origin:border-box; }
.flow .col, .flow .way .r, .flow .big canvas { will-change:translate; }

/* a heading comes up line by line from behind its own baseline */
.flow .fl-line { display:block; overflow:hidden; padding:.07em 0 .13em; margin:-.07em 0 -.13em; }
.flow .fl-line > span { display:block; translate:0 125%; transition:translate 1.15s var(--ease); transition-delay:calc(var(--l) * 95ms); }
.flow .fl-on .fl-line > span, .flow .fl-on.fl-line > span { translate:none; }

/* the close: what follows its heading */
.flow .end .sub, .flow .end .row { opacity:0; translate:0 22px; transition:opacity .9s ease, translate 1.1s var(--ease); }
.flow .end .sub { transition-delay:.24s; }
.flow .end .row { transition-delay:.36s; }
.flow .end.fl-on .sub, .flow .end.fl-on .row { opacity:1; translate:none; }
