/* GetPower: steps 1–7 on phones and tablets — current line, pulse to the card, frame charged green. */
.gp-rail, .gp-charge { display: none; }
@media (max-width: 1250px) {
  .work-list.gp-timeline { position: relative; padding-left: 34px; box-sizing: border-box; --gp-done: #3ef0a1; }
  .gp-timeline .gp-rail { display: block; position: absolute; left: 9px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); pointer-events: none; }
  .gp-rail-fill {
    position: absolute; left: 0; top: 0; width: 100%; height: var(--gp-fill, 0px); border-radius: 2px;
    background: linear-gradient(180deg, #b32bcc, #6deeff);
    box-shadow: 0 0 10px rgba(109, 238, 255, .55);
  }
  .gp-rail-head {
    position: absolute; left: 50%; top: var(--gp-fill, 0px); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 6px 2px #bff6ff, 0 0 18px 6px rgba(109, 238, 255, .55);
    opacity: 0; transition: opacity .3s ease;
  }
  .gp-rail.is-running .gp-rail-head { opacity: 1; animation: gp-rail-spark .9s ease-in-out infinite; }
  @keyframes gp-rail-spark { 50% { box-shadow: 0 0 9px 3px #fff, 0 0 26px 9px rgba(179, 43, 204, .55); } }
  .gp-rail-node {
    position: absolute; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
    background: #00203e; border: 2px solid rgba(255, 255, 255, .35); box-sizing: border-box;
    transition: border-color .35s ease, background-color .35s ease, box-shadow .35s ease, transform .5s cubic-bezier(.32, .72, 0, 1);
  }
  .gp-rail-node.is-lit { border-color: #fff; background: var(--gp-done); box-shadow: 0 0 12px 3px rgba(62, 240, 161, .6); transform: scale(1.15); }

  /* Overlay: pulse and green frames are drawn above the cards; the cards themselves are never animated. */
  .gp-timeline .gp-charge { display: block; position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 1; }
  .gp-step-link {
    fill: none; stroke: #eafff6; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: .32 1.4; stroke-dashoffset: .32; opacity: 0;
  }
  .gp-step.is-charging .gp-step-link { animation: gp-step-link .42s cubic-bezier(.4, 0, .2, 1) forwards; }
  @keyframes gp-step-link {
    0% { stroke-dashoffset: .32; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { stroke-dashoffset: -1.05; opacity: 0; }
  }
  /* Frames: charge in from the corner when reached; fade out smoothly when you scroll back above them. */
  .gp-step-ring { opacity: 0; transition: opacity .9s ease; }
  .gp-step.is-done .gp-step-ring { opacity: 1; transition-duration: .2s; }
  .gp-step.is-done .gp-step-ring-glow { opacity: .55; }
  .gp-step-half {
    fill: none; stroke: var(--gp-done); stroke-width: 3.4; stroke-linecap: round;
    stroke-dasharray: 1 1; stroke-dashoffset: 1;
    transition: stroke-dashoffset 0s linear .9s; /* reset only after the fade-out */
  }
  .gp-step-wire {
    fill: none; stroke: var(--gp-done); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 1 1; stroke-dashoffset: 1;
    transition: stroke-dashoffset 0s linear .9s;
  }
  .gp-step-ring-glow .gp-step-half, .gp-step-ring-glow .gp-step-wire { stroke-width: 7; opacity: .5; }
  .gp-step-ring-glow .gp-step-wire { stroke-width: 5; }
  .gp-step.is-done .gp-step-half, .gp-step.is-done .gp-step-wire { stroke-dashoffset: 0; transition: none; }
  /* The connection is laid along the pulse's path, then the frame charges from the corner. */
  .gp-step.is-charging .gp-step-wire { transition: stroke-dashoffset .34s cubic-bezier(.4, 0, .2, 1); }
  .gp-step.is-charging .gp-step-half { transition: stroke-dashoffset .75s cubic-bezier(.22, 1, .36, 1) .32s; }
  .gp-step.is-charging .gp-step-ring-glow { animation: gp-step-flash 1.4s ease-out .3s both; }
  @keyframes gp-step-flash { 0% { opacity: 1; } 35% { opacity: 1; } 100% { opacity: .55; } }

  /* Text and number brighten once the step is reached. */
  .gp-timeline .work-list-item { color: rgba(255, 255, 255, .58); transition: color .9s ease; }
  .gp-timeline .work-list-item.gp-lit { color: #fff; }
  .gp-timeline .work-list-item::after { transition: text-shadow .9s ease; }
  .gp-timeline .work-list-item.gp-lit::after { text-shadow: 0 0 14px rgba(62, 240, 161, .8); }
}
@media (prefers-reduced-motion: reduce) {
  .gp-rail-head, .gp-step-link { display: none !important; }
  .gp-step-half, .gp-step-ring, .gp-timeline .work-list-item, .gp-rail-node { transition: none !important; }
  .gp-step-ring-glow { animation: none !important; }
}
