/* ============================================================
   Seu Tributo de Volta — style.css
   Tokens conforme parametros-visuais-site.md (25/08/2026)
   ============================================================ */

:root {
  /* Paleta alinhada à logo: azul-marinho #00285E + dourado #D8981F + off-white */
  --ink: #00285E;          /* azul-marinho da logo — texto, headers, fundos escuros */
  --ink-deep: #001B42;     /* variante mais escura — hover de botões escuros */
  --paper: #F6F4EE;        /* papel quente, puxado para o off-white da logo */
  --paper-raised: #FBFAF7;
  --gold: #D8981F;         /* dourado da moeda/ponto da logo — preenchimentos, CTA, destaque do gráfico */
  --gold-text: #8F6317;    /* dourado escurecido para texto pequeno sobre papel (contraste AA) */
  --gold-soft: #F3D68F;    /* dourado claro — texto/rótulos sobre fundo azul */
  --line: #D9D5CB;
  --slate: #4F5B70;        /* cinza-azulado alinhado ao marinho */
  --white: #FFFFFF;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 2px;
  --container: 1120px;
  --section-y: clamp(64px, 8vw, 88px);
  --gutter: clamp(20px, 4vw, 40px);
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Escala tipográfica ---------- */
h1 { font-size: clamp(2.25rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--slate); max-width: 56ch; }
.muted { color: var(--slate); }
.small { font-size: 0.9rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 14px;
}
.mono { font-family: var(--font-mono); font-weight: 500; }
.num { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section--raised { background: var(--paper-raised); }
.section--ink { background: var(--ink); color: var(--paper); border-top: none; }
.section--ink .eyebrow { color: var(--gold-soft); }
.section--ink .muted { color: var(--gold-soft); opacity: 0.85; }

.section-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 48px); }

.grid-2 { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; align-items: center; }
.grid-3 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 820px) {
  .grid-2 { grid-template-columns: 1.05fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.section--raised .card { background: var(--paper); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  transition: background-color .18s ease, transform .18s ease;
}
.btn--primary { background: var(--gold); color: var(--ink); }
.btn--primary:hover { background: #C4881A; }
.btn--secondary { background: var(--ink); color: var(--paper); }
.btn--secondary:hover { background: var(--ink-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.section--ink .btn--ghost { color: var(--paper); border-color: var(--paper); }
.btn--lg { padding: 18px 28px; font-size: 1.05rem; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__logo { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.brand__mark { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand__sub { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); }
.nav { display: none; gap: 28px; align-items: center; }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--slate); }
.nav a:hover { color: var(--ink); }
@media (min-width: 820px) { .nav { display: flex; } .brand__sub { display: inline; } }
@media (max-width: 819px) { .brand__sub { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 8vw, 104px); border-top: none; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 20px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 16px; font-size: 0.85rem; color: var(--slate); font-family: var(--font-mono); }

/* ---------- Gráfico do teto (elemento de assinatura) ---------- */
.teto-chart { width: 100%; }
.teto-chart__frame {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 14px;
}
.teto-chart__title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.teto-chart__title .eyebrow { margin: 0; }
.teto-chart svg { width: 100%; height: auto; overflow: visible; }
.teto-chart text { font-family: var(--font-mono); font-weight: 500; }
.bar-base { fill: var(--ink); }
.bar-over { fill: var(--gold); }
.bar-over, .bar-base { transform-box: fill-box; transform-origin: bottom; }
.teto-line { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 5 5; }
.teto-label { fill: var(--gold-text); font-size: 13px; letter-spacing: 0.08em; }
.axis-label { fill: var(--slate); font-size: 13px; }
.axis-value { fill: var(--ink); font-size: 13px; }
.teto-chart__legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate); letter-spacing: 0.04em; }
.teto-chart__legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.teto-chart__legend .l-base::before { background: var(--ink); }
.teto-chart__legend .l-over::before { background: var(--gold); }
.teto-chart__legend .l-line::before { background: none; border-top: 2px dashed var(--gold); height: 0; vertical-align: 2px; }

@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.teto-chart.is-animated .bar-base { animation: growBar .7s cubic-bezier(.2,.7,.2,1) both; }
.teto-chart.is-animated .bar-over { animation: growBar .5s cubic-bezier(.2,.7,.2,1) .7s both; }
.teto-chart.is-animated .bar-base:nth-of-type(2) { animation-delay: .1s; }
@media (prefers-reduced-motion: reduce) {
  .teto-chart.is-animated .bar-base, .teto-chart.is-animated .bar-over { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Serviços ---------- */
.service { display: flex; flex-direction: column; gap: 14px; }
.service h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
.service__who { font-size: 0.95rem; color: var(--slate); }
.service__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.tag {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--slate);
}
.tag--gold { color: var(--gold-text); border-color: var(--gold-soft); }

/* ---------- Etapas (ordem real) ---------- */
.steps { display: grid; gap: 0; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 24px 24px 24px 0; border-top: 1px solid var(--line); }
@media (min-width: 820px) { .step { border-top: none; border-left: 1px solid var(--line); padding-left: 20px; } .step:first-child { border-left: none; padding-left: 0; } }
.step__n { font-family: var(--font-mono); font-weight: 600; color: var(--gold-text); font-size: 0.8rem; letter-spacing: 0.1em; margin-bottom: 10px; }
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--slate); font-size: 0.95rem; }

/* ---------- Quem assina ---------- */
.author { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 820px) { .author { grid-template-columns: 300px 1fr; } }
.author__photo {
  aspect-ratio: 312 / 390; width: 100%; max-width: 300px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden;
}
.author__photo img { width: 100%; height: 100%; object-fit: cover; }
.author__photo .placeholder { font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate); letter-spacing: 0.1em; text-align: center; padding: 16px; }
.author__creds { font-family: var(--font-mono); font-size: 0.8rem; color: var(--slate); letter-spacing: 0.06em; margin: 10px 0 18px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  font-family: var(--font-display); font-weight: 500; font-size: 1.15rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--gold-text); font-size: 1.3rem; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .faq__body { padding: 0 0 22px; color: var(--slate); max-width: 68ch; }

/* ---------- CTA final ---------- */
.cta-final h2 { max-width: 20ch; }
.cta-final .btn { margin-top: 28px; }
.cta-final__aside { font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold-soft); margin-top: 18px; letter-spacing: 0.04em; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--slate); }
.site-footer .container { display: grid; gap: 20px; }
@media (min-width: 820px) { .site-footer .container { grid-template-columns: 1fr auto; align-items: end; } }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer .legal { max-width: 70ch; line-height: 1.5; }

