/* Seção 1 · medicas (prefixo ma-) — as três, cada uma em seu balão, com a formatura pregada ao lado */
.ma-sec { background: var(--creme); }
.ma-malha .wf-mancha { will-change: transform; }
.ma-m1 { width: 70vmax; height: 70vmax; left: -26vmax; top: -18vmax; background: radial-gradient(closest-side in oklab, rgb(227 179 154 / .55), rgb(227 179 154 / 0)); animation-duration: 33s; }
.ma-m2 { width: 64vmax; height: 64vmax; right: -24vmax; top: 30%; background: radial-gradient(closest-side in oklab, rgb(192 138 92 / .42), rgb(192 138 92 / 0)); animation-duration: 29s; animation-delay: -9s; }
.ma-m3 { width: 50vmax; height: 50vmax; left: 10%; bottom: -12vmax; background: radial-gradient(closest-side in oklab, rgb(209 70 107 / .14), rgb(209 70 107 / 0)); animation-duration: 37s; animation-delay: -14s; }
.ma-m4 { width: 60vmax; height: 60vmax; left: 30%; top: 8%; background: radial-gradient(closest-side in oklab, rgb(250 246 240 / .9), rgb(250 246 240 / 0)); animation-duration: 26s; animation-delay: -5s; }

/* topo */
.ma-topo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 1rem 4rem; align-items: end; margin-bottom: clamp(5rem, 9vw, 8.5rem); }
.ma-topo .wf-kicker { grid-column: 1 / -1; margin: 0; }
.ma-h2 { margin: 0; max-width: 13em; }

