/* Landing Dona do Preço. Cores e fontes: docs/brand-guidelines.md */

:root {
  --terracota: #B4532A;
  --terracota-escuro: #8F3F1F;
  --cacau: #3B2A20;
  --creme: #FBF6EF;
  --papel: #FFFDF9;
  --caramelo: #E3A857;
  --cafe: #7A6556;
  --borda: #E8DED2;
  --lucro: #3F6B4B;
  --prejuizo: #B42318;
  --atencao: #92400E;

  --titulo: "Fraunces", Georgia, "Times New Roman", serif;
  --texto: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --largura: 1180px;
  --margem: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--creme);
  color: var(--cacau);
  font: 400 17px/1.6 var(--texto);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--titulo); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--caramelo); outline-offset: 3px; border-radius: 4px; }

/* ---------- Botões ---------- */

.botao {
  display: inline-block;
  background: var(--terracota);
  color: #fff;
  font: 600 1.02rem/1 var(--texto);
  padding: 17px 26px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--terracota-escuro);
  transition: background .15s, transform .15s;
}
.botao:hover { background: var(--terracota-escuro); }
.botao:active { transform: translateY(1px); box-shadow: none; }
.botao-claro { background: var(--creme); color: var(--cacau); box-shadow: 0 2px 0 var(--caramelo); }
.botao-claro:hover { background: #fff; }
.botao-texto { font-weight: 600; color: var(--terracota-escuro); text-underline-offset: 4px; }

/* ---------- Topo ---------- */

.topo {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--largura); margin: 0 auto; padding: 22px var(--margem);
}
.marca {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.3rem/1 var(--titulo); text-decoration: none; white-space: nowrap;
}
.marca-etiqueta { width: 40px; height: 28px; }
.topo-link { font-weight: 600; font-size: .95rem; text-underline-offset: 4px; white-space: nowrap; }

/* ---------- Abertura ---------- */

.abertura {
  position: relative;
  min-height: min(860px, 100svh);
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.abertura-foto {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 70% center;
}
/* Clareia o lado esquerdo da mesa para o texto ficar legível. */
.abertura::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(251,246,239,.96) 0%, rgba(251,246,239,.9) 38%, rgba(251,246,239,.55) 50%, rgba(251,246,239,0) 64%);
}
.abertura-conteudo {
  width: 100%; max-width: var(--largura); margin: 0 auto;
  padding: 120px var(--margem) 72px;
  display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: 40px; align-items: start;
}
.abertura h1 { font-size: clamp(2.5rem, 5.2vw, 4.3rem); line-height: 1.04; margin-bottom: 22px; }
.abertura-texto > p { font-size: 1.15rem; max-width: 30em; color: #4A382C; }
.acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 30px 0 16px; }
.garantias { font-size: .95rem; color: var(--cafe); }

/* Etiqueta de preço pendurada: o elemento marcante da página */
.etiqueta-pendurada {
  justify-self: end;
  margin: -120px 4% 0 0;
  width: 300px;
  display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0;
  animation: balanco 2.4s cubic-bezier(.3,.6,.4,1) .3s both;
}
@keyframes balanco {
  0% { transform: rotate(7deg); }
  35% { transform: rotate(-4deg); }
  65% { transform: rotate(2deg); }
  100% { transform: rotate(-1.5deg); }
}
@media (prefers-reduced-motion: reduce) { .etiqueta-pendurada { animation: none; transform: rotate(-1.5deg); } }

