/* Base do site — Clínica Catani. Variáveis em hero.css (:root). Componentes compartilhados com prefixo wf-.
   Seções: cada uma tem prefixo próprio (ver 04-partes/roteiro.md). */
:root {
  --papel: #fffaf3;
  --t-h2: clamp(2.2rem, 1rem + 3.6vw, 4.6rem);
  --t-h3: clamp(1.4rem, 1.05rem + 1.1vw, 2.1rem);
  --sec-pad: clamp(5rem, 9vw, 9rem);
  --max: 1440px;
  --creme-2: #e9d6cc; /* texto secundário sobre vinho */
}
html { scroll-padding-top: 1rem; }
main { display: block; }

/* seções */
.wf-sec { position: relative; isolation: isolate; padding: var(--sec-pad) var(--esp-lateral); overflow-x: clip; }
.wf-sec-in { max-width: var(--max); margin: 0 auto; position: relative; }
.wf-escura { background: var(--vinho); color: var(--creme); }
.wf-kicker { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: var(--t-mini); letter-spacing: .18em; text-transform: uppercase; color: var(--vinho-2); margin: 0 0 1.1rem; }
.wf-escura .wf-kicker { color: var(--creme-2); }
.wf-kicker::before { content: ""; width: 1.8rem; height: 2px; background: var(--magenta); }
.wf-h2 { font-family: var(--f-titulo); font-weight: 700; font-size: var(--t-h2); line-height: .98; letter-spacing: -.01em; color: var(--vinho); margin: 0 0 1.4rem; text-wrap: balance; }
.wf-escura .wf-h2 { color: var(--creme); }
.wf-lead { font-size: clamp(1.12rem, 1.02rem + .4vw, 1.35rem); line-height: 1.5; max-width: 38rem; margin: 0; }

/* grifo magenta em pincel atrás de uma palavra: <span class="wf-grifado">palavra<svg class="wf-grifo" ...></span> */
.wf-grifado { position: relative; display: inline-block; white-space: nowrap; z-index: 0; }
.wf-grifo { position: absolute; left: -2%; width: 104%; bottom: -.18em; height: .3em; fill: var(--magenta); z-index: -1; overflow: visible; }
.js .wf-grifo { clip-path: inset(0 100% 0 0); transition: clip-path .8s cubic-bezier(.6,0,.3,1) .35s; }
.js .wf-on .wf-grifo, .js .wf-grifo.wf-on { clip-path: inset(0 0 0 0); }

/* etiqueta com sombra dura */
.wf-etiqueta { display: inline-block; font-family: var(--f-titulo); font-weight: 600; font-size: var(--t-etiqueta); line-height: 1.12; padding: .55em .85em .6em; border-radius: 14px; border: 2px solid var(--vinho); background: var(--creme); color: var(--vinho); box-shadow: 5px 5px 0 var(--vinho); transform: rotate(var(--r, -2deg)); }

/* bilhete de papel */
.wf-bilhete { background: var(--papel); color: var(--tinta); border-radius: 6px 6px 22px 6px; padding: 1.1rem 1.2rem 1rem; box-shadow: 0 1px 0 rgb(74 22 38 / .1), 0 14px 30px -12px rgb(74 22 38 / .45); transform: rotate(var(--r, -2deg)); }
.wf-bilhete mark { background: linear-gradient(transparent 58%, rgb(209 70 107 / .45) 58%, rgb(209 70 107 / .45) 92%, transparent 92%); color: inherit; padding: 0 .05em; }

/* balão de fala (mesmo clip do hero: #d-balao) */
.wf-balao-caixa { position: relative; }
.wf-balao, .wf-balao-sombra { clip-path: url(#d-balao); }
.wf-balao { position: relative; z-index: 1; overflow: hidden; }
.wf-balao img { width: 100%; height: 100%; object-fit: cover; }
.wf-balao-sombra { position: absolute; inset: 0; z-index: 0; transform: translate(14px, 14px); background: linear-gradient(150deg in oklab, var(--magenta), var(--vinho) 70%); }

/* botão claro (para seções escuras) */
.btn-claro { background: var(--creme); color: var(--vinho); border-color: var(--creme); box-shadow: 4px 4px 0 var(--magenta); }
.btn-claro:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--magenta); }
.wf-escura .btn-secundario { background: transparent; color: var(--creme); border-color: var(--creme); }
.wf-escura .btn-secundario:hover { background: rgb(246 239 230 / .1); box-shadow: 4px 4px 0 var(--magenta); }

/* malha das seções */
.wf-malha { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.wf-mancha { position: absolute; border-radius: 50%; animation: deriva 32s ease-in-out infinite alternate; }
.wf-grao { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .05; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.wf-escura .wf-grao { mix-blend-mode: screen; opacity: .04; }

/* revelação na rolagem (só com JS) */
.js [data-rev] { opacity: 0; translate: 0 22px; transition: opacity .8s cubic-bezier(.2,.7,.2,1), translate .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rev-d, 0s); }
.js [data-rev].wf-on { opacity: 1; translate: 0 0; }
.js .wf-rapido [data-rev] { transition-delay: 0s !important; }

/* botão flutuante de WhatsApp (celular) */
.wf-flutuante { position: fixed; z-index: 50; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); display: none; align-items: center; gap: .5rem; padding: .85rem 1.15rem; border-radius: 999px; background: var(--vinho); color: var(--creme); font-weight: 600; text-decoration: none; border: 2px solid var(--vinho); box-shadow: 4px 4px 0 var(--magenta); transition: opacity .3s, translate .3s; }
.wf-flutuante .ico { width: 1.3em; height: 1.3em; }
.wf-flutuante.wf-some { opacity: 0; translate: 0 20px; pointer-events: none; }
@media (max-width: 820px) { .wf-flutuante { display: inline-flex; } }

/* rodapé */
.rp { background: #2e0d18; color: var(--creme-2); padding: clamp(3.5rem, 6vw, 5.5rem) var(--esp-lateral) 2rem; position: relative; overflow: hidden; }
.rp-in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.rp-marca { display: flex; align-items: center; gap: .7rem; color: var(--creme); text-decoration: none; }
.rp-marca svg { width: 46px; height: 40px; color: #c99a7c; }
.rp-marca b { font-family: var(--f-titulo); font-size: 2.2rem; line-height: 1; display: block; }
.rp-marca small { display: block; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; margin-top: .3rem; }
.rp-frase { font-family: var(--f-titulo); font-weight: 600; font-size: 1.35rem; line-height: 1.2; color: var(--creme); margin: 1.4rem 0 0; max-width: 20rem; }
.rp h2 { font-family: var(--f-titulo); font-weight: 600; font-size: 1.05rem; color: var(--creme); margin: 0 0 .8rem; letter-spacing: .02em; }
.rp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .95rem; line-height: 1.4; }
.rp a { color: var(--creme); text-underline-offset: 4px; }
.rp a:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }
.rp-base { max-width: var(--max); margin: 3rem auto 0; padding-top: 1.4rem; border-top: 1px solid rgb(233 214 204 / .2); display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; font-size: var(--t-mini); }
.rp-selo a { font-weight: 600; color: var(--creme); }
@media (max-width: 900px) { .rp-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .rp-col-marca { grid-column: 1 / -1; } }
@media (max-width: 520px) { .rp-in { grid-template-columns: minmax(0, 1fr); } .rp-base { padding-bottom: 4.5rem; } }

/* movimento reduzido: tudo visível, nada derivando */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-rev] { opacity: 1; translate: none; }
  .js .wf-grifo { clip-path: none; }
}
