/* Seção 2 · Cuide-se. Observe-se. Acompanhe-se. (tríptico do hero D no sistema do site) */
.tv {
  --tv-vao: clamp(.625rem, .3rem + .9vw, 1.125rem);
  --tv-alt: clamp(24rem, 66svh, 42rem);
  --tv-c1: 1fr; --tv-c2: 1fr; --tv-c3: 1fr;
  --tv-curva: cubic-bezier(.68, 0, .18, 1);
  position: relative;
  overflow: clip;
  padding: var(--s-respiro) var(--a-margem);
  background: var(--a-nevoa);
  color: var(--a-tinta);
}

/* malha: pêssego e malva sobre névoa, com o verde-água do hero ainda no alto */
.tv-malha {
  position: absolute;
  inset: -10%;
  z-index: -2;
  background:
    radial-gradient(38% 30% at 12% 4% in oklab, color-mix(in oklab, var(--a-verde-agua) 34%, var(--a-nevoa)), transparent 100%),
    radial-gradient(46% 42% at 86% 22% in oklab, color-mix(in oklab, var(--a-pessego) 62%, var(--a-nevoa)), transparent 100%),
    radial-gradient(44% 40% at 18% 78% in oklab, color-mix(in oklab, var(--a-malva) 44%, var(--a-nevoa)), transparent 100%),
    radial-gradient(36% 36% at 78% 96% in oklab, color-mix(in oklab, var(--a-pessego) 54%, var(--a-nevoa)), transparent 100%),
    var(--a-nevoa);
  background-size: 120% 120%, 118% 118%, 122% 122%, 116% 116%, auto;
  animation: tv-deriva 36s ease-in-out infinite alternate;
}
@keyframes tv-deriva {
  0%   { background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%, 0 0; }
  50%  { background-position: 25% 15%, 70% 25%, 25% 70%, 80% 70%, 0 0; }
  100% { background-position: 10% 30%, 90% 50%, 40% 90%, 60% 100%, 0 0; }
}
.tv-grao {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: var(--s-grao);
}

.tv-dentro { max-width: var(--s-largura); margin: 0 auto; }

/* topo: rótulo + abertura na voz dela */
.tv-topo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--a-e3) var(--a-e4);
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.tv-abertura {
  margin: 0;
  max-width: 14em;
  font-family: var(--a-f-titulo);
  font-weight: 400;
  font-size: clamp(1.625rem, 1rem + 1.8vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  text-align: right;
  text-wrap: balance;
  color: var(--a-tinta);
}
.tv-forte { font-weight: 900; }

/* rótulo (como .a-sobre) */
.tv-sobre {
  margin: 0;
  display: flex;
  align-items: center;
  gap: .9em;
  font-size: var(--a-t-rotulo);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--a-malva-texto);
}
.tv-sobre::before { content: ""; width: 2.2em; height: 1px; background: currentColor; }

/* ---------- tríptico ---------- */
.tv-tri {
  display: grid;
  grid-template-columns: minmax(0, var(--tv-c1)) minmax(0, var(--tv-c2)) minmax(0, var(--tv-c3));
  grid-template-rows: auto var(--tv-alt) auto;
  grid-template-areas: "v1 v2 v3" "p1 p2 p3" "f1 f2 f3";
  column-gap: var(--tv-vao);
  transition: grid-template-columns .9s var(--tv-curva);
}
.tv-tri[data-ativo="1"] { --tv-c1: 1.45fr; }
.tv-tri[data-ativo="2"] { --tv-c2: 1.45fr; }
.tv-tri[data-ativo="3"] { --tv-c3: 1.45fr; }

.tv-titulo { display: contents; margin: 0; }
.tv-verbo {
  display: flex;
  align-items: flex-start;
  gap: .5em;
  min-width: 0;
  padding: 0 0 clamp(.75rem, .5rem + .8vw, 1.25rem);
  font-family: var(--a-f-texto);
  font-weight: 200;
  text-transform: uppercase;
  font-size: clamp(1.0625rem, 2.1vw, 2.875rem);
  line-height: 1;
  letter-spacing: .08em;
  color: var(--a-tinta);
  white-space: nowrap;
}
.tv-v1 { grid-area: v1; } .tv-v2 { grid-area: v2; } .tv-v3 { grid-area: v3; }
.tv-num {
  font-family: var(--a-f-titulo);
  font-weight: 900;
  font-size: max(.8125rem, .3em);
  letter-spacing: .04em;
  padding-top: .1em;
  color: var(--a-cristal);
}
.tv-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tv-petala { display: inline-block; width: auto; height: 1.9em; aspect-ratio: 20 / 32; flex: none; vertical-align: middle; }
.tv-num { display: inline-flex; align-items: center; gap: .45em; }
.tv-num .tv-petala { margin-top: -.35em; }
.tv-se { font-weight: 600; color: var(--a-cristal); letter-spacing: .04em; }

