/* ==========================================================
   Roda do Emagrecimento — Dra. Cláudia Benati
   Fontes hospedadas no próprio site (sem envio de dados a terceiros)
   ========================================================== */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url("/fonts/poppins-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/poppins-latin-600-normal.woff2") format("woff2"); }

:root {
  --creme: #F8F4EE;
  --bege: #EDE3D8;
  --bege-escuro: #E2D4C4;
  --marrom: #4A3429;
  --marrom-suave: #6B5245;
  --caramelo: #A47759;
  --caramelo-texto: #7D5640; /* variação do caramelo com contraste AA para textos pequenos */
  --terracota: #B87561;
  --terracota-texto: #8E4F3D;
  --branco: #FFFFFF;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(74, 52, 41, .04), 0 12px 32px -12px rgba(74, 52, 41, .14);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-variant-numeric: lining-nums;
  background: var(--creme);
  color: var(--marrom);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--terracota-texto); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--marrom); color: var(--creme); padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Topo ---------- */
.topbar { padding: 22px var(--gutter) 0; }
.topbar__inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
}
.brand {
  font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase; color: var(--marrom);
}
.brand-doctor { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 17px; color: var(--caramelo-texto); }
.crm { font-family: var(--sans); font-style: normal; font-size: .72em; letter-spacing: .06em; white-space: nowrap; }

/* ---------- Telas ---------- */
.screen { padding: 0 var(--gutter); }
.screen--enter { animation: screenIn .55s var(--ease) both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .screen--enter { animation: none; } }

/* ---------- Tipografia ---------- */
.eyebrow {
  margin: 0 0 18px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--caramelo-texto);
}
.display {
  font-family: var(--serif); font-weight: 500; color: var(--marrom);
  font-size: clamp(40px, 7.4vw, 66px); line-height: 1.04; letter-spacing: -.01em;
  margin: 0 0 22px; text-wrap: balance;
}
.display--md { font-size: clamp(34px, 6vw, 52px); }
.display--sm { font-size: clamp(30px, 4.8vw, 42px); line-height: 1.1; }
.display--light { color: var(--creme); }
.display:focus { outline: none; }

.lead {
  font-size: clamp(17px, 2.1vw, 19px); font-weight: 300; line-height: 1.6;
  color: var(--marrom-suave); margin: 0 0 32px; max-width: 34em;
}
.lead--center { margin-left: auto; margin-right: auto; text-align: center; }

.prose p { margin: 0 0 1.05em; max-width: 36em; }
.prose__opening {
  font-family: var(--serif); font-size: clamp(25px, 3.4vw, 30px); line-height: 1.25;
  font-weight: 500; font-style: italic; color: var(--marrom); margin-bottom: 1.1em !important;
}
.prose__questions {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(21px, 2.8vw, 24px); line-height: 1.45; color: var(--caramelo-texto);
  padding: 6px 0 6px 22px; border-left: 2px solid var(--caramelo);
  margin: 1.5em 0 1.6em !important;
}
.prose__accent { font-weight: 500; color: var(--marrom); }
.prose__closing {
  font-family: var(--serif); font-size: clamp(28px, 3.6vw, 34px); font-weight: 500; line-height: 1.2; margin-top: 1.4em !important;
}

/* ---------- Botões ---------- */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 56px; padding: 16px 34px; border-radius: 999px;
  font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; line-height: 1.3;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--marrom); color: var(--creme); box-shadow: 0 10px 24px -14px rgba(74, 52, 41, .7); }
.btn--primary:hover { background: #3A2820; }
.btn--primary[aria-disabled="true"] { background: #B9A99C; box-shadow: none; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--marrom); border-color: var(--bege-escuro); }
.btn--ghost:hover { border-color: var(--caramelo); background: rgba(237, 227, 216, .5); }
.btn--light { background: var(--creme); color: var(--marrom); }
.btn--light:hover { background: var(--branco); }
.btn--outline-light { background: transparent; color: var(--creme); border-color: rgba(248, 244, 238, .5); }
.btn--outline-light:hover { border-color: var(--creme); background: rgba(248, 244, 238, .08); }
.btn--outline-light[aria-busy="true"] { opacity: .7; cursor: progress; }
.invite :focus-visible { outline-color: var(--creme); }

/* ---------- Tela 1 ---------- */
.hero {
  max-width: 1160px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: 1fr; gap: 48px;
}
.hero__photo { margin: 0; position: relative; }
.hero__photo img, .photo-fallback {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%;
  border-radius: var(--radius); background: var(--bege);
}
.photo-fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 72px; font-weight: 500; letter-spacing: .06em; color: var(--caramelo);
}
.hero__photo--mobile { aspect-ratio: 4 / 4.6; max-height: 72vh; margin: 8px 0 44px; }
.hero__photo--desktop { display: none; }

.cta-block { margin-top: 36px; }
.cta-block .btn { width: 100%; }
.cta-meta { margin: 16px 0 0; font-size: 13px; color: var(--marrom-suave); letter-spacing: .02em; text-align: center; }
.cta-meta span { margin: 0 6px; color: var(--caramelo); }

@media (min-width: 560px) {
  .cta-block .btn { width: auto; }
  .cta-meta { text-align: left; }
}

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(56px, 7vw, 104px); align-items: start; }
  .hero__photo--mobile { display: none; }
  .hero__photo--desktop {
    display: block; position: sticky; top: 32px;
    aspect-ratio: 4 / 5; max-height: calc(100vh - 64px);
  }
  .hero__photo--desktop figcaption {
    position: absolute; left: 20px; bottom: 20px;
    background: rgba(248, 244, 238, .94); border-radius: 12px; padding: 12px 18px;
    display: flex; flex-direction: column; line-height: 1.3;
  }
  .figcaption__name { font-family: var(--serif); font-size: 21px; font-weight: 500; }
  .figcaption__role { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--caramelo-texto); }
  .hero__text { padding-top: 12px; }
}

