/* ═══════════════════════════════════════════════════════════════════
   NOVAQYS — Interactive Journey Section
   Premium scroll-driven experience inspired by Apple, Tesla, Stripe
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Section Container ─────────────────────────────────────────── */
.journey-section {
  position: relative;
  overflow: hidden;
  padding: 6rem 1.5rem 8rem;
  background: linear-gradient(180deg, #0a0d1a 0%, #06060d 30%, #0a0d1a 60%, #0f0a1a 100%);
}

.journey-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(31,111,235,0.06), transparent),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(46,196,182,0.04), transparent);
  pointer-events: none;
}

/* ─── Section Header ────────────────────────────────────────────── */
.journey-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 5rem;
  position: relative;
  z-index: 2;
}

.journey-header .section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--nova-blue);
  background: rgba(31,111,235,0.1);
  border: 1px solid rgba(31,111,235,0.2);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.journey-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--nova-text-primary);
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.journey-header .gradient-text {
  background: linear-gradient(135deg, #1F6FEB, #2EC4B6, #1F6FEB);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.journey-header p {
  font-size: 1.05rem;
  color: var(--nova-text-secondary);
  line-height: 1.7;
  max-width: 36rem;
  margin: 0 auto;
}

/* ─── Journey Container ─────────────────────────────────────────── */
.journey-container {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  z-index: 2;
}

/* ─── Glowing Path Line ─────────────────────────────────────────── */
.journey-path {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  z-index: 1;
}

.journey-path-track {
  position: absolute;
  inset: 0;
  width: 100%;
  background: linear-gradient(180deg,
    rgba(31,111,235,0.08),
    rgba(46,196,182,0.08) 40%,
    rgba(31,111,235,0.08) 70%,
    rgba(46,196,182,0.08)
  );
  border-radius: 3px;
}

.journey-path-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg,
    #1F6FEB,
    #9d8fd1 15%,
    #2EC4B6 30%,
    #9d8fd1 40%,
    #2EC4B6 55%,
    #E5484D 65%,
    #1F6FEB 78%,
    #9d8fd1 88%,
    #2EC4B6 100%
  );
  border-radius: 3px;
  box-shadow:
    0 0 20px rgba(31,111,235,0.4),
    0 0 60px rgba(31,111,235,0.15);
  transition: height 0.1s linear;
}

.journey-path-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31,111,235,0.3), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, top 0.1s linear;
}

/* ─── Journey Step ──────────────────────────────────────────────── */
.journey-step {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  margin-bottom: 6rem;
  min-height: 20vh;
}

.journey-step:last-child {
  margin-bottom: 0;
}

/* Alternate left/right on desktop */
.journey-step:nth-child(odd) {
  flex-direction: row;
  padding-right: calc(50% + 3rem);
  padding-left: 1rem;
}

.journey-step:nth-child(even) {
  flex-direction: row-reverse;
  padding-left: calc(50% + 3rem);
  padding-right: 1rem;
}

/* ─── Step Marker (on the path line) ────────────────────────────── */
.journey-step-marker {
  position: absolute;
  left: 50%;
  top: 1.5rem;
  transform: translateX(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey-step-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--nova-bg);
  border: 3px solid;
  position: relative;
  z-index: 2;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.journey-step-dot-inner {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.journey-step.active .journey-step-dot-inner {
  opacity: 1;
  transform: scale(1);
}

.journey-step-dot-glow {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.5s;
}

.journey-step.active .journey-step-dot-glow {
  opacity: 1;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.5); opacity: 0.2; }
}

/* ─── Step Card ─────────────────────────────────────────────────── */
.journey-step-card {
  position: relative;
  width: 100%;
  background: rgba(20, 20, 31, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.3;
  transform: translateY(30px) scale(0.95);
  filter: blur(4px);
}

.journey-step.active .journey-step-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  border-color: rgba(255,255,255,0.1);
}

.journey-step.dimmed .journey-step-card {
  opacity: 0.25;
  transform: translateY(0) scale(0.93);
  filter: blur(2px);
}

.journey-step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
}

.journey-step.active .journey-step-card::before {
  opacity: 1;
}

/* Glow border per step */
.journey-step[data-color="#1F6FEB"].active .journey-step-card {
  border-color: rgba(31,111,235,0.3);
  box-shadow: 0 0 40px rgba(31,111,235,0.08), inset 0 1px 0 rgba(31,111,235,0.1);
}
.journey-step[data-color="#9d8fd1"].active .journey-step-card {
  border-color: rgba(155,140,247,0.3);
  box-shadow: 0 0 40px rgba(155,140,247,0.08), inset 0 1px 0 rgba(155,140,247,0.1);
}
.journey-step[data-color="#2EC4B6"].active .journey-step-card {
  border-color: rgba(46,196,182,0.3);
  box-shadow: 0 0 40px rgba(46,196,182,0.08), inset 0 1px 0 rgba(46,196,182,0.1);
}
.journey-step[data-color="#9d8fd1"].active .journey-step-card {
  border-color: rgba(157,143,209,0.3);
  box-shadow: 0 0 40px rgba(157,143,209,0.08), inset 0 1px 0 rgba(157,143,209,0.1);
}
.journey-step[data-color="#2EC4B6"].active .journey-step-card {
  border-color: rgba(46,196,182,0.3);
  box-shadow: 0 0 40px rgba(46,196,182,0.08), inset 0 1px 0 rgba(46,196,182,0.1);
}
.journey-step[data-color="#E5484D"].active .journey-step-card {
  border-color: rgba(229,72,77,0.3);
  box-shadow: 0 0 40px rgba(229,72,77,0.08), inset 0 1px 0 rgba(229,72,77,0.1);
}

