/* ============================================================
   MELIORIX SYSTEMS — services.css
   Styles for service detail pages + hooks (quiz / calculators)
   ============================================================ */

/* ---------- Service hero ---------- */
.service-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + var(--section-pad));
  padding-bottom: var(--section-pad);
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at top right, rgba(0,170,255,0.12), transparent 60%),
              radial-gradient(ellipse at bottom left, rgba(57,255,20,0.06), transparent 55%),
              var(--bg-deep);
}
.breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--text-muted); font-size: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent-blue); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--accent-green); }
.service-hero h1 { max-width: 800px; margin-bottom: 20px; }
.service-hero .lead { font-size: 20px; color: var(--text-muted); max-width: 640px; }

/* ---------- Includes list ("what's included") ---------- */
.includes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.include-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s;
}
.include-item:hover { border-color: var(--accent-blue); transform: translateY(-3px); }
.include-item .tick {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(57,255,20,0.12);
  color: var(--accent-green);
  display: flex; align-items: center; justify-content: center;
}
.include-item h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.include-item p { color: var(--text-muted); font-size: 14px; }

/* ---------- Process steps ---------- */
.steps { display: flex; gap: 0; counter-reset: step; position: relative; }
.step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 16px;
}
.step::before {
  content: '';
  position: absolute;
  top: 28px; left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step:last-child::before { display: none; }
.step .step-num {
  counter-increment: step;
  position: relative;
  z-index: 1;
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-blue);
  color: var(--accent-blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}
.step .step-num::after { content: counter(step); }
.step h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 14px; }

/* ---------- Animated process: line draws + numbers light up sequentially ----------
   Default (no JS / reduced motion) = fully visible. JS adds .steps-animate to set the
   hidden start state, then .in-view to play the staggered sequence. */
.steps-animate .step::before {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s var(--ease);
}
.steps-animate .step-num {
  color: var(--text-muted);
  border-color: var(--text-muted);
  opacity: 0;
  transform: scale(0.6);
}
.steps-animate .step h4,
.steps-animate .step p { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s var(--ease); }

.steps-animate.in-view .step-num { animation: stepPop 0.55s var(--ease) forwards; }
.steps-animate.in-view .step::before { transform: scaleX(1); }
.steps-animate.in-view .step h4,
.steps-animate.in-view .step p { opacity: 1; transform: translateY(0); }

/* stagger: number → connecting line → next number ... */
.steps-animate.in-view .step:nth-child(1) .step-num { animation-delay: 0.10s; }
.steps-animate.in-view .step:nth-child(2) .step-num { animation-delay: 0.45s; }
.steps-animate.in-view .step:nth-child(3) .step-num { animation-delay: 0.80s; }
.steps-animate.in-view .step:nth-child(4) .step-num { animation-delay: 1.15s; }
.steps-animate.in-view .step:nth-child(5) .step-num { animation-delay: 1.50s; }
.steps-animate.in-view .step:nth-child(1)::before { transition-delay: 0.35s; }
.steps-animate.in-view .step:nth-child(2)::before { transition-delay: 0.70s; }
.steps-animate.in-view .step:nth-child(3)::before { transition-delay: 1.05s; }
.steps-animate.in-view .step:nth-child(4)::before { transition-delay: 1.40s; }
.steps-animate.in-view .step:nth-child(1) h4 { transition-delay: 0.20s; }
.steps-animate.in-view .step:nth-child(1) p  { transition-delay: 0.28s; }
.steps-animate.in-view .step:nth-child(2) h4 { transition-delay: 0.55s; }
.steps-animate.in-view .step:nth-child(2) p  { transition-delay: 0.63s; }
.steps-animate.in-view .step:nth-child(3) h4 { transition-delay: 0.90s; }
.steps-animate.in-view .step:nth-child(3) p  { transition-delay: 0.98s; }
.steps-animate.in-view .step:nth-child(4) h4 { transition-delay: 1.25s; }
.steps-animate.in-view .step:nth-child(4) p  { transition-delay: 1.33s; }
.steps-animate.in-view .step:nth-child(5) h4 { transition-delay: 1.60s; }
.steps-animate.in-view .step:nth-child(5) p  { transition-delay: 1.68s; }

@keyframes stepPop {
  0%   { opacity: 0; transform: scale(0.6); border-color: var(--text-muted); color: var(--text-muted); box-shadow: 0 0 0 rgba(0,170,255,0); }
  60%  { opacity: 1; transform: scale(1.14); border-color: var(--accent-blue); color: var(--accent-blue); }
  100% { opacity: 1; transform: scale(1); border-color: var(--accent-blue); color: var(--accent-blue); box-shadow: 0 0 18px rgba(0,170,255,0.35); }
}

/* ---------- Hook section wrapper ---------- */
.hook {
  background: var(--bg-surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 48px;
  max-width: 900px;
  margin: 0 auto;
}
.hook-header { text-align: center; margin-bottom: 36px; }
.hook-header h2 { margin-bottom: 8px; }
.hook-header p { color: var(--text-muted); }

/* ---------- Quiz ---------- */
.quiz-progress {
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 32px;
}
.quiz-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  border-radius: 3px;
  transition: width 0.5s var(--ease);
}
.quiz-question h3 { margin-bottom: 24px; text-align: center; }
.quiz-step-label { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.quiz-options { display: grid; gap: 12px; margin-bottom: 28px; }
.quiz-option {
  text-align: left;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  color: var(--text-primary);
  transition: all 0.25s var(--ease);
  display: flex;
  align-items: center;
  gap: 14px;
}
.quiz-option .radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: all 0.25s;
  position: relative;
}
.quiz-option:hover { border-color: var(--accent-blue); transform: translateX(4px); }
.quiz-option.selected { border-color: var(--accent-green); background: rgba(57,255,20,0.07); }
.quiz-option.selected .radio { border-color: var(--accent-green); background: var(--accent-green); }
.quiz-option.selected .radio::after {
  content: ''; position: absolute; inset: 4px;
  background: #03260a; border-radius: 50%;
}
.quiz-nav { display: flex; justify-content: space-between; align-items: center; }
.quiz-nav .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Quiz result */
.quiz-result { text-align: center; }
.quiz-result.hidden, .quiz-question.hidden { display: none; }
.result-score {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1;
  margin-bottom: 8px;
}
.result-score small { font-size: 28px; color: var(--text-muted); }
.score-bar { height: 12px; background: var(--bg-card); border-radius: 6px; overflow: hidden; margin: 24px 0; }
.score-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ff4d5e, var(--accent-blue), var(--accent-green));
  background-size: 300% 100%;
  border-radius: 6px;
  transition: width 1.2s var(--ease);
}
.result-text { color: var(--text-primary); max-width: 560px; margin: 0 auto 32px; font-size: 17px; }
.result-recommendation {
  background: var(--bg-card);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 auto 32px;
  max-width: 560px;
  text-align: left;
}
.result-recommendation h4 { color: var(--accent-blue); margin-bottom: 8px; font-family: var(--font-body); }

/* slideDown form */
.hook-form {
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.6s var(--ease), opacity 0.6s ease, margin 0.6s ease;
}
.hook-form.open { max-height: 600px; opacity: 1; margin-top: 12px; }
.hook-form .form-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.hook-form .form-inline input { flex: 1; min-width: 180px; }

/* ---------- Calculator (websites) ---------- */
.calc-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.calc-fields { display: flex; flex-direction: column; gap: 28px; }
.calc-group h4 { font-family: var(--font-body); font-size: 15px; margin-bottom: 14px; color: var(--text-primary); }
.calc-options { display: grid; gap: 10px; }
.calc-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  font-size: 15px;
}
.calc-opt:hover { border-color: var(--accent-blue); }
.calc-opt input { accent-color: var(--accent-green); width: 18px; height: 18px; }
.calc-opt .price-tag { margin-left: auto; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.calc-opt.checked { border-color: var(--accent-green); background: rgba(57,255,20,0.06); }

.calc-result {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  background: var(--bg-card);
  border: 1px solid var(--accent-blue);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 0 40px rgba(0,170,255,0.12);
}
.calc-result .label { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.calc-result .price {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1.1;
  margin-bottom: 4px;
}
.calc-result .price-range { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.calc-result .btn { width: 100%; justify-content: center; }

/* ---------- ROI calculator ---------- */
.roi-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.roi-sliders { display: flex; flex-direction: column; gap: 32px; }
.roi-slider label { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 14px; }
.roi-slider label .val { color: var(--accent-green); font-weight: 700; font-family: var(--font-display); }
.roi-slider input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  outline: none;
}
.roi-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(57,255,20,0.5);
  border: 3px solid var(--bg-deep);
}
.roi-slider input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-green); cursor: pointer; border: 3px solid var(--bg-deep);
}

