/* ============================================================
   ЯСКРАВІ СЮЖЕТИ — кінематографічні ефекти
   Наліплені на основні стилі, не ламають їх
   ============================================================ */

/* ============================================================
   1. КІНЕМАТОГРАФІЧНИЙ HERO — шари + масштабування
   ============================================================ */
.hero-cinema {
  position: relative;
  min-height: auto;
  padding: 56px 0 64px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0b1d2e;
}

.hero-cinema .cine-bg {
  position: absolute;
  inset: -6%;
  background-image: url("images/pipe-big-opt.jpg");
  background-size: cover;
  background-position: center;
  animation: cineKen 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes cineKen {
  0%   { transform: scale(1.02) translate3d(0,0,0); }
  100% { transform: scale(1.16) translate3d(-1.8%, -1.2%, 0); }
}

.hero-cinema .cine-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(9,24,38,.94) 0%, rgba(9,24,38,.72) 48%, rgba(15,40,62,.42) 100%),
    radial-gradient(900px 460px at 78% 28%, rgba(47,111,168,.36), transparent 68%);
}

/* рухома «іскра» */
.hero-cinema .cine-spark {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,176,90,.30) 0%, transparent 70%);
  filter: blur(30px);
  animation: sparkFloat 14s ease-in-out infinite;
  pointer-events: none;
}
.hero-cinema .cine-spark.s2 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(90,180,255,.26) 0%, transparent 70%);
  animation-duration: 19s; animation-delay: -6s;
}
@keyframes sparkFloat {
  0%,100% { transform: translate(0,0) scale(1); opacity:.7; }
  33%     { transform: translate(60px,-40px) scale(1.15); opacity:1; }
  66%     { transform: translate(-40px,50px) scale(.9); opacity:.55; }
}

.hero-cinema .container { position: relative; z-index: 3; }

/* кінематографічна рамка-смуги */
.hero-cinema::before,
.hero-cinema::after {
  content:"";
  position:absolute; left:0; right:0;
  height: 42px;
  background: linear-gradient(to bottom, rgba(7,18,29,.85), transparent);
  z-index: 2;
  pointer-events: none;
}
.hero-cinema::before { top:0; }
.hero-cinema::after {
  bottom:0;
  background: linear-gradient(to top, rgba(7,18,29,.85), transparent);
}

/* ============================================================
   2. ГОРИЗОНТАЛЬНИЙ ТАЙМЛАЙН «Від труби до відводу»
   ============================================================ */