/* ─── Card Inner Elements ───────────────────────────────────────── */
.journey-step-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.journey-step-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  background: rgba(31,111,235,0.1);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.5s;
}

.journey-step.active .journey-step-icon-wrap {
  background: rgba(31,111,235,0.15);
  border-color: rgba(31,111,235,0.2);
  box-shadow: 0 0 30px rgba(31,111,235,0.1);
}

.journey-step-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nova-text-primary);
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
}

.journey-step-card p {
  font-size: 0.875rem;
  color: var(--nova-text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ─── Step Button ───────────────────────────────────────────────── */
.journey-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nova-text-primary);
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.journey-step-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.journey-step-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.journey-step-btn i {
  font-size: 0.7rem;
  transition: transform 0.3s;
}

.journey-step-btn:hover i {
  transform: translateX(3px);
}

/* ─── Step-Specific Animation Areas ─────────────────────────────── */
.journey-step-anim {
  margin-top: 1rem;
  height: 0;
  overflow: hidden;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.journey-step.active .journey-step-anim {
  height: auto;
  overflow: visible;
}

/* Gauge animation for AQMI steps */
.journey-gauge {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.journey-gauge-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.journey-step.active .journey-gauge-fill {
  width: var(--gauge-value, 0%);
}

.journey-gauge-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--nova-text-tertiary);
  margin-top: 0.3rem;
}

/* Logo row for constructors step */
.journey-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.journey-logo-item {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--nova-text-secondary);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.journey-step.active .journey-logo-item {
  opacity: 1;
  transform: translateY(0);
}

.journey-step.active .journey-logo-item:nth-child(1) { transition-delay: 0.1s; }
.journey-step.active .journey-logo-item:nth-child(2) { transition-delay: 0.2s; }
.journey-step.active .journey-logo-item:nth-child(3) { transition-delay: 0.3s; }
.journey-step.active .journey-logo-item:nth-child(4) { transition-delay: 0.4s; }
.journey-step.active .journey-logo-item:nth-child(5) { transition-delay: 0.5s; }
.journey-step.active .journey-logo-item:nth-child(6) { transition-delay: 0.6s; }

/* Score display for AQMI Professional */
.journey-score-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.journey-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.journey-step.active .journey-score-badge {
  opacity: 1;
  transform: scale(1);
}

.journey-step.active .journey-score-badge:nth-child(1) { transition-delay: 0.3s; }
.journey-step.active .journey-score-badge:nth-child(2) { transition-delay: 0.8s; }
.journey-step.active .journey-score-badge:nth-child(3) { transition-delay: 1.3s; }
.journey-step.active .journey-score-badge:nth-child(4) { transition-delay: 1.8s; }

/* ─── Final Step (Development) - Factory Illustration ───────────── */
.journey-final-scene {
  margin-top: 1rem;
  position: relative;
  height: 120px;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 100%, rgba(46,196,182,0.06), transparent);
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease 0.3s;
}

.journey-step.active .journey-final-scene {
  opacity: 1;
}

.journey-final-scene svg {
  width: 100%;
  height: 100%;
}

/* ─── Particles ─────────────────────────────────────────────────── */
.journey-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.journey-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--nova-blue);
  opacity: 0;
  animation: journeyParticleFloat 8s ease-in-out infinite;
}

@keyframes journeyParticleFloat {
  0% { transform: translateY(100%) translateX(0); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .journey-section {
    padding: 4rem 1.25rem 6rem;
  }

  .journey-step:nth-child(odd),
  .journey-step:nth-child(even) {
    padding-left: 3.5rem;
    padding-right: 1rem;
    flex-direction: row;
  }

  .journey-path {
    left: 1.25rem;
    transform: none;
  }

  .journey-step-marker {
    left: 1.25rem;
    top: 1.5rem;
    transform: none;
    width: 36px;
    height: 36px;
  }

  .journey-step-dot {
    width: 16px;
    height: 16px;
  }

  .journey-step-card {
    padding: 1.5rem;
  }

  .journey-step-card h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 640px) {
  .journey-section {
    padding: 3rem 1rem 5rem;
  }

  .journey-header {
    margin-bottom: 3rem;
  }

  .journey-step {
    margin-bottom: 3rem;
    min-height: auto;
  }

  .journey-step:nth-child(odd),
  .journey-step:nth-child(even) {
    padding-left: 3rem;
    padding-right: 0.5rem;
  }

  .journey-path {
    left: 0.75rem;
  }

  .journey-step-marker {
    left: 0.75rem;
    width: 28px;
    height: 28px;
    top: 1rem;
  }

  .journey-step-dot {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .journey-step-card {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .journey-step-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .journey-step-card h3 {
    font-size: 1rem;
  }

  .journey-step-card p {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .journey-step-btn {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
  }

  .journey-step-number {
    font-size: 0.6rem;
  }

  .journey-final-scene {
    height: 80px;
  }
}

/* ─── Reduced Motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .journey-step-card {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .journey-step.active .journey-step-card,
  .journey-step.dimmed .journey-step-card {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .journey-path-fill {
    transition: none;
  }

  .journey-step-dot-glow {
    animation: none;
    opacity: 0.5;
  }
}