/* tr · Uma formação de cada vez — o fio do ciático vira o fio do tempo; cada ano acende como o disco L4–L5 */
.tr {
  --tr-ano-w: clamp(150px, 19vw, 290px);
  --tr-fio-x: calc(var(--tr-ano-w) + 34px);
  --tr-p: 0px;
}
.tr-defs { position: absolute; width: 0; height: 0; }
.tr-fundo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tr-mancha { position: absolute; border-radius: 50%; background: radial-gradient(circle closest-side in oklab, var(--c), transparent); }
.tr-m1 { --c: #2E261E; width: 80vmax; height: 80vmax; left: -30vmax; top: -30vmax; }
.tr-m2 { --c: color-mix(in oklab, #C9A75A 14%, #17130F); width: 60vmax; height: 60vmax; right: -24vmax; top: 30%; }
.tr-m3 { --c: #221C16; width: 70vmax; height: 70vmax; left: 10%; bottom: -30vmax; }

/* ---------- cabeça ---------- */
.tr-cab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 110px); align-items: end; }
.tr-titulo { color: var(--papel); }
.tr-titulo { font-size: clamp(2.4rem, 1.2rem + 4.2vw, 5rem); }
.tr-apoio { margin: 0 0 .5em; padding-top: 20px; border-top: 1px solid color-mix(in oklab, var(--ouro) 45%, transparent); font-size: var(--t-apoio); max-width: 34em; }

/* ---------- o fio ---------- */
.tr-tempo { position: relative; margin-top: clamp(64px, 10vh, 120px); }
.tr-fio { position: absolute; left: var(--tr-fio-x); top: 0; bottom: 64px; width: 2px; translate: -1px 0; background: color-mix(in oklab, var(--ouro) 22%, transparent); border-radius: 2px; }
.tr-fio-cheio { position: absolute; left: 0; top: 0; width: 100%; height: var(--tr-p); background: linear-gradient(in oklab to bottom, var(--ouro), var(--ouro-claro)); border-radius: 2px; }
.tr-fio-ponta { position: absolute; left: 50%; top: var(--tr-p); width: 10px; height: 10px; border-radius: 50%; translate: -50% -50%; background: #F8E7AE; box-shadow: 0 0 0 4px color-mix(in oklab, var(--ouro) 30%, transparent), 0 0 18px 4px color-mix(in oklab, var(--ouro-claro) 60%, transparent); }

.tr-marcos { list-style: none; margin: 0; padding: 0; }
.tr-marco {
  position: relative;
  display: grid; grid-template-columns: var(--tr-ano-w) 68px minmax(0, 1fr); align-items: start;
  padding: clamp(28px, 5vh, 56px) 0;
}
.tr-ano { margin: 0; text-align: right; font-family: var(--f-titulo); font-weight: 700; font-size: clamp(3rem, 1.6rem + 4vw, 6.2rem); line-height: .9; letter-spacing: -.045em; }
.tr-ano span { color: color-mix(in oklab, var(--ouro) 26%, transparent); transition: color .8s ease; }
.tr-aceso .tr-ano span {
  color: transparent;
  background: linear-gradient(in oklab 100deg, #C9A75A 0%, #E3CC8F 30%, #FBF0CF 50%, #E3CC8F 70%, #C9A75A 100%) 0 0 / 260% 100%;
  -webkit-background-clip: text; background-clip: text;
}
.tr-ano span { display: inline-block; transition: color .8s ease, filter .8s ease; }
.tr-agora .tr-ano span { filter: drop-shadow(0 0 22px color-mix(in oklab, var(--ouro) 45%, transparent)); animation: tr-sol 3.8s ease-in-out infinite alternate; }
@keyframes tr-sol { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.tr-fora .tr-ano span { animation-play-state: paused; }
.tr-no { justify-self: center; width: 76px; height: 76px; margin-top: calc(clamp(3rem, 1.6rem + 4vw, 6.2rem) * .45 - 38px); position: relative; z-index: 1; }
.tr-no svg { width: 100%; height: 100%; overflow: visible; }
.tr-disco { fill: var(--noite-3); stroke: color-mix(in oklab, var(--ouro) 55%, transparent); stroke-width: 1.8; transition: fill .8s ease, stroke .8s ease; }
.tr-halo { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity 1s ease; }
.tr-onda { fill: none; stroke: var(--ouro); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.tr-aceso .tr-disco { fill: url(#tr-ouro); stroke: var(--ouro-claro); }
.tr-aceso .tr-halo { opacity: .4; }
.tr-agora .tr-halo { opacity: 1; animation: tr-pulso 3.8s ease-in-out infinite; }
.tr-agora .tr-onda { animation: tr-onda 3.8s ease-out infinite; }
@keyframes tr-pulso { 0%, 100% { transform: scale(.82); opacity: .75; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes tr-onda { 0% { transform: scale(.9); opacity: .9; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.tr-fora .tr-halo, .tr-fora .tr-onda { animation-play-state: paused; }

.tr-conteudo {
  padding-left: clamp(8px, 1.6vw, 24px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(28px, 4vw, 64px); align-items: start;
}
.tr-txt { max-width: 34em; padding-top: 4px; }
.tr-sigla {
  margin: 0; align-self: center; justify-self: start; font-family: var(--f-titulo); font-weight: 700; font-size: clamp(4rem, 2rem + 6vw, 9rem); line-height: .8; letter-spacing: -.04em;
  color: transparent; background: linear-gradient(in oklab 168deg, color-mix(in oklab, #E3CC8F 34%, transparent), color-mix(in oklab, #C9A75A 10%, transparent)); -webkit-background-clip: text; background-clip: text;
}
.tr-quando { margin: 0 0 8px; font-family: var(--f-titulo); font-weight: 600; font-size: var(--t-mini); letter-spacing: .1em; text-transform: uppercase; color: var(--ouro-claro); }
.tr-nome { color: var(--papel); }
.tr-conteudo .s-texto { margin: 12px 0 0; }

/* fotos em moldura de papel, como o certificado */
.tr-papel {
  margin: 0; width: min(100%, var(--tr-w, 400px)); justify-self: start;
  padding: 12px 12px 14px; background: var(--papel); border-radius: 4px;
  rotate: var(--rot, 0deg);
  box-shadow: inset 0 0 0 4px var(--papel), inset 0 0 0 5px color-mix(in oklab, var(--ouro) 70%, transparent), 0 30px 60px -28px rgba(0, 0, 0, .85), 0 0 0 1px rgba(201, 167, 90, .35);
}
.tr-papel img { width: 100%; height: auto; border-radius: 2px; }
.tr-papel figcaption { margin-top: 10px; font-size: .95rem; line-height: 1.4; color: var(--tinta-suave); }
.tr-dupla { display: flex; align-items: flex-start; }
.tr-dupla .tr-papel:first-child figcaption { padding-right: 52px; }
.tr-marco:nth-child(1) .tr-papel { --tr-w: 300px; }
.tr-marco:nth-child(5) .tr-papel { --tr-w: 470px; }
.tr-dupla .tr-papel { flex: none; width: min(56%, 340px); }
.tr-papel-cert { width: min(54%, 300px) !important; margin-left: -56px; margin-top: 62%; position: relative; z-index: 1; }

/* 2023: o letreiro da casa, em ouro */
.tr-letreiro { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 24px); color: var(--ouro); padding: clamp(18px, 2.4vw, 32px) 0; }
.tr-emblema { width: clamp(84px, 8vw, 132px); height: auto; aspect-ratio: 1; flex: none; filter: drop-shadow(0 0 22px color-mix(in oklab, var(--ouro) 40%, transparent)); }
.tr-letreiro-txt { display: grid; line-height: 1; }
.tr-letreiro-centro { font-family: var(--f-titulo); font-weight: 600; font-size: clamp(.78rem, .6rem + .35vw, 1rem); letter-spacing: .21em; text-transform: uppercase; color: var(--papel); }
.tr-letreiro-nome {
  font-family: var(--f-marca); font-weight: 600; font-size: clamp(2.1rem, 1.2rem + 2.6vw, 3.8rem); margin-top: 10px; padding-bottom: .08em;
  color: transparent; background: linear-gradient(in oklab 168deg, #F6E8C0 0%, #E3CC8F 45%, #B48C3C 100%); -webkit-background-clip: text; background-clip: text;
}

/* o fim aberto do fio: a frase dela inteira, e o último ponto fica aberto */
.tr-fim { position: relative; margin: clamp(40px, 7vh, 80px) 0 0; padding-left: calc(var(--tr-fio-x) + 56px); }
.tr-aberto { position: absolute; left: var(--tr-fio-x); top: .3em; width: 24px; height: 24px; translate: -50% 0; border-radius: 50%; border: 2px solid var(--ouro-claro); box-shadow: 0 0 26px 4px color-mix(in oklab, var(--ouro) 40%, transparent); }
.tr-fim-citacao { margin: 0; }
.tr-fim-grande { margin: 0; max-width: 17em; font-family: var(--f-titulo); font-weight: 600; font-size: clamp(2rem, 1rem + 3.4vw, 4.4rem); line-height: 1.06; letter-spacing: -.03em; color: var(--papel); text-wrap: balance; }
.tr-ouro { color: transparent; background: linear-gradient(in oklab 168deg, #F6E8C0 0%, #E3CC8F 45%, #C9A75A 100%); -webkit-background-clip: text; background-clip: text; }
.tr-fim-meio { margin: 22px 0 0; font-size: var(--t-apoio); line-height: 1.5; color: var(--papel-suave); }
.tr-fim-frase { margin: 6px 0 0; font-family: var(--f-titulo); font-weight: 600; font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); color: var(--ouro-claro); }
.tr-fim-quem { margin: 16px 0 0; font-size: 1rem; color: var(--papel-suave); }

/* ---------- notebook menor: o certificado desce para baixo da foto ---------- */
@media (min-width: 900px) and (max-width: 1180px) {
  .tr-dupla { flex-direction: column; }
  .tr-dupla .tr-papel { width: min(92%, 340px); }
  .tr-dupla .tr-papel:first-child figcaption { padding-right: 0; }
  .tr-papel-cert { width: min(84%, 300px) !important; margin: 12px 0 0 18%; }
}

/* ---------- celular e tablet ---------- */
@media (max-width: 899px) {
  .tr { --tr-fio-x: 15px; }
  .tr-cab { grid-template-columns: 1fr; gap: 28px; }
  .tr-marco { grid-template-columns: 30px minmax(0, 1fr); gap: 0 14px; padding: 26px 0; }
  .tr-papel { padding: 10px 10px 12px; }
  .tr-no { grid-column: 1; grid-row: 1; width: 40px; height: 40px; justify-self: center; margin-top: calc(clamp(2.6rem, 12vw, 4rem) * .45 - 20px); }
  .tr-sigla { display: none; }
  .tr-ano { grid-column: 2; grid-row: 1; text-align: left; font-size: clamp(2.6rem, 12vw, 4rem); }
  .tr-conteudo { grid-column: 2; padding-left: 0; margin-top: 10px; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tr-papel { width: min(100%, 340px); }
  .tr-dupla { flex-direction: column; }
  .tr-dupla .tr-papel:first-child figcaption { padding-right: 0; }
  .tr-dupla .tr-papel { width: min(88%, 320px); }
  .tr-papel-cert { width: min(78%, 280px) !important; margin: 14px 0 0 auto; }
  .tr-fim { padding-left: 44px; }
  .tr-aberto { width: 20px; height: 20px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .tr-papel-cert { margin: 14px 0 0 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .tr-fio-ponta { display: none; }
}