.process-strip {
  background: #0f2131;
  padding: 46px 0 52px;
  overflow: hidden;
}
.process-strip h2 { color:#fff; }
.process-strip .section-sub { color:#a9c2d6; }

.process-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #2f6fa8 transparent;
}
.process-rail::-webkit-scrollbar { height: 7px; }
.process-rail::-webkit-scrollbar-thumb { background:#2f6fa8; border-radius:4px; }
.process-rail::-webkit-scrollbar-track { background: rgba(255,255,255,.07); border-radius:4px; }

.process-step {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: #16324a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: transform .35s cubic-bezier(.22,.61,.36,1),
              border-color .35s, box-shadow .35s;
}
.process-step:hover {
  transform: translateY(-6px);
  border-color: rgba(232,121,43,.7);
  box-shadow: 0 16px 38px rgba(0,0,0,.42);
}
.process-step .ps-img {
  height: 150px;
  background-size: cover;
  background-position: center;
  position: relative;
  filter: saturate(1.05);
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.process-step:hover .ps-img { transform: scale(1.07); }
.process-step .ps-img::after {
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(to top, rgba(22,50,74,.95), transparent 62%);
}
.process-step .ps-day {
  position:absolute; top:12px; left:12px;
  background:#e8792b; color:#fff;
  font-size:11px; font-weight:800;
  padding: 3px 10px; border-radius: 12px;
  z-index: 2;
  letter-spacing:.3px;
}
.process-step .ps-num {
  position:absolute; top:10px; right:14px;
  font-size: 30px; font-weight: 800;
  color: rgba(255,255,255,.16);
  line-height: 1;
  z-index: 2;
}
.process-step .ps-body { padding: 16px 18px 20px; }
.process-step .ps-body b {
  display:block; color:#fff; font-size:15px; margin-bottom:6px;
}
.process-step .ps-body span { color:#9db6cc; font-size:13px; line-height:1.45; }

.process-hint {
  margin-top: 12px;
  font-size: 12.5px;
  color: #7f9ab0;
  display:flex; align-items:center; gap:8px;
}
.process-hint::before {
  content:"⟵";
  font-size: 15px;
  animation: hintMove 1.6s ease-in-out infinite;
}
@keyframes hintMove {
  0%,100% { transform: translateX(0); opacity:.5; }
  50%     { transform: translateX(-6px); opacity:1; }
}

/* ============================================================
   3. ІНТЕРАКТИВНИЙ ВИБІР КУТА
   ============================================================ */
.angle-picker {
  background: #fff;
  border-radius: 16px;
  padding: 30px 32px 26px;
  box-shadow: 0 16px 46px rgba(31,78,120,.12);
  border: 1px solid #e2e8ee;
  margin-top: 30px;
}
.angle-picker h3 {
  font-size: 17px; color: #1f4e78; margin-bottom: 4px;
}
.angle-picker .ap-sub {
  font-size: 13.5px; color:#61707f; margin-bottom: 20px;
}
.angle-btns {
  display:flex; gap: 9px; flex-wrap: wrap; margin-bottom: 22px;
}
.angle-btn {
  flex: 1 1 70px;
  padding: 11px 8px;
  border: 2px solid #dde3e9;
  background:#fff;
  border-radius: 10px;
  font-size: 14.5px; font-weight: 700;
  color:#4a5a68; cursor:pointer;
  transition: .22s;
  font-family: inherit;
}
.angle-btn:hover { border-color:#2f6fa8; color:#1f4e78; }
.angle-btn.active {
  background:#e8792b; border-color:#e8792b; color:#fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(232,121,43,.35);
}

.ap-stage {
  background:#f4f6f8;
  border-radius: 12px;
  padding: 18px;
  display:flex; align-items:center; justify-content:center;
  min-height: 210px;
}
#angleSvg { width:100%; max-width: 340px; height:auto; display:block; }

.ap-pipe-base {
  fill: none; stroke:#dfe6ec; stroke-width: 30;
  stroke-linecap: round;
}
.ap-pipe-live {
  fill:none; stroke:#1f4e78; stroke-width: 30;
  stroke-linecap: round;
  transition: d .55s cubic-bezier(.34,1.2,.4,1);
}
.ap-flow {
  fill:none; stroke:#47b8ff; stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 14 24;
  animation: apFlow 1.3s linear infinite;
}
@keyframes apFlow { to { stroke-dashoffset: -76; } }
.ap-dot { fill:#e8792b; }
.ap-label {
  font-family: 'Segoe UI', sans-serif;
  font-size: 15px; font-weight: 800;
  fill:#1f4e78;
}
.ap-caption {
  text-align:center; margin-top:14px;
  font-size:14px; color:#61707f;
}
.ap-caption b { color:#1f4e78; }

/* ============================================================
   4. ПОРІВНЯННЯ «Дешевий vs Наш»
   ============================================================ */
.compare-duel {
  display:grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 52px rgba(15,33,49,.18);
  margin: 28px 0 10px;
}
.duel-col { padding: 30px 28px; }
.duel-bad {
  background: linear-gradient(160deg,#3a2530,#2a1b24);
  color:#f0d9df;
}
.duel-good {
  background: linear-gradient(160deg,#123a4f,#0f2b3c);
  color:#d5eaf5;
  position: relative;
}
.duel-good::before {
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(400px 200px at 80% 0%, rgba(46,158,79,.22), transparent 70%);
  pointer-events:none;
}
.duel-head {
  font-size:12px; font-weight:800; letter-spacing:1px;
  text-transform:uppercase; margin-bottom:18px; opacity:.72;
}
.duel-title {
  font-size:20px; font-weight:800; margin-bottom:22px; line-height:1.3;
  position:relative; z-index:1;
}
.duel-row {
  display:flex; justify-content:space-between; gap:12px;
  padding: 11px 0; font-size:14.5px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  position:relative; z-index:1;
}
.duel-row:last-of-type { border-bottom:none; }
.duel-row .dr-label { opacity:.75; }
.duel-row .dr-val { font-weight:700; white-space:nowrap; }
.duel-row.neg .dr-val { color:#ff9a9a; }
.duel-row.pos .dr-val { color:#7fe0a0; }
.duel-total {
  margin-top: 18px; padding-top: 16px;
  border-top: 2px solid rgba(255,255,255,.22);
  display:flex; justify-content:space-between; align-items:baseline;
  position:relative; z-index:1;
}
.duel-total .dt-label { font-size:13px; opacity:.75; }
.duel-total .dt-val { font-size:24px; font-weight:800; letter-spacing:-.5px; }
.duel-bad .dt-val { color:#ff8080; }
.duel-good .dt-val { color:#7fe0a0; }
.duel-note {
  text-align:center; font-size:13px; color:#61707f; margin-top:16px;
}

/* ============================================================
   5. СЛАЙДЕР ДІАМЕТРІВ із автопрокруткою
   ============================================================ */
.diam-slider {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #0f2131;
}
.diam-track {
  display:flex;
  transition: transform .65s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.diam-slide {
  flex: 0 0 100%;
  position: relative;
  min-height: 340px;
  display:flex; align-items:flex-end;
  padding: 34px;
  background-size: cover;
  background-position: center;
}
.diam-slide::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(to top, rgba(9,24,38,.94) 0%, rgba(9,24,38,.42) 55%, rgba(9,24,38,.18) 100%);
}
.diam-slide-body { position:relative; z-index:2; color:#fff; max-width: 520px; }
.diam-slide-body .ds-diam {
  font-size: 42px; font-weight: 800; letter-spacing:-1.5px;
  color:#ffd9b8; line-height:1; margin-bottom:12px;
}
.diam-slide-body .ds-title { font-size:20px; font-weight:700; margin-bottom:10px; }
.diam-slide-body .ds-desc { font-size:14.5px; color:#c3d8e8; margin-bottom:16px; }
.diam-slide-body .ds-btn {
  display:inline-block; background:#e8792b; color:#fff;
  padding: 11px 22px; border-radius: 8px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  transition:.2s;
}
.diam-slide-body .ds-btn:hover { background:#cf6720; transform: translateY(-2px); }

.diam-nav {
  position:absolute; top:50%; transform:translateY(-50%);
  width: 46px; height: 46px; border-radius:50%;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.28);
  color:#fff; font-size: 19px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:.2s; z-index: 5;
  backdrop-filter: blur(6px);
}
.diam-nav:hover { background: rgba(255,255,255,.3); }
.diam-prev { left: 16px; }
.diam-next { right: 16px; }

.diam-dots {
  position:absolute; bottom: 16px; right: 22px;
  display:flex; gap: 7px; z-index: 5;
}
.diam-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  border:none; cursor:pointer; padding:0;
  transition: .25s;
}
.diam-dot.active {
  background:#e8792b; width: 24px; border-radius: 4px;
}

/* прогрес-лінія автопрокрутки */
.diam-progress {
  position:absolute; bottom:0; left:0; right:0;
  height: 3px; background: rgba(255,255,255,.12);
  z-index: 6;
}
.diam-progress-bar {
  height:100%; width:0;
  background: linear-gradient(90deg,#e8792b,#ffd9b8);
}
.diam-slider.playing .diam-progress-bar {
  animation: diamProg 6.5s linear infinite;
}
@keyframes diamProg {
  from { width: 0; }
  to   { width: 100%; }
}

/* ============================================================
   6. ПАРАЛАКС-БЛОК
   ============================================================ */
.parallax-quote {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color:#fff;
}
.parallax-quote .pq-bg {
  position:absolute; inset:-14%;
  background-image: url("images/pipe-welding-opt.jpg");
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.parallax-quote .pq-veil {
  position:absolute; inset:0;
  background: linear-gradient(115deg, rgba(9,24,38,.93) 0%, rgba(15,40,62,.72) 52%, rgba(23,61,95,.55) 100%);
}
.parallax-quote .container { position:relative; z-index:3; }
.pq-inner { max-width: 720px; }
.pq-mark {
  font-size: 62px; line-height: .8;
  color:#e8792b; font-weight: 800;
  margin-bottom: 10px;
}
.pq-text {
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 18px;
}
.pq-text em { font-style: normal; color:#ffd9b8; }
.pq-src { font-size: 14px; color:#a9c2d6; }

/* ============================================================
   7. МАГНІТНІ КНОПКИ + КУРСОР-БЛИСК
   ============================================================ */
.btn-magnet {
  position: relative;
  overflow: hidden;
  transition: transform .28s cubic-bezier(.22,.61,.36,1),
              box-shadow .28s ease;
}
.btn-magnet::before {
  content:"";
  position:absolute;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  transform: translate(-50%,-50%);
  left: var(--mx,50%); top: var(--my,50%);
  transition: width .5s ease, height .5s ease, opacity .5s ease;
  pointer-events: none;
}
.btn-magnet:hover::before {
  width: 320px; height: 320px;
  opacity: 0;
}
.btn-magnet:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 34px rgba(232,121,43,.45);
}

/* ============================================================
   8. КАРТКИ З 3D-НАХИЛОМ
   ============================================================ */
.card-3d {
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.22,.61,.36,1),
              box-shadow .35s ease;
  will-change: transform;
}
.card-3d:hover {
  box-shadow: 0 24px 52px rgba(31,78,120,.22);
}

/* ============================================================
   9. СЯЮЧА РАМКА (для флагмана Ø630)
   ============================================================ */
.glow-frame {
  position: relative;
}
.glow-frame::before {
  content:"";
  position:absolute; inset: -2px;
  border-radius: 14px;
  background: linear-gradient(120deg, #e8792b, #ffd9b8, #2f6fa8, #e8792b);
  background-size: 300% 300%;
  animation: glowShift 6s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity .4s;
}
.glow-frame:hover::before { opacity: 1; }
@keyframes glowShift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* ============================================================
   10. АНІМОВАНИЙ РОЗДІЛЮВАЧ
   ============================================================ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #dde3e9 20%, #dde3e9 80%, transparent);
  margin: 0;
}
.divider-glow {
  height: 2px;
  background: linear-gradient(90deg, transparent, #e8792b, transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: dividerSweep 3.5s ease-in-out infinite;
}
@keyframes dividerSweep {
  0%   { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1000px) {
  .compare-duel { grid-template-columns: 1fr; }
  .duel-col { padding: 24px 22px; }
  .process-step { flex: 0 0 220px; }
  .diam-slide { min-height: 300px; padding: 26px; }
  .diam-slide-body .ds-diam { font-size: 34px; }
}
@media (max-width: 720px) {
  .hero-cinema { min-height: 66vh; }
  .hero-cinema::before, .hero-cinema::after { height: 26px; }
  .process-step { flex: 0 0 200px; }
  .process-step .ps-img { height: 120px; }
  .angle-picker { padding: 22px 18px 20px; }
  .angle-btn { flex: 1 1 56px; font-size: 13px; padding: 9px 5px; }
  .diam-slide { min-height: 280px; padding: 22px 18px 34px; }
  .diam-slide-body .ds-diam { font-size: 28px; }
  .diam-slide-body .ds-title { font-size: 16px; }
  .diam-nav { width: 36px; height: 36px; font-size: 15px; }
  .diam-prev { left: 8px; }
  .diam-next { right: 8px; }
  .parallax-quote { min-height: 300px; }
  .pq-mark { font-size: 44px; }
  .duel-title { font-size: 17px; }
  .duel-total .dt-val { font-size: 20px; }
}

/* повага до reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero-cinema .cine-bg,
  .hero-cinema .cine-spark,
  .process-hint::before,
  .ap-flow,
  .diam-slider.playing .diam-progress-bar,
  .glow-frame::before,
  .divider-glow {
    animation: none !important;
  }
}
