/* Recado Cantado — identidade visual "Cartão de carinho" (design A2)
   Referência: docs/design/recado-cantado-a2.html, feito no Claude Design.
   Vinho e terracota sobre creme; Fraunces nos títulos, Caveat para o que
   parece escrito à mão, Figtree no texto. Pensado primeiro para o celular:
   quase todo cliente chega por anúncio no Instagram e TikTok. */

:root {
  --creme: #FBF4EA;
  --papel: #FFFCF7;
  --areia: #F6E6D9;
  --linha: #EBDCCB;
  --borda-campo: #D9C3B0;
  --vinho: #6E1F33;
  --vinho-escuro: #4E1424;
  --terracota: #B8432A;
  --coral: #EE6C4D;
  --pessego: #FFD8C7;
  --tinta: #2B1A1E;
  --texto: #4A3337;
  --apagado: #6B5256;
  --discreto: #8A6A6F;
  --erro: #B42318;

  --titulo: "Fraunces", Georgia, serif;
  --mao: "Caveat", cursive;
  --corpo: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
/* O atributo hidden precisa vencer o display dos botões e caixas. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--corpo);
  font-size: 17px;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}
svg { display: block; }
a { color: var(--vinho); }
a:hover { color: var(--vinho-escuro); }
h1, h2, h3 { font-family: var(--titulo); font-weight: 600; line-height: 1.1; margin: 0; color: var(--vinho-escuro); }
h2 { font-size: 34px; }
.mao { font-family: var(--mao); font-weight: 700; }

.largura { width: min(1080px, 100% - 40px); margin-inline: auto; }
.largura--estreita { width: min(640px, 100% - 40px); }

/* -- botões ------------------------------------------------------------- */
.botao {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 0 24px;
  border: 0; border-radius: 16px;
  background: var(--vinho); color: #fff;
  font: 700 17px var(--corpo); text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 0 var(--vinho-escuro);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.botao:hover { color: #fff; background: #7d2640; }
.botao:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--vinho-escuro); }
.botao:disabled { opacity: .65; cursor: wait; transform: none; }
.botao--topo { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; box-shadow: none; white-space: nowrap; }
.botao--pulsa { animation: rc-pulse 2.6s ease-out 2.4s infinite; }
.botao--fantasma { background: transparent; color: var(--vinho); box-shadow: none; border: 1.5px solid var(--borda-campo); }
.botao--fantasma:hover { background: var(--areia); color: var(--vinho); }
.link-ouvir {
  min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; text-underline-offset: 4px;
}

/* -- topo ----------------------------------------------------------------- */
.topo {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 244, 234, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linha);
}
.topo__linha { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marca { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--vinho); }
.marca span { font: 700 19px var(--titulo); letter-spacing: -.2px; white-space: nowrap; }

/* -- abertura ------------------------------------------------------------- */
.abertura { position: relative; padding: 28px 0 56px; overflow: hidden; }
.abertura__grade { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: center; }
.abertura__dedicatoria {
  display: inline-block; font-family: var(--mao); font-size: 25px; font-weight: 700; color: var(--terracota);
  transform: rotate(-2deg); transform-origin: left; margin-bottom: 8px;
  animation: rc-write 1.2s ease-out .1s both;
}
.abertura h1 { font-size: clamp(46px, 12vw, 64px); line-height: 1.04; letter-spacing: -1.2px; }
.abertura h1 > span { display: inline-block; animation: rc-up .7s cubic-bezier(.2,.8,.2,1) both; }
.abertura h1 > span:nth-child(1) { animation-delay: .35s; }
.abertura h1 > span:nth-child(2) { animation-delay: .5s; }
.abertura h1 .destaque { position: relative; font-style: italic; font-weight: 500; color: var(--terracota); animation-delay: .7s; }
.destaque svg { position: absolute; left: 0; bottom: -6px; width: 100%; height: 14px; overflow: visible; }
.destaque path { stroke-dasharray: 230; stroke-dashoffset: 230; animation: rc-draw .9s ease-out 1.3s forwards; }
.abertura__texto { margin: 20px 0 0; font-size: 17px; color: var(--texto); max-width: 36ch; animation: rc-up .7s ease-out 1.1s both; }
.abertura__acoes { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; max-width: 420px; animation: rc-up .7s ease-out 1.3s both; }
.selos { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: 420px; }
.selos li {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  background: var(--areia); color: var(--vinho-escuro); font-size: 14px; font-weight: 600;
  animation: rc-up .5s ease-out both;
}
.selos li:nth-child(1) { animation-delay: 1.5s; }
.selos li:nth-child(2) { animation-delay: 1.62s; }
.selos li:nth-child(3) { animation-delay: 1.74s; }