.tv-painel {
  position: relative;
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: color-mix(in oklab, var(--a-base) 80%, var(--a-malva));
  font: inherit;
  color: inherit;
}
.tv-p1 { grid-area: p1; --tv-ve-a: var(--a-verde-agua); --tv-ve-b: var(--a-pessego); view-transition-name: tv-p1; }
.tv-p2 { grid-area: p2; --tv-ve-a: var(--a-pessego); --tv-ve-b: var(--a-cristal-claro); view-transition-name: tv-p2; }
.tv-p3 { grid-area: p3; --tv-ve-a: var(--a-lilas); --tv-ve-b: var(--a-malva); view-transition-name: tv-p3; }

.tv-foto { position: absolute; inset: 0; display: block; transition: filter .9s var(--tv-curva), scale .9s var(--tv-curva); }
.tv-tri:is([data-ativo="1"], [data-ativo="2"], [data-ativo="3"]) .tv-foto { filter: saturate(.72) brightness(.96); }
.tv-tri[data-ativo="1"] .tv-p1 .tv-foto,
.tv-tri[data-ativo="2"] .tv-p2 .tv-foto,
.tv-tri[data-ativo="3"] .tv-p3 .tv-foto { filter: none; scale: 1.03; }
@media (hover: hover) and (min-width: 761px) { .tv-painel { cursor: zoom-in; } .tv-painel[aria-pressed="true"] { cursor: zoom-out; } }
.tv-foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  transform-origin: 50% 30%;
}
.tv-p3 .tv-foto img { object-position: 50% 10%; }
.tv-foto .tv-larga { display: none; }

/* véu da paleta só no pé do retrato */
.tv-painel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 40% at 6% 106% in oklab, color-mix(in oklab, var(--tv-ve-a) 62%, transparent), transparent),
    radial-gradient(80% 36% at 96% 104% in oklab, color-mix(in oklab, var(--tv-ve-b) 52%, transparent), transparent);
}
/* filete da paleta no topo */
.tv-painel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg in oklab, var(--tv-ve-a), var(--tv-ve-b));
}