/* ---------- Tela 2 — Questionário ---------- */
.quiz { max-width: 680px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) 0 clamp(56px, 8vw, 96px); }
.quiz__progress-meta {
  display: flex; justify-content: space-between; font-size: 12px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--marrom-suave); margin-bottom: 10px;
}
.progress { height: 4px; background: var(--bege-escuro); border-radius: 99px; overflow: hidden; }
.progress__fill { height: 100%; width: 0; background: var(--caramelo); border-radius: 99px; transition: width .5s var(--ease); }

.quiz__guide {
  margin: 28px 0 0; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 19px; line-height: 1.45; color: var(--marrom-suave);
}

.quiz__card {
  margin-top: 28px; background: var(--branco); border-radius: var(--radius);
  padding: clamp(24px, 5vw, 44px); box-shadow: var(--shadow);
}
.quiz__card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__card.is-changing .quiz__question,
.quiz__card.is-changing .options,
.quiz__card.is-changing .quiz__area { opacity: 0; transform: translateY(8px); }
.quiz__question, .options, .quiz__area { transition: opacity .28s var(--ease), transform .28s var(--ease); }

.quiz__area {
  margin: 0 0 14px; font-size: 11.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--caramelo-texto);
}
.quiz__question {
  font-family: var(--serif); font-weight: 500; font-size: clamp(25px, 4.2vw, 32px); line-height: 1.22;
  margin: 0 0 28px; color: var(--marrom); text-wrap: pretty;
}
.quiz__question:focus { outline: none; }

.options { display: grid; gap: 10px; }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option__label {
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 14px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--bege-escuro); background: var(--creme);
  font-size: 15.5px; color: var(--marrom); cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.option__dot {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--caramelo); background: var(--branco); position: relative;
  transition: border-color .2s var(--ease);
}
.option__dot::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--marrom);
  transform: scale(0); transition: transform .22s var(--ease);
}
.option:hover .option__label { border-color: var(--caramelo); }
.option input:checked + .option__label { border-color: var(--marrom); background: var(--bege); font-weight: 500; }
.option input:checked + .option__label .option__dot { border-color: var(--marrom); }
.option input:checked + .option__label .option__dot::after { transform: scale(1); }
.option input:focus-visible + .option__label { outline: 2px solid var(--terracota-texto); outline-offset: 2px; }

.quiz__error { min-height: 1.5em; margin: 14px 0 0; font-size: 14px; color: var(--terracota-texto); font-weight: 500; }

.quiz__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.quiz__nav .btn { flex: 1 1 0; padding-left: 18px; padding-right: 18px; }
@media (min-width: 560px) { .quiz__nav .btn { flex: 0 0 auto; min-width: 168px; } }

/* ---------- Resultado ---------- */
.result-block { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 0 0; }
.result-block--wheel { text-align: center; }
.result-block--wheel .display { margin-bottom: 14px; }

.wheel-card {
  background: var(--bege); border-radius: 24px; padding: clamp(14px, 4vw, 40px) clamp(6px, 3vw, 40px) clamp(22px, 4vw, 34px);
  margin-top: 8px;
}
.wheel { max-width: 560px; margin: 0 auto; }
.wheel svg { width: 100%; height: auto; display: block; overflow: visible; }
.wheel-legend { margin: 10px 16px 4px; font-size: 14.5px; font-weight: 500; color: var(--marrom); }
.wheel-scale { margin: 0 16px; font-size: 13px; color: var(--marrom-suave); line-height: 1.55; }

.wheel .r-poly { animation: polyIn .9s var(--ease) both; transform-origin: 220px 216px; }
@keyframes polyIn { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wheel .r-poly { animation: none; } }