.roi-result {
  background: var(--bg-card);
  border: 1px solid var(--accent-green);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 0 40px rgba(57,255,20,0.1);
}
.roi-result .roi-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--border); }
.roi-result .roi-row:last-of-type { border-bottom: none; }
.roi-result .roi-row .k { color: var(--text-muted); font-size: 14px; }
.roi-result .roi-row .v { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.roi-result .roi-row.highlight .v { color: var(--accent-green); font-size: 28px; }
.roi-result .roi-payback {
  margin-top: 20px; padding: 18px;
  background: rgba(57,255,20,0.08);
  border-radius: 10px;
  text-align: center;
  color: var(--accent-green);
  font-weight: 600;
}

/* ---------- Why-us mini ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-item { text-align: center; padding: 28px; }
.why-item .icon-lg { width: 48px; height: 48px; color: var(--accent-blue); margin: 0 auto 18px; }
.why-item h3 { font-size: 20px; margin-bottom: 10px; }
.why-item p { color: var(--text-muted); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hook { padding: 28px 20px; }
  .includes-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; gap: 28px; }
  .step { padding: 0; display: flex; gap: 20px; text-align: left; align-items: flex-start; }
  .step::before { top: 0; left: 28px; width: 2px; height: 100%; }
  .step .step-num { margin: 0; }
  .step .step-body { padding-top: 6px; }
  /* vertical line draws top→bottom on mobile */
  .steps-animate .step::before { transform: scaleY(0); transform-origin: top center; }
  .steps-animate.in-view .step::before { transform: scaleY(1); }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .roi-layout { grid-template-columns: 1fr; gap: 32px; }
  .why-grid { grid-template-columns: 1fr; }
  .hook-form .form-inline { flex-direction: column; }
}

/* ============================================================
   Website-service landing — extended sections
   ============================================================ */
:root { --subnav-h: 54px; }

/* anchored sections sit below fixed navbar + sticky subnav */
section[id] { scroll-margin-top: calc(var(--nav-h) + var(--subnav-h) + 8px); }
.container-narrow { max-width: 800px; }

/* ---------- Secondary in-page nav (второе меню) ---------- */
.subnav {
  position: sticky;
  top: var(--nav-h);
  /* закрываем зазор: слот в потоке должен быть равен высоте шапки */
  margin-top: calc(var(--nav-h) - var(--subnav-h));
  z-index: 900;
  height: var(--subnav-h);
  background: rgba(15,30,53,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
/* на страницах с подменю верхний отступ героя уже съеден слотом .subnav */
.subnav + main .service-hero { padding-top: calc(var(--subnav-h) + var(--section-pad)); }
.subnav .container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.subnav-scroll { display: flex; align-items: center; gap: 26px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.subnav-scroll::-webkit-scrollbar { display: none; }
.subnav-scroll a {
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  white-space: nowrap; padding: 6px 2px; position: relative;
  transition: color 0.2s;
}
.subnav-scroll a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent-green); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.subnav-scroll a:hover { color: var(--text-primary); }
.subnav-scroll a.active { color: var(--accent-green); }
.subnav-scroll a.active::after { transform: scaleX(1); }
.subnav-cta { padding: 9px 20px; font-size: 14px; flex-shrink: 0; }

/* ---------- Hero (two-column) ---------- */
.svc-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.svc-hero-text h1 { margin-bottom: 22px; }
.svc-hero-text .lead { margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-points { display: flex; flex-direction: column; gap: 12px; }
.hero-points li { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font-size: 15px; }
.hero-points li svg { color: var(--accent-green); flex-shrink: 0; }

/* hero dashboard mockup */
.svc-hero-visual { perspective: 1400px; }
.hero-mock {
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 40px 80px -40px rgba(0,0,0,0.9), 0 0 60px rgba(0,170,255,0.1);
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(3deg);
  transition: transform 0.5s var(--ease);
  backdrop-filter: blur(14px);
}
.hero-mock:hover { transform: rotateY(0deg) rotateX(0deg); }
.mock-bar { display: flex; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); background: rgba(0,0,0,0.2); }
.mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--text-muted); opacity: 0.5; }
.mock-bar span:first-child { background: #ff5f57; opacity: 0.8; }
.mock-bar span:nth-child(2) { background: #febc2e; opacity: 0.8; }
.mock-bar span:nth-child(3) { background: var(--accent-green); opacity: 0.8; }
.mock-body { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.mock-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mock-kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.mock-kpi .k { color: var(--text-muted); font-size: 12px; }
.mock-kpi .v { font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--text-primary); margin: 2px 0 8px; }
.mock-kpi .spark { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent-blue), var(--accent-green)); }
.mock-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; }
.mock-chart span { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent-blue), rgba(0,170,255,0.25)); }
.mock-chart span:last-child { background: linear-gradient(180deg, var(--accent-green), rgba(57,255,20,0.25)); }
.mock-list { display: flex; flex-direction: column; gap: 10px; }
.mock-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.mock-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-blue); flex-shrink: 0; }
.mock-item .dot.ok { background: var(--accent-green); box-shadow: 0 0 8px rgba(57,255,20,0.6); }

/* ---------- Icon cards (lead-grid) ---------- */
.lead-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.lead-grid.lead-grid-3 { grid-template-columns: repeat(3, 1fr); }
.icard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.icard:hover { border-color: var(--accent-blue); transform: translateY(-4px); box-shadow: 0 24px 50px -34px rgba(0,170,255,0.5); }
.icard .icon-box {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(0,170,255,0.1);
  color: var(--accent-blue);
  margin-bottom: 18px;
  transition: background 0.3s, color 0.3s;
}
.icard:hover .icon-box { background: rgba(57,255,20,0.12); color: var(--accent-green); }
.icard h3 { font-size: 19px; margin-bottom: 10px; }
.icard p { color: var(--text-muted); font-size: 14px; }

/* generic icon-box for service cards (built on .card) */
.service-card .icon-box {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(0,170,255,0.1);
  color: var(--accent-blue);
  margin-bottom: 20px;
  transition: background 0.4s, color 0.4s;
}
.service-card:hover .icon-box { background: rgba(57,255,20,0.12); color: var(--accent-green); }
.svc-when { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.svc-when strong { color: var(--text-primary); font-weight: 600; }

/* ---------- "3D Pin" hover effect (адаптация под наш дизайн) ---------- */
/* scoped через .pin-effect — не влияет на другие блоки/страницы с .service-card */
.services-grid.pin-effect .service-card { transform-origin: 50% 100%; }
.services-grid.pin-effect .service-card:hover {
  transform: translateY(-4px) rotateX(10deg) scale(0.98);
}

.pin-fx {
  position: absolute;
  left: 50%; bottom: 0;
  width: 220px; height: 110px;
  transform: translate(-50%, 55%);
  pointer-events: none;
  z-index: -1;
}
.pin-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1px solid rgba(0,170,255,0.55);
  transform: translate(-50%, -50%) scaleY(0.32) scale(0.3);
  opacity: 0;
}
.service-card:hover .pin-ring {
  animation: pinRing 2.4s ease-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes pinRing {
  0%   { transform: translate(-50%, -50%) scaleY(0.32) scale(0.3); opacity: 0; }
  18%  { opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scaleY(0.32) scale(14.85); opacity: 0; }
}
.pin-beam {
  position: absolute;
  left: 50%; bottom: 50%;
  width: 2px; height: 0;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--accent-blue));
  opacity: 0;
  transition: height 0.5s var(--ease), opacity 0.4s var(--ease);
}
.service-card:hover .pin-beam { height: 44px; opacity: 0.85; }
.pin-dot {
  position: absolute;
  left: 50%; bottom: 50%;
  width: 6px; height: 6px;
  margin-left: -3px; margin-bottom: -3px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 14px 4px rgba(57,255,20,0.7);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.service-card:hover .pin-dot { opacity: 1; transform: scale(1); }

@media (max-width: 640px) {
  .services-grid.pin-effect .service-card:hover { transform: translateY(-4px); }
  .pin-fx { display: none; }
}

/* ---------- Accent quote callout ---------- */
.accent-quote {
  max-width: 880px;
  margin: 48px auto 0;
  padding: 28px 32px;
  border-left: 3px solid var(--accent-green);
  background: linear-gradient(90deg, rgba(57,255,20,0.06), transparent);
  border-radius: 0 12px 12px 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* ---------- Process grid (10 steps) ---------- */
.process-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.pcard {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.3s, transform 0.3s;
}
.pcard:hover { border-color: var(--accent-blue); transform: translateY(-3px); }
.pcard .pnum {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  color: var(--accent-blue); line-height: 1; flex-shrink: 0;
  width: 48px;
}
.pcard h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.pcard p { color: var(--text-muted); font-size: 14px; }
.pcard-final { border-color: var(--accent-green); background: rgba(57,255,20,0.05); }
.pcard-final .pnum { color: var(--accent-green); }

/* ---------- Feature checklist ("Работаем с") ---------- */
.feat-list {
  max-width: 880px; margin: 44px auto 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 32px;
}
.feat-list h4 { font-family: var(--font-body); font-size: 16px; margin-bottom: 16px; }
.feat-list ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; }
.feat-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-muted); font-size: 15px; }
.feat-list li svg { color: var(--accent-green); flex-shrink: 0; margin-top: 4px; }

