/* ════════════════════════════════════════════════════════════════
   DOBRA 03 · JORNADA DOS CICLOS (.imj-) — escopo próprio.
   Tema claro do projeto: fundo gelo #e9ebef · texto #0c0e14 ·
   glass cards brancos · acentos roxos (#8b5cf6 / #7c3aed).

   Desktop (JS ativo, [data-journey-on]): a seção é pinada (~350vh)
   e a "câmera" desce pela trilha — o track sobe, a curva SVG se
   desenha e a etapa sob o centro ganha foco com leve rotateX 3D.
   Mobile: timeline vertical com linha de progresso.
   Sem JS / reduced-motion: o atributo nunca é aplicado e tudo
   fica empilhado, estático e legível (fallback).
   ════════════════════════════════════════════════════════════════ */

.imj-journey {
  position: relative;
  background: #e9ebef; /* mesmo "gelo" das dobras 01/02 */
  color: #0c0e14;
  padding: 96px 0;
  overflow: hidden;
}

.imj-grid {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  gap: 56px;
}
@media (min-width: 1024px) {
  .imj-grid {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: 48px;
  }
}

/* ---------- header (fixo durante o pin) ---------- */
.imj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-dark);
}
.imj-eyebrow::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(139, 92, 246, 0.6);
}
.imj-title {
  margin-top: 16px;
  font-family: var(--f-section);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 20ch;
}
.imj-title em {
  font-style: normal;
  background: linear-gradient(135deg, #9b5cff 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.imj-sub {
  margin-top: 16px;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(12, 14, 20, 0.62);
  max-width: 44ch;
}

/* contador com anel de progresso (desktop) */
.imj-ringwrap {
  display: none;
  margin-top: 40px;
  align-items: center;
  gap: 20px;
}
@media (min-width: 1024px) {
  .imj-ringwrap {
    display: flex;
  }
}
.imj-ring {
  position: relative;
  width: 104px;
  height: 104px;
}
.imj-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.imj-ring-track {
  fill: none;
  stroke: rgba(12, 14, 20, 0.12);
  stroke-width: 2;
}
.imj-ring-fill {
  fill: none;
  stroke: var(--purple-dark);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 289; /* 2π·46 */
  stroke-dashoffset: 289;
}
.imj-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 34px;
}
.imj-counter {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0c0e14;
}
.imj-count i {
  margin-left: 3px;
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 11px;
  color: rgba(12, 14, 20, 0.65);
}
.imj-ringlabel {
  font-family: var(--f-body);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(12, 14, 20, 0.62);
  max-width: 16ch;
}

/* ---------- viewport da "câmera" + curva ---------- */
.imj-viewport {
  position: relative;
}

/* ---------- trilha de etapas ---------- */
.imj-track {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-left: 28px; /* espaço da linha da timeline mobile */
}
/* linha da timeline (mobile) */
.imj-track::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(12, 14, 20, 0.14);
}
/* progresso da linha (scrubbed no mobile) */
.imj-progress {
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--purple-dark);
  transform-origin: top;
}
.imj-dot {
  position: absolute;
  left: -25.5px;
  top: 34px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
}
@media (min-width: 1024px) {
  .imj-track {
    padding-left: 0;
  }
  .imj-track::before,
  .imj-progress,
  .imj-dot {
    display: none;
  }
}

/* ---------- card de etapa (glass claro, como .imv-card) ---------- */
.imj-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 24px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(12, 14, 20, 0.08);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 8px rgba(12, 14, 20, 0.06),
    0 24px 64px rgba(12, 14, 20, 0.07);
  backface-visibility: hidden;
  will-change: transform;
  transition:
    opacity 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (min-width: 1024px) {
  .imj-card {
    grid-template-columns: 88px 1fr;
    width: 440px;
    padding: 26px 26px;
  }
  .imj-card:nth-child(odd) {
    align-self: flex-end;
  }
  .imj-card:nth-child(even) {
    align-self: flex-start;
  }
}

.imj-num {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 3vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #0c0e14;
}
.imj-card h3 {
  font-family: var(--f-section);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0c0e14;
}
.imj-sline {
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-dark);
}
.imj-desc {
  margin-top: 9px;
  font-family: var(--f-body);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(12, 14, 20, 0.62);
}

/* ---------- estados dirigidos pelo JS ([data-journey-on]) ---------- */
[data-journey-on] .imj-viewport {
  perspective: 1200px; /* profundidade do rotateX na ativação */
}
[data-journey-on] .imj-card {
  opacity: 0.35;
  filter: blur(1.5px);
  transform: scale(0.94) rotateX(7deg);
}
[data-journey-on] .imj-card.is-active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) rotateX(0deg);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 30px rgba(12, 14, 20, 0.10),
    0 24px 64px rgba(12, 14, 20, 0.10);
}

/* layout "câmera fixa" do desktop — só com JS ativo */
@media (min-width: 1024px) {
  .imj-journey[data-journey-on] {
    padding: 0;
  }
  [data-journey-on] .imj-stage {
    display: flex;
    align-items: center;
    height: 100vh;
  }
  [data-journey-on] .imj-grid {
    width: 100%;
  }
  [data-journey-on] .imj-viewport {
    height: 80vh;
    overflow: hidden;
    /* respiro lateral para a sombra dos cards (o clip do overflow é na
       borda do padding) — margem negativa compensa, layout não se move */
    padding-inline: 72px;
    margin-inline: -72px;
    /* fade nas bordas do viewport da câmera */
    mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
  }
  [data-journey-on] .imj-track {
    row-gap: 22vh;
    padding-block: 25vh;
  }
}

/* a11y: estático e legível para quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .imj-card {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
