/* Home: the yellow pipework line and the sideways first-call-to-close flow.
   The line takes the glowing yellow of the insurer teaser (#F8ED43). It is
   drawn and moved by js/home-rail.js, desktop only; phones keep the stacked
   flow and no line. */
.rail{position:absolute;left:0;top:0;width:100%;pointer-events:none;z-index:1;overflow:visible}
.rail-fix{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}
.rail-fix.rail-page{position:absolute;inset:auto;left:0;top:0;width:100%;overflow:visible}
.rail path,.rail-fix path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.rail .g3,.rail-fix .g3{stroke:rgba(248,237,67,.06);stroke-width:16}
.rail .g2,.rail-fix .g2{stroke:rgba(248,237,67,.14);stroke-width:9}
.rail .g1,.rail-fix .g1{stroke:rgba(248,237,67,.45);stroke-width:4.5}
.rail .core,.rail-fix .core{stroke:#f8ed43;stroke-width:2}
/* light running through the pipe, moved by the scroll */
.rail .flow,.rail-fix .flow{stroke:#fffbe0;stroke-width:2;stroke-dasharray:3 34}
.rail .head,.rail-fix .head{fill:#fffbe0}
.rail .hglow,.rail-fix .hglow{fill:rgba(248,237,67,.28)}
/* over the parchment the pipe is paler, as on the teaser's light pages */
.rail-fix.light .core{stroke:#eedc2a;stroke-width:2.4}
.rail-fix.light .g1{stroke:rgba(238,220,42,.55);stroke-width:6}
.rail-fix.light .g2{stroke:rgba(248,237,67,.3);stroke-width:12}
.rail-fix.light .g3{stroke:rgba(248,237,67,.14);stroke-width:22}
.rail-fix.light .flow{stroke:#fffdf0}
/* a diamond where the pipe meets each step */
.rail .dm{transition:opacity 400ms}
.rail .dm rect{fill:#000;stroke:rgba(248,237,67,.45);stroke-width:1.5}
.rail .dm .dg{fill:rgba(248,237,67,0);stroke:none;transition:fill 400ms}
.rail .dm.lit rect:not(.dg){fill:#f8ed43;stroke:#fffbe0}
.rail .dm.lit .dg{fill:rgba(248,237,67,.22)}

/* the flow pans sideways while it is pinned */
.fl.pan{max-width:none;margin:0;padding:0;position:relative}
.fl.pan .fl-pin{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden}
.fl.pan .fl-head{position:absolute;left:var(--hx,168px);top:18vh;max-width:640px;margin:0;z-index:3}
.fl.pan .fl-row{position:absolute;left:0;top:0;height:100%;display:block;padding:0;will-change:transform}
.fl.pan .fl-wire{display:none}
.fl.pan .fl-node{position:absolute;top:calc(var(--ly,50vh) + 36px);width:var(--pw,420px);background:none;box-shadow:none;padding:0 8px 0 0;border-radius:0}
.fl.pan .fl-node .fx-k{font-size:11px;margin-bottom:16px}
.fl.pan .fl-node b{font-size:clamp(18px,1.8vw,26px);line-height:1.3;margin-bottom:20px}
.fl.pan .fl-node ul{gap:10px}
.fl.pan .fl-node li{font-size:13px;padding-left:16px}
.fl.pan .fl-node li::before{width:5px;height:5px}
.fl.pan .rail{z-index:1}

/* Phones: the hero's hand-over (js/hero-mobile.js) and the pipe out of each
   story scene's symbol (js/home-story.js). Moved and scaled only. */
.mstack{position:fixed;inset:0;z-index:1;pointer-events:none;perspective:1500px;perspective-origin:50% 10%}
.mstack img,.mstack i{position:absolute;left:0;top:0;will-change:transform,opacity;backface-visibility:hidden}
.mstack .m-shade{left:50%;top:85%;width:90vw;height:22vh;transform:translate(-50%,-50%);background:radial-gradient(ellipse 50% 50% at 50% 50%,rgba(23,21,18,.14),transparent 70%)}
.mstack .m-sym{opacity:0}
.mstack .m-trail,.m-out{width:2px;height:1px;transform-origin:50% 0;background:#f8ed43;
  box-shadow:0 0 4px 1px rgba(248,237,67,.45),0 0 12px 4px rgba(248,237,67,.14)}
.mstack .m-trail{height:1px;opacity:0}
.m-out{position:absolute;z-index:2;pointer-events:none;will-change:transform}
@media(min-width:760px),(orientation:landscape) and (max-height:500px){.mstack,.m-out{display:none!important}}
.m-in{z-index:0}

/* Phones: the rail after the story, as plain pieces (home-rail.js, phoneRail) */
.rail-m{position:absolute;left:0;top:0;width:100%;pointer-events:none;z-index:3}   /* above the footer, so the pipe reaches the bottom of the page */
.rail-m .rm-bend{position:absolute;overflow:visible}
.rail-m .rm-bend path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.rail-m .rm-bend .g3{stroke:rgba(248,237,67,.06);stroke-width:16}
.rail-m .rm-bend .g2{stroke:rgba(248,237,67,.14);stroke-width:9}
.rail-m .rm-bend .g1{stroke:rgba(248,237,67,.45);stroke-width:4.5}
.rail-m .rm-bend .core{stroke:#f8ed43;stroke-width:2}
.rail-m .rm-run{position:absolute;width:2px;transform-origin:50% 0;transform:scaleY(0);will-change:transform;background:#f8ed43;
  box-shadow:0 0 4px 1px rgba(248,237,67,.45),0 0 12px 4px rgba(248,237,67,.14)}
.rail-m .rm-dm{position:absolute;width:9px;height:9px;margin:-4.5px 0 0 -4.5px;transform:rotate(45deg);border-radius:1.5px;background:#000;
  border:1.5px solid rgba(248,237,67,.45);transition:background-color 300ms,box-shadow 300ms}
.rail-m .rm-dm.lit{background:#f8ed43;border-color:#fffbe0;box-shadow:0 0 10px rgba(248,237,67,.5)}
/* the end of the phone line: a glowing dot that pops in as the line arrives */
.rm-end{position:absolute;width:0;height:0;z-index:3;pointer-events:none}
.rm-end::before{content:'';position:absolute;left:-6px;top:-6px;width:12px;height:12px;border-radius:50%;background:#fffbe0;
  box-shadow:0 0 0 2px #f8ed43,0 0 14px 4px rgba(248,237,67,.75),0 0 34px 10px rgba(248,237,67,.28);transform:scale(0);opacity:0;
  transition:transform 520ms cubic-bezier(.34,1.56,.64,1),opacity 200ms}
.rm-end b{position:absolute;left:-22px;top:-22px;width:44px;height:44px;border-radius:50%;box-shadow:0 0 0 1.5px rgba(248,237,67,.8);opacity:0;transform:scale(.3)}
.rm-end.lit::before{transform:scale(1);opacity:1}
.rm-end.lit b{animation:rm-ring 1200ms cubic-bezier(.2,.9,.25,1) 80ms both}
@keyframes rm-ring{0%{opacity:.9;transform:scale(.3)}100%{opacity:0;transform:scale(1.6)}}
@media(prefers-reduced-motion:reduce){.rm-end.lit b{animation:none}.rm-end::before{transition:none}}
@media(min-width:760px),(orientation:landscape) and (max-height:500px){.rail-m{display:none!important}}
/* phones: the travelling logo from the hero is the centre of the first wheel */
@media(max-width:759px) and (orientation:portrait),(max-width:759px) and (min-height:501px){.hs1 .hs-mark{opacity:0!important}}
.mstack .m-glow{width:0;height:0;will-change:transform}
.mstack .m-glow b{position:absolute;left:-75px;top:-75px;width:150px;height:150px;border-radius:50%;opacity:0;transform:scale(.4);will-change:transform,opacity;
  background:radial-gradient(closest-side,rgba(255,253,236,1),rgba(248,237,67,.75) 30%,rgba(248,237,67,.22) 60%,rgba(248,237,67,0))}
.mstack .m-glow.pop b{animation:mpop 1100ms cubic-bezier(.2,.9,.25,1) both}
@keyframes mpop{0%{opacity:0;transform:scale(.4)}14%{opacity:1;transform:scale(1.25)}35%{opacity:.85;transform:scale(1.05)}100%{opacity:0;transform:scale(1.5)}}
@media(prefers-reduced-motion:reduce){.mstack .m-glow.pop b{animation:none}}
/* the join: pipe, pop and dot pinned to the page at the top of the story */
.mpin{position:absolute;left:0;top:0;width:0;height:0;z-index:2;pointer-events:none;will-change:transform}
.mpin i{position:absolute;left:0;top:0}
.mpin .m-trail{width:2px;height:1px;transform-origin:50% 0;background:#f8ed43;opacity:0;will-change:transform,opacity;
  box-shadow:0 0 4px 1px rgba(248,237,67,.45),0 0 12px 4px rgba(248,237,67,.14)}
.mpin .m-glow{width:0;height:0}
.mpin .m-glow b{position:absolute;left:-75px;top:-75px;width:150px;height:150px;border-radius:50%;opacity:0;transform:scale(.4);will-change:transform,opacity;
  background:radial-gradient(closest-side,rgba(255,253,236,1),rgba(248,237,67,.75) 30%,rgba(248,237,67,.22) 60%,rgba(248,237,67,0))}
.mpin .m-glow.pop b{animation:mpop 1100ms cubic-bezier(.2,.9,.25,1) both}
.mpin .m-dot{width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:#fffbe0;opacity:0;transform:scale(0);
  box-shadow:0 0 0 2px rgba(248,237,67,.55),0 0 10px 3px rgba(248,237,67,.5);transition:transform 380ms cubic-bezier(.34,1.56,.64,1),opacity 300ms}
.mpin .m-dot.on{opacity:1;transform:scale(1)}
@media(min-width:760px),(orientation:landscape) and (max-height:500px){.mpin{display:none!important}}
@media(prefers-reduced-motion:reduce){.mpin .m-glow.pop b{animation:none}}
/* phones: the hero's logo is the centre of both story scenes */
@media(max-width:759px) and (orientation:portrait),(max-width:759px) and (min-height:501px){.hs2 .hub2{opacity:0!important}}
/* glow drawn into the pipe itself, so stretching it never smears it past its ends */
.mpin .m-trail,.m-out,.rail-m .rm-run{width:20px!important;margin-left:-9px;box-shadow:none!important;
  background:linear-gradient(90deg,rgba(248,237,67,0) 0,rgba(248,237,67,.05) 18%,rgba(248,237,67,.16) 34%,rgba(248,237,67,.5) 44%,#f8ed43 47.5%,#f8ed43 52.5%,rgba(248,237,67,.5) 56%,rgba(248,237,67,.16) 66%,rgba(248,237,67,.05) 82%,rgba(248,237,67,0) 100%)!important}
.mstack .m-still{width:20px;height:1px;margin-left:-9px;transform-origin:50% 0;opacity:0;will-change:transform,opacity;
  background:linear-gradient(90deg,rgba(248,237,67,0) 0,rgba(248,237,67,.05) 18%,rgba(248,237,67,.16) 34%,rgba(248,237,67,.5) 44%,#f8ed43 47.5%,#f8ed43 52.5%,rgba(248,237,67,.5) 56%,rgba(248,237,67,.16) 66%,rgba(248,237,67,.05) 82%,rgba(248,237,67,0) 100%)}
/* phones: one pipe into the logo through both scenes */

/* the glow in the middle of the logo */
.mstack .m-core{width:0;height:0}
.mstack .m-core b{position:absolute;left:-22px;top:-22px;width:44px;height:44px;border-radius:50%;opacity:0;transform:scale(.6);transition:opacity 500ms,transform 500ms cubic-bezier(.34,1.56,.64,1);will-change:transform,opacity;
  background:radial-gradient(closest-side,rgba(255,253,236,.95),rgba(248,237,67,.55) 40%,rgba(248,237,67,0))}
.mstack .m-core.on b{opacity:.75;transform:scale(1)}
.mstack .m-core.pop b{animation:mcore 900ms cubic-bezier(.2,.9,.25,1)}
@keyframes mcore{0%{opacity:.4;transform:scale(.6)}25%{opacity:1;transform:scale(1.7)}100%{opacity:.75;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.mstack .m-core.pop b{animation:none}}
/* every straight pipe has exactly the bend's profile (2px core, 4.5/9/16px glows),
   so the width never changes where pieces meet (Ollie, 6 Nov 2026) */
.mpin .m-trail,.mstack .m-still,.m-out,.rail-m .rm-run{width:20px!important;margin-left:-9px!important;box-shadow:none!important;background:linear-gradient(90deg,rgba(248,237,67,0) 10%,rgba(248,237,67,.06) 10%,rgba(248,237,67,.06) 27.5%,rgba(248,237,67,.19) 27.5%,rgba(248,237,67,.19) 38.75%,rgba(248,237,67,.555) 38.75%,rgba(248,237,67,.555) 45%,#f8ed43 45%,#f8ed43 55%,rgba(248,237,67,.555) 55%,rgba(248,237,67,.555) 61.25%,rgba(248,237,67,.19) 61.25%,rgba(248,237,67,.19) 72.5%,rgba(248,237,67,.06) 72.5%,rgba(248,237,67,.06) 90%,rgba(248,237,67,0) 90%)!important}
/* phones: the pipe passes behind the top circle and its label, cleanly */
@media(max-width:759px) and (orientation:portrait),(max-width:759px) and (min-height:501px){.hs2 .party2 b{background:#000;padding:2px 8px;border-radius:4px}}
/* square ends on the bend so it meets the straight pipes flush (round ends overlapped them) */
.rail-m .rm-bend path{stroke-linecap:butt!important}