/* cartão de mensagem */
.cartao { position: relative; max-width: 420px; width: 100%; justify-self: center; }
.cartao__mancha { position: absolute; inset: -20px -30px -24px; background: var(--areia); border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; animation: rc-blob 9s ease-in-out infinite; }
.cartao__nota { position: absolute; z-index: 2; animation: rc-note 4.2s ease-out infinite both; }
.cartao__nota--1 { left: 34px; top: 70px; --dx: -26px; animation-delay: 2.2s; }
.cartao__nota--2 { left: 70px; top: 76px; --dx: 18px; animation-delay: 3.6s; }
.cartao__nota--3 { left: 50px; top: 74px; --dx: 40px; animation-delay: 5s; }
.cartao__entra { position: relative; z-index: 1; animation: rc-card-in 1s cubic-bezier(.2,.8,.2,1) .6s both; }
.cartao__papel {
  position: relative; padding: 30px 22px 24px; background: var(--papel); border-radius: 6px;
  box-shadow: 0 1px 0 var(--linha), 0 18px 40px -18px rgba(78, 20, 36, .35);
  display: flex; flex-direction: column; gap: 16px;
  animation: rc-float 5s ease-in-out 1.6s infinite;
}
.cartao__fita {
  position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; margin-left: -55px;
  background: rgba(238, 108, 77, .35); animation: rc-tape .5s ease-out 1.4s both;
}
.cartao__cabeca { display: flex; justify-content: space-between; align-items: baseline; }
.cartao__para { font-family: var(--mao); font-size: 30px; font-weight: 700; color: var(--vinho); animation: rc-write 1s ease-out 1.5s both; }
.rotulo-ritmo { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--discreto); }
.cartao__player { display: flex; align-items: center; gap: 12px; }
.cartao__play { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.cartao__anel { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--coral); animation: rc-ring 2s ease-out 2s infinite; }
.cartao__anel + .cartao__anel { animation-delay: 3s; }
.cartao__play a {
  position: relative; width: 48px; height: 48px; border-radius: 50%; background: var(--coral); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.onda { flex-grow: 1; height: 48px; display: flex; align-items: center; gap: 3px; overflow: hidden; }
.onda span { width: 4px; flex-shrink: 0; border-radius: 2px; background: var(--coral); animation: rc-eq 1.2s ease-in-out infinite; }
.onda span.tocado { background: var(--coral); }
.onda span.resto { background: #E2CDBB; }
.cartao__letra { margin: 0; font-family: var(--mao); font-size: 26px; line-height: 1.2; color: var(--tinta); animation: rc-lyric 8s linear 2s infinite both; }
.cartao__tracejado { height: 1px; background: repeating-linear-gradient(90deg, #E2CDBB 0 6px, transparent 6px 12px); }
.cartao__legenda { font-size: 13px; color: var(--discreto); }

/* -- ocasiões ------------------------------------------------------------- */
.ocasioes { padding: 36px 0 40px; background: var(--vinho); color: var(--creme); }
.ocasioes h2 { font-family: var(--mao); font-size: 30px; font-weight: 700; color: var(--pessego); margin-bottom: 16px; }
.ocasioes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ocasioes li { padding: 9px 14px; border-radius: 999px; border: 1.5px solid rgba(251, 244, 234, .55); font-size: 15px; font-weight: 600; }

/* -- seções --------------------------------------------------------------- */
.secao { padding: 56px 0; }
.secao--areia { background: var(--areia); }
.secao--papel { background: var(--papel); border-top: 1px solid var(--linha); }
.secao__cabeca { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.secao__cabeca p { margin: 0; font-size: 16px; color: var(--apagado); }

/* exemplos */
.exemplos { display: grid; gap: 12px; }
.exemplo {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--papel); border: 1px solid var(--linha); border-radius: 16px;
}
.exemplo__play {
  width: 52px; height: 52px; flex-shrink: 0; border: none; border-radius: 50%;
  background: var(--vinho); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.exemplo__play:disabled { background: #C9B3B7; cursor: default; }
.exemplo__textos { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.exemplo__ritmo { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--terracota); }
.exemplo__titulo { font: 600 18px/1.25 var(--titulo); color: var(--tinta); }
.exemplo__breve { font-size: 13px; color: var(--discreto); }
.exemplo.tocando .exemplo__play { background: var(--coral); }
.exemplo__textos { flex: 1; }
.exemplo__progresso { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.exemplo__tempo { font-size: 12px; color: var(--discreto); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 72px; text-align: right; }
/* Barra de progresso: trilho areia, parte tocada em coral, bolinha vinho.
   Alta o bastante para o dedo acertar no celular. */
.exemplo__barra {
  --feito: 0%;
  flex: 1; min-width: 0; height: 28px; margin: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: transparent;
  /* Arrastar na barra é mexer na música, não rolar a página. */
  touch-action: none;
}
.exemplo__barra::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--coral) var(--feito), var(--linha) var(--feito));
}
.exemplo__barra::-moz-range-track { height: 6px; border-radius: 3px; background: var(--linha); }
.exemplo__barra::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--coral); }
.exemplo__barra::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px;
  border-radius: 50%; background: var(--vinho); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.exemplo__barra::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--vinho); border: 2px solid #fff; }
.exemplo__barra:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }

