/* ============================================================
   CALCULADORA DE RESCISÃO — Brand Amanda Zawadzki (vinho/dourado)
   ============================================================ */
:root {
  --preto-vinho: #0D0712;
  --vinho-soft: #1F1428;
  --vinho: #B91E5E;
  --pink: #FF3C7E;
  --gold: #D4A574;
  --gold-light: #E6BB85;
  --branco-quente: #F5EBEA;
  --branco-mute: #C9B8B0;
  --success: #5FA88E;
  --erro: #E04848;
  --bg-soft: rgba(245,235,234,0.04);
  --border: rgba(212,165,116,0.25);

  --font-display: 'Anek Latin', 'Inter', system-ui, sans-serif;
  --font-text:    'Inter', system-ui, sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;

  --radius: 14px;
  --tap: 52px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-text);
  font-size: 16px;
  background:
    radial-gradient(120% 60% at 90% 0%, rgba(212,165,116,0.10), transparent 60%),
    radial-gradient(80% 50% at -10% 100%, rgba(185,30,94,0.12), transparent 60%),
    var(--preto-vinho);
  color: var(--branco-quente);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

/* ============= TOP BAR ============= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center;
  padding: 14px 20px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(13,7,18,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vinho), var(--pink));
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 700;
}
.logo-text strong { display:block; font-size: .95rem; line-height:1.1; }
.logo-text small  { display:block; font-size: .68rem; color: var(--branco-mute); margin-top:2px; }

/* ============= HERO ============= */
main { max-width: 540px; margin: 0 auto; padding: 24px 18px 60px; }
.hero { text-align: center; margin-bottom: 28px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  margin: 12px 0 8px;
  letter-spacing: -0.01em;
}
.hero .lead {
  color: var(--branco-mute);
  font-size: .95rem;
  margin: 0;
}

/* ============= PROGRESS ============= */
.progress { margin: 0 0 28px; }
.progress .bar {
  height: 4px;
  background: var(--vinho-soft);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress .bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--vinho), var(--pink));
  transition: width .35s ease;
}
.progress .steps {
  display: flex; justify-content: space-between;
}
.progress .step {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--vinho-soft);
  color: var(--branco-mute);
  display: grid; place-items: center;
  font-weight: 700; font-size: .8rem;
  transition: all .2s;
}
.progress .step.active {
  background: linear-gradient(135deg, var(--vinho), var(--pink));
  color: white;
  box-shadow: 0 4px 12px rgba(255,60,126,0.4);
}
.progress .step.done {
  background: var(--gold);
  color: var(--preto-vinho);
}

/* ============= WIZARD ============= */
.step-panel {
  border: none; padding: 0; margin: 0;
  display: none;
}
.step-panel.active {
  display: block;
  animation: slideIn .3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

legend {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 22px;
  padding: 0;
  display: block;
  color: var(--branco-quente);
  line-height: 1.25;
}

/* ============= INPUTS ============= */
label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin: 22px 0 8px;
  color: var(--gold-light);
}

input[type=text], input[type=tel], input[type=email],
input[type=date], input[type=number] {
  width: 100%;
  min-height: var(--tap);
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-text);
  background: var(--bg-soft);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--branco-quente);
  transition: all .2s;
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;  /* faz o date picker ficar legível */
}
input::placeholder { color: rgba(245,235,234,0.35); }
input:focus {
  outline: none;
  border-color: var(--pink);
  background: rgba(245,235,234,0.07);
  box-shadow: 0 0 0 4px rgba(255,60,126,0.15);
}

.input-prefix {
  position: relative;
}
.input-prefix span {
  position: absolute;
  left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--gold);
  font-weight: 700;
  pointer-events: none;
}
.input-prefix input { padding-left: 44px; }

.hint {
  display: block;
  font-size: .78rem;
  color: var(--branco-mute);
  margin-top: 6px;
  line-height: 1.4;
}

.erro {
  display: block;
  font-size: .82rem;
  color: var(--erro);
  margin-top: 6px;
  min-height: 1em;
}
.erro:empty { min-height: 0; }

/* ============= RADIO CARDS ============= */
.radio-card {
  display: flex; align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  margin: 10px 0;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  min-height: var(--tap);
}
.radio-card input { margin: 0; transform: scale(1.4); accent-color: var(--pink); }
.radio-card div { flex: 1; }
.radio-card strong {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 3px;
  color: var(--branco-quente);
}
.radio-card small {
  display: block;
  font-size: .82rem;
  color: var(--branco-mute);
  line-height: 1.35;
}
.radio-card:has(input:checked) {
  border-color: var(--pink);
  background: linear-gradient(135deg, rgba(185,30,94,0.12), rgba(255,60,126,0.06));
  box-shadow: 0 4px 16px rgba(255,60,126,0.15);
}
.radio-card:has(input:checked) strong { color: var(--gold-light); }

