/* tj · Trajetória — a história como uma tira de ECG */
.tj { --tj-zona: 170px; }

/* ---------- abertura: retrato + título + fala ---------- */
.tj-abre { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5.5rem); align-items: end; }
.tj-abre { align-items: start; }
.tj-fotos { position: relative; padding-bottom: 22%; }
.tj-foto { margin: 0; position: relative; }
.tj-f1 { width: 86%; rotate: -1.6deg; z-index: 1; }
.tj-f2 { position: absolute; width: 48%; right: -6%; bottom: -2%; rotate: 3deg; z-index: 2; }
.tj-foto img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 10px solid #fbf9f4; border-bottom-width: 52px;
  box-shadow: 0 30px 60px -28px rgb(13 31 25 / .55), 0 6px 14px -6px rgb(13 31 25 / .3); }
.tj-f2 img { aspect-ratio: 1 / 1; object-position: 50% 30%; border-width: 8px; border-bottom-width: 44px; }
.tj-foto figcaption { position: absolute; left: 16px; right: 12px; bottom: 12px; font-size: .95rem; line-height: 1.2; color: var(--vermelho); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tj-f2 figcaption { bottom: 10px; }
.tj-f2::before { /* fita adesiva */
  content: ""; position: absolute; z-index: 1; top: -14px; left: 50%; width: 92px; height: 28px; translate: -50% 0; rotate: -4deg;
  background: rgb(233 226 208 / .78); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.tj-texto { padding-top: clamp(1rem, 4vw, 3.5rem); }
.tj .ts-forte { font-size: clamp(2.8rem, 1.2rem + 5.4vw, 6.4rem); }
.tj-rot { margin: 0 0 1.4rem; }
.tj-fala { margin: clamp(2rem, 4vw, 3.2rem) 0 0; max-width: 34em; padding-left: 1.4rem; border-left: 2px solid var(--vermelho); }
.tj-fala mark { background: linear-gradient(transparent 58%, rgb(224 83 63 / .28) 58%, rgb(224 83 63 / .28) 92%, transparent 92%); color: inherit; padding-inline: .05em; }
.tj-fala p { margin: 0; font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); line-height: 1.45; color: var(--tinta); }
.tj-fala footer { margin-top: .9rem; }

/* ---------- a tira ---------- */
.tj-tira { position: relative; margin-top: clamp(3rem, 5vw, 4.5rem); margin-inline: -2vw; padding: 4.6rem calc(2vw + var(--marg)) 4rem;
  background-color: #f7f3ea; rotate: -.8deg;
  background-image:
    linear-gradient(rgb(157 23 21 / .2) 1px, transparent 1px),
    linear-gradient(90deg, rgb(157 23 21 / .2) 1px, transparent 1px),
    linear-gradient(rgb(157 23 21 / .085) 1px, transparent 1px),
    linear-gradient(90deg, rgb(157 23 21 / .085) 1px, transparent 1px);
  background-size: 25px 25px, 25px 25px, 5px 5px, 5px 5px;
  box-shadow: 0 1px 0 rgb(255 255 255 / .6) inset, 0 30px 50px -30px rgb(13 31 25 / .45), 0 6px 14px -8px rgb(13 31 25 / .25); }
.tj-ecg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tj-cab { position: absolute; bottom: .8rem; left: calc(2vw + var(--marg)); margin: 0; font-family: var(--f-nota); font-size: .8rem; letter-spacing: .05em; color: rgb(157 23 21 / .9); font-weight: 500; }

.tj-marcos { list-style: none; margin: 0 auto; padding: 0; position: relative; max-width: var(--largura);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 clamp(1rem, 2vw, 2rem); }
.tj-marco { position: relative; }
.tj-ano { margin: 0 0 var(--tj-zona); font-family: var(--f-nota); font-style: italic; font-weight: 500; color: var(--vermelho);
  font-size: clamp(2.2rem, 1.2rem + 2.2vw, 3.3rem); line-height: 1; white-space: nowrap; letter-spacing: -.03em; }
.tj-ano small { font-size: .55em; }
.tj-ano { position: relative; }
.tj-ano::after { /* haste da anotação até o pico R */
  content: ""; position: absolute; left: 10px; top: calc(100% + 10px); width: 0; height: var(--tj-haste, 40px);
  border-left: 1.5px dashed rgb(157 23 21 / .55); }
.js .tj-ano::after { scale: 1 0; transform-origin: top; transition: scale .5s .1s var(--curva-traco); }
.js .tj-marco.on .tj-ano::after { scale: 1 1; }
.tj-pulso { display: none; }
.js .tj-pulso { display: block; position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  left: var(--px, 0); top: var(--py, 0); border: 1.5px solid rgb(157 23 21 / .6); opacity: 0; }
.js .tj.fim .tj-pulso { animation: tj-pulso 1.875s cubic-bezier(.2,.7,.2,1) infinite; }
.js .tj-marco.on > .tj-pulso { opacity: 0; translate: none; }
@keyframes tj-pulso { 0% { scale: .3; opacity: .9; } 70%, 100% { scale: 1.6; opacity: 0; } }
.tj-hoje .tj-ano { color: var(--verde); }
.tj-fase { position: absolute; top: 2.1rem; margin: 0; height: 12px; border: 1.5px solid rgb(157 23 21 / .7); border-bottom: 0; font-family: var(--f-nota); font-style: italic; font-weight: 500; font-size: .95rem; color: var(--vermelho); }
.tj-fase span { position: absolute; left: 50%; top: -.75em; translate: -50% 0; padding: 0 .6em; background: #f7f3ea; white-space: nowrap; line-height: 1.2; }
.js .tj-fase { opacity: 0; transition: opacity .6s; }
.js .tj-fase.on { opacity: 1; }
.tj-nome { margin: 0; font-family: var(--f-titulo); text-transform: uppercase; font-weight: 700; font-size: clamp(1.25rem, .9rem + .7vw, 1.65rem); line-height: 1.05; color: var(--verde); }
.tj-nome span { display: block; font-weight: 400; color: var(--texto-papel); font-size: .8em; letter-spacing: .02em; margin-top: .2em; }
.tj-desc { margin: .7rem 0 0; color: var(--texto-papel); font-size: var(--t-texto); line-height: 1.45; }
.tj-nota { margin: .8rem 0 0; font-size: 1rem; line-height: 1.3; }

/* revelação acompanhando a pena (só com JS) */
.js .tj-marco > * { opacity: 0; translate: 0 8px; transition: opacity .6s var(--curva), translate .6s var(--curva); }
.js .tj-marco.on > * { opacity: 1; translate: 0 0; }
.js .tj-marco.on > .tj-nome { transition-delay: .08s; }
.js .tj-marco.on > .tj-desc { transition-delay: .16s; }
.js .tj-marco.on > .tj-nota { transition-delay: .4s; }

/* ---------- tablet e celular: a tira fica em pé ---------- */
@media (max-width: 1100px) {
  .tj-tira { rotate: -.6deg; padding: 3.4rem 1.1rem 2.4rem 96px; }
  .tj-cab { left: auto; right: 1rem; top: .8rem; font-size: .72rem; }
  .tj-marcos { grid-template-columns: minmax(0, 36rem); justify-content: start; gap: 2.8rem; margin: 0; }
  .tj-ano { margin-bottom: .5rem; }
  .tj-fase { display: none; }
  .tj-ano::after { display: none; }
  .tj-cab { bottom: auto; top: .8rem; }
}

/* ---------- tablet: fotos presas à esquerda, tira em pé à direita ---------- */
@media (min-width: 761px) and (max-width: 1100px) {
  .tj { display: grid; grid-template-columns: var(--marg) minmax(0, .82fr) minmax(0, 1.18fr) var(--marg); column-gap: clamp(1.5rem, 3vw, 2.5rem); }
  .tj-abre { display: contents; }
  .tj-fotos { grid-column: 2; grid-row: 1 / 3; position: sticky; top: 6rem; align-self: start; }
  .tj-texto { grid-column: 3; grid-row: 1; padding-top: 0; }
  .tj .ts-forte { font-size: clamp(2.6rem, 1rem + 4.4vw, 4rem); }
  .tj-tira { grid-column: 3 / 5; grid-row: 2; margin-inline: 0; }
  .tj-foto figcaption { font-size: .8rem; }
}

/* ---------- celular: a tira fica em pé ---------- */
@media (max-width: 760px) {
  .tj-abre { grid-template-columns: 1fr; gap: 2.4rem; }
  .tj-fotos { width: min(100%, 460px); padding-bottom: 26%; }
  .tj-foto figcaption { font-size: .76rem; }
  .tj-cab span { display: none; }
  .tj .ts-forte { font-size: clamp(2.6rem, 11vw, 3.6rem); }
  .tj-fala { margin-top: 1.6rem; }
  .tj-texto { order: -1; padding-bottom: 0; }
  .tj-tira { margin-inline: calc(-1 * var(--marg) * .4); }
}

@media (prefers-reduced-motion: reduce) {
  .js .tj-marco > * { opacity: 1; translate: none; }
  .js .tj-ano::after { scale: 1 1; }
  .js .tj.fim .tj-pulso { animation: none; }
}
