/* ==========================================================================
   Trajetória: linha que se desenha conforme a rolagem
   A linha desce em curvas, acende cada marco ao chegar nele e um número
   grande fica fixo ao lado contando a etapa (01 → 05).
   ========================================================================== */

.tl { padding-block: clamp(var(--space-10), 10vw, var(--space-16)); }
.tl-head { max-width: 800px; margin-bottom: var(--space-10); }
.tl-head .eyebrow { margin-bottom: var(--space-3); }
.tl-head h2 { margin: 0; font-size: var(--fs-section); line-height: var(--lh-section); }
.tl-head h2 em { color: var(--blue); font-style: normal; }
.tl-head > p:last-child { max-width: 576px; margin: var(--space-3) 0 0; color: var(--text-muted); font-size: var(--fs-lead); line-height: var(--lh-lead); }

.tl-wrap { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) 128px minmax(0, 1.4fr); }

/* Número fixo: contorno azul, as dezenas preenchidas */
.tl-count { position: relative; grid-column: 1; grid-row: 1; }
.tl-count-sticky { position: sticky; top: 32vh; display: grid; gap: var(--space-2); }
.tl-count-num { display: block; color: transparent; -webkit-text-stroke: 1.5px var(--blue); font-size: clamp(80px, 9vw, 128px); font-weight: 600; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tl-count-num b { color: var(--blue); -webkit-text-stroke: 0; font-weight: 600; }
.tl-count-name { color: var(--blue); font-size: var(--fs-small); font-weight: 600; letter-spacing: var(--tracking-eyebrow); line-height: var(--lh-small); text-transform: uppercase; transition: opacity .3s ease; }
.tl-count-name.is-swapping { opacity: 0; }

.tl-list { position: relative; grid-column: 2 / 4; grid-row: 1; margin: 0; padding: 0; list-style: none; }
.tl-item { position: relative; display: grid; grid-template-columns: 128px minmax(0, 1fr); min-height: clamp(160px, 26vh, 240px); padding-bottom: var(--space-5); }
.tl-node { position: absolute; top: 8px; left: var(--tl-x, 64px); width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--neutral-300); transition: box-shadow .5s ease, background-color .5s ease, transform .5s cubic-bezier(.3, 1.7, .5, 1); }
.tl-item.is-on .tl-node { background: var(--blue); box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 8px var(--tint-blue); transform: scale(1.12); }
.tl-item.is-current.is-on .tl-node { background: var(--sand); box-shadow: inset 0 0 0 2px var(--sand), 0 0 0 8px var(--tint-sand); }

.tl-card { grid-column: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px var(--space-2); align-items: start; }
.tl-ico { grid-row: span 3; width: 48px; height: 48px; padding: 12px; border-radius: var(--radius-control); background: var(--tint-blue); color: var(--blue); }
.tl-ico * { stroke-dasharray: 80; stroke-dashoffset: 0; }
.tl-step { margin: 0; color: var(--blue); font-size: var(--fs-small); font-weight: 600; letter-spacing: var(--tracking-eyebrow); line-height: var(--lh-small); text-transform: uppercase; }
.tl-card h3 { margin: var(--space-1) 0 0; font-size: var(--fs-card); font-weight: 600; line-height: var(--lh-card); }
.tl-card p:not(.tl-step) { max-width: 576px; margin: var(--space-2) 0 0; color: var(--text-muted); font-size: var(--fs-body); line-height: var(--lh-body); }

/* Linha (criada pelo script) */
.tl-svg { position: relative; grid-column: 2; grid-row: 1; align-self: stretch; width: 128px; height: 100%; overflow: visible; pointer-events: none; }
.tl-svg .is-base { fill: none; stroke: var(--neutral-300); stroke-width: 1.5; stroke-dasharray: 2 8; stroke-linecap: round; }
.tl-svg .is-draw { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; }
.tl-svg .is-head { fill: var(--sand); filter: drop-shadow(0 0 6px var(--sand)) drop-shadow(0 0 16px var(--sand)); transition: opacity .3s ease; }

/* Com script: cada marco entra quando a linha chega nele */
.tl.is-js .tl-card { opacity: .2; transform: translateY(16px); transition: opacity .6s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.tl.is-js .tl-item.is-on .tl-card { opacity: 1; transform: none; }
.tl.is-js .tl-ico * { stroke-dashoffset: 80; transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .3, 1) .15s; }
.tl.is-js .tl-item.is-on .tl-ico * { stroke-dashoffset: 0; }

@media (max-width: 760px) {
  .tl-wrap { grid-template-columns: 1fr; }
  .tl-count { display: none; }
  .tl-list { grid-column: 1; }
  .tl-item { grid-template-columns: 64px minmax(0, 1fr); min-height: 0; padding-bottom: var(--space-6); }
  .tl-svg { grid-column: 1; width: 64px; }
  .tl-card { grid-template-columns: 1fr; }
  .tl-ico { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .tl.is-js .tl-card, .tl.is-js .tl-ico * { transition: none !important; }
}
.tl-card p:not(.tl-step) + p { margin-top: var(--space-1); }
@media (min-width: 761px) { .tl-card > :not(.tl-ico) { grid-column: 2; } .tl-card .tl-ico { grid-row: 1 / span 3; } }