/* ---------- falas ---------- */
.tv-fala {
  min-width: 0;
  padding-top: clamp(1.25rem, 1rem + .8vw, 1.75rem);
  position: relative;
}
.tv-f1 { grid-area: f1; } .tv-f2 { grid-area: f2; } .tv-f3 { grid-area: f3; }
.tv-fala::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: .5rem;
  height: 1px;
  background: var(--s-linha);
}
.tv-fala::after {
  content: "";
  position: absolute;
  left: 0; top: calc(.5rem - 1px);
  width: 100%;
  height: 3px;
  background: var(--a-cristal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .9s var(--tv-curva);
}
.tv-tri[data-ativo="1"] .tv-f1::after,
.tv-tri[data-ativo="2"] .tv-f2::after,
.tv-tri[data-ativo="3"] .tv-f3::after { transform: scaleX(1); }

.tv-citacao { margin: 0; position: relative; }
.tv-citacao::before {
  content: "“";
  display: block;
  height: .5em;
  margin: .1rem 0 .15rem -.04em;
  font-family: var(--a-f-titulo);
  font-weight: 900;
  font-size: clamp(3.25rem, 2.5rem + 2vw, 4.5rem);
  line-height: 1;
  color: var(--a-cristal);
}
.tv-fala-rot, .tv-dica { display: none; }
.tv-citacao p {
  transition: color .6s;
  margin: 0;
  max-width: 24em;
  font-family: var(--a-f-titulo);
  font-weight: 400;
  font-size: clamp(1.25rem, 1rem + .55vw, 1.5625rem);
  line-height: 1.4;
  color: var(--a-tinta);
  text-wrap: pretty;
}
/* com um painel ampliado, as outras falas recuam */
.tv-tri:is([data-ativo="1"], [data-ativo="2"], [data-ativo="3"]) .tv-citacao p { color: var(--a-tinta-suave); }
.tv-tri[data-ativo="1"] .tv-f1 .tv-citacao p,
.tv-tri[data-ativo="2"] .tv-f2 .tv-citacao p,
.tv-tri[data-ativo="3"] .tv-f3 .tv-citacao p { color: var(--a-tinta); }
.tv-apoio {
  margin: var(--a-e2) 0 0;
  max-width: 28em;
  font-size: var(--s-t-corpo);
  line-height: 1.6;
  color: var(--a-tinta-suave);
}

/* ---------- pé ---------- */
.tv-pe { margin: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) 0 0; display: flex; align-items: center; gap: var(--a-e3); }
.tv-pe-fio { flex: 1; display: flex; align-items: center; gap: var(--a-e2); font-size: .875rem; }
.tv-pe-fio::after { content: ""; flex: 1; height: 1px; background: color-mix(in oklab, var(--a-tinta) 22%, transparent); }
.tv-pe-fio .tv-petala { height: 1.6rem; }
.tv-link {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-size: var(--s-t-corpo);
  font-weight: 400;
  color: var(--a-cristal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .3s;
}
.tv-link svg { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.tv-link:hover { color: #6c3540; text-decoration-thickness: 2px; }

/* ---------- gesto: os painéis abrem um a um ---------- */
.js .tv:not(.tv-aberto) .tv-painel { clip-path: inset(0 50% 0 50%); }
.js .tv:not(.tv-aberto) .tv-verbo,
.js .tv:not(.tv-aberto) .tv-fala { opacity: 0; }

.tv-aberto .tv-painel { animation: tv-abre 1.15s var(--tv-curva) both; }
.tv-aberto .tv-foto { animation: tv-aproxima 1.6s var(--tv-curva) both; }
.tv-aberto .tv-pal { display: inline-block; animation: tv-verbo 1.2s var(--tv-curva) both; }
.tv-aberto .tv-num { animation: tv-surge .8s ease both; }
.tv-aberto .tv-verbo, .tv-aberto .tv-fala { opacity: 1; }
.tv-aberto .tv-fala { animation: tv-sobe 1s var(--a-lento) both; }
.tv-aberto .tv-p1, .tv-aberto .tv-p1 .tv-foto { animation-delay: .05s; }
.tv-aberto .tv-p2, .tv-aberto .tv-p2 .tv-foto { animation-delay: .6s; }
.tv-aberto .tv-p3, .tv-aberto .tv-p3 .tv-foto { animation-delay: 1.15s; }
.tv-aberto .tv-v1 .tv-pal, .tv-aberto .tv-v1 .tv-num { animation-delay: .35s; }
.tv-aberto .tv-v2 .tv-pal, .tv-aberto .tv-v2 .tv-num { animation-delay: .9s; }
.tv-aberto .tv-v3 .tv-pal, .tv-aberto .tv-v3 .tv-num { animation-delay: 1.45s; }
.tv-aberto .tv-f1 { animation-delay: .7s; }
.tv-aberto .tv-f2 { animation-delay: 1.25s; }
.tv-aberto .tv-f3 { animation-delay: 1.8s; }

@keyframes tv-abre { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
@keyframes tv-aproxima { from { transform: scale(1.16); } to { transform: scale(1); } }
@keyframes tv-verbo { from { opacity: 0; letter-spacing: .4em; } to { opacity: 1; letter-spacing: .08em; } }
@keyframes tv-surge { from { opacity: 0; } to { opacity: 1; } }
@keyframes tv-sobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* entrada terminada: nada recomeça quando a fala ou o número trocam de display */
.tv-feito .tv-painel, .tv-feito .tv-foto, .tv-feito .tv-pal, .tv-feito .tv-num, .tv-feito .tv-fala { animation: none; }

/* depois de aberto, os retratos respiram */
.tv-respira .tv-foto img { animation: tv-respira 18s ease-in-out infinite alternate; }
.tv-respira .tv-p2 img { animation-duration: 21s; animation-delay: -6s; }
.tv-respira .tv-p3 img { animation-duration: 24s; animation-delay: -12s; }
@keyframes tv-respira { from { transform: scale(1); } to { transform: scale(1.045); } }
.tv-fora .tv-malha, .tv-fora .tv-foto img { animation-play-state: paused; }

::view-transition-group(tv-p1), ::view-transition-group(tv-p2), ::view-transition-group(tv-p3) {
  animation-duration: .6s;
  animation-timing-function: cubic-bezier(.68, 0, .18, 1);
}

/* ---------- celular: um painel grande, dois menores ---------- */
@media (max-width: 760px) {
  .tv-sobre { margin-bottom: var(--a-e3); }
  .tv-tri {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-template-areas: "p1 p1" "p2 p3" "d d" "f f";
    gap: var(--tv-vao);
    transition: none;
  }
  .tv-tri[data-ativo="2"] { grid-template-areas: "p2 p2" "p1 p3" "d d" "f f"; }
  .tv-tri[data-ativo="3"] { grid-template-areas: "p3 p3" "p1 p2" "d d" "f f"; }
  .tv-v1 { grid-area: p1; } .tv-v2 { grid-area: p2; } .tv-v3 { grid-area: p3; }

  .tv-painel { aspect-ratio: 4 / 5; }
  .tv-tri[data-ativo="1"] .tv-p1,
  .tv-tri[data-ativo="2"] .tv-p2,
  .tv-tri[data-ativo="3"] .tv-p3 { aspect-ratio: 1 / 1; }

  .tv-verbo {
    position: relative;
    z-index: 3;
    pointer-events: none;
    align-self: end;
    justify-self: start;
    margin: 0 0 .5rem .5rem;
    padding: .45rem .65rem .4rem;
    background: color-mix(in oklab, var(--a-nevoa) 92%, transparent);
    border-radius: 3px;
    font-size: .8125rem;
    letter-spacing: .06em;
    align-items: center;
    gap: .45em;
  }
  .tv-num { font-size: .6875rem; padding-top: 0; }
  .tv-tri[data-ativo="1"] .tv-v1,
  .tv-tri[data-ativo="2"] .tv-v2,
  .tv-tri[data-ativo="3"] .tv-v3 { font-size: clamp(1.25rem, .7rem + 3vw, 1.625rem); margin: 0 0 .65rem .65rem; padding: .55rem .8rem .45rem; }
  @keyframes tv-verbo { from { opacity: 0; letter-spacing: .3em; } to { opacity: 1; letter-spacing: .06em; } }

  .tv-foto img { object-position: 50% 14%; }
  .tv-tri[data-ativo="1"] .tv-p1 .tv-larga,
  .tv-tri[data-ativo="2"] .tv-p2 .tv-larga,
  .tv-tri[data-ativo="3"] .tv-p3 .tv-larga { display: block; object-position: 50% 0%; }
  .tv-tri[data-ativo="1"] .tv-p1 .tv-alta,
  .tv-tri[data-ativo="2"] .tv-p2 .tv-alta,
  .tv-tri[data-ativo="3"] .tv-p3 .tv-alta { display: none; }

  .tv-fala { grid-area: f; display: none; padding-top: 1.5rem; }
  .tv-tri[data-ativo="1"] .tv-f1,
  .tv-tri[data-ativo="2"] .tv-f2,
  .tv-tri[data-ativo="3"] .tv-f3 { display: block; }
  .tv-citacao p { font-size: 1.3125rem; }
  .tv-apoio { font-size: 1.0625rem; }
  .tv-topo { flex-direction: column; align-items: flex-start; gap: var(--a-e2); margin-bottom: var(--a-e4); }
  .tv-abertura { text-align: left; font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.25rem); }
  .tv-verbo { font-size: .8125rem; letter-spacing: .03em; }
  .tv-verbo .tv-num { display: none; }
  .tv-tri[data-ativo="1"] .tv-v1 .tv-num,
  .tv-tri[data-ativo="2"] .tv-v2 .tv-num,
  .tv-tri[data-ativo="3"] .tv-v3 .tv-num { display: inline; }
  .tv-fala-rot {
    display: flex;
    gap: .8em;
    margin: .25rem 0 .5rem;
    font-size: .9375rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--a-malva-texto);
  }
  .tv-fala-rot { align-items: center; }
  .tv-fala-rot .tv-petala { height: 1.5rem; }
  .tv-fala-rot span { font-family: var(--a-f-titulo); font-weight: 900; letter-spacing: .04em; color: var(--a-cristal); }
  .tv-citacao::before { font-size: 3rem; margin-top: 0; }
  .tv-dica {
    display: block;
    grid-area: d;
    margin: .1rem 0 0;
    font-size: .9375rem;
    color: var(--a-malva-texto);
  }
  .tv-pe { margin-top: 2rem; gap: var(--a-e2); }
  .tv-pe-fio { display: none; }
  .tv-pe-fio::after { display: none; }
}

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .tv-malha, .tv-respira .tv-foto img { animation: none; }
  .js .tv:not(.tv-aberto) .tv-painel { clip-path: none; }
  .js .tv:not(.tv-aberto) .tv-verbo, .js .tv:not(.tv-aberto) .tv-fala { opacity: 1; }
  .tv-aberto .tv-painel, .tv-aberto .tv-foto, .tv-aberto .tv-pal, .tv-aberto .tv-num, .tv-aberto .tv-fala { animation: none; }
  .tv-tri, .tv-fala::after, .tv-link, .tv-foto { transition: none; }
}
