/* Seção 3 · Trajetória (tj) — Dra. Dânia Brancalhão */
.tj {
  --tj-cristal-luz: color-mix(in oklab, var(--a-cristal-claro) 55%, #fff);
  --tj-col-pet: 2.5rem;
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background: var(--a-base);
  color: var(--a-tinta);
  padding: var(--s-respiro) var(--a-margem);
}
.tj-malha {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(38% 30% at 88% 8% in oklab, color-mix(in oklab, var(--a-verde-agua) 52%, var(--a-base)), transparent 100%),
    radial-gradient(42% 34% at 6% 30% in oklab, color-mix(in oklab, var(--a-pessego) 62%, var(--a-base)), transparent 100%),
    radial-gradient(40% 30% at 92% 62% in oklab, color-mix(in oklab, var(--a-pessego) 48%, var(--a-base)), transparent 100%),
    radial-gradient(46% 30% at 14% 92% in oklab, color-mix(in oklab, var(--a-verde-agua) 44%, var(--a-base)), transparent 100%),
    var(--a-base);
}
.tj-grao {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--s-grao);
  mix-blend-mode: multiply;
  opacity: .05;
  pointer-events: none;
}

.tj-grade {
  max-width: var(--s-largura);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 6rem);
  align-items: start;
}

/* ---------- foto ---------- */
.tj-foto {
  position: sticky;
  top: max(1rem, calc(50svh - min(56vw, 92svh) * .5));
  margin: 0 0 0 calc(var(--a-margem) * -0.6);
  height: min(56vw, 92svh);
  display: grid;
  place-items: end center;
}
.tj-luz {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 46%;
  width: 118%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(closest-side in oklab, color-mix(in oklab, var(--a-pessego) 70%, #fff) 0%, color-mix(in oklab, var(--a-pessego) 38%, transparent) 55%, transparent 100%);
}
.tj-legenda {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .25em;
  font-family: var(--a-f-titulo);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--a-tinta);
  padding-left: 3em;
  position: absolute;
}
.tj-legenda::before { content: ""; position: absolute; left: 0; top: .75em; width: 2.2em; height: 1px; background: var(--a-malva-texto); }
.tj-legenda span { font-family: var(--a-f-texto); font-weight: 500; font-size: .9375rem; letter-spacing: .1em; color: var(--a-malva-texto); }
.tj-retrato {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 80%, transparent 99%);
}

/* ---------- texto ---------- */
.tj-texto { padding-top: clamp(0rem, 2vw, 2rem); }
.tj-rotulo {
  margin: 0 0 var(--a-e3);
  font-size: var(--a-t-rotulo);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--a-malva-texto);
  display: flex;
  align-items: center;
  gap: .9em;
}
.tj-rotulo::before { content: ""; width: 2.2em; height: 1px; background: currentColor; }
.tj-titulo {
  margin: 0;
  font-family: var(--a-f-titulo);
  font-weight: 400;
  font-size: var(--s-t-grande);
  line-height: 1.06;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.tj-forte { font-weight: 900; }
.tj-titulo .tj-forte { display: block; }
.tj-relato { margin-top: var(--a-e4); max-width: 34em; }
.tj-relato p {
  margin: 0 0 1.1em;
  font-size: var(--s-t-corpo);
  line-height: 1.7;
  color: var(--a-tinta-suave);
  text-wrap: pretty;
}
.tj-relato .tj-abre { font-size: var(--s-t-apoio); line-height: 1.6; color: var(--a-tinta); }

/* ---------- linha do tempo ---------- */
.tj-sub {
  margin: clamp(3rem, 2rem + 3vw, 5rem) 0 var(--a-e4);
  font-size: var(--a-t-rotulo);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--a-malva-texto);
}
.tj-linha {
  --tj-p: 1;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tj-linha::before, .tj-linha::after {
  content: "";
  position: absolute;
  left: calc(var(--tj-col-pet) / 2 - 1px);
  top: 1.2rem;
  bottom: 1.2rem;
  width: 2px;
  border-radius: 2px;
}
.tj-linha::before { background: color-mix(in oklab, var(--a-tinta) 12%, transparent); }
.tj-linha::after {
  background: linear-gradient(180deg in oklab, var(--a-cristal-claro), var(--a-cristal));
  transform-origin: top;
  transform: scaleY(var(--tj-p));
}
.tj-marco {
  position: relative;
  display: grid;
  grid-template-columns: var(--tj-col-pet) 10.5rem minmax(0, 1fr);
  column-gap: var(--a-e3);
  align-items: start;
  padding: 1.35rem 0;
}
.tj-marco + .tj-marco::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--tj-col-pet) + var(--a-e3));
  right: 0;
  height: 1px;
  background: var(--s-linha);
}
.tj-pet {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 2.1rem;
  margin-top: .15rem;
}
.tj-pet::before {
  content: "";
  position: absolute;
  inset: -30% -70%;
  border-radius: 50%;
  background: radial-gradient(closest-side in oklab, color-mix(in oklab, var(--a-cristal-claro) 40%, transparent), transparent);
  opacity: 1;
  transition: opacity .9s var(--a-lento), transform .9s var(--a-lento);
}
.tj-pet img {
  position: relative;
  height: 100%;
  width: auto;
  transition: filter .9s var(--a-lento), transform .9s var(--a-lento);
}
.tj-ano {
  font-family: var(--a-f-titulo);
  font-weight: 900;
  font-size: clamp(1.5rem, 1.2rem + .9vw, 2rem);
  line-height: 1.2;
  color: var(--a-cristal);
  transition: color .9s var(--a-lento);
  white-space: nowrap;
}
.tj-ate { font-weight: 400; margin: 0 .05em; }
.tj-sem-ano .tj-ano { font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); padding-top: .3em; }
.tj-feito {
  margin: 0;
  padding-top: .3rem;
  font-size: var(--s-t-corpo);
  line-height: 1.55;
  color: var(--a-tinta);
}
.tj-nota {
  display: block;
  margin-top: .2em;
  font-size: .9375rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--a-malva-texto);
  font-weight: 400;
}

