/*
 * Process: five steps, each a label above a leader line above a tile.
 *
 * The leader is an SVG line with a pulsing dot at its end rather than a border,
 * because the dot has to sit exactly on the end of the run and a border cannot
 * carry one. The tile shadow is a drop-shadow filter, not a box-shadow, so it
 * follows the object's silhouette instead of its bounding box.
 */

.ge-prc {
  margin-inline: auto;
  max-width: var(--ge-prc-frame-max, var(--ge-frame-max, 1320px));
  padding: var(--ge-prc-pad, 64px var(--ge-frame-gutter, 12px));
  box-sizing: border-box;
}
@media (min-width: 640px) { .ge-prc { padding: var(--ge-prc-pad-sm, 96px var(--ge-frame-gutter, 20px)); } }

.ge-prc__head { display: grid; align-items: end; gap: var(--ge-prc-head-gap, 32px); }
@media (min-width: 1024px) {
  .ge-prc__head { grid-template-columns: minmax(0, 1fr) auto; padding-left: var(--ge-prc-inset, 24px); }
}
.ge-prc__aside { max-width: var(--ge-prc-aside-measure, 26ch); font-size: var(--ge-prc-aside-fontsize, 14px); color: var(--ge-prc-aside-color, var(--ge-body)); }

/* Below 768 the rail is replaced by .ge-prc__list, not reflowed. Five square
 * isometric renders stacked down a phone is a screen and a half of artwork
 * carrying five short sentences, and the run between them has nothing left to
 * connect once the row is one column wide. */
.ge-prc__rail { display: none; }
.ge-prc__list { display: grid; gap: var(--ge-prc-list-gap, 16px); margin: var(--ge-prc-list-m, 32px 0 0); padding: 0; list-style: none; }
@media (min-width: 768px) {
  .ge-prc__rail { display: block; position: relative; margin-top: var(--ge-prc-rail-gap, 48px); }
  .ge-prc__list { display: none; }
}

.ge-prc__steps {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 0;
  margin: 0; padding: 0; list-style: none;
}

.ge-prc__step { display: flex; flex-direction: column; align-items: center; }

/* Reserved height so five labels of different lengths still align their tiles. */
.ge-prc__copy {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 100%; max-width: var(--ge-prc-copy-maxw, 21ch); padding-inline: var(--ge-prc-copy-paddinginline, 8px);
  min-height: var(--ge-prc-copy-h, 132px);
}
.ge-prc__icon {
  width: var(--ge-prc-icon-size, 26px); height: var(--ge-prc-icon-size, 26px);
  margin-bottom: var(--ge-prc-icon-marginbottom, 10px);
  color: var(--ge-prc-icon-color, var(--ge-ink));
  transition: color 300ms var(--ge-ease-out);
}
.ge-prc__step:hover .ge-prc__icon { color: var(--ge-prc-icon-hover, var(--ge-green)); }
.ge-prc__step-title {
  margin: 0; font-size: 15px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ge-prc-title-color, var(--ge-ink));
}
.ge-prc__step-body {
  margin: var(--ge-prc-step-body-m, 4px 0 0); text-wrap: pretty;
  font-size: var(--ge-prc-step-body-fontsize, 12.5px); line-height: 1.4;
  color: var(--ge-prc-body-color, var(--ge-body));
}

.ge-prc__leader { flex: none; width: var(--ge-prc-leader-w, 12px); height: var(--ge-prc-leader-h, 80px); overflow: visible; }
.ge-prc__leader-line {
  stroke: color-mix(in oklch, var(--ge-prc-line-color, var(--ge-green)) 85%, transparent);
  stroke-width: 1.8; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 0;
  transition: stroke-dashoffset 500ms var(--ge-ease-out), stroke-width 250ms ease;
}
.ge-prc__step:hover .ge-prc__leader-line { stroke: var(--ge-prc-line-color, var(--ge-green)); stroke-width: 2.6; }
.ge-prc__leader-dot {
  fill: var(--ge-prc-node-color, var(--ge-green));
  transform-box: fill-box; transform-origin: center;
  opacity: 1; transform: scale(1);
  transition: opacity 400ms var(--ge-ease-out), transform 400ms var(--ge-ease-out);
}
.ge-prc__step:hover .ge-prc__leader-dot { transform: scale(1.4); }
.ge-prc__tile {
  /* aspect-ratio as well as the width/height attributes: if a marketer swaps in
   * a non-square render the box still reserves its height before the bytes
   * land, so the row never reflows under the reader. */
  display: block; width: var(--ge-prc-tile-w, 68%); height: auto; aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 20px 20px rgba(14,21,51,.22)) drop-shadow(0 4px 7px rgba(14,21,51,.16));
  transition: opacity 600ms var(--ge-ease-out), transform 600ms var(--ge-ease-out), filter 350ms ease;
}
.ge-prc__step:hover .ge-prc__tile {
  filter: drop-shadow(0 26px 26px rgba(14,21,51,.30)) drop-shadow(0 6px 10px rgba(14,21,51,.20));
}

