/* ============================================
   WOW features — progress, process, sticky CTA
   ============================================ */

/* ---- Header scroll progress ---- */
.header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.header__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-amber), var(--color-gold), var(--color-amber-light));
  box-shadow: 0 0 14px rgba(232, 168, 48, 0.6);
  transition: width 0.12s linear;
  border-radius: 0 3px 3px 0;
}

/* ---- About trust counter ---- */
.about__trust {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(232, 168, 48, 0.15);
}

.about__trust-stat {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 22px;
  border-radius: var(--radius-lg);
  background: rgba(200, 134, 10, 0.08);
  border: 1px solid rgba(232, 168, 48, 0.22);
}

.about__trust-stat strong {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--color-gold);
}

.about__trust-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--color-gold);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  min-width: 2.5ch;
}

.about__trust-value.is-counting {
  transition: transform 0.2s ease;
}

.about__trust-label {
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.about__trust-stat span:last-child {
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.stat-counter {
  display: inline-block;
  min-width: 1.5ch;
  text-align: right;
}

/* Parallax wrappers — transform на обёртке, не на карточке (без конфликта с stagger/hover) */
.about__parallax-item {
  min-width: 0;
}

.about__visual > .about__parallax-item:first-child,
.about__visual > .about__parallax-item:last-child {
  grid-column: 1 / -1;
}

.about__parallax-item > .about__card {
  height: 100%;
}

.about__parallax-item > .about__card--main,
.about__parallax-item > .about__card--accent {
  grid-column: auto;
}

[data-parallax-group] [data-parallax-layer] {
  will-change: transform;
}

/* ---- How we work — beer pipeline flow ---- */
.process {
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(200, 134, 10, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 100%, rgba(232, 168, 48, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 50%, var(--color-bg) 100%);
  position: relative;
  overflow: hidden;
}

.process__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.process__spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 140, 0.9) 0%, rgba(232, 168, 48, 0.4) 100%);
  opacity: 0;
  filter: blur(0.5px);
}

.process.is-flowing .process__spark {
  animation: processSparkDrift 6s ease-in-out infinite;
}

.process__spark--1 { left: 12%; top: 28%; animation-delay: 0s; }
.process__spark--2 { left: 52%; top: 18%; animation-delay: 2s; }
.process__spark--3 { left: 78%; top: 35%; animation-delay: 4s; }

@keyframes processSparkDrift {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  15% { opacity: 0.85; }
  50% { opacity: 0.5; transform: translate(18px, -28px) scale(1); }
  85% { opacity: 0; transform: translate(32px, -48px) scale(0.4); }
}

.process__layout {
  position: relative;
}

.process__track {
  position: relative;
  height: 24px;
  margin: 0 8% 28px;
}

.process__pipe {
  display: block;
  width: 100%;
  height: 24px;
  overflow: visible;
}

.process__pipe-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
  stroke-linecap: round;
}

.process__pipe-fill {
  fill: none;
  stroke: var(--color-amber);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 6px rgba(232, 168, 48, 0.55));
}

.process.is-flowing .process__pipe-fill {
  animation: processPipeFill 2.2s cubic-bezier(0.35, 0, 0.15, 1) forwards,
             processPipeShimmer 2.8s linear 2.2s infinite;
}

@keyframes processPipeFill {
  to { stroke-dashoffset: 0; }
}

