/* ============================================================
   Sourcing & Transparency Page Styles
   Scroll-driven 3D supply chain journey
   ============================================================ */

/* --- Page Base --- */
.sourcing-page {
  background: var(--white);
  overflow-x: hidden;
}

/* --- Fixed 3D Canvas --- */
.sourcing-canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.sourcing-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- Page Header --- */
.sourcing-hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--white) 0%, rgba(255,255,255,0.85) 60%, rgba(245,245,245,0.7) 100%);
}

.sourcing-hero__content {
  max-width: 720px;
  padding: var(--space-2xl);
}

.sourcing-hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: var(--space-lg);
}

.sourcing-hero__label::before,
.sourcing-hero__label::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--purple);
  opacity: 0.3;
}

.sourcing-hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--onyx);
  margin-bottom: var(--space-md);
}

.sourcing-hero__title .highlight {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sourcing-hero__subtitle {
  font-size: var(--text-lg);
  color: var(--muted-grey);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.sourcing-hero__scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-2xl);
}

.sourcing-hero__scroll-hint span {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-grey);
}

.sourcing-hero__scroll-line {
  width: 1px;
  height: 50px;
  background: var(--border-grey);
  position: relative;
  overflow: hidden;
}

.sourcing-hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--purple);
  animation: scrollPulse 2s var(--ease-in-out) infinite;
}

@keyframes scrollPulse {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* --- Journey Scroll Container --- */
.sourcing-journey {
  position: relative;
  z-index: 2;
  height: 700vh; /* 7 stages × 100vh each */
}

/* --- Stage Overlay Labels --- */
.stage-label {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.stage-label.active {
  opacity: 1;
  transform: translateY(0);
}

/* Left-side stage info panel */
.stage-label--info {
  left: clamp(2rem, 5vw, 5rem);
  bottom: clamp(3rem, 8vh, 6rem);
  max-width: 420px;
}

.stage-label__number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.stage-label__number::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--purple);
  opacity: 0.4;
}

.stage-label__title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--onyx);
  margin-bottom: var(--space-sm);
}

.stage-label__desc {
  font-size: var(--text-base);
  color: var(--muted-grey);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

/* Data tags row */
.stage-label__tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--dark-grey);
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.stage-tag--purple {
  background: var(--purple-subtle);
  border-color: rgba(74, 29, 106, 0.15);
  color: var(--purple);
}

.stage-tag--gold {
  background: var(--gold-subtle);
  border-color: rgba(196, 136, 47, 0.15);
  color: #8B6914;
}

/* Right-side data panel */
.stage-label--data {
  right: clamp(2rem, 5vw, 5rem);
  top: 50%;
  transform: translateY(-50%) translateX(20px);
  max-width: 260px;
}

.stage-label--data.active {
  transform: translateY(-50%) translateX(0);
}

.stage-data-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
}

.stage-data-card__header {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-grey);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-grey);
}

.stage-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.stage-data-row:not(:last-child) {
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.stage-data-row__label {
  font-size: var(--text-sm);
  color: var(--muted-grey);
}

.stage-data-row__value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--onyx);
  font-variant-numeric: tabular-nums;
}

.stage-data-row__value--purple {
  color: var(--purple);
}

.stage-data-row__value--gold {
  color: var(--gold);
}

/* --- Progress Indicator (right edge) --- */
.journey-progress {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.journey-progress__line {
  width: 2px;
  height: 200px;
  background: var(--border-grey);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.journey-progress__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--purple), var(--gold));
  border-radius: 2px;
  transition: height 0.3s var(--ease-out-cubic);
}

.journey-progress__dots {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.journey-progress__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border-grey);
  transition: all 0.3s var(--ease-out-cubic);
  position: relative;
  z-index: 1;
}

.journey-progress__dot.active {
  background: var(--purple);
  border-color: var(--purple);
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--purple-glow);
}

.journey-progress__dot.passed {
  background: var(--gold);
  border-color: var(--gold);
}

/* --- Bottom CTA after journey --- */
.sourcing-cta {
  position: relative;
  z-index: 2;
  padding: var(--space-section) 0;
  text-align: center;
  background: var(--white);
}

.sourcing-cta__title {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--onyx);
  margin-bottom: var(--space-md);
}

.sourcing-cta__subtitle {
  font-size: var(--text-lg);
  color: var(--muted-grey);
  max-width: 520px;
  margin: 0 auto var(--space-xl);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .sourcing-journey {
    height: 500vh;
  }

  .stage-label--info {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-xl);
    max-width: 100%;
  }

  .stage-label--data {
    display: none; /* Hide data panel on mobile — too cluttered */
  }

  .stage-label__title {
    font-size: 1.5rem;
  }

  .journey-progress {
    right: 0.5rem;
  }

  .journey-progress__line {
    height: 140px;
  }

  .journey-progress__dot {
    width: 8px;
    height: 8px;
  }
}
