/* Dra. Ana Lahis Tano — camada cinematográfica (home e link na bio)
   Só transform / opacity / clip-path / stroke-dashoffset: zero layout shift.
   Tudo gated por html.cine (JS ligado e sem prefers-reduced-motion);
   sem JS ou com movimento reduzido, a página mostra o estado final. */

:root { --t0: 0s; --suave: cubic-bezier(.2, .7, .2, 1); --grao: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.cortina-on { --t0: .85s; }

/* ---------- grão de filme nas seções escuras ---------- */
.grao { position: relative; }
.grao::after { content: ""; position: absolute; inset: 0; background: var(--grao); background-size: 220px 220px; opacity: .055; pointer-events: none; z-index: 3; mix-blend-mode: screen; }

/* ---------- cortina de entrada (só primeira visita da sessão) ---------- */
.cortina { display: none; }
.cortina-on .cortina {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 200;
  background: var(--mata); clip-path: inset(0 0 0 0);
  animation: cortina-sai .4s cubic-bezier(.7, 0, .3, 1) .8s forwards;
}
.cortina svg { width: min(44vw, 12.5rem); height: auto; overflow: visible; animation: cortina-marca .4s ease-in .8s forwards; }
.cortina .geo { stroke-dasharray: 1; stroke-dashoffset: 1; animation: desenha .85s cubic-bezier(.45, .05, .2, 1) forwards; }
.cortina .geo.d2 { animation-delay: .12s; }
.cortina .geo.d3 { animation-delay: .24s; }
.cortina .geo--pontos { stroke-dasharray: 0 9; stroke-dashoffset: 0; opacity: 0; animation: surge .5s ease .3s forwards; }
@keyframes cortina-sai { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
@keyframes cortina-marca { to { opacity: 0; transform: scale(.94); } }
@keyframes surge { to { opacity: .8; } }
@keyframes desenha { to { stroke-dashoffset: 0; } }

/* ---------- cursor (só pointer: fine) ---------- */
.cursor { position: fixed; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--bronze); pointer-events: none; z-index: 300; opacity: 0; transform: translate(-50%, -50%); transition: width .3s var(--suave), height .3s var(--suave), background-color .3s, border-color .3s, opacity .3s; will-change: left, top; }
.cursor.ativo { opacity: 1; }
.cursor.link { width: 44px; height: 44px; background: rgba(187, 142, 102, .12); border: 1px solid var(--bronze); }
.cursor.some { opacity: 0; }
html.cine-cursor { cursor: none; }
html.cine-cursor :is(input, textarea, select, .form, .form *) { cursor: auto; }

/* ---------- reveal genérico por scroll ---------- */
.cine [data-reveal] { transition: opacity 1s var(--suave), transform 1s var(--suave), clip-path 1.2s var(--suave); transition-delay: calc(var(--t0, 0s) + var(--i, 0) * 70ms); }
.cine [data-reveal]:not(.in) { opacity: 0; transform: translateY(26px); }
.cine [data-reveal="clip"] { opacity: 1; transform: none; }
.cine [data-reveal="clip"] img { transition: clip-path 1.3s var(--suave); clip-path: inset(0 0 0 0 round 14rem 14rem 4px 4px); }
.cine [data-reveal="clip"]:not(.in) img { clip-path: inset(100% 0 0 0 round 14rem 14rem 4px 4px); }
.cine [data-reveal="escala"]:not(.in) { opacity: 0; transform: scale(.92); }
/* linhas divisórias que se desenham */
.cine .abordagem, .cine .causa__lista li, .cine .faq details { position: relative; border-color: transparent; }
.cine .abordagem::after, .cine .causa__lista li::after, .cine .faq details::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--linha-clara);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--suave) calc(var(--i, 0) * 70ms + .25s);
}
.cine .abordagem::after, .cine .faq details::after { bottom: -1px; }
.cine .causa__lista li::after { top: -1px; }
.cine .abordagem.in::after, .cine .causa__lista li.in::after, .cine .faq details.in::after { transform: scaleX(1); }
@media (min-width: 48rem) { .cine .abordagem:nth-child(-n+2) { border-top-color: var(--linha-clara); } }

