/* The process overview of the landing page. Every step carries a colour of its
   own (--c, with a tint and a line of it) and a small scene; the script only
   switches is-current / is-complete, the timing of a scene is its --d delays. */
.wf { --wf-duration: 5600ms; --wf-red: #b42318; --wf-red-soft: #fdecea; --wf-blue: #2f6fd6; --wf-blue-soft: #e9f1fd; --wf-amber: #b47a1c; --wf-amber-soft: #fdf3dc; --wf-paper: #fcfbf8; width: 100%; }
.wf [hidden] { display: none; }
.wf-step--quote { --c: var(--fp-p); --c-soft: var(--fp-accent); --c-line: rgba(122, 88, 184, 0.34); --c-glow: rgba(122, 88, 184, 0.2); }
.wf-step--invoice { --c: var(--wf-blue); --c-soft: var(--wf-blue-soft); --c-line: rgba(47, 111, 214, 0.34); --c-glow: rgba(47, 111, 214, 0.18); }
.wf-step--payment { --c: var(--fp-ok); --c-soft: #e6f4ec; --c-line: rgba(14, 122, 67, 0.34); --c-glow: rgba(14, 122, 67, 0.17); }
.wf-step--tax { --c: var(--wf-amber); --c-soft: var(--wf-amber-soft); --c-line: rgba(180, 122, 28, 0.38); --c-glow: rgba(180, 122, 28, 0.18); }
.wf-track { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; }
.wf .wf-step { min-width: 0; }
.wf-progress { height: 4px; margin-bottom: 26px; border-radius: 4px; overflow: hidden; background: var(--fp-line); }
.wf-progress i { display: block; height: 100%; background: var(--c); transform: scaleX(0); transform-origin: left; }
.wf-preview { height: 272px; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border: 1px solid var(--fp-line); border-radius: 16px; background: linear-gradient(180deg, var(--c-soft) 0, var(--fp-white) 78px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05); transition: opacity 0.45s, filter 0.45s, transform 0.45s, border-color 0.45s, box-shadow 0.45s; }
.wf-preview svg { display: block; width: 100%; height: 100%; }
.wf-preview__head { display: flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 600; color: var(--fp-gray); }
.wf-preview__mark { flex: none; width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--c); color: var(--fp-white); transition: background 0.45s, color 0.45s; }
.wf-preview__no { margin-left: auto; font: 11px var(--fp-mono); color: var(--c); }
.wf-scene { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.wf-paper { display: grid; gap: 7px; padding: 11px 12px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 8px; background: var(--wf-paper); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); }
.wf-paper__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wf-paper__top b { min-width: 0; font-size: 12.5px; font-weight: 650; color: var(--fp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-paper__l { display: block; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, 0.09); }
.wf-tags { display: flex; gap: 4px; flex: none; }
.wf-tag { flex: none; padding: 2px 6px; border-radius: 4px; font: 500 9px var(--fp-mono); letter-spacing: 0.03em; }
.wf-tag--pdf { background: var(--wf-red-soft); color: var(--wf-red); }
.wf-tag--xml { background: var(--wf-blue-soft); color: var(--wf-blue); }
.wf-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; color: var(--fp-gray); }
.wf-kv b { font-weight: 600; text-align: right; color: var(--fp-ink); }
.wf-kv:last-child { padding-top: 6px; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.wf-btn { position: relative; overflow: hidden; display: grid; place-items: center; height: 32px; border-radius: 9px; background: var(--c-line); font-size: 12px; font-weight: 600; color: var(--fp-white); }
.wf-btn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--c); }
.wf-btn > span { position: relative; }
.wf-swap { display: inline-grid; justify-items: center; align-items: center; }
.wf-swap > * { grid-area: 1 / 1; }
.wf-swap > :first-child { opacity: 0; }
.wf-send { display: flex; align-items: center; gap: 8px; }
.wf-send__line { position: relative; flex: 1; height: 0; border-top: 2px dashed var(--c-line); }
.wf-send__line i { position: absolute; top: -6px; left: calc(100% - 10px); width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px var(--c-soft); }
.wf-ico { flex: none; width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--c-soft); color: var(--c); }
.wf-ico--red { background: var(--wf-red-soft); color: var(--wf-red); }
.wf-ico--blue { background: var(--wf-blue-soft); color: var(--wf-blue); }
.wf-ico--purple { background: var(--fp-accent); color: var(--fp-p); }
.wf-ico--green { background: var(--fp-ok-soft); color: var(--fp-ok); }
.wf-send__to { background: var(--c); color: var(--fp-white); }
.wf-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--fp-line); border-radius: 11px; background: var(--fp-white); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03); }
.wf-row--slim { padding: 5px 9px; }
.wf-row--slim .wf-ico { width: 24px; height: 24px; padding: 5px; border-radius: 7px; }
.wf-row__t { display: grid; gap: 1px; min-width: 0; margin-right: auto; }
.wf-row__t small { font-size: 10px; color: var(--fp-muted); }
.wf-row__t b { font-size: 12px; font-weight: 650; color: var(--fp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-row__s { font-size: 10.5px; color: var(--fp-gray); }
.wf-amount { flex: none; font: 600 13px var(--fp-mono); color: var(--fp-ok); }
.wf-link { align-self: flex-start; width: 0; height: 14px; margin: -9px 0 -9px 24px; border-left: 2px dashed var(--c-line); }
.wf-badge { padding: 3px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 600; }
.wf-badge--open { background: var(--wf-amber-soft); color: var(--wf-amber); }
.wf-badge--ok { background: var(--fp-ok-soft); color: var(--fp-ok); }
.wf-tick { flex: none; width: 16px; height: 16px; padding: 3px; border-radius: 50%; background: var(--fp-ok); color: var(--fp-white); }
.wf-preview__result { display: flex; align-items: center; gap: 7px; min-height: 22px; font-size: 11.5px; font-weight: 600; color: var(--fp-ok); }
.wf-preview .wf-check { width: 20px; height: 20px; }
.wf-check { width: 22px; height: 22px; flex: none; overflow: visible; }
.wf-check rect { fill: var(--fp-ok); }
.wf-check path { stroke: var(--fp-white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wf-number { display: block; font: 12px var(--fp-mono); color: color-mix(in srgb, var(--c) 75%, #000); margin-top: 24px; }
.wf-step h3 { font-size: 21px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.25; margin: 10px 0 12px; color: var(--fp-ink); transition: color 0.45s; }
.wf-explanation { font-size: 15px; line-height: 1.65; margin: 0; color: var(--fp-gray); }

/* A step that has not begun: the scene waits in its start state, colours held back. */
.wf.is-ready .wf-step:not(.is-current):not(.is-complete) .wf-preview { opacity: 0.6; filter: saturate(0.35); }
.wf.is-ready .wf-step:not(.is-current):not(.is-complete) :is(.wf-a, .wf-preview__result, .wf-swap > :last-child) { opacity: 0; }
.wf.is-ready .wf-step:not(.is-current):not(.is-complete) .wf-swap > :first-child { opacity: 1; }
.wf.is-ready .wf-step:not(.is-current):not(.is-complete) .wf-btn::before { width: 0; }
.wf.is-ready .wf-step:not(.is-current):not(.is-complete) .wf-send__line i { left: 0; }
.wf.is-ready .wf-step:not(.is-current):not(.is-complete) :is(.wf-preview__mark, .wf-send__to) { background: var(--c-soft); color: var(--c); }
.wf.is-ready .wf-step:not(.is-current):not(.is-complete) h3 { color: var(--fp-gray); }

/* The step that runs. */
.wf .is-current .wf-preview { border-color: var(--c-line); box-shadow: 0 16px 38px var(--c-glow); transform: translateY(-4px); }
.wf .is-current h3 { color: var(--c); }
.wf .is-current .wf-progress i { animation: wf-progress var(--wf-duration) linear both; }
.wf .is-current .wf-a { animation: wf-reveal 0.5s var(--d, 0s) both; }
.wf .is-current .wf-paper__l { animation-name: wf-write; transform-origin: left; }
.wf .is-current .wf-tick { animation-name: wf-pop; animation-delay: calc(var(--d, 0s) + 0.3s); }
.wf .is-current .wf-btn::before { animation: wf-fill 1.2s var(--d, 0s) linear both; }
.wf .is-current .wf-swap > :first-child { animation: wf-hide 0.25s var(--d, 0s) both; }
.wf .is-current .wf-swap > :last-child { animation: wf-show 0.35s var(--d, 0s) both; }
.wf .is-current .wf-send__line i { animation: wf-travel 1.2s var(--d, 0s) ease-in-out both; }
.wf .is-current .wf-send__to { animation: wf-arm 0.35s calc(var(--d, 0s) + 1.2s) both; }
.wf .is-current .wf-preview__result { animation: wf-reveal 0.5s 3.7s both; }
.wf .is-current .wf-preview .wf-check { animation: wf-check-pop 0.55s 3.7s ease-out both; }
.wf .is-current .wf-preview .wf-check path { animation: wf-check-draw 0.45s 3.85s both; }

.wf .is-complete .wf-progress i { transform: scaleX(1); }
.wf.is-finished .wf-completion .wf-check { animation: wf-check-pop 0.55s ease-out both; }
.wf.is-finished .wf-completion .wf-check path { animation: wf-check-draw 0.45s 0.15s both; }
.wf-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 66px; margin-top: 32px; }
.wf-completion { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 12px; background: var(--fp-ok-soft); font-size: 17px; font-weight: 700; color: var(--fp-ok); }
.wf-completion .wf-check { width: 30px; height: 30px; }
.wf.is-ready .wf-completion { opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s; }
.wf.is-finished .wf-completion { opacity: 1; transform: none; }
.wf-playback { display: flex; align-items: center; flex: none; gap: 14px; color: var(--fp-gray); font-size: 13px; margin-left: auto; }
.wf-playback button { padding: 8px 14px; border: 1px solid var(--fp-line); border-radius: 8px; background: var(--fp-white); color: var(--fp-p); cursor: pointer; font: inherit; font-weight: 600; }
.wf-playback button:focus-visible { outline: 2px solid var(--fp-p); outline-offset: 3px; }
.wf:not(.is-playing) *, .wf:not(.is-playing) *::before { animation-play-state: paused !important; }
@keyframes wf-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wf-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes wf-write { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: none; } }
@keyframes wf-pop { 0% { opacity: 0; transform: scale(0.4); } 65% { opacity: 1; transform: scale(1.2); } 100% { opacity: 1; transform: none; } }
@keyframes wf-fill { from { width: 0; } to { width: 100%; } }
@keyframes wf-hide { from { opacity: 1; } to { opacity: 0; } }
@keyframes wf-show { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes wf-travel { from { left: 0; } to { left: calc(100% - 10px); } }
@keyframes wf-arm { from { background: var(--c-soft); color: var(--c); } }
@keyframes wf-check-pop { 0% { transform: scale(0.65); } 65% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes wf-check-draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@media (max-width: 1020px) {
  .wf--4 .wf-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .wf--4 .wf-track { grid-template-columns: 1fr; gap: 34px; }
  .wf-progress { margin-bottom: 18px; }
  .wf-number { margin-top: 18px; }
  .wf-footer { flex-wrap: wrap; }
  .wf-completion { font-size: 15px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .wf *, .wf *::before { animation: none !important; transition: none !important; }
  .wf .is-current .wf-progress i { transform: scaleX(1); }
}
