/* =============================================================
   SECTION 7 — THE TESTING JOURNEY
   All rules scoped under .testing-journey
   ============================================================= */

.testing-journey {
  --tj-navy-900: #292130;
  --tj-navy-800: #3B2F4A;
  --tj-teal-500: #8B5E83;
  --tj-teal-300: #C77D8A;
  --tj-teal-050: rgba(255, 255, 255, 0.08);
  --tj-cyan-300: #A98BC2;
  --tj-ink: #FFFFFF;
  --tj-ink-soft: #EAE3EB;
  --tj-border: rgba(255, 255, 255, 0.14);
  --tj-white: #FFFFFF;
  --tj-bg: linear-gradient(135deg, #33283D 0%, #47364E 58%, #51405A 100%);
  --tj-font-display: "Bricolage Grotesque", "Inter", sans-serif;
  --tj-font-body: "Inter", sans-serif;

  position: relative;
  background: var(--tj-bg);
  padding-top: 6.5rem;
  padding-bottom: 6.5rem;
  font-family: var(--tj-font-body);
  isolation: isolate;
  overflow: hidden;
}

/* ---------- Header ---------- */
.testing-journey-header {
  max-width: 42rem;
  margin: 0 auto 3rem;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
}

.testing-journey-header.is-visible {
  animation: testing-journey-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes testing-journey-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testing-journey-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tj-teal-300);
  background: rgba(199, 125, 138, 0.14);
  border: 1px solid rgba(199, 125, 138, 0.3);
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.testing-journey-title {
  font-family: var(--tj-font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  color: var(--tj-white);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.testing-journey-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--tj-ink-soft);
}

/* ---------- Panel ---------- */
.testing-journey-panel {
  position: relative;
  background: rgba(41, 33, 48, 0.78);
  border: 1px solid var(--tj-border);
  border-radius: 1.5rem;
  padding: 3.5rem 3rem 2.75rem;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.testing-journey-panel::before {
  content: "";
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 139, 194, 0.2) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Track (connecting line) ---------- */
.testing-journey-container {
  position: relative;
}

.testing-journey-track {
  position: absolute;
  top: 2rem;
  left: 10%;
  right: 10%;
  height: 2px;
  z-index: 0;
}

.testing-journey-track-line {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.testing-journey-track-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8B5E83, #C77D8A);
  transition: width 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.testing-journey-container.is-visible .testing-journey-track-progress {
  width: 100%;
}

/* ---------- Steps ---------- */
.testing-journey-steps {
  position: relative;
  z-index: 1;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.testing-journey-step {
  flex: 1;
  text-align: center;
  padding: 0 0.75rem;
  opacity: 0;
  transform: translateY(18px);
}

.testing-journey-step.is-visible {
  animation: testing-journey-step-rise 0.65s cubic-bezier(0.16, 1, 0.3, 1)
    forwards;
}

@keyframes testing-journey-step-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testing-journey-step-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(59, 47, 74, 0.9);
  border: 1px solid var(--tj-border);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.35rem;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.35s ease;
}

.testing-journey-step.is-visible .testing-journey-step-marker {
  animation: testing-journey-marker-glow 1.6s ease-out 0.3s;
}

@keyframes testing-journey-marker-glow {
  0% {
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.4);
  }
  40% {
    box-shadow:
      0 0 0 8px rgba(199, 125, 138, 0.25),
      0 10px 24px -14px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.4);
  }
}

.testing-journey-step:hover .testing-journey-step-marker {
  transform: translateY(-3px);
  border-color: #C77D8A;
}

.testing-journey-icon {
  font-size: 1.4rem;
  color: var(--tj-white);
}

.testing-journey-number {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tj-font-display);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--tj-white);
  background: linear-gradient(135deg, #C77D8A, #9E6A94);
  box-shadow: 0 4px 10px -2px rgba(199, 125, 138, 0.45);
}

.testing-journey-step-title {
  font-family: var(--tj-font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--tj-white);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.testing-journey-step-description {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--tj-ink-soft);
  margin: 0 auto;
  max-width: 13rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .testing-journey {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .testing-journey-panel {
    padding: 3rem 1.75rem 2.25rem;
  }

  .testing-journey-step-description {
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .testing-journey-title {
    font-size: 1.7rem;
  }

  .testing-journey-panel {
    padding: 2.25rem 1.5rem;
  }

  .testing-journey-steps {
    flex-direction: column;
    gap: 2.25rem;
  }

  .testing-journey-step {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 1.1rem;
    padding: 0;
  }

  .testing-journey-step-marker {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 0;
  }

  .testing-journey-icon {
    font-size: 1.2rem;
  }

  .testing-journey-step-description {
    margin: 0;
  }

  .testing-journey-track {
    top: 0;
    bottom: 0;
    left: 1.625rem;
    right: auto;
    width: 2px;
    height: auto;
  }

  .testing-journey-track-progress {
    width: 2px;
    height: 0;
    transition: height 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .testing-journey-container.is-visible .testing-journey-track-progress {
    width: 2px;
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testing-journey-header,
  .testing-journey-step,
  .testing-journey-step-marker,
  .testing-journey-track-progress {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .testing-journey-container.is-visible .testing-journey-track-progress {
    width: 100%;
  }

  @media (max-width: 767.98px) {
    .testing-journey-container.is-visible .testing-journey-track-progress {
      width: 2px;
      height: 100%;
    }
  }
}