/* ---------- Tech chips ---------- */
.tech-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 880px; margin: 0 auto; }
.chip {
  padding: 12px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  transition: border-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.chip:hover { border-color: var(--accent-green); color: var(--accent-green); transform: translateY(-2px); box-shadow: 0 0 20px rgba(57,255,20,0.18); }

/* ---------- Cases ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case-card { display: flex; flex-direction: column; align-items: flex-start; }
.case-tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--accent-blue);
  background: rgba(0,170,255,0.1); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.case-card h3 { margin-bottom: 10px; }
.case-card p { color: var(--text-muted); margin-bottom: 16px; }
.case-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.case-meta svg { color: var(--accent-green); }
.case-card .more-link {
  margin-top: auto; color: var(--accent-blue); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; transition: gap 0.3s, color 0.3s;
}
.case-card:hover .more-link { color: var(--accent-green); gap: 12px; }

/* ---------- FAQ accordion ---------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.3s; }
.faq-item.open { border-color: var(--accent-blue); }
.faq-q {
  width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--text-primary);
}
.faq-q .faq-icon { color: var(--accent-blue); flex-shrink: 0; transition: transform 0.3s var(--ease); }
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 24px 22px; color: var(--text-muted); font-size: 15px; }

/* ---------- CTA / footer extras ---------- */
.cta-note { margin-top: 22px; color: var(--text-muted); font-size: 14px; }
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { font-size: 13px; color: var(--text-muted); transition: color 0.2s; }
.footer-legal a:hover { color: var(--accent-blue); }

/* ---------- Responsive (extended sections) ---------- */
@media (max-width: 980px) {
  .lead-grid, .lead-grid.lead-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .svc-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .svc-hero-visual { order: -1; }
  .hero-mock { transform: none; }
  .lead-grid, .lead-grid.lead-grid-3 { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .feat-list ul { grid-template-columns: 1fr; }
  .subnav-cta { display: none; }
  .accent-quote { font-size: 16px; padding: 22px 24px; }
}

/* ============================================================
   REDESIGN v2 — lighter typography, more motion & graphics
   (scoped to .svc-page so other pages are untouched)
   ============================================================ */

/* ---------- Calmer type scale + tighter rhythm ---------- */
.svc-page h1 { font-size: 48px; line-height: 1.08; }
.svc-page h2, .svc-page .section-title { font-size: 30px; }
.svc-page h3 { font-size: 18px; }
.svc-page section { padding: var(--section-pad) 0; }
.svc-page .section-title { margin-bottom: 12px; letter-spacing: -0.5px; }
.svc-page .section-subtitle { font-size: 16px; max-width: 600px; margin-bottom: 44px; }
.svc-page .service-hero { min-height: auto; padding-bottom: var(--section-pad); }
.svc-page .service-hero .hero-grid { margin-top: 8px; }
.svc-page .service-hero h1 { font-size: 50px; }
.svc-page .hero-subtitle { font-size: 17px; }
@media (max-width: 768px) {
  .svc-page h1, .svc-page .service-hero h1 { font-size: 32px; }
  .svc-page h2, .svc-page .section-title { font-size: 24px; }
}

/* tilt cards need perspective on their grid */
.lead-grid { perspective: 1000px; }
.icard { transform-style: preserve-3d; will-change: transform; }

/* ---------- Animated stats band ---------- */
.stats-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,170,255,0.08), transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(57,255,20,0.06), transparent 60%),
    var(--bg-card);
  padding: 36px 0;
}
.sb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.sb-item { position: relative; }
.sb-item > svg { width: 26px; height: 26px; color: var(--accent-blue); margin: 0 auto 10px; }
.sb-num {
  font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1;
  background: linear-gradient(100deg, var(--accent-blue), var(--accent-green));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sb-label { color: var(--text-muted); font-size: 13px; margin-top: 8px; }
.sb-item + .sb-item::before {
  content: ''; position: absolute; left: -12px; top: 10%; height: 80%; width: 1px; background: var(--border);
}
@media (max-width: 768px) {
  .sb-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .sb-item + .sb-item::before { display: none; }
  .sb-num { font-size: 34px; }
}

/* ---------- Mini chips ("Работаем с") ---------- */
.mini-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 720px; margin: 36px auto 0; }
.mini-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}
.mini-chip svg { color: var(--accent-green); }
.mini-chip:hover { border-color: var(--accent-green); color: var(--text-primary); transform: translateY(-2px); }