/* como funciona */
.passos { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.passos li { display: flex; gap: 16px; }
.passos__numero {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%;
  background: var(--papel); border: 1.5px solid var(--vinho); color: var(--vinho);
  display: flex; align-items: center; justify-content: center; font: 700 22px var(--titulo);
}
.passos li:last-child .passos__numero { background: var(--vinho); color: #fff; }
.passos h3 { font-size: 21px; color: var(--tinta); margin: 4px 0 4px; }
.passos p { margin: 0; font-size: 16px; color: var(--texto); }

/* preço */
.oferta {
  max-width: 460px; margin-inline: auto; padding: 28px 22px; background: var(--papel);
  border: 1.5px solid var(--vinho); border-radius: 20px; box-shadow: 8px 8px 0 var(--areia);
  display: flex; flex-direction: column; gap: 20px;
}
.oferta__chamada { font-family: var(--mao); font-size: 26px; font-weight: 700; color: var(--terracota); }
.oferta__valor { font: 700 60px/1 var(--titulo); letter-spacing: -1.5px; color: var(--vinho-escuro); }
.oferta ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.oferta li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.oferta li svg { flex-shrink: 0; margin-top: 1px; }
.oferta__seguro { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--apagado); text-align: center; }

/* -- formulário ----------------------------------------------------------- */
.etapas { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.etapas li { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 500; color: var(--apagado); }
.etapas li::before { content: ""; height: 6px; border-radius: 3px; background: var(--linha); }
.etapas li.ativa, .etapas li.feita { font-weight: 700; color: var(--vinho); }
.etapas li.ativa::before, .etapas li.feita::before { background: var(--vinho); }

.etapa { display: none; border: 0; padding: 0; margin: 0; min-width: 0; }
.etapa.ativa { display: flex; flex-direction: column; gap: 18px; animation: rc-up .3s ease-out both; }
.etapa legend { font: 600 24px var(--titulo); color: var(--vinho-escuro); padding: 0; margin-bottom: 18px; }

.campo { display: flex; flex-direction: column; gap: 8px; }
.campo > span, .campo__rotulo { font-size: 15px; font-weight: 700; color: var(--tinta); }
.campo em { font-style: normal; font-weight: 500; color: var(--discreto); font-size: 13px; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 54px; padding: 0 14px;
  border: 1.5px solid var(--borda-campo); border-radius: 12px;
  background: var(--creme); font: 400 16px var(--corpo); color: var(--tinta);
  transition: border-color .15s, background .15s;
}
.campo textarea { padding: 14px; resize: vertical; min-height: 180px; line-height: 1.5; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--vinho); background: #fff; }
.campo .invalido { border-color: var(--erro); }
.contador { align-self: flex-end; color: var(--discreto); font-size: 12px; }

.opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.opcoes label { cursor: pointer; }
.opcoes input { position: absolute; opacity: 0; pointer-events: none; }
.opcoes span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--borda-campo); background: var(--creme); font-weight: 600; font-size: 15px; color: var(--tinta);
  transition: background .15s, border-color .15s, color .15s;
}
.opcoes input:checked + span { background: var(--vinho); border-color: var(--vinho); color: #fff; }
.opcoes input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }
.opcoes.invalido span { border-color: var(--erro); }

.aviso-leve { margin: 0; font-size: 14px; color: var(--apagado); background: var(--areia); border-radius: 12px; padding: 12px 14px; }

.resumo { background: var(--areia); border-radius: 14px; padding: 16px 18px; font-size: 15px; }
.resumo:empty { display: none; }
.resumo dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.resumo dt { color: var(--apagado); }
.resumo dd { margin: 0; font-weight: 600; }

.aceite { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.aceite input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--vinho); flex: none; }