.scores {
  list-style: none; margin: 28px 0 0; padding: 0; text-align: left;
  display: grid; grid-template-columns: 1fr; gap: 0 36px;
}
@media (min-width: 640px) { .scores { grid-template-columns: 1fr 1fr; } }
.score { padding: 14px 2px; border-bottom: 1px solid var(--bege-escuro); }
.score__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.score__name { font-weight: 500; font-size: 15px; }
.score__value { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1; white-space: nowrap; }
.score__value small { font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--marrom-suave); }
.score__bar { height: 3px; background: var(--bege-escuro); border-radius: 9px; margin: 9px 0 7px; overflow: hidden; }
.score__bar span { display: block; height: 100%; background: var(--caramelo); border-radius: 9px; }
.score__band { font-size: 12.5px; color: var(--marrom-suave); }
.score--high .score__bar span { background: var(--terracota); }
.scores-note { margin: 16px 0 0; font-size: 12.5px; color: var(--marrom-suave); text-align: left; }

.insights { display: grid; gap: 14px; margin-top: 8px; }
.insight {
  background: var(--branco); border-radius: var(--radius); padding: clamp(22px, 4vw, 32px);
  box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 4px 20px;
}
.insight__rank {
  grid-row: span 2; font-family: var(--serif); font-size: 46px; font-weight: 500; line-height: .9; color: var(--caramelo);
  min-width: 28px;
}
.insight__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.insight__title { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; margin: 0; }
.insight__score { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--caramelo-texto); white-space: nowrap; }
.insight__text { margin: 8px 0 0; color: var(--marrom); }
@media (max-width: 479px) {
  .insight { grid-template-columns: 1fr; }
  .insight__rank { grid-row: auto; font-size: 38px; margin-bottom: 6px; }
}
.insight--low { grid-template-columns: 1fr; }

.note {
  border-radius: 24px; background: var(--bege);
  padding: clamp(28px, 6vw, 56px);
}
.prose--note p { max-width: none; }
.signature { margin: 28px 0 0; display: flex; flex-direction: column; line-height: 1.35; }
.signature__name { font-family: var(--serif); font-size: 26px; font-weight: 500; font-style: italic; }
.signature__role { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--caramelo-texto); margin-top: 4px; }
.signature__handle { font-size: 14px; color: var(--marrom-suave); margin-top: 6px; }

.invite {
  background: var(--marrom); color: var(--creme); border-radius: 28px;
  padding: clamp(32px, 7vw, 64px);
}
.eyebrow--light { color: #E3C6AF; }
.prose--light p { color: rgba(248, 244, 238, .9); max-width: none; }
.invite__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 34px; }
.invite__actions .btn { width: 100%; }
@media (min-width: 640px) {
  .invite__actions { flex-direction: row; flex-wrap: wrap; }
  .invite__actions .btn { width: auto; }
}
.invite__status { min-height: 1.4em; margin: 14px 0 0; font-size: 14px; color: #F1DCCB; }
.invite__fineprint { margin: 18px 0 0; font-size: 13px; color: rgba(248, 244, 238, .75); line-height: 1.6; }

.result-block--restart { text-align: center; padding-top: 40px; padding-bottom: 24px; }

/* ---------- Rodapé ---------- */
.footer {
  max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 56px;
  font-size: 12.5px; line-height: 1.65; color: var(--marrom-suave); text-align: center;
}
.footer p { margin: 0 0 8px; }
.footer__sign { margin-top: 18px !important; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--marrom); }

.noscript { position: fixed; inset: auto 16px 16px; background: var(--marrom); color: var(--creme); padding: 16px; border-radius: 12px; text-align: center; }

/* Algarismos alinhados (Cormorant usa algarismos de estilo antigo por padrão) */
.display, .score__value, .insight__rank, .wheel text, .wheel tspan { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* ---------- Contato (antes do resultado) ---------- */
.contact .quiz__question { margin-bottom: 14px; }
.contact__intro { margin: 0 0 26px; color: var(--marrom-suave); font-size: 15.5px; line-height: 1.6; }
.field { margin-bottom: 6px; }
.field__label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--marrom); }
.field__input {
  width: 100%; min-height: 54px; padding: 14px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--bege-escuro); background: var(--creme);
  font: inherit; font-size: 16px; color: var(--marrom);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field__input::placeholder { color: #9C877A; }
.field__input:hover { border-color: var(--caramelo); }
.field__input:focus { outline: none; border-color: var(--marrom); background: var(--branco); }
.field__input:focus-visible { outline: 2px solid var(--terracota-texto); outline-offset: 2px; }
.field__input[aria-invalid="true"] { border-color: var(--terracota-texto); }
.field__error { min-height: 1.4em; margin: 6px 0 4px; font-size: 13.5px; color: var(--terracota-texto); font-weight: 500; }
.consent { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--marrom-suave); }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--marrom); cursor: pointer; }
.consent label { cursor: pointer; }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.progress__fill--full { width: 100%; }
.notfound { text-align: center; padding-top: 80px; }
