/* Camada de rolagem (fase 2): a rolagem dirige a página. Só transform/opacity/stroke-dashoffset. Cores vêm dos tokens do :root (index.html). */

/* ---------- revelar ao entrar ---------- */
.js [data-r] { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js [data-r].r-in { opacity: 1; transform: none; }

/* ---------- títulos palavra por palavra ---------- */
@keyframes up { to { transform: none; } }
.js .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .08em .14em; margin: -.06em -.08em -.14em; }
.js .split .w > span { display: inline-block; transform: translateY(112%); }
.js .split.go .w > span { animation: up .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 60ms + var(--d, 0ms)); }
.rm .split .w > span, .rm .split.go .w > span { transform: none; animation: none; }
/* sublinhado ondulado da palavra em destaque: as palavras são inline-block, então o traço vai no span interno */
.split em { text-decoration: none; }
.js .split em .w { padding-bottom: .34em; margin-bottom: -.34em; }
.split em .w > span { background: linear-gradient(transparent 62%, rgba(255,194,75,.55) 62%, rgba(255,194,75,.55) 90%, transparent 90%); padding: 0 .06em; }
.final .split em .w > span { background: none; }

/* ---------- base das seções fixas ---------- */
.pin { padding: 0; scroll-margin-top: -84px; }
.pin-in { position: relative; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* ---------- hero: painel 3D que "deita" ---------- */
.win3d { width: 100%; margin-top: 56px; perspective: 1600px; }
.win3d .window { margin-top: 0; transform-origin: 50% 0; }
.js .win3d .window { transform: rotateX(20deg) scale(.92); will-change: transform; }
.rm .win3d .window { transform: none; }
.num { font-style: normal; font-variant-numeric: tabular-nums; }

/* ---------- K: foto em moldura 3D ---------- */
.photo-wrap { perspective: 1600px; width: 100%; max-width: 440px; margin-inline: auto; }
.photo-wrap .photo { margin: 0; }
.js .photo-wrap .photo { transform-origin: 50% 100%; transform: rotateX(14deg) scale(.88); will-change: transform; }
.rm .photo-wrap .photo { transform: none; }

/* ---------- menu: seção ativa ---------- */
.links { gap: 4px; }
.links a { padding: 7px 14px; border-radius: 999px; border: 2px solid transparent; transition: color .2s, background .2s, border-color .2s; }
.links a.on { color: var(--ink); background: var(--sun-t); border-color: var(--ink); }


/* ---------- E: história em cenas ---------- */
.method-pin .pin-in { height: 360vh; }
.story-st { display: flex; flex-direction: column; }
.story-wrap { height: 100%; width: 100%; justify-content: center; gap: 10px; padding-top: 96px; padding-bottom: 14px; }
.story-wrap .h2 { font-size: clamp(1.8rem, 5.2vw, 2.9rem); }
.story-wrap .eyebrow { padding-block: 4px; }
.method-card { margin: 4px auto 0; flex: 1 1 auto; min-height: 0; max-height: 560px; display: flex; flex-direction: column; }
.method-card .mhead { padding-top: 14px; }
.method-card .steps { padding-top: 12px; padding-bottom: 12px; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.step { min-height: 0; padding-block: 4px; }
.step span.t { font-size: 11.5px; margin-top: 6px; }
.scenes { position: relative; flex: 1 1 auto; min-height: 140px; border-top: 2px solid var(--stroke); border-bottom: 2px solid var(--stroke); background: var(--cobalt-t); }
.scene { position: absolute; inset: 0; padding: 10px 18px; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s; }
.scene.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.method-card .mbody { padding: 14px 20px 12px; min-height: 108px; }
.method-card .mbody h3 { font-size: clamp(1.4rem, 4.2vw, 2.05rem); }
.method-card .mbody p { margin-top: 6px; font-size: 14px; }
.method-card .mfoot { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 16px 14px; }
.method-card .mfoot b { font-size: 13px; line-height: 1.3; }

.chat { display: grid; gap: 10px; width: 100%; max-width: 520px; font-size: 14.5px; }
.bub { max-width: 90%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; border: 2px solid var(--stroke); }
.bub.q { justify-self: end; background: var(--tomato); color: #fff; border-bottom-right-radius: 5px; min-height: 44px; }
.bub.a { background: var(--surface); border-bottom-left-radius: 5px; max-width: none; }
.bub.a b { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--tomato-d); margin-bottom: 2px; }
/* resposta da Milena com a foto dela, como no WhatsApp */
.msg { display: flex; align-items: flex-end; gap: 8px; justify-self: start; max-width: 96%; }
.msg .av { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 2px solid var(--stroke); object-fit: cover; background: var(--surface); }
@media (min-width: 700px) { .msg .av { width: 40px; height: 40px; } }

.rows { display: grid; gap: 9px; width: 100%; max-width: 520px; }
.rw { display: grid; grid-template-columns: 124px 1fr 24px; white-space: nowrap; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 800; }
.rw .tr { height: 12px; border-radius: 9px; background: var(--surface); border: 2px solid var(--stroke); overflow: hidden; }
.rw .tr i { display: block; height: 100%; background: var(--tomato); transform: scaleX(0); transform-origin: 0 50%; }
.rw .ck { width: 22px; height: 22px; border-radius: 50%; background: var(--leaf-d); border: 2px solid var(--stroke); color: #fff; display: grid; place-items: center; font-size: 11px; font-style: normal; opacity: 0; transform: scale(.6); transition: opacity .25s ease, transform .25s ease; }
.rw .ck.on { opacity: 1; transform: none; }
.plan-tag { justify-self: center; margin-top: 2px; font-size: 12px; font-weight: 800; color: var(--ink); background: var(--leaf-t); border: 2px solid var(--stroke); padding: 5px 14px; border-radius: 999px; opacity: 0; }

.tree { width: 100%; height: 100%; max-height: 270px; display: block; }
.tree .edge { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.tree .nd rect { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.tree .nd text { font: 800 12px var(--sans); fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.tree .nd.main rect { fill: var(--tomato); }
.tree .nd.main text { fill: #fff; }
.tree .nd.home rect { fill: var(--leaf-t); }
.tree .nd.home text { fill: var(--ink); }
.tree .nd.home text.sub { font-size: 10px; font-weight: 700; fill: var(--muted); }


/* ---------- G: faixas (uma tomate, outra cobalto) ---------- */
.bands { padding-block: 40px; overflow: hidden; display: grid; gap: 0; border-top: 2px dashed var(--dot); }
.marquee { overflow: hidden; padding: 8px 0; border-block: 2px solid var(--stroke); color: #fff; }
.marquee + .marquee { margin-top: -2px; }
.marquee:first-child { background: var(--tomato); }
.marquee:last-child { background: var(--cobalt); }
.mq { display: inline-flex; align-items: center; gap: 24px; white-space: nowrap; will-change: transform; padding-right: 24px; }
.mq span { font-family: var(--serif); font-size: clamp(1.8rem, 6vw, 3.2rem); line-height: 1.15; font-weight: 600; }
.mq i { font-style: normal; color: var(--sun); font-size: 2rem; }
.mq-a span { font-style: italic; }

/* ---------- F: trilha horizontal ---------- */
.journey .pin-in { height: 300vh; }
.journey-st { display: flex; flex-direction: column; justify-content: center; gap: 28px; padding-top: 88px; }
.track { display: flex; gap: 18px; padding: 4px 16px 10px; align-items: stretch; will-change: transform; }
.track::after { content: ""; flex: none; width: 2px; }
@media (min-width: 1000px) { .track { padding-inline: 76px; } .jbar { margin-inline: 76px; } }
.jp { flex: none; width: min(300px, 78vw); min-height: 280px; background: var(--surface); border: 2px solid var(--stroke); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-cut); }
article.jp:nth-of-type(1) { background: var(--tomato-t); }
article.jp:nth-of-type(2) { background: var(--sun-t); }
article.jp:nth-of-type(3) { background: var(--leaf-t); }
article.jp:nth-of-type(4) { background: var(--cobalt-t); }
@media (min-width: 700px) { .jp { width: 340px; } }
.jp.intro { width: min(340px, 80vw); border: 0; background: none; box-shadow: none; justify-content: center; align-items: flex-start; padding-left: 0; }
.jp.intro .h2 { font-size: clamp(2rem, 7vw, 3.3rem); }
.jp small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--tomato-d); }
.jp h3 { font-family: var(--serif); font-size: 1.65rem; line-height: 1.1; font-weight: 600; color: var(--ink); }
.jp p { color: var(--muted); font-size: 15px; }
.jp ul { list-style: none; margin: 4px 0 0; padding: 0; }
.jp li { padding: 9px 0; border-top: 2px dashed var(--stroke); font-size: 14.5px; font-weight: 700; }
.jbar { margin-inline: 16px; height: 10px; background: var(--surface); border: 2px solid var(--stroke); border-radius: 9px; overflow: hidden; }
.jbar i { display: block; height: 100%; width: 100%; background: var(--tomato); transform: scaleX(0); transform-origin: 0 50%; }

.place-sec { padding-block: 56px; }

/* ---------- J: texto gigante ---------- */
.final .cta-run { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none; z-index: 0; }
.final .cta-run span { display: inline-block; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(5rem, 15vw, 11rem); line-height: 1; color: rgba(255, 255, 255, .12); will-change: transform; }

/* ---------- movimento reduzido: tudo vira seção normal, no estado final ---------- */
.rm .pin-in { height: auto !important; }
.rm .sticky { position: static; height: auto; overflow: visible; }
.rm .story-wrap { padding: 102px 16px 40px; height: auto; }
.rm .method-card { max-height: none; }
.rm .scenes { min-height: 260px; }
.rm .journey-st { padding-top: 102px; padding-bottom: 40px; }
.rm .track { overflow-x: auto; transform: none !important; scroll-snap-type: x proximity; }
.rm .jp { scroll-snap-align: start; }
.rm .jbar, .rm .final .cta-run { display: none; }
.rm .plan-tag { opacity: 1; }

@media (max-height: 780px) {
  .story-lead, .story-wrap .eyebrow, .method-card .mhead .mono { display: none; }
  .story-wrap { padding-top: 90px; padding-bottom: 10px; gap: 6px; }
  .story-wrap .h2 { font-size: clamp(1.6rem, 4.6vw, 2.4rem); }
  .method-card { margin-top: 2px; }
  .method-card .mhead { padding: 10px 16px 0; justify-content: flex-end; }
  .method-card .steps { padding-top: 8px; padding-bottom: 8px; }
  .method-card .mbody { padding: 10px 18px 6px; min-height: 0; }
  .method-card .mbody h3 { font-size: 1.3rem; }
  .method-card .mbody p { font-size: 13px; margin-top: 3px; line-height: 1.45; }
  .method-card .mfoot { padding: 8px 14px 10px; gap: 8px; }
  .method-card .mfoot .mono { font-size: 9.5px; letter-spacing: .1em; }
  .method-card .mfoot b { font-size: 12px; }
}
@media (max-width: 520px) {
  .method-card .mhead { padding-inline: 16px; }
  .method-card .steps { padding-inline: 16px; }
  .rw { grid-template-columns: 118px 1fr 22px; gap: 8px; font-size: 13px; }
}


/* ---------- ritmo: menos espaço em branco, textos mais compactos ---------- */
.journey .pin-in { height: 200vh; }
.journey .sticky { height: auto; top: max(72px, calc(50vh - 230px)); top: max(72px, calc(50svh - 230px)); padding-top: 0; padding-bottom: 8px; }
.journey-st { gap: 22px; }
.jp { min-height: 340px; }
.rm .journey .sticky { top: auto; }
@media (max-width: 700px) {
  section { padding-block: 52px; }
  .pin { padding-block: 0; }
  .center { gap: 16px; }
  .hero { padding-bottom: 24px; }
  .story { margin: 14px auto 0; }
  .story h3 { font-size: 1.4rem; margin-bottom: 10px; }
  .story p { font-size: 14.5px; line-height: 1.55; margin-top: 8px; }
  .trio { margin-top: 24px; gap: 14px; }
  .card { padding: 20px 20px 22px; }
  .card .ic { width: 40px; height: 40px; margin-bottom: 12px; }
  .card h3 { font-size: 1.4rem; }
  .card p { font-size: 14.5px; margin-top: 6px; }
  .faq { margin-top: 24px; }
  .place-sec { padding-block: 36px; }
  .bands { padding-block: 24px; }
  .final .wrap { padding-block: 64px; }
  .about { gap: 28px; }
}

/* ===== Paleta Viva ===== */
.marquee:first-child { background: #B0345A; }
.marquee:last-child { background: var(--leaf); }
.mq i { color: var(--sun); }
.jp:not(.intro) { border-top: 6px solid var(--leaf); }
.jp:nth-child(3n) { border-top-color: var(--sun); }
.jp:nth-child(3n+1):not(.intro) { border-top-color: #F27A8C; }

/* ---------- Cartão "Como a psicoterapia pode ajudar" com contorno em nuvem ---------- */
.panel.cloudy { position: relative; border: 0; background: transparent; padding: 40px 34px 42px; isolation: isolate; }
.cloud-edge { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; pointer-events: none; }
.cloud-edge path { fill: var(--bg); stroke: #F2B8C2; stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 8px 10px rgba(176,52,90,.14)); }