/* ---------- Vertical animated timeline (process) ---------- */
.vtimeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 8px; }
.vline {
  position: absolute; left: 31px; top: 18px; bottom: 18px; width: 2px;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-green));
  transform: scaleY(0); transform-origin: top center;
  transition: transform 1.6s var(--ease);
  box-shadow: 0 0 12px rgba(57,255,20,0.3);
}
.vtimeline.visible .vline { transform: scaleY(1); }
.vstep { display: flex; gap: 22px; align-items: flex-start; padding: 12px 0; position: relative; }
.vnum {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  box-shadow: 0 0 0 6px var(--bg-deep), 0 6px 18px -6px rgba(0,170,255,0.7);
  position: relative; z-index: 1;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.vstep:hover .vnum { transform: scale(1.1); box-shadow: 0 0 0 6px var(--bg-deep), 0 0 22px rgba(57,255,20,0.6); }
.vstep-body {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  transition: border-color 0.3s, transform 0.3s;
}
.vstep:hover .vstep-body { border-color: var(--accent-blue); transform: translateX(4px); }
.vstep-body h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.vstep-body p { color: var(--text-muted); font-size: 14px; }
.vstep-final .vnum { background: linear-gradient(135deg, var(--accent-green), #aaff66); box-shadow: 0 0 0 6px var(--bg-deep), 0 0 24px rgba(57,255,20,0.7); }
.vstep-final .vstep-body { border-color: var(--accent-green); background: rgba(57,255,20,0.05); }
.bg-surface .vnum, .bg-surface .vline { box-shadow: 0 0 0 6px var(--bg-surface), 0 6px 18px -6px rgba(0,170,255,0.7); }

/* ---------- Tech marquee section spacing ---------- */
.tech-section { padding-bottom: var(--section-pad) !important; }
.tech-section .marquee { margin-top: 44px; }

/* ---------- Illustrated case cards ---------- */
.cases-grid { perspective: 1000px; }
.case-card { padding-top: 0; overflow: hidden; }
.case-media {
  height: 120px; margin: 0 -32px 22px; display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.case-media svg { width: 44px; height: 44px; color: #fff; opacity: 0.95; position: relative; z-index: 1; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)); }
.case-media::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: 16px 16px; opacity: 0.5;
}
.case-media.m1 { background: linear-gradient(135deg, #0066cc, #00AAFF); }
.case-media.m2 { background: linear-gradient(135deg, #00AAFF, #39FF14); }
.case-media.m3 { background: linear-gradient(135deg, #1a3a6b, #0066cc); }
.case-media.m4 { background: linear-gradient(135deg, #2fb00a, #39FF14); }

/* ---------- Hero aurora inside service hero ---------- */
.svc-page .service-hero { isolation: isolate; }
.svc-page .service-hero .hero-aurora { z-index: 0; }
.svc-page .service-hero .container { position: relative; z-index: 2; }

@media (max-width: 768px) {
  .vtimeline { padding-left: 0; }
  .case-media { margin: 0 -24px 18px; }
}

/* ============================================================
   3D analysis funnel (section «Сначала бизнес — потом дизайн»)
   ============================================================ */
.funnel {
  position: relative;
  max-width: 820px;
  margin: 40px auto 0;
  aspect-ratio: 1000 / 1080;
}
.funnel-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* cone */
.funnel-rings ellipse { fill: none; stroke: rgba(0,170,255,0.16); stroke-width: 1.4; }
.funnel-wall { fill: none; stroke: rgba(0,170,255,0.22); stroke-width: 1.5; stroke-dasharray: 3 7; }
.funnel-conns line { stroke: var(--hairline); stroke-width: 1.4; stroke-dasharray: 2 6; }

/* lightning channel */
.funnel-base { fill: none; stroke: rgba(120,180,255,0.16); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.funnel-trail {
  fill: none; stroke: url(#flLine); stroke-width: 3.5;
  stroke-linecap: round; stroke-linejoin: round;
  filter: url(#flGlow);
}

/* nodes */
.funnel-node { fill: var(--bg-surface); stroke: var(--accent-blue); stroke-width: 2; transition: fill .3s, stroke .3s; }
.funnel-node.on { fill: var(--accent-green); stroke: var(--accent-green); filter: url(#flGlow); }
.funnel-node-final { stroke: var(--accent-green); }

/* electric impulse */
.funnel-pulse .core { fill: #eafff4; filter: url(#flGlow); }
.funnel-pulse .halo { fill: rgba(57,255,20,0.35); animation: flHalo 1.2s ease-in-out infinite; }
@keyframes flHalo { 0%,100% { opacity: .55; } 50% { opacity: .15; } }

/* labels */
.funnel-label {
  position: absolute;
  width: 30%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  pointer-events: none;
}
.funnel-label.left  { left: 0;  text-align: right; transform: translate(-14px, -50%); }
.funnel-label.right { right: 0; text-align: left;  transform: translate(14px, -50%); }
.funnel-label.final { left: 50%; width: 360px; max-width: 80%; text-align: center; transform: translate(-50%, 12px); }
.funnel-label.show { opacity: 1; }
.funnel-label.left.show  { transform: translate(0, -50%); }
.funnel-label.right.show { transform: translate(0, -50%); }
.funnel-label.final.show { transform: translate(-50%, 0); }

.fl-card {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 36px -22px rgba(0,0,0,0.9);
  text-align: left;
}
.funnel-label.left .fl-card { flex-direction: row-reverse; }
.fl-card .fl-n {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
}
.fl-card .fl-n svg { color: var(--bg-deep); }
.fl-card p { font-size: 13.5px; line-height: 1.3; color: var(--text-primary); }
.fl-card.fl-final {
  border-color: var(--accent-green);
  background: rgba(57,255,20,0.08);
  box-shadow: 0 0 28px rgba(57,255,20,0.22);
}
.fl-card.fl-final p { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .funnel-pulse .halo { animation: none; }
  .funnel-label { transition: none; }
}

/* mobile: stack labels as a sequential list, hide the cone graphic */
@media (max-width: 760px) {
  .funnel { aspect-ratio: auto; max-width: 440px; display: flex; flex-direction: column; gap: 12px; padding-left: 22px; }
  .funnel::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--accent-blue), var(--accent-green)); border-radius: 2px; }
  .funnel-svg { display: none; }
  .funnel-label, .funnel-label.left, .funnel-label.right, .funnel-label.final {
    position: static; width: auto; max-width: none; text-align: left;
    transform: translateX(-12px); left: auto; right: auto;
  }
  .funnel-label.show, .funnel-label.left.show, .funnel-label.right.show, .funnel-label.final.show { transform: translateX(0); }
  .funnel-label.left .fl-card { flex-direction: row; }
  .fl-card { display: flex; width: 100%; }
  .funnel-label::before { content: ''; position: absolute; left: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-green); margin-top: 16px; box-shadow: 0 0 10px rgba(57,255,20,0.6); }
}

/* ============================================================
   «Знакомо?» → «Мы делаем по-другому»
   Impulse runs the line, every point lights up in neon on approach
   ============================================================ */
section.familiar {
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 74% 76%, rgba(57,255,20,0.10), transparent 62%),
    radial-gradient(ellipse 50% 42% at 10% 16%, rgba(0,140,255,0.10), transparent 64%),
    #030A14;
}
/* faint circuit grid */
.familiar .fam-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(120,180,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,180,255,0.05) 1px, transparent 1px),
    linear-gradient(rgba(120,180,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,180,255,0.035) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 42% 45%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 70% 62% at 42% 45%, #000 0%, transparent 78%);
  opacity: .8;
}

.fam-stage {
  --u: min(12px, calc(1.0417vw - 0.5px));
  position: relative;
  aspect-ratio: 1536 / 1024;
  font-size: var(--u);
  line-height: 1.35;
}
.fam-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* ---------- heading (beats the .svc-page type scale) ---------- */
.fam-stage .fam-title {
  position: absolute; left: 5.2%; top: 3.5%;
  margin: 0; z-index: 3;
  font-size: 3.9em; line-height: 1; letter-spacing: -0.02em;
  font-weight: 800; color: #fff;
  text-shadow: 0 0 40px rgba(0,170,255,0.28);
}

/* ---------- the line ---------- */
.fam-base { fill: none; stroke: rgba(120,180,255,0.18); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fam-trail {
  fill: none; stroke: url(#famLine); stroke-width: 3.6;
  stroke-linecap: round; stroke-linejoin: round;
  filter: url(#famGlow);
}
.fam-arrowhead { fill: var(--accent-green); filter: url(#famGlow); opacity: 0; transition: opacity .5s var(--ease); }
.fam-stage.done .fam-arrowhead { opacity: 1; }

/* dead ends */
.fam-dead-line { fill: none; stroke: rgba(0,170,255,0.35); stroke-width: 2; stroke-dasharray: 8 9; stroke-linecap: round; }
.fam-dead-x { fill: none; stroke: rgba(0,170,255,0.6); stroke-width: 2.6; stroke-linecap: round; }

/* glitch fragments */
.fam-glitch rect { fill: #FF2D55; opacity: 0; animation: famGlitch 3.6s var(--gd, 0s) infinite steps(1, end); }
@keyframes famGlitch {
  0%, 6% { opacity: .85; } 7%, 11% { opacity: 0; } 12%, 15% { opacity: .6; } 16%, 100% { opacity: 0; }
}

/* ---------- nodes ---------- */
.fam-node {
  fill: #061426; stroke: rgba(0,170,255,0.55); stroke-width: 2.2;
  transition: fill .35s var(--ease), stroke .35s var(--ease), filter .35s var(--ease);
}
.fam-node-start { fill: #DCF2FF; stroke: #00AAFF; stroke-width: 3; filter: url(#famGlow); }
.fam-node.on { fill: #EAF9FF; stroke: var(--accent-blue); filter: url(#famGlowSm); }
.fam-node-g { stroke: rgba(57,255,20,0.5); }
.fam-node-g.on { fill: #EFFFE9; stroke: var(--accent-green); filter: url(#famGlow); }
.fam-node.flash { filter: url(#famGlow); }
.fam-mark { fill: none; stroke: none; }

/* impulse */
.fam-pulse .core { fill: #F2FFFB; filter: url(#famGlow); }
.fam-pulse .halo { fill: rgba(120,220,255,0.32); animation: famHalo 1.15s ease-in-out infinite; }
@keyframes famHalo { 0%, 100% { opacity: .6; } 50% { opacity: .12; } }

/* connectors + anchors */
.fam-conn {
  fill: none; stroke: rgba(120,180,255,0.28); stroke-width: 1.8;
  stroke-dasharray: 2 7; stroke-linecap: round;
  transition: stroke .45s var(--ease);
}
.fam-conn.on { stroke: rgba(0,170,255,0.75); }
.fam-anchor { fill: #0A1628; stroke: rgba(0,170,255,0.5); stroke-width: 2; transition: fill .35s, stroke .35s, filter .35s; }
.fam-anchor.on { fill: var(--accent-blue); stroke: var(--accent-blue); filter: url(#famGlowSm); }

/* ---------- portal ---------- */
.fam-portal-glow { opacity: 0; transition: opacity .9s var(--ease); }
.fam-portal-glow.on { opacity: 1; }
.fam-portal-fill  { fill: url(#famPortalFill); opacity: 0; transition: opacity .8s var(--ease); }
.fam-portal-frame { fill: none; stroke: var(--accent-green); stroke-width: 6; stroke-linejoin: round; opacity: .3; transition: opacity .7s var(--ease), filter .7s var(--ease); }
.fam-portal-inner { fill: none; stroke: rgba(220,255,210,0.85); stroke-width: 1.6; stroke-linejoin: round; opacity: 0; transition: opacity .7s var(--ease); }
.fam-portal.on .fam-portal-fill  { opacity: 1; }
.fam-portal.on .fam-portal-frame { opacity: 1; filter: url(#famGlow); }
.fam-portal.on .fam-portal-inner { opacity: 1; }

/* ---------- pain point blocks ---------- */
.fam-item {
  position: absolute;
  left: var(--l); top: var(--t); width: var(--w);
  z-index: 2;
  opacity: 0;
  transform: translateY(0.9em);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.fam-item.on { opacity: 1; transform: translateY(0); }

.fam-text {
  font-size: 1.45em; line-height: 1.26; font-weight: 500;
  color: #C6D8F2;
  margin: 0 0 0.75em;
  transition: color .5s var(--ease), text-shadow .5s var(--ease);
}
.fam-item.on .fam-text { color: #EAF3FF; text-shadow: 0 0 18px rgba(0,170,255,0.25); }
.fam-text .hl-blue { color: #7FC9FF; transition: color .5s var(--ease), text-shadow .5s var(--ease); }
.fam-item.on .fam-text .hl-blue { color: #3FB8FF; text-shadow: 0 0 14px rgba(0,170,255,0.7), 0 0 34px rgba(0,170,255,0.35); }
.fam-item.flash .fam-text .hl-blue { text-shadow: 0 0 20px rgba(0,170,255,0.95), 0 0 46px rgba(0,170,255,0.5); }

/* generic mini card */
.fam-card {
  display: inline-block;
  padding: 0.95em 1.35em;
  border-radius: 0.8em;
  background: rgba(10,22,40,0.72);
  border: 1px solid rgba(120,180,255,0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease), background .5s var(--ease);
}
.fam-item.on .fam-card {
  border-color: rgba(0,170,255,0.5);
  box-shadow: 0 0 26px rgba(0,170,255,0.18), inset 0 0 22px rgba(0,170,255,0.06);
}
.fam-item.flash .fam-card { box-shadow: 0 0 40px rgba(0,170,255,0.34), inset 0 0 26px rgba(0,170,255,0.1); }

.fc-label {
  display: block;
  font-size: 0.92em; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.5em;
}
.fc-row { display: flex; align-items: center; gap: 0.6em; white-space: nowrap; }
.fc-old { font-size: 1.4em; color: #8FA6C8; text-decoration-line: line-through; text-decoration-color: #FF2D55; text-decoration-thickness: 2px; }
.fc-arrow { width: 1.3em; height: 1.3em; color: #4E6A94; }
.fc-new { font-size: 1.4em; font-weight: 600; color: #3FB8FF; }
.fam-item.on .fc-new { text-shadow: 0 0 16px rgba(0,170,255,0.6); }

/* leads card */
.fam-card-leads { width: 100%; }
.fc-zero { font-size: 2.2em; font-weight: 700; color: #3FB8FF; line-height: 1.1; }
.fam-item.on .fc-zero { text-shadow: 0 0 20px rgba(0,170,255,0.55); }
.fc-spark { width: 100%; height: 3.4em; margin-top: 0.4em; overflow: visible; }
.fc-spark .fc-spark-line { fill: none; stroke: #2E7FD4; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fc-spark circle { fill: #2E7FD4; }
.fam-item.on .fc-spark .fc-spark-line { stroke: #3FB8FF; }
.fam-item.on .fc-spark circle { fill: #3FB8FF; }

/* avatars — иконка + название роли под ней: 1-й ряд — иконки и разделители, 2-й — подписи */
.fam-avatars {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: start; justify-items: center; align-items: center;
  column-gap: 0.55em; row-gap: 0.5em;
}
.fav {
  grid-row: 1;
  width: 3.1em; height: 3.1em; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(120,180,255,0.2);
  background: rgba(10,22,40,0.7);
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease), color .5s var(--ease);
}
.fav svg { width: 1.6em; height: 1.6em; }
.fav.a1 { color: #2C6EC4; }
.fav.a2 { color: #1F9E8E; }
.fav.a3 { color: #5A6B84; }
.fam-item.on .fav.a1 { color: #4E9BFF; border-color: rgba(0,140,255,0.55); box-shadow: 0 0 20px rgba(0,140,255,0.28); }
.fam-item.on .fav.a2 { color: #35E0C6; border-color: rgba(53,224,198,0.5); box-shadow: 0 0 20px rgba(53,224,198,0.24); }
.fam-item.on .fav.a3 { color: #8A9BB5; border-color: rgba(140,160,190,0.35); }
.fav-sep { grid-row: 1; color: #3C516F; font-size: 1.2em; letter-spacing: 0.1em; }
.fav-role {
  grid-row: 2;
  font-size: 1.05em; line-height: 1.2; white-space: nowrap;
  color: #7C93B5;
  transition: color .5s var(--ease);
}
.fav-role.r1 { grid-column: 1; }
.fav-role.r2 { grid-column: 3; }
.fav-role.r3 { grid-column: 5; }
.fam-item.on .fav-role { color: #A9BFDD; }

/* invoices */
.fam-invoices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75em; }
.finv {
  position: relative;
  padding: 0.85em 1em 0.95em;
  border-radius: 0.7em;
  background: rgba(10,22,40,0.6);
  border: 1px solid rgba(120,180,255,0.12);
  opacity: .45;
  transition: opacity .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.finv.is-live { opacity: .75; }
.fam-item.on .finv { opacity: .6; }
.fam-item.on .finv.is-live {
  opacity: 1;
  border-color: rgba(0,170,255,0.5);
  box-shadow: 0 0 26px rgba(0,170,255,0.2);
}
.finv-id   { display: block; font-size: 0.9em; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.finv-name { display: block; font-size: 1.06em; line-height: 1.25; color: #B9CCE8; margin: 0.45em 0 0.3em; }
.finv-sum  { display: block; font-size: 1.28em; font-weight: 600; color: #7FC9FF; }
.finv.is-live .finv-sum { color: #3FB8FF; }
.fam-item.on .finv.is-live .finv-sum { text-shadow: 0 0 16px rgba(0,170,255,0.6); }
.finv-badge {
  position: absolute; top: -0.5em; right: -0.4em;
  width: 1.5em; height: 1.5em; border-radius: 0.4em;
  display: grid; place-items: center;
  font-size: 0.9em; font-weight: 700; color: #fff;
  background: #E01B3C;
  box-shadow: 0 0 0 rgba(224,27,60,0);
  transition: box-shadow .5s var(--ease);
}
.fam-item.on .finv-badge { box-shadow: 0 0 16px rgba(224,27,60,0.65); }

/* ---------- solution ---------- */
.fam-solution {
  position: absolute; left: 65.5%; top: 63%; width: 34%;
  z-index: 3;
  opacity: 0; transform: translateY(0.8em);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.fam-solution.on { opacity: 1; transform: translateY(0); }
.fam-sol-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 3.2em; line-height: 1.06; font-weight: 800; letter-spacing: -0.02em;
  color: #fff;
}
.fam-sol-title .accent { color: var(--accent-green); }
.fam-solution.on .fam-sol-title .accent { text-shadow: 0 0 24px rgba(57,255,20,0.55), 0 0 60px rgba(57,255,20,0.28); }

/* ---------- benefits ---------- */
.fam-benefits {
  position: absolute; left: 64.1%; top: 84.2%; width: 33.5%;
  z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.fben {
  padding: 0 0.7em;
  border-left: 1px solid rgba(120,180,255,0.14);
  opacity: 0; transform: translateY(0.7em);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.fben:first-child { border-left: none; padding-left: 0; }
.fben.on { opacity: 1; transform: translateY(0); }
.fben svg { width: 1.9em; height: 1.9em; color: var(--accent-green); margin-bottom: 0.7em; }
.fben.on svg { filter: drop-shadow(0 0 10px rgba(57,255,20,0.6)); }
.fben.flash svg { filter: drop-shadow(0 0 18px rgba(57,255,20,0.95)); }
.fben p { margin: 0; font-size: 0.97em; line-height: 1.32; color: #9FB4D2; }
.fben.on p { color: #D5E4F7; }

@media (prefers-reduced-motion: reduce) {
  .fam-pulse .halo, .fam-glitch rect { animation: none; }
  .fam-item, .fam-solution, .fben, .fam-node, .fam-conn { transition: none; }
}

/* ============================================================
   «Знакомо?» — mobile: sequential list, no geometry
   ============================================================ */
@media (max-width: 900px) {
  .familiar .fam-bg { -webkit-mask-image: none; mask-image: none; opacity: .5; }

  .fam-stage {
    --u: 12px;
    aspect-ratio: auto;
    display: flex; flex-direction: column;
    font-size: 16px;
  }
  .fam-svg { display: none; }

  .fam-stage .fam-title { position: static; font-size: 40px; margin-bottom: 28px; }

  .fam-item, .fam-solution, .fam-benefits {
    position: static; left: auto; top: auto; width: auto;
  }
  .fam-item {
    position: relative;
    padding: 0 0 26px 22px;
    transform: translateX(-10px);
  }
  .fam-item.on { transform: translateX(0); }
  /* neon rail linking the points */
  .fam-item::before {
    content: ''; position: absolute; left: 5px; top: 12px; bottom: -6px;
    width: 2px; background: linear-gradient(180deg, rgba(0,170,255,0.65), rgba(0,170,255,0.12));
  }
  .fam-item:last-of-type::before { background: linear-gradient(180deg, rgba(0,170,255,0.55), rgba(57,255,20,0.5)); }
  .fam-item::after {
    content: ''; position: absolute; left: 0; top: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #061426; border: 2px solid rgba(0,170,255,0.5);
    transition: background .35s, box-shadow .35s;
  }
  .fam-item.on::after { background: var(--accent-blue); box-shadow: 0 0 14px rgba(0,170,255,0.75); }

  .fam-text { font-size: 19px; margin-bottom: 14px; }
  .fam-card { padding: 14px 18px; border-radius: 12px; }
  .fam-card-leads { max-width: 320px; }
  .fc-label, .finv-id { font-size: 12px; }
  .fc-old, .fc-new { font-size: 20px; }
  .fc-arrow { width: 18px; height: 18px; }
  .fc-zero { font-size: 30px; }
  .fc-spark { height: 44px; }
  .fav { width: 46px; height: 46px; }
  .fav svg { width: 24px; height: 24px; }
  .fav-role { font-size: 14px; }
  .fam-invoices { grid-template-columns: 1fr; gap: 14px; max-width: 320px; }
  .finv { padding: 12px 14px 14px; }
  .finv-name { font-size: 14px; }
  .finv-sum { font-size: 18px; }
  .finv-badge { font-size: 12px; width: 20px; height: 20px; }

  .fam-solution { margin: 22px 0 26px; }
  .fam-sol-title { font-size: 38px; }

  .fam-benefits { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; }
  .fben { padding: 0; border-left: none; }
  .fben svg { width: 26px; height: 26px; margin-bottom: 10px; }
  .fben p { font-size: 14px; }
  .fben p br { display: none; }
}

@media (max-width: 480px) {
  .fam-stage .fam-title { font-size: 34px; }
  .fam-sol-title { font-size: 31px; }
  .fam-text { font-size: 17px; }
  .fam-benefits { grid-template-columns: 1fr; gap: 18px; }
}

/* ============================================================
   «Знакомо?» v2 — плавная линия, карточки-объекты, блок решений
   Дополняет базовые .fam-* выше. Мобильная версия — черновая.
   ============================================================ */

section.familiar.v2 { padding: var(--section-pad) 0; }
.fam-stage.v2-stage { aspect-ratio: 1536 / 1030; }

/* ---------- заголовок ---------- */
.fam-ghost {
  position: absolute; left: 3.2%; top: 1.6%;
  z-index: 0; pointer-events: none; user-select: none;
  font-family: var(--font-display);
  font-size: 10em; font-weight: 800; line-height: 1;
  letter-spacing: -0.04em; text-transform: uppercase;
  color: rgba(226,238,255,0.055);
  white-space: nowrap;
}
.fam-stage.v2-stage .fam-title {
  left: 4.5%; top: 5.7%;
  z-index: 2;
}

/* ---------- дверь: косяк, открытая створка, ручка, свет из проёма ---------- */
.fam-door > * { opacity: 0; transition: opacity .8s var(--ease); }
.fam-door.on > * { opacity: 1; }
.door-light { fill: url(#v3DoorLight); }
.door-glow  { fill: rgba(57,255,20,0.5); filter: url(#famGlow); }
.fam-door.on .door-glow { opacity: .75; }
.door-jamb {
  fill: none; stroke: var(--accent-green); stroke-width: 5;
  stroke-linejoin: round; stroke-linecap: square;
}
.fam-door.on .door-jamb { filter: url(#famGlow); }
.door-leaf {
  fill: #081524; stroke: rgba(57,255,20,0.8); stroke-width: 2.4;
  stroke-linejoin: round;
}
.door-panel { fill: none; stroke: rgba(57,255,20,0.4); stroke-width: 1.5; stroke-linejoin: round; }
.door-knob  { fill: #DFFFD2; }
.fam-door.on .door-knob { filter: url(#famGlowSm); }

/* ---------- линия ---------- */
.v2-stage .fam-trail { stroke: url(#v2Line); stroke-width: 3.4; }
.v2-stage .fam-base  { stroke: rgba(120,180,255,0.13); stroke-width: 2.2; }
.v2-stage .fam-portal-fill { fill: url(#v2PortalFill); }
/* стрелка вниз — указывает на следующий модуль */
.v2-stage .fam-arrowhead { fill: var(--accent-green); }

/* ---------- пункты: приглушены, активный горит (вариант B) ---------- */
.v2-stage .fam-item {
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease);
}
.v2-stage .fam-item.on  { opacity: .5; filter: saturate(.6); }
/* статичный кадр (reduced motion): фокусировать нечего — показываем всё */
.v2-stage.static .fam-item.on { opacity: 1; filter: none; }
.v2-stage.static .fam-item.on .fam-text { color: #EAF3FF; }
.v2-stage .fam-item.now { opacity: 1; filter: none; }
.v2-stage .fam-item.on  .fam-text { color: #92A9CA; text-shadow: none; }
.v2-stage .fam-item.now .fam-text { color: #EAF3FF; }
.v2-stage .fam-item[data-key="p1"] .hl-blue,
.v2-stage .fam-item[data-key="p2"] .hl-blue { color: inherit; text-shadow: none; }

.v2-stage .fam-node.on  { fill: #0B1E36; filter: none; }
.v2-stage .fam-node.now { fill: #EAF9FF; filter: url(#famGlowSm); }
.v2-stage .fam-conn.on  { stroke: rgba(120,180,255,0.22); }
.v2-stage .fam-conn.now { stroke: rgba(0,170,255,0.7); }
.v2-stage .fam-anchor.on  { fill: #123256; filter: none; }
.v2-stage .fam-anchor.now { fill: var(--accent-blue); filter: url(#famGlowSm); }
.v2-stage .fam-solution.on { opacity: 1; filter: none; }

/* пункты слева от линии — текст и карточки прижаты вправо */
.fam-item.side-left { text-align: right; }
.fam-item.side-left .cal,
.fam-item.side-left .bank,
.fam-item.side-left .drain,
.fam-item.side-left .fam-card { margin-left: auto; }
.fam-item.side-left .fam-avatars { justify-content: flex-end; }

/* ---------- 1. отрывной календарь ---------- */
.cal {
  position: relative;
  display: inline-block;
  width: 9.4em; padding-top: 0.7em;
  border-radius: 0.7em;
  background: #0E1A2C;
  border: 1px solid rgba(120,180,255,0.18);
  overflow: hidden;
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.fam-item.now .cal { border-color: rgba(0,170,255,0.42); box-shadow: 0 14px 40px -26px #000; }
/* перфорация по верхнему краю */
.cal::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 0.75em;
  background: radial-gradient(circle at 0.45em -0.1em, transparent 0.32em, #0E1A2C 0.33em) repeat-x;
  background-size: 0.9em 100%;
}
.cal-rings { position: absolute; top: 0.05em; left: 0; right: 0; display: flex; justify-content: center; gap: 3em; z-index: 2; }
.cal-rings i { width: 0.5em; height: 1.15em; border-radius: 0.25em; background: #43587A; display: block; }
.cal-top {
  margin-top: 0.35em; padding: 0.35em 0;
  text-align: center; text-transform: uppercase;
  font-size: 0.88em; font-weight: 700; letter-spacing: 0.2em;
  color: #FFD9DF; background: #B3213B;
}
.cal-body { padding: 0.6em 0 0.95em; text-align: center; }
.cal-num {
  position: relative; display: inline-block;
  font-family: var(--font-display); font-weight: 800;
  font-size: 2.65em; line-height: 1; color: #6D82A2;
}
.cal-strike { position: absolute; left: -12%; top: 0; width: 124%; height: 100%; overflow: visible; }
.cal-strike path { fill: none; stroke: #FF3B5C; stroke-width: 6; stroke-linecap: round; }
.cal-hand {
  margin-top: 0.15em;
  font-family: 'Caveat', 'Bradley Hand', cursive;
  font-size: 1.9em; font-weight: 600; color: #C8D6EA;
  white-space: nowrap;   /* «28 травня» длиннее «28 мая» — не даём разорвать дату */
  transform: rotate(-5deg);
}
.fam-item.now .cal-hand { color: #EAF3FF; }

/* ---------- 2. подписи ролей — см. .fav-role в блоке avatars ---------- */

/* ---------- 3. списание из банковского приложения ---------- */
.bank {
  display: flex; align-items: center; gap: 0.9em;
  width: 100%; max-width: 26em;
  padding: 0.95em 1.15em;
  border-radius: 0.9em;
  background: rgba(12,24,42,0.85);
  border: 1px solid rgba(120,180,255,0.16);
  text-align: left;
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.fam-item.now .bank { border-color: rgba(255,59,92,0.4); box-shadow: 0 0 26px -8px rgba(255,59,92,0.35); }
.bank-ico {
  flex-shrink: 0; width: 2.6em; height: 2.6em; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,59,92,0.14); color: #FF6B85;
}
.bank-ico svg { width: 1.3em; height: 1.3em; }
.bank-mid { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bank-title { font-size: 1.15em; font-weight: 600; color: #D5E4F7; }
.bank-sub   { font-size: 0.92em; color: #6B82A8; }
.bank-sum {
  flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.5em; color: #FF3B5C; white-space: nowrap;
}
.fam-item.now .bank-sum { text-shadow: 0 0 18px rgba(255,59,92,0.5); }

/* ---------- 4. деньги уходят, заявок нет ---------- */
.drain {
  display: inline-block; width: 100%; max-width: 27em;
  padding: 0.85em 1.05em 0.75em;
  border-radius: 0.9em;
  background: rgba(12,24,42,0.72);
  border: 1px solid rgba(120,180,255,0.16);
  text-align: left;
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.fam-item.now .drain { border-color: rgba(255,59,92,0.38); box-shadow: 0 0 26px -8px rgba(255,59,92,0.32); }
.drain-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1em; margin-bottom: 0.7em; }
.dh-item { display: flex; flex-direction: column; }
.dh-k { font-size: 0.88em; letter-spacing: 0.06em; text-transform: uppercase; color: #6B82A8; }
.dh-v { font-family: var(--font-display); font-weight: 700; font-size: 1.6em; line-height: 1.2; }
.dh-v.red  { color: #FF3B5C; }
.dh-v.zero { color: #5E738F; }
.fam-item.now .dh-v.red { text-shadow: 0 0 18px rgba(255,59,92,0.45); }

.drain-chart { width: 100%; height: 5.6em; display: block; }
.drain-area { fill: url(#drainFill); }
.drain-line { fill: none; stroke: #FF3B5C; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.drain-zero { fill: none; stroke: #4C6288; stroke-width: 2; }
.drain-zero-dots circle { fill: #4C6288; }
.drain-dot  { fill: #FF3B5C; }

.drain-legend { display: flex; gap: 1.4em; margin-top: 0.5em; }
.lg { display: inline-flex; align-items: center; gap: 0.45em; font-size: 0.92em; color: #6B82A8; }
.lg i { width: 0.7em; height: 0.7em; border-radius: 2px; display: block; }
.lg.red i { background: #FF3B5C; }
.lg.mut i { background: #3B4E6B; }

/* ---------- решение ---------- */
.v2-stage .fam-solution {
  left: 65.5%; top: 72.57%; width: 33%;
}

/* ============================================================
   БЛОК 2 — как именно мы делаем по-другому
   ============================================================ */
section.familiar.v2.sol-block { padding: 0 0 var(--section-pad); }
.fam-stage.sol-stage { aspect-ratio: 1536 / 990; }

.sol-base  { stroke: rgba(57,255,20,0.14); stroke-width: 2.2; }
.sol-trail { stroke: url(#solLine); stroke-width: 3.4; }

.sol-row {
  position: absolute;
  /* правый край строки держим внутри зелёной рамки (её стенка — x=1410 из 1536) */
  left: 16.93%; width: 73.2%;
  top: var(--t);
  display: grid;
  grid-template-columns: 4.6% 35% 1fr;
  column-gap: 3.2%;
  align-items: start;
  opacity: 0; transform: translate(-0.9em, -18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.sol-row.on { opacity: 1; transform: translate(0, -18px); }

.sol-ico {
  width: 3.2em; height: 3.2em; margin-top: -0.4em;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent-green);
  background: rgba(57,255,20,0.10);
  border: 1px solid rgba(57,255,20,0.28);
  transition: box-shadow .5s var(--ease), background .5s var(--ease);
}
.sol-ico svg { width: 1.6em; height: 1.6em; }
.sol-row.on .sol-ico { box-shadow: 0 0 22px -4px rgba(57,255,20,0.45); background: rgba(57,255,20,0.16); }

.sol-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7em; line-height: 1.25; font-weight: 700;
  color: #EAF3FF;
}
.sol-row.on .sol-title { text-shadow: 0 0 22px rgba(57,255,20,0.18); }

.sol-desc {
  margin: 0;
  font-size: 1.28em; line-height: 1.5;
  color: #9FB4D2;
}
.sol-row.on .sol-desc { color: #C3D4EC; }

/* ============================================================
   Мобильная версия — черновая, дорабатываем после десктопа
   ============================================================ */
@media (max-width: 900px) {
  .fam-stage.v2-stage { aspect-ratio: auto; }
  .fam-ghost { font-size: 64px; top: 0; left: 0; }
  .fam-stage.v2-stage .fam-title { left: auto; top: auto; }

  .fam-item.side-left { text-align: left; }
  .fam-item.side-left .cal,
  .fam-item.side-left .bank,
  .fam-item.side-left .drain { margin-left: 0; }
  .fam-item.side-left .fam-avatars { justify-content: flex-start; }

  .v2-stage .fam-item { opacity: .38; }
  .v2-stage .fam-item.now { opacity: 1; }

  .cal { width: 132px; }
  .bank, .drain { max-width: 320px; }
  .dh-k { font-size: 12px; line-height: 1.25; }
  .drain-chart { height: 90px; }
  .next-stub p { margin: 0 auto; }
}

/* ============================================================
   «Знакомо?» v3 — ровная геометрия вместо свободной кривой
   Вертикальный рельс слева (та же линия, что левая стенка зелёной рамки
   блока «Мы делаем по-другому»), одинаковые строки «текст + панель визуала»,
   панели выровнены по правому краю. Геометрию линии считает main.js
   по реальной вёрстке — поэтому блок не ломается от длины текста и языка.
   ============================================================ */
section.familiar.v3 { padding: var(--section-pad) 0 0; }

.fam-stage.v3-stage {
  --rail: 13.02%;                    /* = 200/1536, совпадает с рамкой блока 2 */
  --gap: 5.4%;                       /* отступ контента от рельса */
  --pad: calc(var(--rail) + var(--gap));
  aspect-ratio: auto;                /* высоту задаёт контент, а не картинка */
  padding-bottom: 10.5em;            /* место для выхода линии вниз-вправо */
}
/* невидимая метка: JS читает её, чтобы знать x рельса при любых единицах */
.v3-stage .fam-rail { position: absolute; left: var(--rail); top: 0; width: 0; height: 0; }
.v3-stage .fam-svg { z-index: 0; }

/* ---------- заголовок ---------- */
.v3-stage .fam-head { position: relative; z-index: 2; padding-left: var(--pad); margin-bottom: 3em; }
.v3-stage .fam-ghost { left: 0; top: -0.3em; font-size: 9.4em; }
.fam-stage.v3-stage .fam-title { position: static; font-size: 4.2em; }

/* ---------- строки ---------- */
.v3-stage .fam-rows { position: relative; z-index: 2; padding-left: var(--pad); }
.v3-stage .fam-item {
  position: relative; left: auto; top: auto; width: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30em;
  column-gap: 2.8em;
  align-items: center;
  padding: 2em 0;
  opacity: 0; transform: translateX(-1.2em);
  transition: opacity .55s var(--ease), transform .55s var(--ease), filter .55s var(--ease);
}
.v3-stage .fam-item + .fam-item { border-top: 1px solid rgba(120,180,255,0.09); }
.v3-stage .fam-item.on  { opacity: 1; transform: translateX(0); }

.v3-stage .fam-text {
  margin: 0; max-width: 23em;
  font-size: 1.62em; line-height: 1.34; font-weight: 500;
  color: #92A9CA; text-shadow: none;
}
.v3-stage .fam-item.on .fam-text { color: #EAF3FF; }
.v3-stage .fam-text .hl-blue { color: #7FC9FF; text-shadow: none; }
.v3-stage .fam-item.now .fam-text .hl-blue { color: #3FB8FF; text-shadow: 0 0 14px rgba(0,170,255,0.55); }

/* ---------- панель визуала: одинаковый прямоугольник в каждой строке ---------- */
.v3-stage .fam-visual {
  justify-self: end;
  display: grid; place-items: center;
  width: 100%; min-height: 10.2em;
  padding: 1.5em;
  border-radius: 1.1em;
  background: rgba(9,19,34,0.62);
  border: 1px solid rgba(120,180,255,0.12);
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease), background .5s var(--ease);
}
.v3-stage .fam-item.now .fam-visual {
  border-color: rgba(0,170,255,0.3);
  background: rgba(12,26,46,0.8);
  box-shadow: 0 0 40px -14px rgba(0,170,255,0.6);
}
/* внутренние карточки живут внутри общей панели — своя рамка им не нужна */
.v3-stage .fam-visual .bank,
.v3-stage .fam-visual .drain {
  width: 100%; max-width: none; padding: 0;
  background: none; border: 0; box-shadow: none;
}
.v3-stage .fam-visual .drain-chart { height: 5em; }
.v3-stage .fam-visual .cal { margin: 0; }

/* ---------- финал: ворота на рельсе + «мы делаем по-другому» ---------- */
.v3-stage .fam-solution {
  position: relative; left: auto; top: auto; width: auto; z-index: 2;
  padding-left: var(--pad); margin-top: 2.4em; min-height: 14em;
  display: flex; align-items: center;
  opacity: 0; transform: translateY(0.9em);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.v3-stage .fam-solution.on { opacity: 1; transform: translateY(0); filter: none; }
/* слот = проём двери; косяк, створка и ручка рисуются вокруг него в SVG */
.v3-stage .fam-portal-slot {
  position: absolute; left: var(--rail); top: 50%;
  width: 4.8em; height: 11.4em; transform: translate(-50%, -50%);
}
.v3-stage .fam-sol-title { margin: 0; font-size: 3.4em; line-height: 1.12; }

/* ---------- линия ---------- */
.v3-stage .fam-trail { stroke: url(#v3Line); stroke-width: 3; }
.v3-stage .fam-base  { stroke: rgba(120,180,255,0.13); stroke-width: 2; }
.v3-stage .fam-node.on  { fill: #0B1E36; filter: none; }
.v3-stage .fam-node.now { fill: #EAF9FF; filter: url(#famGlowSm); }

/* ============================================================
   «Знакомо?» v3 — mobile: строки в один столбец, рельс рисует CSS
   ============================================================ */
@media (max-width: 900px) {
  .fam-stage.v3-stage { padding-bottom: 0; display: block; }
  .v3-stage .fam-svg, .v3-stage .fam-rail, .v3-stage .fam-portal-slot { display: none; }

  .v3-stage .fam-head { padding-left: 0; margin-bottom: 26px; }
  .v3-stage .fam-ghost { font-size: 64px; top: -0.15em; }
  .fam-stage.v3-stage .fam-title { font-size: 40px; }

  .v3-stage .fam-rows { padding-left: 0; }
  .v3-stage .fam-item {
    grid-template-columns: 1fr; row-gap: 16px;
    padding: 22px 0 26px 22px;
    border-top: 0;
  }
  .v3-stage .fam-item + .fam-item { border-top: 0; }
  .v3-stage .fam-text { font-size: 19px; max-width: none; }
  .v3-stage .fam-visual { justify-self: stretch; max-width: 340px; min-height: 0; padding: 16px; }
  .v3-stage .fam-visual .drain-chart { height: 84px; }

  .v3-stage .fam-solution { padding-left: 22px; margin: 4px 0 22px; min-height: 0; }
  .v3-stage .fam-sol-title { font-size: 38px; }
}

@media (max-width: 480px) {
  .fam-stage.v3-stage .fam-title { font-size: 34px; }
  .v3-stage .fam-sol-title { font-size: 31px; }
  .v3-stage .fam-text { font-size: 17px; }
}

/* ============================================================
   Блок «Мы делаем по-другому» — mobile: строки были абсолютными
   и наезжали друг на друга. Разворачиваем их в обычный список.
   ============================================================ */
@media (max-width: 900px) {
  .fam-stage.sol-stage { aspect-ratio: auto; display: block; }

  .sol-row {
    position: static; left: auto; top: auto; width: auto;
    display: grid; grid-template-columns: 42px 1fr;
    column-gap: 14px; row-gap: 6px;
    padding: 0 0 26px;
    transform: translateX(-10px);
  }
  .sol-row.on { transform: translateX(0); }
  .sol-ico { grid-row: span 2; width: 42px; height: 42px; margin: 2px 0 0; }
  .sol-ico svg { width: 21px; height: 21px; }
  .sol-title { grid-column: 2; font-size: 20px; }
  .sol-desc { grid-column: 2; font-size: 15px; }
  /* последняя строка не добавляет свой padding к нижнему отступу блока */
  .sol-row:last-of-type { padding-bottom: 0; }
}

/* ============================================================
   Единый вертикальный ритм блоков (см. main.css)
   Компенсируем внутренние отступы обёрток, чтобы от края секции
   до текста/графики оставалось ровно --section-pad (90px).
   ============================================================ */
section > .why-grid:last-child,
section > .container > .why-grid:last-child { margin-bottom: -28px; }  /* .why-item { padding: 28px } */

section > .vtimeline:last-child,
section > .container > .vtimeline:last-child { margin-bottom: -12px; } /* .vstep { padding: 12px 0 } */

/* «Мы делаем по-другому»: в viewBox под зелёной рамкой остаётся пустое
   поле 42/990 — из-за него нижний отступ блока был 122px вместо 90px.
   42/1536 ширины сцены = 2.734% (проценты в margin считаются от ширины). */
@media (min-width: 901px) {
  section > .container > .fam-stage.sol-stage { margin-bottom: -2.734%; }
}