/* acender: pulso de luz */
.js .tj-marco.tj-aceso .tj-pet img { animation: tj-pulso 1.1s var(--a-lento); }
@keyframes tj-pulso {
  0% { transform: scale(.78); filter: saturate(.3) brightness(1.1); }
  40% { transform: scale(1.2); filter: saturate(1.15) brightness(1.18) drop-shadow(0 0 .5rem color-mix(in oklab, var(--a-cristal-claro) 70%, transparent)); }
  100% { transform: scale(1); filter: none; }
}
/* o marco de hoje: a chegada */
.tj-hoje .tj-pet { height: 2.9rem; margin-top: -.2rem; }
.tj-linha .tj-hoje .tj-ano { font-size: clamp(1.5rem, 1.2rem + .9vw, 2rem); padding-top: 0; }
.tj-hoje .tj-feito { font-weight: 400; }

/* apagado até a linha chegar (só com JS) */
.js .tj-marco:not(.tj-aceso) .tj-pet img { filter: saturate(0) brightness(1.1) opacity(.45); transform: scale(.78); }
.js .tj-marco:not(.tj-aceso) .tj-pet::before { opacity: 0; transform: scale(.5); }
.js .tj-marco:not(.tj-aceso) .tj-ano { color: var(--a-tinta-suave); }

/* ---------- fecho ---------- */
.tj-fecho { margin: clamp(3rem, 2rem + 3vw, 5rem) 0 0; padding: 0; }
.tj-fecho-pet { display: block; width: auto; height: 2.75rem; margin-bottom: var(--a-e3); filter: drop-shadow(0 .4rem .9rem color-mix(in oklab, var(--a-cristal-claro) 45%, transparent)); }
.tj-fecho-frase {
  margin: 0;
  font-family: var(--a-f-titulo);
  font-weight: 400;
  font-size: clamp(1.75rem, 1rem + 1.7vw, 2.6rem);
  line-height: 1.18;
  text-wrap: balance;
}
.tj-fecho-apoio {
  margin: var(--a-e3) 0 0;
  max-width: 30em;
  font-size: var(--s-t-apoio);
  line-height: 1.6;
  color: var(--a-tinta-suave);
}
.tj-link {
  display: inline-block;
  margin-top: var(--a-e4);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--a-cristal);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.tj-nome { white-space: nowrap; }
.tj-fecho-frase .tj-forte { display: block; }
.tj-link:hover { color: #6c3540; text-decoration-thickness: 2px; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) and (min-width: 761px) {
  .tj-marco { grid-template-columns: var(--tj-col-pet) minmax(0, 1fr); }
  .tj-ano { grid-column: 2; }
  .tj-feito { grid-column: 2; padding-top: 0; }
  .tj-pet { grid-row: 1 / span 2; }
}

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .tj { --tj-col-pet: 2rem; }
  .tj-titulo { font-size: clamp(2.1rem, 1.4rem + 3vw, 2.6rem); }
  .tj-marco + .tj-marco::before { left: calc(var(--tj-col-pet) + 1rem); }
  .tj-grade { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tj-foto {
    position: relative;
    top: auto;
    order: 2;
    height: auto;
    width: min(100%, 26rem);
    margin: var(--a-e4) auto var(--a-e3);
    aspect-ratio: 1066 / 1330;
  }
  .tj-texto { display: contents; }
  .tj-rotulo { order: 0; }
  .tj-titulo { order: 1; }
  .tj-relato { order: 3; }
  .tj-sub { order: 4; }
  .tj-linha { order: 5; }
  .tj-fecho { order: 6; }
  .tj-link { order: 7; justify-self: start; }
  .tj-marco { grid-template-columns: var(--tj-col-pet) minmax(0, 1fr); column-gap: 1rem; padding: .75rem 0; }
  .tj-ano { grid-column: 2; }
  .tj-feito { grid-column: 2; padding-top: .1rem; }
  .tj-pet { grid-row: 1 / span 2; height: 1.9rem; }
  .tj-relato p { font-size: 1.0625rem; }
  .tj-relato .tj-abre { font-size: 1.1875rem; }
  .tj-legenda { bottom: .5rem; font-size: 1rem; }
  .tj-legenda span { font-size: .875rem; }
  .tj-hoje .tj-pet { height: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tj-pet img, .tj-pet::before, .tj-ano { transition: none; }
  .js .tj-marco.tj-aceso .tj-pet img { animation: none; }
  .js .tj-marco:not(.tj-aceso) .tj-pet img { filter: none; transform: none; }
  .js .tj-marco:not(.tj-aceso) .tj-pet::before { opacity: 1; transform: none; }
  .js .tj-marco:not(.tj-aceso) .tj-ano { color: var(--a-cristal); }
}