@keyframes processPipeShimmer {
  0% { stroke: #a86808; filter: drop-shadow(0 0 4px rgba(232, 168, 48, 0.4)); }
  50% { stroke: #e8a830; filter: drop-shadow(0 0 10px rgba(232, 168, 48, 0.75)); }
  100% { stroke: #a86808; filter: drop-shadow(0 0 4px rgba(232, 168, 48, 0.4)); }
}

.process__node {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 2px solid rgba(232, 168, 48, 0.25);
  box-shadow: 0 0 0 4px rgba(200, 134, 10, 0.06);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
  z-index: 2;
}

.process__node--1 { left: 16.66%; }
.process__node--2 { left: 50%; }
.process__node--3 { left: 83.33%; }

.process__node.is-active {
  background: var(--color-gold);
  border-color: #fff;
  box-shadow:
    0 0 0 4px rgba(232, 168, 48, 0.25),
    0 0 16px rgba(232, 168, 48, 0.65);
  animation: processNodePulse 1.8s ease-in-out infinite;
}

@keyframes processNodePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.process__droplet {
  position: absolute;
  top: 50%;
  left: 16.66%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--color-gold) 55%, #a86808);
  box-shadow: 0 0 10px rgba(232, 168, 48, 0.8);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.process.is-flowing .process__droplet {
  animation: processDropletRun 2.2s cubic-bezier(0.45, 0, 0.25, 1) forwards;
}

@keyframes processDropletRun {
  0% { opacity: 0; left: 16.66%; transform: scale(0.5); }
  8% { opacity: 1; transform: scale(1); }
  45% { left: 50%; }
  92% { opacity: 1; left: 83.33%; transform: scale(1); }
  100% { opacity: 0; left: 83.33%; transform: scale(0.6); }
}

.process__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.process__step {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  overflow: visible;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.process.is-flowing .process__step.is-active,
.process.is-flowing .process__step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.process__step.is-active {
  border-color: rgba(232, 168, 48, 0.45);
  box-shadow:
    var(--shadow-glass),
    0 8px 32px rgba(200, 134, 10, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.process__step::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-amber), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.process__step.is-active::after {
  opacity: 1;
}

.process__num {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(232, 168, 48, 0.35);
  transition: color 0.35s ease;
}

.process__step.is-active .process__num {
  color: var(--color-gold);
}

.process__icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
}

.process__icon-ring {
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  border: 1px solid rgba(232, 168, 48, 0.2);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.process__step.is-active .process__icon-ring {
  opacity: 1;
  transform: scale(1);
  animation: processRingSpin 8s linear infinite;
}

@keyframes processRingSpin {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1) rotate(360deg); }
}

.process__icon {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(200, 134, 10, 0.18) 0%, rgba(200, 134, 10, 0.06) 100%);
  border: 1px solid rgba(232, 168, 48, 0.28);
  color: var(--color-gold);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.process__step.is-active .process__icon {
  transform: scale(1.06);
  box-shadow: 0 4px 20px rgba(200, 134, 10, 0.25);
  animation: processIconPop 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes processIconPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.12); }
  100% { transform: scale(1.06); }
}

.process__icon svg {
  width: 26px;
  height: 26px;
}

.process__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--color-heading);
  margin: 0 0 10px;
  overflow: visible;
}

.process__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
}

.process__cta {
  margin-top: 36px;
  text-align: center;
}

@media (max-width: 900px) {
  .process__track {
    margin: 0;
    height: auto;
    position: absolute;
    left: 18px;
    top: 8px;
    bottom: 8px;
    width: 8px;
  }

  .process__pipe {
    display: none;
  }

  .process__track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8%;
    bottom: 8%;
    width: 6px;
    margin-left: -3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
  }

  .process__track::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 8%;
    width: 6px;
    margin-left: -3px;
    height: 0;
    border-radius: 3px;
    background: linear-gradient(180deg, #a86808, var(--color-gold), #e8a830);
    box-shadow: 0 0 10px rgba(232, 168, 48, 0.5);
  }

  .process.is-flowing .process__track::after {
    animation: processPipeFillVertical 2.2s cubic-bezier(0.35, 0, 0.15, 1) forwards,
               processPipeShimmerVertical 2.8s linear 2.2s infinite;
  }

  @keyframes processPipeFillVertical {
    to { height: 84%; }
  }

  @keyframes processPipeShimmerVertical {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.25); }
  }

  .process__layout {
    position: relative;
    padding-left: 44px;
  }

  .process__node--1 { left: 50%; top: 10%; margin: -7px 0 0 -7px; }
  .process__node--2 { left: 50%; top: 50%; margin: -7px 0 0 -7px; }
  .process__node--3 { left: 50%; top: 90%; margin: -7px 0 0 -7px; }

  .process.is-flowing .process__droplet {
    animation-name: processDropletRunVertical;
  }

  @keyframes processDropletRunVertical {
    0% { opacity: 0; top: 10%; left: 50%; transform: scale(0.5); }
    8% { opacity: 1; transform: scale(1); }
    45% { top: 50%; }
    92% { opacity: 1; top: 90%; transform: scale(1); }
    100% { opacity: 0; top: 90%; transform: scale(0.6); }
  }

  .process__steps {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
    gap: 16px;
  }
}

@media (min-width: 901px) {
  .process__layout {
    padding-top: 4px;
  }
}

/* ---- Sticky mobile CTA ---- */
.sticky-cta {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c9891f, var(--color-amber));
  color: #111;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 24px rgba(200, 134, 10, 0.35);
  transform: translate(-50%, 120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  pointer-events: none;
}

.sticky-cta svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sticky-cta.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-cta:active {
  transform: translate(-50%, 2px) scale(0.98);
}

@media (min-width: 769px) {
  .sticky-cta {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .scroll-top.visible {
    bottom: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header__progress-bar {
    transition: none;
  }

  .sticky-cta {
    transition: none;
  }

  [data-parallax-group] [data-parallax-layer] {
    transform: none !important;
  }

  .process__pipe-fill,
  .process__droplet,
  .process__spark,
  .process__node.is-active,
  .process__step.is-active .process__icon,
  .process__step.is-active .process__icon-ring {
    animation: none !important;
  }

  .process__step {
    opacity: 1;
    transform: none;
  }

  .process.is-flowing .process__pipe-fill {
    stroke-dashoffset: 0;
  }

  .process__node.is-active {
    transform: none;
  }
}
