/* ============================================================
   TOKENS DA MARCA — mesmas cores e fontes de marceloavelar.com.br
   ============================================================ */
:root {
  /* Cores */
  --bg: #ffffff;
  --surface-soft: #f6f7fa; /* paper-2 do site */
  --ink: #16243d; /* navy do site: títulos e botões */
  --text: #2c3547; /* texto corrido */
  --muted: #6e7480; /* apoio e rótulos */
  --border: #e2e5ea;
  --border-strong: #c2c7cf; /* silver do site */
  --accent: #33456e; /* navy-500 */
  --accent-dark: #16243d;
  --accent-soft: #eef1f6;
  --silver-grad: linear-gradient(135deg, #f8f9fa 0%, #dde1e5 40%, #c4c9d0 100%);
  --error: #b3261e;

  /* Fontes */
  --font-display: "Josefin Sans", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-body: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Escala tipográfica (mobile) */
  --fs-eyebrow: 0.6875rem; /* 11px */
  --fs-small: 0.875rem; /* 14px */
  --fs-option: 0.9375rem; /* 15px */
  --fs-body: 1rem; /* 16px */
  --fs-lead: 1.0625rem; /* 17px */
  --fs-h2: 1.5rem; /* 24px */
  --fs-h1: 1.875rem; /* 30px */
  --fs-display: 2.5rem; /* 40px */
}

@media (min-width: 640px) {
  :root {
    --fs-h2: 1.75rem; /* 28px */
    --fs-h1: 2.5rem; /* 40px */
    --fs-display: 3.5rem; /* 56px */
  }
}

/* ============================================================
   BASE
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }

/* ============================================================
   ESTRUTURA
   ============================================================ */
.progresso {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 3px;
  background: var(--border);
}
.progresso > div {
  width: 0;
  height: 100%;
  background: var(--ink);
  transition: width 0.4s ease-out;
}

.pagina {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 36rem;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
}

.marca {
  padding: 1.75rem 0 1.25rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.marca strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.marca span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.conteudo {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0 2rem;
}

.passo { display: flex; flex-direction: column; animation: entrar 0.4s ease-out; }
@keyframes entrar {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   TIPOGRAFIA
   ============================================================ */
.voltar {
  align-self: flex-start;
  margin-bottom: 2rem;
  padding: 0.25rem 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}
.voltar::before { content: "←"; margin-right: 0.5rem; letter-spacing: 0; }
.voltar:hover { color: var(--ink); }

.sobretitulo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.sobretitulo::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
}

.titulo {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.titulo em { font-style: italic; font-weight: 300; color: var(--accent); }
.titulo--destaque { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.015em; }
.titulo--menor { margin-top: 2.5rem; font-size: var(--fs-h2); line-height: 1.2; }

.assinatura {
  margin: 1rem 0 0;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
}
.assinatura span {
  display: block;
  margin-top: 0.125rem;
  font-size: var(--fs-eyebrow);
  font-weight: 400;
  letter-spacing: 0.06em;
}
.texto {
  max-width: 34em;
  margin: 1.75rem 0 0;
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--text);
}
.apoio {
  margin: 0.875rem 0 0;
  font-size: var(--fs-option);
  line-height: 1.6;
  color: var(--muted);
}

.garantias {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: var(--fs-small);
  color: var(--text);
}
.garantias li { display: flex; align-items: baseline; gap: 0.75rem; }
.garantias li::before { content: "—"; color: var(--silver, #9298a4); }

/* ============================================================
   CAMPOS E OPÇÕES
   ============================================================ */
.campos { display: grid; gap: 2rem; margin-top: 2.25rem; }
.campo span {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.campo input {
  width: 100%;
  margin-top: 0.625rem;
  padding: 0 0 0.625rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.campo input:focus { border-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.campo input::placeholder { color: #c2c7cf; }

.opcoes { display: grid; gap: 0.625rem; margin-top: 2.25rem; }
.opcao {
  width: 100%;
  min-height: 58px;
  padding: 0.9375rem 1.25rem;
  text-align: left;
  font-size: var(--fs-option);
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.opcao:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.opcao[aria-pressed="true"] {
  font-weight: 500;
  background: var(--accent-soft);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* Etapa de procedimentos: cirurgias agrupadas por região */
.grupos { display: grid; gap: 1.75rem; margin-top: 2.25rem; }
.grupo__rotulo {
  margin: 0 0 0.625rem;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.opcoes--compactas { gap: 0.5rem; margin-top: 0; }
.opcoes--compactas .opcao { min-height: 50px; padding: 0.75rem 1.125rem; }

.aceite {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 2rem;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--muted);
  cursor: pointer;
}
.aceite input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
}
.aceite a { color: var(--ink); text-underline-offset: 3px; }

/* ============================================================
   BOTÕES, CARTÕES E ESTADOS
   ============================================================ */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 2.5rem;
  padding: 0 2.25rem;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.15s, background-color 0.15s;
}
.botao:hover { background: var(--accent); }
.botao:disabled { opacity: 0.3; cursor: not-allowed; background: var(--ink); }

.opcao:focus-visible, .botao:focus-visible, .voltar:focus-visible, .aceite input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cartao {
  padding: 1.75rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cartao h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}
.cartao p { margin: 0.875rem 0 0; font-size: var(--fs-option); line-height: 1.7; color: var(--text); }
.cartao strong { font-weight: 600; color: var(--ink); }

.erro { margin: 1rem 0 0; font-size: var(--fs-small); font-weight: 500; color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.selo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--silver-grad);
  color: var(--ink);
  font-size: 1.125rem;
}
.discreto { margin-top: 1.5rem; font-size: var(--fs-small); color: var(--muted); }
.discreto a { color: var(--ink); text-underline-offset: 3px; }

/* Banner de cookies (LGPD) */
.cookies {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 20;
  display: grid;
  gap: 0.75rem;
  max-width: 34rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: var(--ink);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(14, 23, 41, 0.28);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.cookies p { margin: 0; color: rgba(255, 255, 255, 0.82); }
.cookies a { color: #fff; text-underline-offset: 2px; }
.cookies__acoes { display: flex; justify-content: flex-end; gap: 0.5rem; }
.cookies button {
  min-height: 40px;
  padding: 0 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cookies [data-cookies="nao"] { background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; }
.cookies [data-cookies="sim"] { background: var(--silver-grad); border: 0; color: var(--ink); }

@media (min-width: 640px) {
  .botao { align-self: flex-start; width: auto; min-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .passo { animation: none; }
  .progresso > div { transition: none; }
}