/* ---------- hero ---------- */
.hero { isolation: isolate; }
.hero__grid > div:first-child { position: relative; z-index: 2; will-change: transform; }
.cine .hero h1 .pal { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.cine .hero h1 .pal > span { display: inline-block; transform: translateY(112%); transition: transform 1.1s var(--suave) calc(var(--t0) + var(--i) * 55ms); }
.cine .hero.in h1 .pal > span { transform: none; }
.cine .hero .lead, .cine .hero .hero__onde, .cine .hero .acoes, .cine .hero .hero__reg { transition: opacity 1.1s var(--suave), transform 1.1s var(--suave); transition-delay: calc(var(--t0) + .45s + var(--i, 0) * 120ms); }
.cine .hero:not(.in) :is(.lead, .hero__onde, .acoes, .hero__reg) { opacity: 0; transform: translateY(20px); }
.retrato-geo { will-change: transform; }
.retrato-geo::before { content: ""; position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle, rgba(187, 142, 102, .30), rgba(187, 142, 102, .06) 45%, transparent 68%); animation: respira 7s ease-in-out infinite; z-index: -1; }
.retrato-geo svg { animation: gira 110s linear infinite; transform-origin: 50% 50%; }
.retrato-geo .foto { transition: transform 1.4s var(--suave) var(--t0); }
.cine .hero:not(.in) .retrato-geo .foto { transform: scale(.9); }
.retrato-geo .foto img { animation: kenburns 12s ease-out forwards; transform-origin: 50% 30%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes respira { 0%, 100% { opacity: .7; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }

/* botão magnético com sheen */
.btn { position: relative; overflow: hidden; will-change: transform; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .5s var(--suave); }
.btn > * { position: relative; z-index: 1; }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .32), transparent); transform: skewX(-18deg); transition: left .7s var(--suave); pointer-events: none; }
.btn--linha::after { background: linear-gradient(105deg, transparent, rgba(212, 176, 142, .32), transparent); }
.btn:hover::after, .btn:focus-visible::after { left: 130%; }

/* ---------- marquee ---------- */
.marquee { background: var(--mata); color: var(--bronze); overflow: hidden; padding: 1.05rem 0; border-top: 1px solid var(--linha-escura); border-bottom: 1px solid var(--linha-escura); }
.marquee__faixa { display: flex; width: max-content; animation: desliza 52s linear infinite; }
.marquee--inv .marquee__faixa { animation-direction: reverse; }
.marquee__grupo { display: flex; align-items: center; gap: 2.5rem; padding-right: 2.5rem; font-family: var(--f-display); font-size: clamp(1.2rem, 1rem + 1.2vw, 1.75rem); white-space: nowrap; letter-spacing: .01em; }
.marquee__grupo i { width: .5rem; height: .5rem; border: 1px solid var(--bronze); transform: rotate(45deg); flex: none; opacity: .8; }
@keyframes desliza { to { transform: translateX(-50%); } }

/* ---------- diagrama: do sintoma à causa ---------- */
.aneis .anel { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--suave) calc(var(--i, 0) * .22s); }
.cine .aneis:not(.in) .anel { stroke-dashoffset: 1; }
.aneis .geo--pontos, .aneis text { transition: opacity 1s ease calc(var(--i, 0) * .22s + .3s); }
.cine .aneis:not(.in) :is(.geo--pontos, text) { opacity: 0; }

/* ---------- passos da consulta ---------- */
.cine .passo { padding-left: 4.25rem; }
.cine .passo::before { width: auto; height: auto; border: 0; top: -.35rem; font-size: 2.75rem; line-height: 1; color: var(--bronze); font-family: var(--f-display); clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--suave) calc(var(--i, 0) * 140ms); }
.cine .passo.in::before { clip-path: inset(0 0 0 0); }
.cine .passo::after { left: .55rem; top: 3.2rem; transform: scaleY(0); transform-origin: top; transition: transform 1s var(--suave) calc(var(--i, 0) * 140ms + .4s); }
.cine .passo.in::after { transform: scaleY(1); }

