/* Página do Dr. Leonardo Novais: tema do mundo de rolagem + seções abaixo dele.
   Depende de tokens.css e components.css (design system). */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--surface); }

/* Margem lateral única da página: barra do topo, copy do mundo, seções e rodapé usam a mesma. */
:root { --gutter: clamp(24px, 5vw, 64px); }
.ln-container { padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 8px 16px; background: var(--gold); color: var(--on-gold); }
.skip:focus { left: var(--space-2); top: var(--space-2); }

/* O mundo de rolagem vive no topo com camadas fixas (palco, copy, barra). Tudo o que vem
   depois fica em `.after-world`, com z-index acima das camadas do motor e fundo sólido,
   e desliza por cima do palco quando a trilha termina. */
.sw-wrap { position: relative; background: var(--surface); }
.after-world { position: relative; z-index: 1000; background: var(--surface); }

/* Texto do site em Cormorant Garamond. A Adobe Myungjo Std M (fonte do manual) não tem os
   glifos acentuados do português (á ã ç ê ó…): o navegador compõe o acento com outra fonte
   e o resultado fica quebrado. A Myungjo permanece na logo (SVG) e no wordmark. */
:root {
  --font-serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-sans: "Cormorant Garamond", "Times New Roman", Georgia, serif;
}
body { font-family: var(--font-serif); font-size: 18px; line-height: 28px; font-weight: 500; }
.ln-btn, .ln-eyebrow, .ln-nav__link, .ln-field__label, .celeb__handle { font-weight: 600; }
.ln-section-header__title, .ln-cta__title, .ln-card__title { font-weight: 600; }

/* Tema do motor: preto e dourado, fontes do design system */
:root, .sw-root {
  --sw-bg: #000000;
  --sw-ink: #ffffff;
  --sw-ink-soft: #9a9a9a;
  --sw-accent: #ba903e;
  --sw-font-display: var(--font-serif);
  --sw-font-body: var(--font-serif);
}
/* Logo original (lockup em SVG) no lugar do nome digitado */
.sw-root .sw-topbar { padding-inline: var(--gutter); gap: var(--space-2); }
.sw-root .sw-brand { flex: 0 1 auto; min-width: 0; }
.sw-root .sw-brand__mark { width: 176px; height: 60px; border-radius: 0; box-shadow: none; background: url("../assets/marca/lockup-horizontal-gold.svg") left center / contain no-repeat; }
.sw-root .sw-brand__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sw-root .sw-topcta { flex: 0 0 auto; font-family: var(--font-serif); font-weight: 500; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-gold); background: var(--gold); border-radius: 0; padding: 12px 18px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.sw-root .sw-topcta:hover { background: var(--gold-light); }
@media (min-width: 900px) { .sw-root .sw-brand__mark { width: 224px; height: 76px; } }
@media (max-width: 480px) {
  .sw-root .sw-brand__mark { width: 132px; height: 46px; }
  .sw-root .sw-topcta { font-size: 11px; letter-spacing: 0.12em; padding: 10px 12px; }
}
/* Legibilidade: véu preto→transparente atrás da copy. No desktop a copy fica à esquerda
   (véu horizontal); no celular fica embaixo (véu vertical subindo do rodapé). */
