/* ============================================================
   Zentle Trust Journey — cinematic scroll-driven story engine
   People -> Payment -> Verification -> History -> Trust Score -> Network
   Scroll-scrubbed elements are driven imperatively from JS (render(progress));
   this file only holds layout, ambient (non-scroll) motion, and static skins.
   ============================================================ */

#trust-journey-pin-wrapper { position: relative; background: #0A0F1C; }

#trust-journey-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(197,160,89,.10), transparent 42%),
    radial-gradient(circle at 82% 85%, rgba(133,146,199,.08), transparent 40%),
    radial-gradient(rgba(255,255,255,.07) 1.2px, transparent 1.6px),
    #0A0F1C;
  background-size: auto, auto, 26px 26px;
  animation: tjBgDrift 50s linear infinite;
}
/* Same dot texture the hero's .grid-glow uses — reused rather than inventing a
   new one, so the journey's background reads as this site's, not a generic effect.
   The drift is slow enough to register as depth, not "particles." */
@keyframes tjBgDrift { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 0, 0 0, 260px 130px; } }
@media (prefers-reduced-motion: reduce) {
  #trust-journey-stage { animation: none; }
}

@media (prefers-reduced-motion: reduce), (max-width: 1023px) {
  #trust-journey-stage { position: relative; height: auto; min-height: 0; padding: 4.5rem 0; }
}

#trust-journey-svg { width: 100%; height: 100%; max-width: 1100px; margin: 0 auto; display: block; }
@media (prefers-reduced-motion: reduce), (max-width: 1023px) {
  #trust-journey-svg { height: auto; aspect-ratio: 3 / 4; max-width: 480px; padding: 0 1.25rem; }
}

/* person silhouettes */
.tj-person { transform-box: fill-box; transform-origin: center; }
.tj-person-body { transition: fill .4s ease; }
.tj-breathe { animation: tjBreathe 4.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes tjBreathe { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(1.02); } }

/* Ambient "the engine is alive" pulse — a ring that continuously breathes
   outward and fades, independent of scroll progress (purely decorative). */
.tj-pulse-loop {
  transform-box: fill-box; transform-origin: center;
  animation: tjPulseLoop 2.8s ease-out infinite;
}
@keyframes tjPulseLoop {
  0%   { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.38); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .tj-pulse-loop { animation: none; opacity: 0; } }

/* caption / label text rendered via foreignObject so it can wrap with real typography */
.tj-caption {
  color: #FCFBFA;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
}
.tj-caption .tj-eyebrow {
  display: block; color: #E9C176; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: .5rem;
}
.tj-caption .tj-sub { display: block; color: rgba(252,251,250,.55); font-weight: 500; font-size: .85em; margin-top: .5rem; }

.tj-final h2 { font-size: clamp(1.5rem, 3.4vw, 2.75rem); }
.tj-final .tj-brand { color: #E9C176; letter-spacing: .02em; }

/* score */
.tj-score-num { font-weight: 800; fill: #FCFBFA; }
.tj-score-label { fill: #E9C176; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* network node label */
.tj-node-label { fill: rgba(252,251,250,.55); font-weight: 600; }

/* ---------- controls ---------- */
#trust-journey-controls {
  position: absolute;
  left: 0; right: 0; bottom: 22px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  z-index: 5;
  opacity: 0; transition: opacity .4s ease;
  pointer-events: none;
}
#trust-journey-controls.tj-controls-visible { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce), (max-width: 1023px) { #trust-journey-controls { display: none; } }

.tj-ctrl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  color: #FCFBFA; font-size: 13px; cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.tj-ctrl-btn:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }

.tj-skip {
  color: rgba(252,251,250,.55); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  background: none; border: none; padding: 8px 4px;
}
.tj-skip:hover { color: #E9C176; }

.tj-replay {
  color: #E9C176; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  background: none; border: none; padding: 8px 4px;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.tj-replay.tj-replay-visible { opacity: 1; pointer-events: auto; }

#trust-journey-progress {
  position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 5;
  background: rgba(255,255,255,.06);
}
#trust-journey-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg,#C5A059,#E9C176); }
@media (prefers-reduced-motion: reduce), (max-width: 1023px) { #trust-journey-progress { display: none; } }

/* screen-reader-only accessible summary, always present regardless of animation state */
.tj-sr-summary { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  .tj-breathe { animation: none; }
}