/* ---------- sobre ---------- */
.cine .sobre__foto::after { transform: scale(.94); opacity: 0; transition: transform 1.4s var(--suave) .5s, opacity 1.4s var(--suave) .5s; }
.cine .sobre__foto.in::after { transform: none; opacity: 1; }

/* ---------- rodapé: nome gigante ---------- */
.rodape__nome { font-family: var(--f-display); font-size: min(15vw, 14rem); line-height: .95; color: #2c3630; text-align: center; margin: 2rem 0 0; white-space: nowrap; overflow: hidden; padding-bottom: .05em; user-select: none; letter-spacing: -.01em; }
.rodape__nome span { display: block; transition: transform 1.6s var(--suave); }
.cine .rodape__nome:not(.in) span { transform: translateY(100%); }

/* ---------- link na bio ---------- */
.bio { position: relative; isolation: isolate; overflow-x: hidden; }
.bio__in { position: relative; z-index: 1; }
.bio__fundo { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bio__fundo::after { content: ""; position: absolute; inset: 0; background: var(--grao); background-size: 220px 220px; opacity: .06; mix-blend-mode: screen; }
.bio__geo { position: absolute; left: 50%; top: 46vh; width: 150vmax; height: 150vmax; transform: translate(-50%, -50%); opacity: .16; animation: gira-centro 140s linear infinite; }
.bio__geo .geo { stroke: var(--bronze); }
.bio__brilho { position: absolute; left: -30%; right: -30%; top: -25vh; height: 130vh; background: radial-gradient(circle at 50% 38%, rgba(187, 142, 102, .30), rgba(187, 142, 102, .08) 30%, transparent 55%); animation: respira 8s ease-in-out infinite; }
.bio__particulas i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--bronze-claro); opacity: 0; animation: flutua var(--d) linear infinite var(--dl); }
@keyframes gira-centro { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes flutua { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: var(--o); } 88% { opacity: var(--o); } 100% { transform: translateY(-38vh); opacity: 0; } }

.cine .bio .entra { animation: entra 1s var(--suave) both; animation-delay: calc(.2s + var(--i, 0) * 60ms); }
@keyframes entra { from { opacity: 0; transform: translateY(18px); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
.cine .bio__avatar img { clip-path: circle(0% at 50% 50%); animation: abre-foto 1.3s var(--suave) .35s forwards; }
@keyframes abre-foto { to { clip-path: circle(50% at 50% 50%); } }
.bio__avatar svg { animation: gira 120s linear infinite; transform-origin: 50% 50%; }
.cine .bio__avatar .geo-desenha { animation-delay: .25s; }
.cine .bio__avatar .geo-desenha.d2 { animation-delay: .5s; }
.cine .bio__avatar .geo-desenha.d3 { animation-delay: .8s; }

.bio .btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .45s var(--suave); }
.bio .btn:hover { transform: scale(1.02); }
.bio .btn:active, .bio .chip:active { transform: scale(.98); transition-duration: .12s; }
.bio .chip { position: relative; overflow: hidden; transition: border-color .2s, color .2s, transform .4s var(--suave); }
.bio__wa { position: relative; display: block; }
.bio__wa::before { content: ""; position: absolute; inset: 0; border-radius: 999px; border: 1px solid var(--bronze); animation: pulso 3s ease-out infinite; pointer-events: none; }
@keyframes pulso { 0% { transform: scale(1); opacity: .75; } 70%, 100% { transform: scale(1.14); opacity: 0; } }
.ripple { position: absolute; border-radius: 50%; background: rgba(241, 236, 228, .22); transform: scale(0); animation: ripple .65s ease-out forwards; pointer-events: none; z-index: 0; }
.btn--bronze .ripple { background: rgba(35, 43, 39, .18); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- movimento reduzido: estado final, sem animação ---------- */
@media (prefers-reduced-motion: reduce) {
  .cortina { display: none !important; }
  .retrato-geo::before, .retrato-geo svg, .retrato-geo .foto img, .marquee__faixa, .bio__geo, .bio__brilho, .bio__particulas i, .bio__avatar svg, .bio__wa::before, .cursor { animation: none !important; }
  .bio__particulas { display: none; }
  .btn, .btn::after, .bio .btn, .bio .chip { transition: none; }
  .btn:hover::after { display: none; }
}