.barbante {
  width: 2px; height: 150px;
  background: repeating-linear-gradient(180deg, #A9784F 0 5px, #C69466 5px 9px);
}
.etiqueta {
  position: relative;
  width: 100%;
  margin-top: -6px;
  padding: 46px 26px 26px;
  background: var(--papel);
  clip-path: polygon(50% 0, 100% 11%, 100% 100%, 0 100%, 0 11%);
  filter: drop-shadow(0 18px 24px rgba(59,42,32,.18));
  border-bottom: 8px solid var(--caramelo);
  transition: border-color .25s;
}
.etiqueta.ruim { border-bottom-color: var(--prejuizo); }
.etiqueta.atencao { border-bottom-color: var(--caramelo); }
.etiqueta.bom { border-bottom-color: var(--lucro); }
.furo {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--creme); box-shadow: inset 0 0 0 3px var(--caramelo);
}
.etiqueta-pergunta { font: 600 1.15rem/1.25 var(--titulo); text-align: center; margin-bottom: 14px; }
.etiqueta-campo {
  display: flex; align-items: center; gap: 8px;
  border-bottom: 2px solid var(--cacau);
  padding: 2px 4px 4px; margin: 0 auto 18px; width: 70%;
  font: 600 1.5rem/1 var(--titulo);
}
.etiqueta-campo input {
  width: 100%; border: 0; background: transparent; color: var(--cacau);
  font: 600 1.9rem/1 var(--titulo); padding: 4px 0; text-align: center;
}
.etiqueta-campo input:focus { outline: none; }
.etiqueta-campo:focus-within { border-bottom-color: var(--terracota); }
.etiqueta-resposta { text-align: center; }
.etiqueta-hora { margin-bottom: 10px; }
.etiqueta-hora span {
  display: block;
  font: 700 2.6rem/1 var(--titulo);
  color: var(--atencao);
  font-variant-numeric: tabular-nums;
  transition: color .25s;
}
.etiqueta.ruim .etiqueta-hora span { color: var(--prejuizo); }
.etiqueta.bom .etiqueta-hora span { color: var(--lucro); }
.etiqueta-hora small { display: block; font-size: .88rem; color: var(--cafe); margin-top: 6px; }
.etiqueta-veredito { font-size: .95rem; font-weight: 500; margin: 0; }
.etiqueta-pendurada figcaption {
  margin-top: 14px; font-size: .78rem; line-height: 1.45; color: #5E4B3E;
  background: rgba(251,246,239,.88); padding: 8px 10px; border-radius: 8px; text-align: center;
}

/* ---------- A conta completa ---------- */

.conta {
  max-width: var(--largura); margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--margem);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 88px); align-items: center;
}
.conta-texto h2 { margin-bottom: 22px; }
.conta-texto p { max-width: 32em; font-size: 1.08rem; }