.sw-root .sw-copylayer::before {
  width: min(62vw, 820px);
  background: linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.72) 40%, rgba(0,0,0,.30) 72%, rgba(0,0,0,0) 100%);
}
@media (max-width: 860px) {
  .sw-root .sw-copylayer::before {
    width: 100%; inset: auto 0 0 0; height: 72vh;
    background: linear-gradient(0deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.82) 35%, rgba(0,0,0,.45) 65%, rgba(0,0,0,0) 100%);
  }
}
.sw-root .sw-copy__title, .sw-root .sw-copy__body, .sw-root .sw-copy__eyebrow { text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 4px 24px rgba(0,0,0,.7); }
.sw-root .sw-copy__num { font-family: var(--font-sans); color: var(--ink-muted); }
.sw-root .sw-copy__eyebrow { font-family: var(--font-sans); font-weight: 500; letter-spacing: 0.3em; color: var(--ink-muted); }
.sw-root .sw-copy__title { font-family: var(--font-serif); font-weight: 600; letter-spacing: 0.01em; line-height: 1.05; }
.sw-root .sw-copy__body { font-family: var(--font-sans); font-weight: 500; font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--ink); }
.sw-root .sw-copy__eyebrow { font-weight: 600; }
.sw-root .sw-copy__tags li { font-weight: 600; }
.sw-root .sw-copy__tags li { font-family: var(--font-sans); font-weight: 500; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-light); background: transparent; border: 1px solid var(--gold); border-radius: 0; }
.sw-root .sw-btn { font-family: var(--font-sans); font-weight: 500; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; border-radius: 0; }
.sw-root .sw-btn--primary { background: var(--gold); color: var(--on-gold); }
.sw-root .sw-btn--primary:hover { background: var(--gold-light); }
.sw-root .sw-btn--ghost { color: var(--ink); border: 1px solid var(--gold); }
.sw-root .sw-hint { font-family: var(--font-sans); letter-spacing: 0.3em; text-transform: uppercase; font-size: 11px; color: var(--ink-muted); }
.sw-root .sw-route__label { font-family: var(--font-sans); letter-spacing: 0.18em; text-transform: uppercase; font-size: 11px; }
.sw-root .sw-scrollbar { background: var(--line); }

/* Seções */
.sec { padding-block: var(--space-5); }
.sec--raised { background: var(--surface-raised); }
.sec .ln-section-header { margin-bottom: var(--space-4); }
.sec .ln-section-header--center { margin-inline: auto; }
.legal, .fecho { max-width: var(--measure); margin: var(--space-4) auto 0; text-align: center; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.fecho { font-size: 17px; line-height: 28px; color: var(--ink); }
.legal, .fecho, .cta__lead, .lead__privacy { text-wrap: balance; }
.center { display: flex; justify-content: center; margin-top: var(--space-3); }
@media (max-width: 640px) {
  .sec { padding-block: var(--space-4); }
  .sec .ln-section-header { margin-bottom: var(--space-3); }
  .ln-section-header__title, .ln-cta__title { font-size: 28px; line-height: 36px; }
  .ln-section-header__lead { font-size: 18px; line-height: 28px; }
  .legal, .fecho { margin-top: var(--space-3); }
}
/* Faixas roláveis (depoimentos e famosos no celular): barra fina dourada */
.quotes, .celebs { scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }

/* Antes & depois */
/* As quatro fotos têm o mesmo recorte 5:6, com a divisa antes/depois no meio (arquivos ba-0X.jpg). */
.ba-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.ba { margin: 0; }
.ba img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; }
@media (max-width: 960px) { .ba-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ba-grid { grid-template-columns: 1fr; } }

/* Depoimentos: faixa rolável */
.quotes { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-3); scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.quotes::after { content: ""; flex: 0 0 var(--space-3); }
.quotes .ln-quote { box-sizing: border-box; flex: 0 0 min(440px, 86%); max-width: none; align-content: start; scroll-snap-align: start; }
.quotes .ln-quote__text { font-size: 22px; line-height: 32px; }
@media (max-width: 640px) { .quotes { gap: var(--space-2); } .quotes .ln-quote { padding-left: var(--space-2); } .quotes .ln-quote__text { font-size: 20px; line-height: 30px; } }