/* ---------- Botão flutuante WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: var(--ink);
  padding: 12px 16px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(0,40,94,.25);
}
.wa-float:hover { background: #C4881A; }
.wa-float svg { width: 20px; height: 20px; }
@media (max-width: 600px) { .wa-float span { display: none; } .wa-float { padding: 14px; } }

/* ---------- Quiz (LP) ---------- */
.quiz {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  max-width: 680px;
}
.quiz__progress { display: flex; gap: 6px; margin-bottom: 24px; }
.quiz__progress i { flex: 1; height: 3px; background: var(--line); border-radius: 1px; }
.quiz__progress i.is-done { background: var(--gold); }
.quiz__step { display: none; }
.quiz__step.is-active { display: block; }
.quiz__q { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 8px; }
.quiz__help { color: var(--slate); font-size: 0.95rem; margin-bottom: 20px; }
.quiz__options { display: grid; gap: 10px; }
.quiz__opt {
  text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; font-size: 1rem; color: var(--ink); width: 100%;
  transition: border-color .15s ease, background-color .15s ease;
}
.quiz__opt:hover { border-color: var(--gold); }
.quiz__opt.is-selected { border-color: var(--gold); background: #FDF4DF; }
.quiz__opt small { display: block; color: var(--slate); font-size: 0.85rem; margin-top: 3px; }
.quiz__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; }
.quiz__back { background: none; border: none; color: var(--slate); text-decoration: underline; padding: 8px 0; }
.quiz__result { display: none; }
.quiz__result.is-active { display: block; }
.quiz__result h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 12px; }
.quiz__result .result-note { border-left: 2px solid var(--gold); padding-left: 14px; color: var(--slate); font-size: 0.92rem; margin: 18px 0 24px; }

/* ---------- Tabela (privacidade / referência) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: var(--paper-raised); }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-family: var(--font-mono); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); background: var(--paper); }
.tbl tr:last-child td { border-bottom: none; }

/* ---------- Prosa (páginas legais) ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.prose h3 { font-size: 1.2rem; margin: 24px 0 8px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* ---------- Utilidades ---------- */
.stack > * + * { margin-top: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
