/*
  V14 — sistema tipográfico, superfícies do navegador e ganchos de movimento.
  Títulos: Cormorant Garamond (assinatura da marca).
  Texto e interface: Albert Sans.
  O movimento é feito em assets/js/motion-v14.js (GSAP); sem JS, tudo fica visível.
*/

:root {
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-text: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Tokens legados (paleta verde da V5) realinhados à marca. */
  --primary: #7c3d2c;
  --primary-dark: #5e2d20;
  --primary-deep: #4a2419;
  --primary-light: #f3e4dc;
  --gold: #a95034;
  --gold-light: #f1e2da;
  --gold-soft: #f1e2da;
  --text: #2f2926;
  --muted: #665d58;
  --line: #e6dad2;
  --success: #386352;
  --shadow: 0 24px 70px rgba(77, 49, 38, .1);
}

/* ---------- Superfícies do navegador ---------- */
html { scrollbar-color: #c7aa9c #f7f1ed; }
::selection { background: #eed8ce; color: #2f2926; }
.site-footer ::selection,
.final-cta ::selection,
.support-band ::selection,
.pricing-card.featured ::selection { background: #a95034; color: #fff; }
input, select, textarea { caret-color: var(--brand-copper); accent-color: var(--brand-copper-dark); }
a { text-underline-offset: .22em; text-decoration-thickness: 1px; }

body {
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
input, select, textarea, button { font-family: inherit; }

/* ---------- Papéis tipográficos ---------- */

/* Display */
.section-heading h2,
.support-inner h2,
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: lining-nums;
}
.section-heading.centered { max-width: 920px; }
.section-heading.centered h2 { max-width: 13.5em; margin-inline: auto; }
.section-heading.centered p { max-width: 60ch; margin-inline: auto; }
.support-inner h2 { text-wrap: balance; }
.final-cta h2 { max-width: 13em; text-wrap: balance; }
.section-heading p { font-size: 1.0625rem; line-height: 1.72; }

/* Hero: a palavra que carrega a promessa ganha o itálico da marca. */
.hero-reference h1 > span:last-child {
  font-style: italic;
  font-weight: 500;
  color: var(--hero-copper-deep);
  letter-spacing: -.035em;
}
.hero-reference .hero-clarifier { font-size: .92rem; }
.hero-progress-item { font-size: .7rem; letter-spacing: .16em; }
.strip-grid span { font-size: .75rem; letter-spacing: .14em; }

/* Rótulos */
.eyebrow { font-weight: 600; letter-spacing: .2em; }

/* Como funciona */
.step-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 500;
  font-variant-numeric: lining-nums;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--brand-copper);
  transition: color .5s var(--ease-out);
}
.step-card p { font-size: .97rem; line-height: 1.65; }

/* Planos */
.pricing-card h3 { line-height: 1; letter-spacing: -.02em; }
.pricing-top p { font-size: .95rem; line-height: 1.6; }
.pricing-card:not(.featured) .pricing-top p,
.pricing-card:not(.featured) .installment { color: var(--brand-muted); }
.price strong {
  font-family: var(--font-display);
  font-size: 4.1rem;
  font-weight: 600;
  font-variant-numeric: lining-nums;
  letter-spacing: -.025em;
}
.price small,
.price span { font-family: var(--font-text); font-weight: 600; }
.installment { font-size: .84rem; }
.plan-list li { font-size: .92rem; line-height: 1.5; }
.pricing-card:not(.featured) .plan-list li { color: #4b423e; }
.plan-pick { font-size: .95rem; font-weight: 600; letter-spacing: .005em; }

/* Tecnologias */
.technology-tags span { font-size: .75rem; font-weight: 600; letter-spacing: .01em; }
.tech-index { font-variant-numeric: lining-nums tabular-nums; }

/* Cirurgias */
.showcase-card h3 { font-size: 1.62rem; }
.showcase-card p { font-size: .88rem; line-height: 1.55; color: var(--brand-muted); }
.showcase-card > span { font-variant-numeric: tabular-nums; }
.surgery-rule-row strong { font-size: .95rem; }
.surgery-rule-row p { font-size: .9rem; line-height: 1.6; }

/* Suporte */
.support-actions .button { font-size: .9rem; font-weight: 600; }

/* Botões grandes seguem o padrão dos CTAs principais: Albert Sans, sólido e firme. */
.button { font-weight: 600; letter-spacing: .005em; }
.button-large {
  min-height: 58px;
  padding-inline: 28px;
  border-radius: 7px;
  font-family: var(--font-text);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

/* Formulário */
.field label { font-size: .875rem; font-weight: 600; }
.progress-step strong { font-size: .875rem; }
.progress-step small, .field-hint { font-size: .8rem; }
.form-plan-card b,
.calculation-total strong,
.pix-total strong,
.final-price-card strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: lining-nums;
  letter-spacing: -.01em;
}
.form-plan-card b { font-size: 1.7rem; color: var(--brand-ink); }
.calculation-total strong { font-size: 1.9rem; }
.pix-total strong { font-size: 1.45rem; }
.calculation-lines strong { font-variant-numeric: tabular-nums; }

/* FAQ: perguntas em serifa, respostas legíveis. */
.accordion summary {
  font-family: var(--font-display);
  font-variant-numeric: lining-nums;
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.accordion p { font-size: .98rem; line-height: 1.7; color: var(--brand-muted); }
.accordion details > p { overflow: hidden; }

/* Rodapé */
.site-footer p,
.site-footer a,
.footer-pending { font-size: .875rem; line-height: 1.7; }
.site-footer p, .footer-pending,
.footer-brand p, .footer-grid > div p { color: #b9aca5; }
.footer-grid strong { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #f7eeea; }
.footer-bottom span { font-size: .8rem; color: #a3958d; }
.footer-bottom a {
  display: inline;
  color: #d7cbc5;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(215, 203, 197, .4);
  text-underline-offset: .22em;
  transition: color .3s ease, text-decoration-color .3s ease;
}
.footer-bottom a:hover { color: #efb296; text-decoration-color: currentColor; }

/* Notas de apoio legíveis. */
.technology-guidance p,
.medical-note p,
.sidebar-help p,
.help-inline p { font-size: .92rem; line-height: 1.6; }

/* Piso de 11px para rótulos funcionais. */
.showcase-card > span { font-size: .75rem; }
.surgery-rule-row > span,
.pricing-rule-card > span { font-size: .72rem; }
.form-plan-card i,
.popular-badge { font-size: .7rem; }
@media (max-width: 580px) {
  .hero-reference .hero-eyebrow { font-size: .7rem; }
}

/* Resumo do investimento: o título do plano fica claro sobre o cabeçalho escuro. */
.calculation-head strong { color: #fff; }
.calculation-head span { opacity: .82; }
.pix-total span { color: #f7e6de; font-weight: 600; }

/* Adicionar cirurgia: resquício verde da V5 trazido para marfim e cobre. */
.add-surgery-button { border-color: #d2b9ad; background: #fffaf7; color: var(--brand-copper-dark); font-weight: 600; }
.add-surgery-button:hover { border-color: var(--brand-copper); background: #fbf1ec; }

/* Informação nas cores da marca (antes verde-petróleo). */
.technology-guidance-icon { background: var(--brand-copper-dark); color: #fff; }

/* Etapas do formulário: entrada suave ao trocar de etapa. */
.form-step.active { animation: step-in .5s var(--ease-out) both; }
@keyframes step-in {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: none; }
}

/* ---------- Ganchos de movimento (ativos só com JS + GSAP) ---------- */

/* O fio de cobre que costura as etapas. */
.steps-grid { position: relative; }
.steps-thread {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
  display: none;
}
.steps-thread span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(169, 80, 52, .25), var(--brand-copper) 30%, var(--brand-copper-dark));
  transform-origin: left center;
}
.step-card::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 30px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--brand-copper);
  border-radius: 50%;
  background: var(--brand-copper);
  transition: background-color .5s var(--ease-out), transform .5s var(--ease-out);
}

.js-motion .steps-thread { display: block; }
.js-motion .step-card::before { background: var(--brand-ivory); transform: scale(.8); }
.js-motion .step-card.is-reached::before { background: var(--brand-copper); transform: scale(1); }
.js-motion .step-card .step-number { color: #d4c1b7; }
.js-motion .step-card.is-reached .step-number { color: var(--brand-copper); }

/* A conta de cobre que percorre a jornada do hero. */
.hero-progress-bead {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--hero-copper);
  box-shadow: 0 0 0 4px rgba(155, 77, 56, .16), 0 4px 12px rgba(115, 54, 39, .35);
  opacity: 0;
  pointer-events: none;
}
.hero-progress-dot { transition: background-color .4s var(--ease-out); }
.hero-progress-item.is-lit .hero-progress-dot { background: var(--hero-copper); }

/* Trilha do hero desenhada pela timeline (variável --rail). */
.js-motion .hero-progress-list::before { transform: scaleY(var(--rail, 1)); }


/* Enquanto o GSAP anima, transições de CSS não disputam as mesmas propriedades. */
.is-animating { transition: none !important; }

/* Com o motor ativo, as animações CSS da V13 dão lugar à timeline GSAP. */
.js-motion .site-header .brand,
.js-motion .site-header .desktop-nav,
.js-motion .site-header .header-cta,
.js-motion .hero-reference .hero-eyebrow,
.js-motion .hero-reference .hero-eyebrow::before,
.js-motion .hero-reference h1,
.js-motion .hero-reference .hero-lead,
.js-motion .hero-reference .hero-actions,
.js-motion .hero-reference .hero-clarifier,
.js-motion .hero-progress,
.js-motion .hero-progress-list::before,
.js-motion .hero-progress-item,
.js-motion .hero-art img { animation: none; }

/* Evita o flash do hero antes da timeline assumir (com fallback em index.html). */
.motion-pending .hero-reference-copy,
.motion-pending .hero-progress,
.motion-pending .site-header .container { visibility: hidden; }

/* Header recolhe ao rolar para baixo e volta ao rolar para cima. */
.site-header { transition: transform .5s var(--ease-out), box-shadow .4s ease, background-color .4s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(77, 49, 38, .07); }
.site-header.is-hidden { transform: translate3d(0, -100%, 0); }

/* O WhatsApp flutuante aparece depois do hero, que já tem o próprio link. */
.js-motion .floating-whatsapp {
  opacity: 0;
  visibility: hidden;
  translate: 0 16px;
  transition: opacity .45s var(--ease-out), translate .45s var(--ease-out), visibility 0s linear .45s, background-color .24s, box-shadow .24s;
}
.js-motion .floating-whatsapp.is-visible {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  transition: opacity .45s var(--ease-out), translate .45s var(--ease-out), visibility 0s, background-color .24s, box-shadow .24s;
}

/* No rodapé, que já tem o próprio link, o WhatsApp flutuante sai para não cobrir o conteúdo. */
.floating-whatsapp.is-at-footer,
.js-motion .floating-whatsapp.is-visible.is-at-footer {
  opacity: 0;
  visibility: hidden;
  translate: 0 16px;
  transition: opacity .3s var(--ease-out), translate .3s var(--ease-out), visibility 0s linear .3s;
}

@media (max-width: 820px) {
  .js-motion .hero-progress-list::before { transform: scaleX(var(--rail, 1)); }
  /* Cada linha do título cabe inteira; evita "com" órfão no celular. */
  .hero-reference h1 { max-width: none; }
}

@media (max-width: 980px) {
  .js-motion .steps-thread { display: none; }
  .step-card::before { display: none; }
  .js-motion .step-card .step-number { color: var(--brand-copper); }
}

@media (max-width: 580px) {
  .price strong { font-size: 3.6rem; }
  .accordion summary { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .form-step.active { animation: none; }
  .site-header { transition: box-shadow .4s ease; }
  .site-header.is-hidden { transform: none; }
}