/* The run between platforms.
 *
 * Top is derived, not measured: the copy block and the leader are both sliders,
 * and the run has to start exactly where the leaders end, so it is positioned by
 * the same two variables rather than by the 212px those happen to add up to at
 * the defaults. Drag either slider and the run follows.
 *
 * aspect-ratio n/1 with preserveAspectRatio="none" is what lets the path stretch
 * horizontally with the page while the tiles keep their square ratio: the SVG's
 * x units track the columns and its y units track the tile height. A
 * non-scaling-stroke keeps the line the same weight through that stretch. */
.ge-prc__run {
  position: absolute; z-index: 0; inset-inline: 0;
  top: calc(var(--ge-prc-copy-h, 132px) + var(--ge-prc-leader-h, 80px));
  width: 100%; aspect-ratio: var(--n, 5) / 1;
  pointer-events: none;
}
.ge-prc__run-line {
  stroke: color-mix(in oklch, var(--ge-prc-run-color, var(--ge-green)) 95%, transparent);
  stroke-width: var(--ge-prc-run-w, 3px); stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 0;
}

/* Two overlaid sparks rather than one: a wide soft pass reads as a glow around
 * the charge, a narrow near-white pass reads as the charge itself. A single
 * stroke gives you one or the other, never both.
 *
 * Gated on reduced motion and nothing else. The first cut hung these off
 * [data-in], the attribute the entry observer sets, which meant they needed
 * JavaScript to have run and the section to have been scrolled into view from
 * above before they would appear at all. They are ambient, not an entrance, so
 * they run whenever motion is allowed. */
.ge-prc__run-glow, .ge-prc__run-spark, .ge-prc__leader-drop { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .ge-prc__run-glow,
  .ge-prc__run-spark,
  .ge-prc__leader-drop { display: block; }
}
.ge-prc__run-glow {
  stroke: var(--ge-prc-run-color, var(--ge-green)); opacity: var(--ge-prc-run-glow-op, .34);
  stroke-width: 14; stroke-linecap: round; stroke-dasharray: 1.2 200;
  animation: ge-prc-drop 4s linear 1.5s infinite;
}
.ge-prc__run-spark {
  stroke: color-mix(in oklch, var(--ge-prc-run-color, var(--ge-green)) 45%, white);
  stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1.2 200;
  animation: ge-prc-drop 4s linear 1.5s infinite;
}
.ge-prc__leader-drop {
  stroke: color-mix(in oklch, var(--ge-prc-line-color, var(--ge-green)) 40%, white);
  stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 200;
  animation: ge-prc-drop 2.6s linear infinite;
  animation-delay: calc(var(--i, 0) * 180ms + 1000ms);
}
/* pathLength is normalised to 100 on every one of these, so one keyframe drives
 * a 12px leader and a 1300px run at the same apparent speed. */
@keyframes ge-prc-drop { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.ge-prc[data-reveal] .ge-prc__run-line { stroke-dashoffset: 100; }
@media (prefers-reduced-motion: no-preference) {
  .ge-prc[data-in] .ge-prc__run-line {
    animation: ge-prc-draw 1500ms var(--ge-ease-out) 300ms forwards;
  }
  .ge-prc[data-in] .ge-prc__leader-dot { animation-name: ge-prc-pop, ge-prc-core; }
  /* and without the observer, the breath alone */
  .ge-prc:not([data-in]) .ge-prc__leader-dot {
    animation: ge-prc-core 2.8s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 180ms + 1200ms);
  }
}
/* The dot keeps a slow breath after it lands, so a section that is all straight
 * lines and still renders still has one thing alive in it. */
@keyframes ge-prc-core {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 5px var(--ge-prc-node-color, var(--ge-green))); }
}

