/* IMPLANTAÇÃO — timeline com curva (estilo Contour Timeline), versão clara */
.sp-impl {
  --impl-ease: cubic-bezier(.22, 1, .36, 1);
  padding: var(--space-section) 6%;
  background: #F3F1FB;
  color: var(--navy);
}
.sp-impl .inner { max-width: var(--max); margin: 0 auto; }
.sp-impl .sp-impl-head { max-width: none; margin: 0 0 clamp(2.5rem, 2rem + 2vw, 4rem); }
.sp-impl .eyebrow { color: var(--teal); }
.sp-impl h2 {
  color: var(--navy);
  margin: 0;
  text-wrap: pretty;
}
.sp-impl h2 em { font-style: italic; color: var(--teal); white-space: nowrap; }
@media (min-width: 900px) {
  .sp-impl h2 { white-space: nowrap; }
}

.sp-impl-tl { outline: none; }
.sp-impl-tl:focus-visible { outline: 2px solid var(--teal); outline-offset: 8px; border-radius: 12px; }

/* Marcos */
.sp-impl-marks { position: relative; height: 64px; }
.sp-impl-mark {
  position: absolute; top: 0; left: var(--x); transform: translateX(-50%);
  width: 24%; height: 100px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: 0; background: none; border: 0; cursor: pointer; font-family: inherit;
  color: #8A87A3; transition: color .4s ease;
}
.sp-impl-mark.is-done { color: var(--teal); }
.sp-impl-mark.is-active { color: var(--navy); }
.sp-impl-mark-day { font-size: clamp(.7rem, .62rem + .3vw, .84rem); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.sp-impl-mark-name { font-size: clamp(.72rem, .66rem + .3vw, .9rem); font-weight: 500; opacity: .85; line-height: 1.3; text-align: center; text-wrap: balance; }

/* Linha */
.sp-impl-line { position: relative; height: 100px; }
.sp-impl-line svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp-impl-path { fill: none; }
.sp-impl-path--base { stroke: rgba(23,22,50,.18); stroke-width: 1.5; }
.sp-impl-path--done { stroke: #6254BF; stroke-width: 2; }
.sp-impl-dot {
  position: absolute; top: 18px; left: var(--x);
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: #C9C4E2; transition: opacity .35s ease, background .4s ease;
}
.sp-impl-dot.is-done { background: #6254BF; }
.sp-impl-dot.is-active { opacity: 0; }
.sp-impl-cursor {
  position: absolute; top: 86px; left: 12.5%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #6254BF;
  box-shadow: 0 0 0 6px rgba(98,84,191,.18), 0 0 20px 2px rgba(98,84,191,.35);
}

/* Card (desktop: slides empilhados com fade) */
.sp-impl-card {
  position: relative; display: grid; width: 100%;
  background: #fff; border: 1px solid #E4E0F5; border-radius: 20px;
  box-shadow: 0 24px 50px -28px rgba(23,22,50,.25);
  overflow: hidden;
}
.sp-impl-slide {
  grid-area: 1 / 1; position: relative;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem clamp(1.5rem, 1rem + 3vw, 4rem); align-items: start;
  padding: clamp(1.35rem, 1rem + 1.2vw, 2.25rem) clamp(1.35rem, 1rem + 1.6vw, 2.5rem);
  opacity: 0; transform: translateX(20px); pointer-events: none;
  transition: opacity .45s ease, transform .55s var(--impl-ease);
}
.sp-impl-slide.is-before { transform: translateX(-20px); }
.sp-impl-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }

.sp-impl-main { display: flex; flex-direction: column; gap: .5rem; }
.sp-impl-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.sp-impl-title { margin: 0; font-family: var(--display); font-size: clamp(1.25rem, 1rem + .9vw, 1.7rem); font-weight: 700; line-height: 1.2; color: var(--navy); }
.sp-impl-desc { margin: 0; font-size: .98rem; line-height: 1.6; color: #5C5A74; text-wrap: pretty; }

.sp-impl-acts { display: flex; flex-direction: column; gap: .7rem; }
.sp-impl-acts-label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8A87A3; }
.sp-impl-acts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.sp-impl-acts li { font-size: .94rem; line-height: 1.45; color: #2A2846; padding-bottom: .7rem; border-bottom: 1px solid #EEEBF8; }

.sp-impl-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #EEEBF8; }
.sp-impl-progress i { display: block; height: 100%; background: #6254BF; transform: scaleX(0); transform-origin: left; }
.sp-impl-slide.is-active .sp-impl-progress i { animation: sp-impl-progress 5s linear forwards; }
.sp-impl.is-paused .sp-impl-progress i { animation-play-state: paused; }
@keyframes sp-impl-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Números do piloto */
.sp-impl-stats {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.sp-impl-stat {
  padding: clamp(1.15rem, 1rem + .8vw, 1.5rem) clamp(1rem, .85rem + .6vw, 1.35rem);
  background: #fff;
  border: 1px solid #E4E0F5;
  border-radius: 16px;
  box-shadow: 0 12px 28px -22px rgba(23,22,50,.28);
}
.sp-impl-stat strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.55rem, 1.2rem + 1.1vw, 2.15rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.sp-impl-stat span {
  display: block;
  margin-top: .45rem;
  font-size: .84rem;
  line-height: 1.4;
  color: #5C5A74;
}

@media (max-width: 899px) {
  .sp-impl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile: carrossel com scroll-snap */
@media (max-width: 719px) {
  .sp-impl-card {
    display: flex; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .sp-impl-card::-webkit-scrollbar { display: none; }
  .sp-impl-slide, .sp-impl-slide.is-before {
    grid-area: auto; flex: 0 0 100%; scroll-snap-align: start;
    opacity: 1; transform: none; pointer-events: auto; transition: none;
  }
  .sp-impl-desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-impl *, .sp-impl *::before { transition: none !important; animation: none !important; }
}