/* elenco: as três de relance, com o ano de formatura */
.ma-elenco-leg { margin: 0 0 1.4rem; color: var(--vinho-2); max-width: 30rem; }
.ma-elenco-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ma-el a { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; text-decoration: none; color: var(--vinho); min-height: 44px; border-radius: 10px; }
.ma-el-rosto { position: relative; display: block; width: min(100%, 132px); aspect-ratio: 1185 / 1400; }
.ma-el-rosto::before { content: ""; position: absolute; inset: 0; translate: 7px 7px; clip-path: url(#d-balao); background: var(--vinho); transition: translate .25s; }
.ma-el-rosto img { position: relative; width: 100%; height: 100%; object-fit: cover; clip-path: url(#d-balao); transition: translate .25s; }
.ma-el:nth-child(2) .ma-el-rosto::before { background: var(--magenta); }
.ma-el-txt { font-family: var(--f-titulo); font-weight: 600; font-size: 1.12rem; line-height: 1.1; }
.ma-el-txt b { display: block; font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem); line-height: 1; color: var(--madeira); }
.ma-el-v { rotate: -2deg; } .ma-el-r { rotate: 1.5deg; margin-top: 1.4rem; } .ma-el-mc { rotate: -1deg; margin-top: .4rem; }
.ma-el a:hover .ma-el-rosto img { translate: -3px -3px; }
.ma-el a:hover .ma-el-rosto::before { translate: 10px 10px; }

/* cada médica */
.ma-medica { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; position: relative; }
.ma-fotos { margin: 0; position: relative; }
.ma-balao .wf-balao, .ma-balao .wf-balao-sombra { aspect-ratio: 902 / 1066; }
.ma-balao .wf-balao img { object-position: 50% 20%; }
.ma-v .ma-balao { width: min(100%, 540px); margin-left: auto; }
.ma-mc .ma-balao { width: min(88%, 460px); }
.ma-mc .ma-balao .wf-balao, .ma-mc .ma-balao .wf-balao-sombra { aspect-ratio: 534 / 631; }

/* balão espelhado (cauda para o outro lado) */
.ma-espelho { transform: scaleX(-1); }
.ma-espelho .wf-balao img { transform: scaleX(-1); }

/* polaroide: a formatura real pregada */
.ma-polaroide { position: absolute; z-index: 3; margin: 0; width: clamp(150px, 15vw, 220px); background: var(--papel); padding: 9px 9px 0; border-radius: 3px; box-shadow: 0 1px 0 rgb(74 22 38 / .12), 0 18px 34px -14px rgb(74 22 38 / .55); rotate: var(--pr, -6deg); }
.ma-polaroide::before { content: ""; position: absolute; top: -12px; left: 50%; width: 78px; height: 24px; translate: -50% 0; rotate: 3deg; background: rgb(227 179 154 / .72); box-shadow: 0 1px 2px rgb(74 22 38 / .15); }
.ma-polaroide img { width: 100%; height: auto; aspect-ratio: 880 / 1100; object-fit: cover; filter: sepia(.18) saturate(.9); }
.ma-polaroide figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; padding: .45rem .15rem .6rem; font-size: var(--t-mini); font-weight: 600; color: var(--vinho-2); letter-spacing: .02em; line-height: 1.25; }
.ma-polaroide figcaption b { font-family: var(--f-titulo); font-weight: 700; font-size: 1.55rem; line-height: 1; color: var(--vinho); }
.ma-pol-v { --pr: -7deg; left: 0; bottom: 4%; }
.ma-pol-mc { --pr: 6deg; right: 0; bottom: 2%; }

/* gesto: a formatura sai de trás do balão */
.js .ma-polaroide[data-rev] { transition: opacity .45s ease, translate .95s cubic-bezier(.3,1.45,.55,1), rotate .95s cubic-bezier(.3,1.45,.55,1); transition-delay: var(--rev-d, 0s); }
.js .ma-pol-v[data-rev]:not(.wf-on) { translate: 45% -18%; rotate: 4deg; }
.js .ma-pol-mc[data-rev]:not(.wf-on) { translate: -45% -18%; rotate: -4deg; }
.js .ma-pol-r[data-rev]:not(.wf-on) { translate: 40% 10%; rotate: 2deg; }

/* texto */
.ma-texto { position: relative; max-width: 36rem; }
/* o ano da formatura, cheio e gigante, atrás da foto de hoje */
.ma-ano { position: absolute; z-index: 0; top: -.74em; left: -.06em; font-family: var(--f-titulo); font-weight: 700; font-size: clamp(6rem, 2rem + 12vw, 15rem); line-height: 1; color: rgb(227 179 154 / .8); letter-spacing: -.03em; pointer-events: none; user-select: none; }
.ma-fotos .wf-balao-caixa, .ma-r-fotos .wf-balao-caixa { z-index: 1; }
.ma-nome { font-family: var(--f-titulo); font-weight: 700; font-size: clamp(2rem, 1.1rem + 2.4vw, 3.4rem); line-height: 1; color: var(--vinho); margin: 0 0 .5rem; letter-spacing: -.01em; }
.ma-reg { font-size: var(--t-mini); font-weight: 600; letter-spacing: .06em; color: var(--vinho-2); margin: 0 0 1.4rem; }
.ma-fala { font-family: var(--f-titulo); font-weight: 600; font-size: clamp(1.3rem, 1.05rem + .8vw, 1.75rem); line-height: 1.18; color: var(--vinho); margin: 0 0 1.1rem; }
.ma-fala small { display: block; font-family: var(--f-texto); font-weight: 500; font-size: var(--t-mini); color: var(--vinho-2); margin-top: .4rem; }
.ma-corpo { margin: 0 0 1.5rem; color: var(--tinta); }
/* linha do tempo curta: ano grande + fato em uma linha */
.ma-linha { list-style: none; margin: 0 0 1.7rem; padding: 0; display: grid; }
.ma-linha li { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: .62rem 0; border-top: 1.5px solid rgb(74 22 38 / .16); line-height: 1.4; }
.ma-linha li:last-child { border-bottom: 1.5px solid rgb(74 22 38 / .16); }
.ma-linha b { font-family: var(--f-titulo); font-weight: 700; font-size: 1.4rem; line-height: 1; color: var(--madeira); }
.ma-tags { list-style: none; margin: 0 0 1.8rem; padding: 0 0 6px; display: flex; flex-wrap: wrap; gap: .9rem .8rem; }
.ma-tags .wf-etiqueta { font-size: clamp(1.02rem, .92rem + .35vw, 1.25rem); padding: .45em .8em .5em; }
.ma-t1 { --r: -2deg; }
.ma-t2 { --r: 1.6deg; background: var(--mel); }
.ma-t3 { --r: -1.2deg; background: var(--pele); }
.ma-t4 { --r: 2.2deg; background: var(--vinho); color: var(--creme); box-shadow: 5px 5px 0 var(--magenta); }
.ma-acao { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.1rem; margin: 0; }
.ma-nota { font-size: var(--t-mini); font-weight: 600; color: var(--vinho-2); }

/* Maria Clara: espelho da mãe */
.ma-mc .ma-fotos { order: 2; }
.ma-mc .ma-texto { justify-self: end; }
.ma-mc .ma-ano { left: auto; right: -.06em; }

/* dobradiça: mãe e filha */
.ma-dobra { margin: clamp(3rem, 5.5vw, 5rem) auto clamp(3.5rem, 6vw, 5.5rem); position: relative; width: min(100%, 980px); display: grid; grid-template-columns: minmax(0, 1fr); }
.ma-balao-duo { width: 78%; justify-self: center; }
.ma-balao-duo .wf-balao, .ma-balao-duo .wf-balao-sombra { aspect-ratio: 1400 / 1141; }
.ma-balao-duo .wf-balao img { object-position: 50% 30%; }
.ma-dobra-leg { position: absolute; inset: 0; pointer-events: none; }
.ma-rotulo-duo { position: absolute; top: 4%; left: 2%; --r: -4deg; background: var(--magenta); color: #fff; font-size: clamp(1.3rem, 1rem + 1vw, 2rem); }
.ma-bilhete { position: absolute; right: -1%; bottom: 8%; width: min(330px, 40%); margin: 0; --r: 2.5deg; pointer-events: auto; }
.ma-bilhete p { margin: 0 0 .5rem; font-family: var(--f-titulo); font-weight: 600; font-size: 1.2rem; line-height: 1.2; color: var(--vinho); }
.ma-bilhete footer { font-size: var(--t-mini); color: var(--vinho-2); font-weight: 500; }

/* Renata: as duas fotos lado a lado, antes e hoje */
.ma-r { margin-top: clamp(4.5rem, 8vw, 7rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ma-r-fotos { position: relative; padding-top: 2rem; }
/* balão virado: a cauda sai por cima (outra direção da conversa) */
.ma-balao-r { width: min(70%, 470px); transform: scaleY(-1); }
.ma-balao-r .wf-balao img { transform: scaleY(-1); object-position: 45% 50%; }
.ma-balao-r .wf-balao, .ma-balao-r .wf-balao-sombra { aspect-ratio: 1 / 1.06; }
.ma-pol-r { --pr: 5deg; right: 0; bottom: 10%; width: min(31%, 210px); }
.ma-r .ma-ano { top: auto; bottom: -.78em; left: -.06em; }
.ma-fala-r { font-size: clamp(1.45rem, 1.1rem + 1.1vw, 2.1rem); }

/* foco */
.ma-sec a:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

/* ---------- tablet e celular ---------- */
@media (max-width: 900px) {
  .ma-topo { grid-template-columns: minmax(0, 1fr); }
  .ma-medica, .ma-r { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
  .ma-mc .ma-fotos { order: 0; }
  .ma-mc .ma-texto { justify-self: start; }
  .ma-v .ma-balao { margin: 0 0 0 auto; width: min(84%, 460px); }
  .ma-mc .ma-balao { margin: 0 auto 0 0; width: min(80%, 420px); }
  .ma-polaroide { width: clamp(112px, 31vw, 180px); padding: 7px 7px 0; }
  .ma-polaroide figcaption { flex-direction: column; font-size: .8125rem; }
  .ma-polaroide figcaption b { font-size: 1.3rem; }
  .ma-pol-v { bottom: -5%; }
  .ma-pol-mc { bottom: -14%; right: -2%; }
  .ma-ano { font-size: clamp(5rem, 22vw, 9rem); top: -.78em; }
  .ma-balao-duo { width: min(100%, 620px); }
  .ma-fotos, .ma-r-fotos { width: min(100%, 540px); }
  .ma-v .ma-fotos { margin-left: auto; }
  .ma-dobra { margin: 5rem 0 4rem; }
  .ma-dobra-leg { position: static; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-top: 1.6rem; }
  .ma-rotulo-duo { position: absolute; top: -1.2rem; left: .5rem; }
  .ma-bilhete { position: relative; right: auto; bottom: auto; width: auto; margin: 0 6px 0 0; }
  .ma-r-fotos { max-width: 520px; padding-top: 1rem; }
  .ma-balao-r { width: 64%; margin: 0; }
  .ma-pol-r { right: 0; bottom: 6%; width: 33%; }
  .ma-r .ma-ano { bottom: -.85em; }
  .ma-r .ma-texto { margin-top: 2.5rem; }
  .ma-linha li { grid-template-columns: 3.7rem minmax(0, 1fr); gap: .7rem; }
  .ma-linha b { font-size: 1.2rem; }
  .ma-elenco-lista { gap: .8rem; }
  .ma-el-rosto { width: min(100%, 104px); }
  .ma-el-txt { font-size: 1rem; }
}
@media (max-width: 520px) {
  .ma-pol-curso { display: none; }
  .ma-polaroide figcaption { flex-direction: row; align-items: baseline; gap: .4rem; font-size: var(--t-mini); }
  .ma-acao .btn { flex: 1 1 100%; }
  .ma-tags { gap: .8rem .65rem; }
  .ma-balao .wf-balao-sombra { transform: translate(10px, 10px); }
  .ma-espelho .wf-balao-sombra { transform: translate(10px, 10px); }
}

@media (prefers-reduced-motion: reduce) {
  .ma-malha .wf-mancha { animation: none; }
  .js .ma-polaroide[data-rev] { translate: none; rotate: var(--pr, -6deg); }
}