/* ------------------------------------------------------------- phone -- */
.ge-prc__row { display: flex; align-items: flex-start; gap: var(--ge-prc-row-gap, 14px); }
.ge-prc__badge {
  flex: none; display: grid; place-items: center;
  width: var(--ge-prc-badge-w, 40px); height: var(--ge-prc-badge-h, 40px); border-radius: var(--ge-prc-badge-radius, 999px);
  background: var(--ge-prc-badge-bg, var(--ge-panel));
  color: var(--ge-prc-icon-color, var(--ge-ink));
}
.ge-prc__badge-icon { width: var(--ge-prc-badge-icon-w, 20px); height: var(--ge-prc-badge-icon-h, 20px); }
.ge-prc__row-copy { min-width: 0; }
.ge-prc__row-step {
  display: block; font-family: var(--ge-font-mono);
  font-size: var(--ge-prc-row-step-fontsize, 10px); letter-spacing: .12em; text-transform: uppercase;
  color: color-mix(in oklch, var(--ge-ink) 50%, transparent);
}
.ge-prc__row-title {
  display: block; margin-top: var(--ge-prc-row-title-mt, 2px);
  font-size: var(--ge-prc-row-title-fontsize, 14.5px); font-weight: 700; line-height: 1.15;
  color: var(--ge-prc-title-color, var(--ge-ink));
}
.ge-prc__row-body {
  display: block; margin-top: var(--ge-prc-row-body-mt, 4px);
  font-size: var(--ge-prc-row-body-fontsize, 12.5px); line-height: 1.375;
  color: var(--ge-prc-body-color, var(--ge-body));
}

/* The reveal, inverted.
 *
 * Content is visible by default and only hides once JavaScript says it is going
 * to animate it back in. The first version had it the other way round: hidden in
 * CSS, shown by a keyframe on page load. Below the fold that left five tiles at
 * opacity 0 with nothing to bring them back, and lazy images inside a
 * zero-opacity box never downloaded either. No script now means a plain, fully
 * visible row, which is the correct failure. */
.ge-prc[data-reveal] .ge-prc__copy,
.ge-prc[data-reveal] .ge-prc__tile { opacity: 0; }
.ge-prc[data-reveal] .ge-prc__copy { transform: translate3d(0, 10px, 0); }
.ge-prc[data-reveal] .ge-prc__tile { transform: translate3d(0, 16px, 0); }
.ge-prc[data-reveal] .ge-prc__leader-line { stroke-dashoffset: 100; }
.ge-prc[data-reveal] .ge-prc__leader-dot { opacity: 0; transform: scale(0.2); }

@media (prefers-reduced-motion: no-preference) {
  .ge-prc[data-in] .ge-prc__copy {
    animation: ge-prc-in 500ms var(--ge-ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 180ms + 100ms);
  }
  .ge-prc[data-in] .ge-prc__tile {
    animation: ge-prc-in 600ms var(--ge-ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 180ms + 250ms);
  }
  .ge-prc[data-in] .ge-prc__leader-line {
    animation: ge-prc-draw 500ms var(--ge-ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 180ms + 450ms);
  }
  .ge-prc[data-in] .ge-prc__leader-dot {
    animation: ge-prc-pop 400ms var(--ge-ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 180ms + 800ms);
  }
}
@keyframes ge-prc-in   { to { opacity: 1; transform: none; } }
@keyframes ge-prc-draw { to { stroke-dashoffset: 0; } }
@keyframes ge-prc-pop  { to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .ge-prc[data-reveal] .ge-prc__copy,
  .ge-prc[data-reveal] .ge-prc__tile { opacity: 1; transform: none; }
  .ge-prc[data-reveal] .ge-prc__leader-line { stroke-dashoffset: 0; }
  .ge-prc[data-reveal] .ge-prc__leader-dot { opacity: 1; transform: scale(1); }
}

/* Settled: once process.js sets data-done the entrance is over, and the final
 * state is written as plain values, with the held keyframes dropped. Without
 * this the tiles stayed visible only through `animation-fill-mode: forwards`,
 * and a full-page capture painted the whole row blank (checklist 107, project
 * rule: a required visual state never depends on motion running). The dots
 * keep their breath, which is ambient, not an entrance. */
.ge-prc[data-in][data-done] .ge-prc__copy,
.ge-prc[data-in][data-done] .ge-prc__tile { opacity: 1; transform: none; animation: none; }
.ge-prc[data-in][data-done] .ge-prc__leader-line,
.ge-prc[data-in][data-done] .ge-prc__run-line { stroke-dashoffset: 0; animation: none; }
.ge-prc[data-in][data-done] .ge-prc__leader-dot { opacity: 1; transform: scale(1); animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .ge-prc[data-in][data-done] .ge-prc__leader-dot {
    animation: ge-prc-core 2.8s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 180ms);
  }
}

/* A sequence that replays on every keystroke is unusable in the editor canvas. */
.elementor-editor-active .ge-prc__copy,
.elementor-editor-active .ge-prc__tile { opacity: 1; transform: none; animation: none; }
.elementor-editor-active .ge-prc__leader-line { stroke-dashoffset: 0; animation: none; }
.elementor-editor-active .ge-prc__leader-dot { opacity: 1; transform: scale(1); animation: none; }
.elementor-editor-active .ge-prc__run-line { stroke-dashoffset: 0; animation: none; }
.elementor-editor-active .ge-prc__run-glow,
.elementor-editor-active .ge-prc__run-spark,
.elementor-editor-active .ge-prc__leader-drop { display: none; }
