/* How ONE QR Works — sticky scroll story (landing + demo) */

@keyframes hw-scan {
  0% { top: 10%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 86%; opacity: 0; }
}

@keyframes hw-pulse-ring {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.45; }
  100% { transform: translate(-50%, -50%) scale(1.45); opacity: 0; }
}

@keyframes hw-flash {
  0% { opacity: 0; }
  35% { opacity: 0.45; }
  100% { opacity: 0; }
}

@keyframes hero-chip-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.hw-scan-line { animation: hw-scan 2.1s ease-in-out infinite; }
.hw-pulse-ring { animation: hw-pulse-ring 1.8s ease-out infinite; }

.hw-stage-el {
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.hw-copy-panel {
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Elegant step rail */
.hw-step-rail {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 320px;
  width: 100%;
}

.hw-step-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.25s ease;
}

.hw-step-btn::before {
  content: '';
  position: absolute;
  top: 7px;
  left: calc(50% + 10px);
  right: calc(-50% + 10px);
  height: 1px;
  background: #e2e8f0;
  z-index: 0;
}

.hw-step-btn:last-child::before {
  display: none;
}

.hw-step-btn.is-done::before {
  background: #7ba3d4;
}

.hw-step-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #fff;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.hw-step-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.hw-step-btn.is-active {
  color: #1e4d92;
}

.hw-step-btn.is-active .hw-step-dot {
  border-color: #1e4d92;
  background: #1e4d92;
  box-shadow: 0 0 0 4px rgba(30, 77, 146, 0.14);
  transform: scale(1.08);
}

.hw-step-btn.is-done {
  color: #4a7ab8;
}

.hw-step-btn.is-done .hw-step-dot {
  border-color: #4a7ab8;
  background: #4a7ab8;
}

.hw-stage-frame {
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(232, 240, 250, 0.9), transparent 70%),
    #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 24px 60px rgba(15, 23, 42, 0.06);
}

.hw-product-card {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 20px 48px rgba(30, 77, 146, 0.1);
}

.hw-connector {
  stroke-dasharray: 4 6;
}

.hw-type-caret {
  display: inline-block;
  width: 1.5px;
  height: 0.85em;
  background: #1e4d92;
  margin-left: 2px;
  vertical-align: -1px;
  animation: hw-scan 1s steps(1) infinite;
  opacity: 0.65;
}

.hw-field-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e8f0fa, #c5d8ef);
  transform-origin: left center;
  transform: scaleX(0);
}

.hero-chip.is-active {
  animation: hero-chip-pulse 0.9s ease-in-out;
  box-shadow: 0 12px 28px rgba(30, 77, 146, 0.16);
  z-index: 140;
}

.hero-chip.is-dim {
  opacity: 0.5;
  filter: grayscale(0.25);
}

.hero-hub-preview {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hw-scroll-track { height: auto !important; }
  .hw-sticky-stage {
    position: relative !important;
    height: auto !important;
    min-height: 100vh;
  }
  .hw-scan-line,
  .hw-pulse-ring,
  .hero-chip.is-active {
    animation: none !important;
  }
  .hw-scan-line { top: 42% !important; opacity: 0.55 !important; }
  .hw-copy-panel { transition: none !important; }
}
