/* ==========================================================================
   Fortune Group — "How it works": six stations connected in one flow
   ========================================================================== */
.gf-proc {
  --p-ink: #1b1f24;
  --p-soft: #5a636d;
  --p-line: rgba(27, 31, 36, 0.1);
  --p-mist: #f3f5f7;
  --p-red: #d90a0a;
  --p-grad: linear-gradient(100deg, #ff3b2f 0%, #d90a0a 45%, #7e0606 100%);
  --p-font: "Archivo", "Manrope", system-ui, sans-serif;
  --p-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --node: 84px;
}
.gf-proc .lp-blob { display: none; }

/* header */
.gf-proc .lp-header { align-items: flex-end; gap: 40px; margin-bottom: 56px; }
.gf-proc .laser-label {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 0; margin-bottom: 18px;
  background: none; border: 0; border-radius: 0;
  font: 600 15px/1 var(--p-font); letter-spacing: 0; text-transform: none;
  color: var(--p-red);
}
.gf-proc .laser-label::before { content: ""; width: 34px; height: 2px; background: var(--p-grad); }
.gf-proc .laser-heading {
  font-family: var(--p-font); font-variation-settings: "wdth" 112; font-weight: 800;
  font-size: clamp(30px, 3.6vw, 54px); line-height: 1.04; letter-spacing: -0.025em;
  color: var(--p-ink); margin: 0;
}
.gf-proc .laser-heading span { background: var(--p-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gf-proc .lp-header .laser-subtext { max-width: 44ch; font-size: 16px; line-height: 1.7; color: var(--p-soft); }

/* the flow board */
.gf-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 52px 20px 44px;
  list-style: none;
  background:
    linear-gradient(rgba(27, 31, 36, 0.035) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(27, 31, 36, 0.035) 1px, transparent 1px) 0 0 / 24px 24px,
    #fff;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  box-shadow: 0 40px 80px -60px rgba(27, 31, 36, 0.35);
}
.gf-proc .gf-flow__step {
  position: relative;
  padding: 0 14px;
  text-align: center;
  background: none; border: 0; box-shadow: none;
}
.gf-proc .gf-flow__step::before, .gf-proc .gf-flow__step::after { display: none; }

/* station */
.gf-flow__node {
  position: relative; z-index: 1;
  width: var(--node); height: var(--node);
  margin: 0 auto 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(27, 31, 36, 0.14);
  box-shadow: 0 14px 30px -18px rgba(27, 31, 36, 0.4);
  transition: border-color 0.4s, box-shadow 0.5s var(--p-ease), transform 0.5s var(--p-ease);
}
.gf-flow__node::before { /* soft halo when this station is working */
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 1px dashed rgba(217, 10, 10, 0.35);
  opacity: 0; transform: scale(0.85) rotate(0deg);
  transition: opacity 0.4s, transform 0.6s var(--p-ease);
}
.gf-flow__icon { width: 38px; height: 38px; fill: none; stroke: var(--p-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gf-flow__icon .acc { stroke: var(--p-red); }
.gf-proc .gf-flow__node .lp-step-num {
  position: absolute; top: -4px; right: -6px; margin: 0; padding: 0;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--p-ink);
  color: #fff; opacity: 1; -webkit-text-stroke: 0;
  font: 700 12px/1 var(--p-font); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 3px #fff;
  transition: background 0.4s;
}

/* connector to the next station */
.gf-flow__line {
  position: absolute; z-index: 0;
  top: calc(var(--node) / 2 - 1px);
  left: calc(50% + var(--node) / 2 + 10px);
  width: calc(100% - var(--node) - 20px);
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(27, 31, 36, 0.22) 0 4px, transparent 4px 9px);
}
.gf-flow__line::before { /* drawn red on reveal */
  content: ""; position: absolute; inset: 0;
  background: var(--p-grad);
  transform: scaleX(0); transform-origin: 0 50%;
}
.gf-flow__line::after { /* arrow tip */
  content: ""; position: absolute; right: -2px; top: 50%;
  width: 8px; height: 8px;
  border-top: 2px solid var(--p-red); border-right: 2px solid var(--p-red);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0;
}
.gf-flow__line i { /* the part travelling to the next station */
  position: absolute; top: 50%; left: 0;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 3px;
  background: #fff; border: 2px solid var(--p-red);
  box-shadow: 0 0 10px rgba(255, 40, 20, 0.7);
  opacity: 0;
}

.gf-proc .gf-flow__step .lp-step-title { font: 700 17px/1.3 var(--p-font); letter-spacing: -0.01em; color: var(--p-ink); margin: 0 0 10px; transition: color 0.4s; }
.gf-proc .gf-flow__step .lp-step-desc { font-size: 14px; line-height: 1.6; color: var(--p-soft); margin: 0 auto; max-width: 30ch; }

/* reveal: stations appear one after another, connectors draw between them */
.gf-flow__node, .gf-flow__step .lp-step-title, .gf-flow__step .lp-step-desc { opacity: 0; transform: translateY(14px); }
.gf-proc.is-in .gf-flow__node,
.gf-proc.is-in .gf-flow__step .lp-step-title,
.gf-proc.is-in .gf-flow__step .lp-step-desc {
  opacity: 1; transform: none;
  transition: opacity 0.6s ease calc(var(--i) * 0.32s), transform 0.7s var(--p-ease) calc(var(--i) * 0.32s), border-color 0.4s, box-shadow 0.5s;
}
.gf-proc.is-in .gf-flow__step .lp-step-desc { transition-delay: calc(var(--i) * 0.32s + 0.1s); }
.gf-proc.is-in .gf-flow__line::before { transform: scaleX(1); transition: transform 0.5s var(--p-ease) calc(var(--i) * 0.32s + 0.25s); }
.gf-proc.is-in .gf-flow__line::after { opacity: 1; transition: opacity 0.3s ease calc(var(--i) * 0.32s + 0.65s); }

/* the working station + the part moving down the line */
.gf-flow__step.is-active .gf-flow__node { border-color: transparent; transform: translateY(-4px) scale(1.05); box-shadow: 0 0 0 1px var(--p-red), 0 22px 40px -18px rgba(217, 10, 10, 0.6); }
.gf-flow__step.is-active .gf-flow__node::before { opacity: 1; transform: scale(1); animation: gf-halo 6s linear infinite; }
.gf-flow__step.is-active .lp-step-num { background: var(--p-grad); }
.gf-flow__step.is-active .lp-step-title { color: var(--p-red); }
.gf-flow__step.is-flow .gf-flow__line i { animation: gf-travel 1.1s cubic-bezier(0.55, 0, 0.35, 1) forwards; }
@keyframes gf-halo { to { transform: scale(1) rotate(360deg); } }
@keyframes gf-travel { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* CTA */
.gf-proc__cta { margin-top: 56px; text-align: center; }
.gf-proc__btn {
  display: inline-flex; align-items: center;
  height: 54px; padding: 0 30px; border-radius: 999px;
  background: var(--p-grad); color: #fff;
  font: 700 16px/1 var(--p-font); text-decoration: none;
  box-shadow: 0 16px 34px -16px rgba(217, 10, 10, 0.8);
  transition: transform 0.25s var(--p-ease), box-shadow 0.25s;
}
.gf-proc__btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 20px 38px -16px rgba(217, 10, 10, 0.95); }

/* laptops: 3 + 3, the line wraps from station 3 to 4 with a return connector */
@media (max-width: 1199px) {
  .gf-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 56px; padding: 48px 16px 40px; }
  .gf-flow__step:nth-child(3) .gf-flow__line { display: none; }
}
/* phones & tablets: vertical flow */
@media (max-width: 767px) {
  .gf-proc { --node: 64px; }
  .gf-proc .lp-header { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 36px; }
  .gf-flow { grid-template-columns: 1fr; row-gap: 0; padding: 30px 18px 10px; }
  .gf-proc .gf-flow__step {
    display: grid; grid-template-columns: var(--node) 1fr; column-gap: 18px;
    padding: 0 0 34px; text-align: left;
  }
  .gf-flow__node { grid-row: 1 / span 2; margin: 0; }
  .gf-flow__icon { width: 30px; height: 30px; }
  .gf-proc .gf-flow__step .lp-step-title { align-self: end; margin-top: 4px; }
  .gf-proc .gf-flow__step .lp-step-desc { margin: 0; max-width: none; }
  .gf-flow__step:nth-child(3) .gf-flow__line { display: block; }
  .gf-flow__line {
    top: calc(var(--node) + 8px); bottom: 8px; left: calc(var(--node) / 2 - 1px);
    width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, rgba(27, 31, 36, 0.22) 0 4px, transparent 4px 9px);
  }
  .gf-flow__line::before { transform: scaleY(0); transform-origin: 50% 0; }
  .gf-proc.is-in .gf-flow__line::before { transform: scaleY(1); }
  .gf-flow__line::after { top: auto; bottom: -2px; right: auto; left: 50%; transform: translateX(-50%) rotate(135deg); }
  .gf-flow__line i { left: 50%; top: 0; margin: -6px 0 0 -6px; }
  .gf-flow__step.is-flow .gf-flow__line i { animation-name: gf-travel-down; }
  @keyframes gf-travel-down { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  .gf-flow__node, .gf-flow__step .lp-step-title, .gf-flow__step .lp-step-desc { opacity: 1 !important; transform: none !important; transition: none !important; }
  .gf-flow__line::before { transform: none !important; }
  .gf-flow__line::after { opacity: 1 !important; }
  .gf-flow__node::before, .gf-flow__line i { animation: none !important; }
}

/* 3 + 3 layout: row two runs right-to-left; a bracket links station 3 down to station 4 */
@media (min-width: 768px) and (max-width: 1199px) {
  .gf-flow { padding-right: 44px; }
  .gf-flow > li:nth-child(4) { grid-column: 3; grid-row: 2; }
  .gf-flow > li:nth-child(5) { grid-column: 2; grid-row: 2; }
  .gf-flow > li:nth-child(6) { grid-column: 1; grid-row: 2; }
  .gf-flow > li:nth-child(n+4) .gf-flow__line { left: auto; right: calc(50% + var(--node) / 2 + 10px); transform: scaleX(-1); }
  .gf-proc .gf-flow > li:nth-child(3)::after {
    display: block;
    content: "";
    position: absolute;
    top: calc(var(--node) / 2 - 1px);
    left: calc(50% + var(--node) / 2 + 10px);
    width: calc(50% - var(--node) / 2 + 6px);
    height: calc(100% + 56px);
    border: 2px dashed rgba(27, 31, 36, 0.22);
    border-left: 0;
    border-radius: 0 22px 22px 0;
    transition: border-color 0.6s ease 1.2s;
  }
  .gf-proc.is-in .gf-flow > li:nth-child(3)::after { border-color: var(--p-red); }
}