.nota {
  position: relative;
  background: var(--papel);
  padding: 30px 28px 26px;
  box-shadow: 0 1px 0 var(--borda), 0 20px 40px -24px rgba(59,42,32,.35);
  transform: rotate(1.2deg);
}
/* Borda recortada, como papel de nota destacado */
.nota::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: radial-gradient(circle at 7px 10px, transparent 6px, var(--papel) 6.5px) 0 0 / 14px 10px repeat-x;
}
.nota-titulo { font: 600 1.35rem/1.2 var(--titulo); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--cacau); }
.nota-itens { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.nota-itens li { display: flex; align-items: baseline; padding: 7px 0; }
.nota-itens li span { flex: 1; display: flex; align-items: baseline; }
.nota-itens li span::after { content: ""; flex: 1; border-bottom: 2px dotted #CDBFB0; margin: 0 10px; transform: translateY(-4px); }
.nota-itens b { font-weight: 600; }
.nota-esquecido { color: var(--terracota-escuro); }
.nota-esquecido span { font-weight: 600; }
.nota-total { border-top: 1px solid var(--borda); margin-top: 8px; padding-top: 14px !important; font-weight: 600; font-size: 1.08rem; }
.nota-total span::after { display: none; }
.nota-preco {
  margin-top: 18px; padding: 16px 18px;
  background: var(--terracota); color: #fff; border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nota-preco span { font-size: .9rem; line-height: 1.35; max-width: 15em; }
.nota-preco strong { font: 700 2rem/1 var(--titulo); white-space: nowrap; }
.nota-rodape { font-size: .8rem; color: var(--cafe); margin: 14px 0 0; }

/* ---------- Passo a passo ---------- */

.passos {
  max-width: var(--largura); margin: 0 auto;
  padding: 0 var(--margem) clamp(72px, 10vw, 128px);
}
.passos h2 { margin-bottom: 36px; }
.passos ol {
  list-style: none; margin: 0 0 40px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  counter-reset: passo;
}
.passos li { counter-increment: passo; border-top: 2px solid var(--cacau); padding-top: 18px; }
.passos li::before {
  content: counter(passo);
  display: block;
  font: 600 3.4rem/1 var(--titulo);
  color: var(--terracota);
  margin-bottom: 12px;
}
.passos h3 { margin-bottom: 8px; }
.passos li p { color: #4A382C; margin: 0; }

/* ---------- Origem ---------- */

.origem {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--papel);
  border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda);
}
.origem-foto img { display: block; width: 100%; height: 100%; min-height: 420px; object-fit: cover; object-position: 75% center; }
.origem-texto { padding: clamp(48px, 7vw, 96px) var(--margem); max-width: 600px; align-self: center; }
.origem-texto h2 { margin-bottom: 22px; }
.origem-texto p { font-size: 1.06rem; }
.frase { font: 600 1.6rem/1.2 var(--titulo); color: var(--terracota); margin: 28px 0 0; }

/* ---------- Desafio ---------- */

.desafio {
  background: var(--cacau); color: var(--creme);
  padding: clamp(72px, 10vw, 120px) var(--margem);
  text-align: center;
}
.desafio > * { max-width: 640px; margin-left: auto; margin-right: auto; }
.desafio h2 { margin-bottom: 20px; }
.desafio p { color: #E9DED2; font-size: 1.08rem; }
.desafio .botao { margin-top: 18px; }

/* ---------- Perguntas ---------- */

.perguntas { max-width: 760px; margin: 0 auto; padding: clamp(72px, 10vw, 120px) var(--margem); }
.perguntas h2 { margin-bottom: 28px; }
.perguntas details { border-bottom: 1px solid var(--borda); }
.perguntas summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-weight: 600; font-size: 1.08rem;
}
.perguntas summary::-webkit-details-marker { display: none; }
.perguntas summary::after {
  content: "+"; font: 400 1.6rem/1 var(--titulo); color: var(--terracota);
  transition: transform .2s;
}
.perguntas details[open] summary::after { transform: rotate(45deg); }
.perguntas details p { padding: 0 0 20px; margin: 0; color: #4A382C; max-width: 36em; }

/* ---------- Rodapé ---------- */

.rodape { border-top: 1px solid var(--borda); text-align: center; padding: 48px var(--margem) 56px; color: var(--cafe); }
.rodape-marca { font: 700 1.3rem/1 var(--titulo); color: var(--cacau); margin-bottom: 8px; }
.rodape-pequeno { font-size: .8rem; max-width: 40em; margin: 18px auto 0; }

/* ---------- Celular e tablet ---------- */

@media (max-width: 900px) {
  .abertura { display: block; min-height: 0; }
  .abertura-foto { position: relative; height: 300px; object-position: 78% center; }
  .abertura::before { display: none; }
  .topo { position: absolute; background: linear-gradient(180deg, rgba(251,246,239,.92), rgba(251,246,239,0)); }
  .abertura-conteudo { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 56px; }
  .etiqueta-pendurada { justify-self: center; margin: 8px 0 0; width: min(320px, 100%); }
  .barbante { height: 40px; }
  .conta { grid-template-columns: 1fr; }
  .nota { transform: none; }
  .passos ol { grid-template-columns: 1fr; gap: 28px; }
  .origem { grid-template-columns: 1fr; }
  .origem-foto img { min-height: 0; height: 280px; }
}

@media (max-width: 420px) {
  .acoes { flex-direction: column; align-items: stretch; text-align: center; }
  .nota { padding: 24px 18px 20px; }
  .nota-preco { flex-direction: column; align-items: flex-start; }
  .topo-link { font-size: .88rem; }
}
