/* Trust: блок Графтех + анимации счётчиков */

.trust-graftech {
  position: relative;
  z-index: 1;
  margin-bottom: clamp(12px, 2vw, 20px);
}

.trust-graftech__bg {
  position: absolute;
  inset: -10% 0 auto;
  height: 140px;
  pointer-events: none;
  opacity: 0.55;
}

.trust-graftech__path {
  width: 100%;
  height: 100%;
}

.trust-graftech__path-line {
  fill: none;
  stroke: url(#trust-graftech-stroke);
  stroke-width: 2;
  stroke-dasharray: 12 10;
  stroke-linecap: round;
  animation: trust-graftech-path 16s linear infinite;
}

/* gradient via CSS stroke on path - fallback solid */
.trust-graftech__path-line {
  stroke: var(--primary-color);
  opacity: 0.25;
}

@keyframes trust-graftech-path {
  to {
    stroke-dashoffset: -44;
  }
}

.trust-graftech__grid {
  position: relative;
  display: grid;
  gap: clamp(28px, 4vw, 40px);
  align-items: stretch;
}

@media (min-width: 960px) {
  .trust-graftech__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: clamp(32px, 4vw, 48px);
  }
}

/* Копирайт */
.trust-graftech__copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trust-graftech__title {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.trust-graftech__brand {
  background: linear-gradient(120deg, var(--primary-color), var(--info-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.trust-graftech__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  width: fit-content;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(45, 128, 194, 0.1);
  border: 1px solid rgba(45, 128, 194, 0.2);
}

.trust-graftech__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--info-color);
  box-shadow: 0 0 0 4px rgba(15, 136, 147, 0.2);
  animation: trust-graftech-dot 2s ease-in-out infinite;
}

@keyframes trust-graftech-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.trust-graftech__story {
  margin: 4px 0 0;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 56ch;
}

.trust-graftech__milestones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.trust-graftech__milestones em {
  font-style: normal;
  color: var(--primary-color);
  font-weight: 800;
}

.trust-graftech__milestones-line {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--info-color));
  border-radius: 2px;
  transform-origin: left;
  transform: scaleX(0);
  animation: trust-graftech-milestone 0.8s ease forwards;
}

.trust-graftech.is-inview .trust-graftech__milestones-line:nth-of-type(1) {
  animation-delay: 0.6s;
}

.trust-graftech.is-inview .trust-graftech__milestones-line:nth-of-type(2) {
  animation-delay: 1.1s;
}

@keyframes trust-graftech-milestone {
  to {
    transform: scaleX(1);
  }
}

/* Статистика */
.trust-graftech__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-graftech__stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(45, 128, 194, 0.16);
  box-shadow: 0 12px 36px rgba(45, 128, 194, 0.1);
  overflow: hidden;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.15, 0.64, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.trust-graftech__stat.is-inview {
  animation: trust-graftech-stat-in 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.trust-graftech__stat:nth-child(1).is-inview { animation-delay: 0.05s; }
.trust-graftech__stat:nth-child(2).is-inview { animation-delay: 0.15s; }
.trust-graftech__stat:nth-child(3).is-inview { animation-delay: 0.25s; }
.trust-graftech__stat:nth-child(4).is-inview { animation-delay: 0.35s; }

@keyframes trust-graftech-stat-in {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.trust-graftech__stat.is-counted {
  border-color: rgba(45, 128, 194, 0.32);
  box-shadow: 0 16px 40px rgba(45, 128, 194, 0.16);
}

.trust-graftech__stat-glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 100%;
  background: radial-gradient(circle, rgba(45, 128, 194, 0.15), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.trust-graftech__stat.is-counted .trust-graftech__stat-glow {
  opacity: 1;
  animation: trust-graftech-glow-pulse 2.5s ease-in-out infinite;
}

@keyframes trust-graftech-glow-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.trust-graftech__stat-value {
  position: relative;
  z-index: 1;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
}

.trust-graftech__stat-suffix {
  font-size: 0.85em;
  color: var(--info-color);
}

.trust-graftech__stat-label {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
  font-weight: 600;
}

/* Разделитель */
.trust-section__divider {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: clamp(36px, 5vw, 52px) auto clamp(28px, 4vw, 40px);
  max-width: 720px;
}

.trust-section__divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 128, 194, 0.35), transparent);
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.34, 1.1, 0.64, 1);
}

.trust-section__divider.is-inview .trust-section__divider-line {
  transform: scaleX(1);
}

.trust-section__divider-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-color);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.5s ease 0.2s,
    transform 0.5s ease 0.2s;
}

.trust-section__divider.is-inview .trust-section__divider-label {
  opacity: 1;
  transform: translateY(0);
}

/* Клиенты — подзаголовок */
.site-premium .trust-section__head--clients {
  margin-bottom: 8px;
}

.site-premium .trust-section__head--clients h3 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.site-premium .trust-stats--product {
  margin-top: 24px;
}

@media (max-width: 639px) {
  .trust-graftech__stat:nth-child(2) .trust-graftech__stat-value {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trust-graftech__path-line,
  .trust-graftech__badge-dot,
  .trust-graftech__stat-glow,
  .trust-graftech__milestones-line,
  .trust-graftech__stat.is-inview {
    animation: none;
  }

  .trust-graftech__milestones-line {
    transform: scaleX(1);
  }

  .trust-section__divider-line,
  .trust-section__divider-label {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