.erro { margin: 18px 0 0; color: var(--erro); font-weight: 600; background: #FDECEA; border-radius: 12px; padding: 12px 14px; font-size: 15px; }

.navegacao { display: flex; gap: 12px; margin-top: 24px; }
.navegacao .botao { flex: 1; }
.navegacao #voltar { flex: 0 0 auto; }

/* -- perguntas ------------------------------------------------------------ */
details { border-bottom: 1px solid var(--linha); padding: 18px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--terracota); font-size: 24px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--texto); margin: 12px 0 0; font-size: 16px; }

/* -- rodapé --------------------------------------------------------------- */
.rodape { padding: 36px 0; background: var(--vinho-escuro); color: var(--areia); }
.rodape__marca { display: flex; align-items: center; gap: 8px; color: var(--creme); }
.rodape__marca span { font: 700 17px var(--titulo); }
.rodape__lema { display: block; margin-top: 10px; font-family: var(--mao); font-size: 22px; color: var(--pessego); }
.rodape nav { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 8px; }
.rodape nav a { min-height: 44px; display: flex; align-items: center; color: var(--creme); font-size: 15px; }
.rodape__copia { font-size: 13px; color: #D9B9B0; }

/* -- botão flutuante do WhatsApp -------------------------------------------- */
.zap-flutuante {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .35);
  transition: transform .15s;
}
.zap-flutuante:hover { color: #fff; transform: scale(1.06); }
/* Espaço no fim da página para o botão não cobrir o rodapé. */
.rodape { padding-bottom: 88px; }

/* -- páginas de texto (termos, privacidade, obrigado) --------------------- */
.texto-legal { padding: 48px 0 72px; }
.texto-legal h1 { font-size: 36px; margin-bottom: 16px; }
.texto-legal h2 { font-size: 22px; margin-top: 1.6em; margin-bottom: .4em; }
.texto-legal p, .texto-legal li { color: var(--tinta); }
.rascunho { background: #FFF3CD; border-radius: 10px; padding: 12px 16px; font-size: 15px; }

/* -- animações (do design A2) --------------------------------------------- */
@keyframes rc-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes rc-write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rc-draw { to { stroke-dashoffset: 0; } }
@keyframes rc-card-in { from { opacity: 0; transform: translateY(70px) rotate(6deg); } to { opacity: 1; transform: translateY(0) rotate(-1.5deg); } }
@keyframes rc-float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-8px) rotate(-.6deg); } }
@keyframes rc-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes rc-ring { from { transform: scale(1); opacity: .6; } to { transform: scale(2); opacity: 0; } }
@keyframes rc-note { 0% { opacity: 0; transform: translate(0, 0) rotate(-8deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -130px) rotate(16deg); } }
@keyframes rc-lyric { 0% { clip-path: inset(0 100% 0 0); opacity: 1; } 40% { clip-path: inset(0 0 0 0); opacity: 1; } 90% { clip-path: inset(0 0 0 0); opacity: 1; } 97% { clip-path: inset(0 0 0 0); opacity: 0; } 100% { clip-path: inset(0 100% 0 0); opacity: 0; } }
@keyframes rc-blob { 0%, 100% { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; transform: rotate(0deg) scale(1); } 50% { border-radius: 58% 42% 45% 55% / 55% 58% 42% 45%; transform: rotate(10deg) scale(1.05); } }
@keyframes rc-pulse { 0% { box-shadow: 0 6px 0 #4E1424, 0 0 0 0 rgba(238, 108, 77, .55); } 70% { box-shadow: 0 6px 0 #4E1424, 0 0 0 14px rgba(238, 108, 77, 0); } 100% { box-shadow: 0 6px 0 #4E1424, 0 0 0 0 rgba(238, 108, 77, 0); } }
@keyframes rc-tape { from { opacity: 0; transform: translateY(-10px) rotate(-6deg); } to { opacity: 1; transform: rotate(2deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; clip-path: none !important; }
  .cartao__nota { display: none; }
  .destaque path { stroke-dashoffset: 0; }
}

/* celulares estreitos: nome e botão do topo numa linha só */
@media (max-width: 400px) {
  .marca span { font-size: 17px; }
  .marca svg { width: 24px; height: 24px; }
  .botao--topo { padding: 0 12px; font-size: 13px; }
}

/* -- telas maiores: o mesmo design, respirando ------------------------------ */
@media (min-width: 860px) {
  .abertura { padding: 72px 0 88px; }
  .abertura__grade { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .secao { padding: 80px 0; }
  .exemplos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .passos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .passos li { flex-direction: column; }
  .rodape__linha { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
}
