/* ============================================================
   КАРКАС · Premium — воронка (смысловой центр) + сравнение
   ============================================================ */

.funnel-section { position: relative; }

/* Обёртка для pin */
.funnel-pin {
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.funnel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.funnel__step {
  display: flex;
  align-items: center;
  gap: 24px;
  opacity: 0.12;                 /* будущие — едва видны */
  transform: scale(0.985);
  transform-origin: left center;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.funnel__step.is-active { opacity: 0.4; }               /* пройденные — притухают */
.funnel__step.is-current { opacity: 1; transform: scale(1); }  /* текущий — в фокусе */
.funnel__step.is-current .funnel__num { color: #fff; }

.funnel__bar {
  position: relative;
  height: 52px;
  width: var(--w);
  background: var(--c);
  border-radius: var(--r-btn);
  display: flex;
  align-items: center;
  padding: 0 22px;
  transform: scaleX(0);
  transform-origin: left center;
  overflow: hidden;
}
.funnel__step.is-active .funnel__bar {
  animation: barDraw 0.55s var(--ease-out) forwards;
}
@keyframes barDraw { to { transform: scaleX(1); } }

.funnel__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  min-width: 64px;
}
.funnel__bar-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
}
.funnel__stage {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 160px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease 0.25s, transform 0.4s ease 0.25s;
}
.funnel__step.is-active .funnel__stage { opacity: 1; transform: translateX(0); }

/* финальный этап — свечение + пульс */
.funnel__step--final.is-active .funnel__bar {
  box-shadow: 0 0 32px var(--green-glow);
  animation: barDraw 0.55s var(--ease-out) forwards, finalPulse 2.4s ease-in-out 0.6s infinite;
}
@keyframes finalPulse {
  0%,100% { box-shadow: 0 0 24px var(--green-glow); }
  50%     { box-shadow: 0 0 46px rgba(62, 200, 122, 0.6); }
}

/* hover-пояснение */
.funnel__hint {
  position: absolute;
  left: calc(var(--w) + 180px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  background: rgba(17, 20, 29, 0.92);
  border: 1px solid rgba(62, 200, 122, 0.3);
  border-radius: var(--r-btn);
  padding: 8px 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.funnel__step.is-active:hover .funnel__hint { opacity: 1; transform: translateY(-50%) translateX(0); }

/* частицы отсева (canvas поверх воронки) */
.funnel__particles {
  position: absolute;
  inset: -40px -200px -40px 0;
  pointer-events: none;
  z-index: 1;
}

/* прогресс воронки сбоку */
.funnel__progress {
  position: absolute;
  top: 0; bottom: 0;
  left: -32px;
  width: 2px;
  background: var(--line);
}
/* индикатор-дробь N/8 */
.funnel__frac {
  position: absolute;
  left: -64px;
  top: -36px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--green);
  line-height: 1;
}
.funnel__frac span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
}
.funnel__progress-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
}

/* ============ Блок сравнения ============ */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 120px;
}
.compare__col { border-radius: var(--r-card); padding: 40px; }
.compare__col--bad {
  background: #fff;
  border: 1px solid var(--line-sand);
  color: var(--text-dark);
  opacity: 0.85;
}
.compare__col--good {
  background: var(--navy);
  color: #fff;
  transform: translateY(-12px);
  box-shadow: 0 24px 60px rgba(28, 53, 87, 0.4);
}
.compare__head {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.compare__col--bad .compare__head { color: var(--text-muted); }
.compare__col--good .compare__head { color: var(--green); }
.compare__row {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.compare__col--good .compare__row { border-bottom-color: rgba(255, 255, 255, 0.1); }
.compare__row:last-child { border-bottom: none; }
/* зелёный росчерк на «хорошей» колонке */
.compare__col--good .compare__row::after {
  content: "";
  position: absolute;
  left: -40px; top: 50%;
  width: 28px; height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.compare.is-visible .compare__col--good .compare__row::after { transform: scaleX(1); }
.compare.is-visible .compare__col--good .compare__row:nth-child(2)::after { transition-delay: 0.1s; }
.compare.is-visible .compare__col--good .compare__row:nth-child(3)::after { transition-delay: 0.2s; }
.compare.is-visible .compare__col--good .compare__row:nth-child(4)::after { transition-delay: 0.3s; }

/* ---- Результат воронки ---- */
.funnel__result {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 14px 20px;
  border-left: 2px solid var(--green);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  pointer-events: none;
}
.funnel__result.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.funnel__result-icon {
  font-size: 1rem;
  color: var(--green);
  flex-shrink: 0;
}
.funnel__result-text {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--green);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