/* Famosos: cartões iguais, print do perfil + vídeo ou foto do caso em caixa 9:16 */
.celebs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.celeb { display: grid; grid-template-rows: auto auto 1fr; gap: var(--space-1); min-width: 0; }
/* Os prints têm proporções diferentes: caixa 5:2 igual para todos, para os vídeos começarem na mesma linha */
.celeb__perfil { display: block; box-sizing: border-box; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; object-position: left center; border: 1px solid var(--line); }
/* Abaixo de 960px os cartões ficariam estreitos demais para ler o print: viram uma faixa rolável */
@media (max-width: 960px) {
  .celebs { display: flex; overflow-x: auto; padding-bottom: var(--space-3); scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .celebs::after { content: ""; flex: 0 0 1px; }
  .celeb { flex: 0 0 min(280px, 74%); scroll-snap-align: start; }
}
.celeb__frame { position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; background: var(--surface-raised); }
.celeb__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.celeb__meta { display: grid; align-content: start; }
.celeb__handle { font-family: var(--font-sans); font-weight: 500; letter-spacing: 0.12em; line-height: 28px; color: var(--gold-text); }
.celeb__role { font-size: 13px; line-height: 20px; color: var(--ink-muted); }

/* Autoridade */
.aut { display: grid; grid-template-columns: minmax(240px, 2fr) 3fr; gap: var(--space-4); align-items: start; }
.aut__photo { margin: 0; display: grid; gap: var(--space-2); }
.aut__photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.aut__photo figcaption { display: grid; gap: 4px; }
.aut__cap { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.aut__text .ln-section-header { margin-bottom: var(--space-3); }
.aut__text .ln-section-header + p { margin-top: 0; }
.aut__text p { max-width: var(--measure); }
.difs { list-style: none; margin: var(--space-3) 0; padding: 0; display: grid; gap: var(--space-1); }
.difs li { padding-left: var(--space-3); position: relative; }
.difs li::before { content: "◆"; position: absolute; left: 0; top: 0; color: var(--gold-text); font-size: 12px; line-height: 28px; }
.aut__fecho { font-size: 26px; line-height: 36px; }
@media (max-width: 800px) { .aut { grid-template-columns: 1fr; } .aut__photo { max-width: 420px; } }

/* Lentes */
.lentes { max-width: 880px; margin-inline: auto; }

/* Formulário nativo, no design system: painel escuro com filete dourado */
#formulario { display: grid; justify-items: center; text-align: center; gap: var(--space-2); padding-inline: var(--gutter); }
.cta__lead { max-width: var(--measure); margin: 0; font-size: 18px; line-height: 28px; }
.lead { box-sizing: border-box; width: min(640px, 100%); max-width: none; margin-top: var(--space-3); padding: var(--space-3); text-align: left; gap: var(--space-3);
  background: var(--surface-raised); border: 1px solid var(--line); border-top: 1px solid var(--rule); position: relative; }
.lead::before { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); top: -1px; height: 1px; background: var(--rule); }
.lead__eyebrow { color: var(--gold-light); text-align: center; }
.lead .ln-field__input { background: var(--surface); }
.lead__choices { margin: 0; padding: 0; border: 0; display: grid; gap: var(--space-1); }
.lead__choices legend { margin-bottom: var(--space-1); color: var(--ink-muted); }
.choice { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-2); align-items: start; padding: var(--space-2); background: var(--surface); border: 1px solid var(--line); cursor: pointer; font-size: 16px; line-height: 24px; color: var(--ink); transition: border-color .2s; }
.choice:hover { border-color: var(--ink-muted); }
.choice input { appearance: none; width: 18px; height: 18px; margin: 3px 0 0; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.choice input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform .15s; }
.choice input:checked::before { transform: scale(1); }
.choice input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.choice:has(input:checked) { border-color: var(--gold); }
.lead__choices.ln-field--error .choice { border-color: var(--gold-text); }
.lead .ln-field__hint[data-error] { color: var(--gold-text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead__privacy { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); text-align: center; }
.lead__done { box-sizing: border-box; width: min(640px, 100%); margin-top: var(--space-3); padding: var(--space-4) var(--space-3); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; gap: var(--space-2); justify-items: center; }
.lead__done-title { margin: 0; font-size: 26px; line-height: 36px; max-width: 30ch; }
.lead[hidden], .lead__done[hidden], .form-embed[hidden] { display: none; }
@media (max-width: 640px) {
  .lead { padding: var(--space-3) var(--space-2); }
  .lead::before { left: var(--space-2); right: var(--space-2); }
  .choice { padding: 12px; gap: 12px; }
}
.form-embed { width: min(640px, 100%); margin-top: var(--space-3); }
.form-embed iframe { display: block; width: 100%; min-height: 880px; border: 0; }
@media (max-width: 480px) { .form-embed iframe { min-height: 980px; } }

/* Bloco final de agendamento: abre o formulário do widget da Mebbi (CRM). Mesmo painel do antigo formulário. */
.cta-panel { box-sizing: border-box; width: min(640px, 100%); margin-top: var(--space-3); padding: var(--space-3); display: grid; gap: var(--space-3); text-align: left;
  background: var(--surface-raised); border: 1px solid var(--line); position: relative; }
.cta-panel::before { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); top: -1px; height: 1px; background: var(--rule); }
.cta-panel__eyebrow { color: var(--gold-light); text-align: center; }
.cta-panel__steps { counter-reset: passo; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.cta-panel__steps li { counter-increment: passo; position: relative; padding-left: 56px; font-size: 17px; line-height: 26px; }
.cta-panel__steps li::before { content: "0" counter(passo); position: absolute; left: 0; top: 0; font-family: var(--font-serif); font-size: 26px; line-height: 26px; color: var(--gold-light); }
.cta-panel__steps strong { font-weight: 700; }
@media (max-width: 640px) { .cta-panel { padding: var(--space-3) var(--space-2); } .cta-panel::before { left: var(--space-2); right: var(--space-2); } }
.footer__brand .footer__cro { font-size: 13px; line-height: 20px; color: var(--ink-muted); letter-spacing: 0.04em; }

/* Botões com texto longo: altura mínima em vez de fixa, para o rótulo quebrar sem cortar */
.ln-btn { box-sizing: border-box; height: auto; min-height: var(--control-height); padding-block: 14px; text-align: center; white-space: normal; line-height: 20px; }
.sw-root .sw-btn { white-space: normal; text-align: center; line-height: 1.3; }
@media (max-width: 640px) { .ln-btn { letter-spacing: 0.14em; padding-inline: var(--space-2); } }

/* Copy do mundo: bloco mais compacto para não encostar na borda inferior nem no botão flutuante */
.sw-root .sw-copy__title { font-size: clamp(1.9rem, 3.6vw, 3rem); }
/* O motor sobrescreve o transform da copy em cada quadro, então `top` é a borda superior do bloco:
   ancorar alto o bastante para o bloco inteiro caber em telas de 720px. */
.sw-root .sw-copy { top: clamp(96px, 20vh, 200px); left: var(--gutter); }
@media (max-width: 860px) {
  .sw-root .sw-copy { top: auto; bottom: calc(clamp(64px, 13dvh, 120px) + env(safe-area-inset-bottom)); right: 96px; }
  .sw-root .sw-copy__title { font-size: clamp(1.6rem, 6.4vw, 2.2rem); line-height: 1.08; }
  .sw-root .sw-copy__body { font-size: 1rem; line-height: 1.45; margin-top: 12px; }
  .sw-root .sw-copy__tags { display: none; }
  .sw-root .sw-copy__num { display: none; }
}

/* Gatilhos do widget do CRM (WTS Chat): mesmo visual dos botões do design system */
button.h-widget-trigger { cursor: pointer; }
button.sw-topcta, button.sw-btn { border: 0; font-family: var(--font-serif); }
button.sw-btn--primary { color: var(--on-gold); }
.footer__trigger { background: none; border: 0; padding: 0; color: var(--gold-text); font-family: var(--font-serif); font-size: 15px; line-height: 24px; font-weight: inherit; text-align: left; cursor: pointer; }
.footer__trigger:hover { color: var(--ink); }
/* Botão flutuante do widget: o PNG verde do WhatsApp vira dourado da marca (glifo branco preservado) */
img.h-widget-float { filter: hue-rotate(283deg) saturate(.55) brightness(.92); }
div.h-widget-float { filter: drop-shadow(0 6px 18px rgba(0,0,0,.6)); }
@media (max-width: 860px) {
  div.h-widget-float { right: 14px !important; bottom: calc(16px + env(safe-area-inset-bottom)) !important; width: 52px !important; height: 52px !important; }
  img.h-widget-float { width: 52px !important; height: 52px !important; }
}

/* Rodapé: mesma largura e margem das seções */
.ln-footer { padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2)); }
/* No celular o botão flutuante do widget fica sobre o canto inferior direito: as últimas linhas desviam dele */
@media (max-width: 860px) { .ln-footer__bottom { padding-right: 72px; } }
.footer__brand { display: grid; gap: var(--space-2); }
.footer__brand .ln-lockup { height: 64px; }
.footer__brand p { margin: 0; font-size: 15px; line-height: 24px; }