/* ============= BOTÕES ============= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  padding: 14px 22px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--branco-quente);
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 0.01em;
}
.btn:hover { background: rgba(245,235,234,0.07); }
.btn:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--vinho), var(--pink));
  border-color: var(--pink);
  color: white;
  box-shadow: 0 6px 22px rgba(255,60,126,0.25);
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 28px rgba(255,60,126,0.35);
}
.btn-block { width: 100%; margin-top: 24px; }
.btn-lg { font-size: 1.08rem; padding: 18px; }

.botoes { display: flex; gap: 12px; margin-top: 26px; }
.botoes .btn { flex: 1; }

.btn-link {
  display: block;
  background: none;
  border: none;
  color: var(--branco-mute);
  font-size: .9rem;
  text-decoration: underline;
  cursor: pointer;
  margin: 24px auto 0;
  padding: 12px;
}
.btn-link:hover { color: var(--gold); }

/* ============= RESULTADO ============= */
#resultado-box {
  background: linear-gradient(135deg, rgba(212,165,116,0.06), rgba(245,235,234,0.02));
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(212,165,116,0.08);
}
.r-modalidade {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 4px;
}
.r-titulo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  margin: 0 0 16px;
  color: var(--branco-quente);
}
.r-verbas {
  width: 100%; border-collapse: collapse; margin-bottom: 16px;
}
.r-verbas tr {
  border-bottom: 1px solid rgba(212,165,116,0.15);
}
.r-verbas td {
  padding: 12px 0;
  font-size: .92rem;
}
.r-verbas td:first-child { color: var(--branco-mute); padding-right: 12px; }
.r-verbas td:last-child  {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--branco-quente);
  white-space: nowrap;
}
.r-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px; padding-top: 18px;
  border-top: 2px solid var(--gold);
}
.r-total .label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.r-total .valor {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.r-extras {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  font-size: .85rem;
}
.r-extras .item {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  color: var(--branco-mute);
}
.r-extras .item strong { color: var(--gold-light); }
.r-aviso {
  background: rgba(255,235,180,0.08);
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  margin: 14px 0;
  font-size: .85rem;
  border-radius: 6px;
  color: var(--branco-quente);
}

.r-comparativo {
  background: linear-gradient(135deg, rgba(185,30,94,0.15), rgba(255,60,126,0.08));
  border: 2px solid var(--pink);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 22px;
}
.r-comparativo h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  color: var(--pink);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.r-comparativo .diff {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--gold-light);
  margin: 8px 0;
}

.cta-receber {
  background: linear-gradient(135deg, var(--vinho-soft), rgba(185,30,94,0.08));
  border: 2px solid var(--vinho);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
}
.cta-receber h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--gold-light);
}
.cta-receber p {
  font-size: .9rem;
  color: var(--branco-mute);
  margin: 0;
}

/* ============= DISCLAIMER ============= */
.disclaimer {
  margin-top: 40px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
}
.disclaimer summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--gold-light);
  list-style: none;
  display: flex; justify-content: space-between;
  align-items: center;
}
.disclaimer summary::after { content: '▾'; transition: transform .2s; }
.disclaimer[open] summary::after { transform: rotate(180deg); }
.disclaimer p {
  margin-top: 12px;
  color: var(--branco-mute);
  line-height: 1.55;
}
.disclaimer strong { color: var(--branco-quente); }

/* ============= FOOTER ============= */
footer {
  text-align: center;
  padding: 30px 20px 40px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
footer .contatos strong {
  font-family: var(--font-display);
  display: block;
  margin-bottom: 8px;
  color: var(--gold-light);
}
footer .contatos p {
  font-size: .82rem;
  color: var(--branco-mute);
  margin: 4px 0;
  line-height: 1.5;
}
footer .copyright {
  font-size: .72rem;
  color: var(--branco-mute);
  opacity: 0.7;
  margin-top: 18px;
}

/* ============= LOADER ============= */
.loader {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============= RESPONSIVO ============= */
@media (min-width: 720px) {
  main { padding: 40px 20px 80px; }
  legend { font-size: 1.6rem; }
}
