/* Agile Records - Controlled Flow motion - agile-motion.css
   Everything is scoped to .af-hero / .af-flow / .af-reveal. */

/* Hero and CTA containers (Elementor: Advanced > CSS Classes = af-hero / af-cta) */
.af-hero, .af-cta{ position: relative; isolation: isolate; }

/* Hero and CTA linework layers */
.af-flow[data-af-flow="hero"], .af-flow[data-af-flow="cta"]{
  --af-line-1: #F4F7FA;   /* white lines */
  --af-line-2: #B8C4D0;   /* silver lines */
  --af-line-3: #6F86A0;   /* blue-grey lines */
  --af-node:   #E9EEF3;   /* white nodes */
  --af-accent: #4CC98F;   /* green nodes, matches the mockup green */
  --af-stroke: 1px;       /* base hairline; lines use 0.55x to 1.35x of this */
  --af-fade-from: 34%;    /* lines are invisible left of this... */
  --af-fade-to:   54%;    /* ...and fully visible right of this (keeps the headline clean) */
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none; user-select: none; overflow: hidden; contain: strict;
  -webkit-mask-image: linear-gradient(90deg, transparent var(--af-fade-from), #000 var(--af-fade-to));
          mask-image: linear-gradient(90deg, transparent var(--af-fade-from), #000 var(--af-fade-to));
}
.af-flow > .af-flow__svg{ position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; overflow: visible; }
.af-flow path{ fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.af-flow .af-l1{ stroke: var(--af-line-1); }
.af-flow .af-l2{ stroke: var(--af-line-2); }
.af-flow .af-l3{ stroke: var(--af-line-3); }
.af-flow .af-w1{ stroke-width: calc(var(--af-stroke) * .55); }
.af-flow .af-w2{ stroke-width: calc(var(--af-stroke) * .8); }
.af-flow .af-w3{ stroke-width: calc(var(--af-stroke) * 1.05); }
.af-flow .af-w4{ stroke-width: calc(var(--af-stroke) * 1.35); }
.af-flow .af-n{ fill: var(--af-node); fill-opacity: .85; }
.af-flow .af-a, .af-flow .af-m{ fill: var(--af-accent); }

/* Elementor editor: the HTML widget is stretched behind the hero, so keep it out of the way */
.elementor-editor-active .af-hero > .elementor-widget-html:has(.af-flow),
.elementor-editor-active .af-hero .elementor-widget-html:has(> .elementor-widget-container > .af-flow){ pointer-events: none; }

/* Hero copy entrance. Hidden only when the motion script is expected to run (html.af-js is set
   in <head>), with a CSS failsafe that reveals it after 3s if the script never arrives. */
.af-js .af-hero .af-reveal{ opacity: 0; animation: af-failsafe 0s linear 3s forwards; }
@keyframes af-failsafe{ to{ opacity: 1; } }

/* Tablet and mobile: the linework sits in a band beneath the content, so no left-side fade */
/* CTA: the lines start just right of the copy */
.af-flow[data-af-flow="cta"]{ --af-fade-from: 38%; --af-fade-to: 56%; }

@media (max-width: 1024px){ .af-flow[data-af-flow="hero"], .af-flow[data-af-flow="cta"]{ --af-fade-from: 0%; --af-fade-to: 22%; } }
@media (max-width: 767px){ .af-flow[data-af-flow="hero"], .af-flow[data-af-flow="cta"]{ --af-fade-from: 0%; --af-fade-to: 14%; opacity: .85; } }

@media (prefers-reduced-motion: reduce){ .af-js .af-hero .af-reveal{ opacity: 1; animation: none; } }

/* ===== Component 2: workflow current (section class af-workflow, stages af-stage) ===== */
.af-workflow{ position: relative; isolation: isolate; }
.af-workflow .af-flow[data-af-flow="workflow"]{
  --af-wf-line: #8D9AA7;    /* background lines */
  --af-wf-main: #5D6B79;    /* the main current, before it lights */
  --af-wf-node: #0B1B2B;    /* stage nodes, before they light */
  --af-wf-green: #2FA772;   /* lit current, nodes and stems (darker than the hero green for contrast on light) */
  --af-wf-bead: #4CC98F;    /* small green dots on the lines */
  --af-stroke: 1px;
  position: absolute; inset: 0; z-index: -1; pointer-events: none; user-select: none; overflow: hidden; contain: strict;
}
.af-workflow .af-flow__svg{ position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; overflow: visible; }
.af-workflow .af-flow path{ fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.af-workflow .af-wf-bg path{ stroke: var(--af-wf-line); }
.af-workflow .af-wf-bg .af-w1{ stroke-width: calc(var(--af-stroke) * .6); }
.af-workflow .af-wf-bg .af-w2{ stroke-width: calc(var(--af-stroke) * .85); }
.af-workflow .af-wf-bg .af-w3{ stroke-width: calc(var(--af-stroke) * 1.15); }
.af-workflow .af-wf-bead{ fill: var(--af-wf-bead); opacity: .85; }
.af-workflow .af-wf-main{ stroke: var(--af-wf-main); stroke-opacity: .55; stroke-width: calc(var(--af-stroke) * 1.2); }
.af-workflow .af-wf-lit{ stroke: var(--af-wf-green); stroke-width: calc(var(--af-stroke) * 2); }
.af-workflow .af-wf-stem{ stroke: var(--af-wf-main); stroke-opacity: .45; stroke-width: calc(var(--af-stroke) * .8); }
.af-workflow .af-wf-stem-lit{ stroke: var(--af-wf-green); stroke-width: calc(var(--af-stroke) * 1.4); }
.af-workflow .af-wf-node{ fill: var(--af-wf-node); transition: fill .45s ease; }
.af-workflow .af-wf-ring{ fill: none; stroke: var(--af-wf-green); stroke-width: 1; opacity: 0;
  transform: scale(.35); transform-box: fill-box; transform-origin: center; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.af-workflow .af-wf-pt.is-on .af-wf-node{ fill: var(--af-wf-green); }
.af-workflow .af-wf-pt.is-on .af-wf-ring{ opacity: .5; transform: scale(1); }
.af-workflow .af-wf-head{ fill: var(--af-wf-green); stroke: #F4F3EF; stroke-width: 2; }

/* Stage states. Only applied once the script is running, so without it every stage looks finished. */
.af-workflow.af-wf-ready .af-stage{ transition: opacity .5s ease; }
.af-workflow.af-wf-ready .af-stage:not(.is-active){ opacity: .42; }
/* Stage icons: the four supplied SVGs draw in currentColor, so colour is controlled here. */
.af-workflow .af-stage.af-stage .elementor-icon{ color: var(--af-wf-icon, #0B1B2B); transition: color .5s ease; }
.af-workflow .af-stage.af-stage.is-active .elementor-icon{ color: var(--af-wf-green-on, #2FA772); }

@media (prefers-reduced-motion: reduce){
  .af-workflow.af-wf-ready .af-stage:not(.is-active){ opacity: 1; }
}
