/* Mielovia section flow 1.1.0 — blends between dark sections, a honey thread wherever a light section meets another */

/* the room on screen becomes its own stacking context, so the layers sit behind its sections */
.mlv-flow-on{isolation:isolate}
.mlv-flow{position:absolute;inset:0;z-index:-9;pointer-events:none;overflow:hidden;contain:strict}
.mlv-flow-layer{position:absolute;left:0;right:0}

/* sections hand their background to the layers */
.mlv-flow-src{background-color:transparent!important;background-image:none!important}
.mlv-flow-nb{border-top-color:transparent!important;border-bottom-color:transparent!important}
.mlv-flow-rel{position:relative}

/* light on blended seams */
.mlv-flow-seam{position:absolute;left:0;width:100%;height:0}
.mlv-flow-glow{position:absolute;border-radius:50%;mix-blend-mode:screen}
.mlv-flow-mote{position:absolute;display:block;width:var(--s);height:var(--s);margin:calc(var(--s) / -2) 0 0 calc(var(--s) / -2);border-radius:50%;background:radial-gradient(circle,#fff5dc 0,#f2bb5e 40%,rgba(242,187,94,0) 72%);opacity:var(--o);mix-blend-mode:screen;animation:mlv-flow-twinkle var(--tw) ease-in-out var(--dl) infinite alternate,mlv-flow-sway var(--sd) ease-in-out var(--dl) infinite alternate;animation-play-state:paused}
.mlv-flow-seam.is-live>*{will-change:transform}
.mlv-flow-seam.is-live>.mlv-flow-mote{animation-play-state:running}
@keyframes mlv-flow-twinkle{from{opacity:calc(var(--o) * .3)}to{opacity:var(--o)}}
@keyframes mlv-flow-sway{from{translate:0 0}to{translate:var(--sx) -16px}}

/* fades over pinned stages and 3D canvases */
.mlv-flow-veil{position:absolute;z-index:4;pointer-events:none}
.mlv-flow-veil.mlv-flow-veil-cv{z-index:auto}

/* full-size overlays drawn as ::before / ::after fade with their photo */
.mlv-flow-pm::before,.mlv-flow-pm::after{-webkit-mask-image:var(--mlv-pmask);mask-image:var(--mlv-pmask)}

/* the honey thread: last in the room, above its sections (no z-index, so its halo blends with them) */
.mlv-flow-over{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.mlv-flow-thread{position:absolute;left:0;right:0;height:0}
.mlv-flow-thread>*{position:absolute;display:block}
/* halo: light, not paint — it glows on the dark side and leaves cream untouched */
.mlv-flow-halo{left:0;right:0;top:-26px;height:52px;background:radial-gradient(50% 50% at 50% 50%,rgba(255,196,96,.42),rgba(255,170,60,.14) 45%,rgba(255,160,50,0) 100%);mix-blend-mode:screen}
/* strand: a glossy rod of honey, bright on the side of the dark section, deep on the side of the light one */
.mlv-flow-strand,.mlv-flow-stream{left:0;right:0;top:-1.5px;height:3px;border-radius:3px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
.mlv-flow-strand{background:linear-gradient(180deg,#ffe7b0 0%,#f7bd52 38%,#dc8a22 72%,#94500f 100%)}
.mlv-flow-strand::after{content:"";position:absolute;left:0;right:0;top:100%;height:4px;background:linear-gradient(180deg,rgba(110,55,10,.28),rgba(110,55,10,0))}
.is-flip>.mlv-flow-strand{background:linear-gradient(0deg,#ffe7b0 0%,#f7bd52 38%,#dc8a22 72%,#94500f 100%)}
.is-flip>.mlv-flow-strand::after{top:auto;bottom:100%;background:linear-gradient(0deg,rgba(110,55,10,.28),rgba(110,55,10,0))}
.is-deep>.mlv-flow-strand{background:linear-gradient(180deg,#f9d58e 0%,#c87818 38%,#8c4a0c 74%,#5a2c06 100%)}
.is-deep>.mlv-flow-halo{opacity:.5}
/* honey flowing along the strand */
.mlv-flow-stream{background:linear-gradient(90deg,rgba(255,246,220,0) 0,rgba(255,246,220,0) 38%,rgba(255,248,226,.75) 50%,rgba(255,246,220,0) 62%,rgba(255,246,220,0) 100%) 0 0/260px 100% repeat-x;opacity:.55;animation:mlv-flow-stream 3.2s linear infinite;animation-play-state:paused}
/* the light that runs along the thread with the scroll */
.mlv-flow-glint{left:0;top:-6px;width:16%;margin-left:-8%;height:12px;background:radial-gradient(50% 50% at 50% 50%,rgba(255,252,238,.95),rgba(255,226,150,.5) 32%,rgba(255,200,100,0) 70%);will-change:transform}
/* drips hanging from the thread, stretching with the scroll; now and then a drop falls */
.mlv-flow-drips{left:0;top:0;overflow:visible}
.mlv-flow-drip{transform-box:fill-box;transform-origin:50% 0;scale:1 var(--mlv-stretch,1);animation:mlv-flow-breathe var(--t) ease-in-out var(--dl) infinite alternate;animation-play-state:paused}
.mlv-flow-fall{width:var(--d);height:calc(var(--d) * 1.2);border-radius:50% 50% 50% 50%/58% 58% 42% 42%;background:radial-gradient(circle at 36% 34%,#fff2c8 0,#f2b04a 36%,#b8661a 100%);opacity:0;animation:mlv-flow-fall var(--t) cubic-bezier(.5,0,.9,.45) var(--dl) infinite;animation-play-state:paused}
.mlv-flow-thread.is-live>.mlv-flow-stream,.mlv-flow-thread.is-live .mlv-flow-drip,.mlv-flow-thread.is-live>.mlv-flow-fall{animation-play-state:running}
@keyframes mlv-flow-stream{to{background-position:260px 0}}
@keyframes mlv-flow-breathe{from{transform:scaleY(.9)}to{transform:scaleY(1.06)}}
@keyframes mlv-flow-fall{0%,76%{opacity:0;transform:translateY(0) scale(.5)}80%{opacity:1;transform:translateY(1px) scale(1)}100%{opacity:0;transform:translateY(var(--fall)) scale(.82)}}
@media (max-width:760px){
  .mlv-flow-halo{top:-18px;height:36px}
  .mlv-flow-strand,.mlv-flow-stream{top:-1px;height:2px}
  .mlv-flow-glint{top:-5px;height:10px;width:30%;margin-left:-15%}
}

/* no rule between the last section and the footer */
.mlv-flow-body .footer{border-top-color:transparent!important}

@media (prefers-reduced-motion:reduce){
  .mlv-flow-mote,.mlv-flow-stream,.mlv-flow-drip{animation:none}
  .mlv-flow-fall{display:none}
}
