/* ============ RESET & VARIÁVEIS ============ */
:root {
  --primary: #0a1e3c;
  --primary-light: #1e3a6f;
  --accent: #c9a961;
  --accent-dark: #a88845;
  --success: #10b981;
  --error: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(10, 30, 60, 0.1);
  --radius: 10px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ HEADER ============ */
.form-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.form-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo__img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: 'Playfair Display', serif;
}

.logo__text strong {
  font-size: 1.2rem;
  color: var(--primary);
}

.logo__text small {
  font-size: 0.7rem;
  color: var(--accent-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.btn-back {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.btn-back:hover {
  color: var(--accent-dark);
}

/* ============ HERO ============ */
.form-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 60px 0 40px;
  text-align: center;
}

.form-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.form-hero p {
  opacity: 0.9;
  font-size: 1.1rem;
}

/* ============ PROGRESS ============ */
.form-main {
  padding: 40px 0 80px;
}

.progress {
  background: #fff;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.progress__bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  width: 20%;
  transition: width 0.4s ease;
  border-radius: 999px;
}

.progress__steps {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: default;
}

.step__number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: grid;
  place-items: center;
  font-weight: 600;
  transition: var(--transition);
  font-size: 0.95rem;
}

.step__label {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
}

.step.active .step__number {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(10, 30, 60, 0.1);
}

.step.active .step__label {
  color: var(--primary);
  font-weight: 600;
}

.step.completed .step__number {
  background: var(--success);
  color: #fff;
}

.step.completed .step__number::before {
  content: '✓';
}

.step.completed .step__number:not(.completed-text) {
  font-size: 0;
}

.step.completed .step__number::before {
  font-size: 1rem;
}

/* ============ FORMULÁRIO ============ */
.form {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px;
}

.form-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.form-step__subtitle {
  color: var(--gray-500);
  margin-bottom: 30px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 30, 60, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--error);
  background: #fef2f2;
}

.form-group .hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500 !important;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ============ AÇÕES ============ */
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.form-actions:has(:only-child) {
  justify-content: flex-end;
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--ghost {
  background: transparent;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
}

.btn--ghost:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
}

.btn--success {
  background: var(--success);
  color: #fff;
}

.btn--success:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ============ REVISÃO ============ */
.review-area {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.review-section {
  margin-bottom: 24px;
}

.review-section:last-child {
  margin-bottom: 0;
}

.review-section h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.review-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
  gap: 16px;
}

.review-item:last-child {
  border-bottom: none;
}

.review-item__label {
  color: var(--gray-500);
  font-weight: 500;
  font-size: 0.9rem;
}

.review-item__value {
  color: var(--gray-900);
  font-weight: 600;
  text-align: right;
  font-size: 0.95rem;
}

/* ============ SUCESSO ============ */
.form-success {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  margin: 0 auto 24px;
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.form-success h2 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  margin-bottom: 12px;
}

.form-success p {
  color: var(--gray-700);
  margin-bottom: 8px;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ============ FOOTER ============ */
.form-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 24px 0;
  text-align: center;
  font-size: 0.9rem;
}

/* ============ RESPONSIVO ============ */
@media (max-width: 768px) {
  .form-hero h1 { font-size: 1.8rem; }
  .form { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .progress { padding: 20px 16px; }
  .step__label { font-size: 0.7rem; }
  .step__number { width: 30px; height: 30px; font-size: 0.85rem; }
  .form-step__title { font-size: 1.4rem; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .review-item { flex-direction: column; gap: 4px; }
  .review-item__value { text-align: left; }
}
/* ============ BOTÃO LINK TERMOS ============ */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: #c9a961;
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.btn-link:hover {
  color: #a8863a;
}

/* ============ MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal[hidden] {
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 60, 0.75);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.modal__box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: modalEntrar 0.25s ease;
}

@keyframes modalEntrar {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header do modal */
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: #0a1e3c;
  color: #fff;
  flex-shrink: 0;
}

.modal__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.modal__logo img {
  height: 32px;
  width: auto;
}

.modal__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  opacity: 0.8;
}
.modal__close:hover {
  background: rgba(255,255,255,0.15);
  opacity: 1;
}

/* Body do modal */
.modal__body {
  padding: 28px 28px 8px;
  overflow-y: auto;
  flex: 1;
  scroll-behavior: smooth;
}

.modal__body h2 {
  color: #0a1e3c;
  font-size: 1.3rem;
  margin: 0 0 4px;
}

.modal__date {
  color: #888;
  font-size: 0.82rem;
  margin-bottom: 24px;
}

.modal__body h3 {
  color: #0a1e3c;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 24px 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid #c9a961;
}

.modal__body p,
.modal__body li {
  color: #444;
  font-size: 0.9rem;
  line-height: 1.7;
}

.modal__body ul {
  padding-left: 20px;
  margin: 8px 0;
}
.modal__body ul li {
  margin-bottom: 4px;
}

/* Footer do modal */
.modal__footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

/* Indicador de scroll */
.modal__body::-webkit-scrollbar {
  width: 6px;
}
.modal__body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.modal__body::-webkit-scrollbar-thumb {
  background: #c9a961;
  border-radius: 10px;
}

/* Mobile */
@media (max-width: 600px) {
  .modal__box {
    max-height: 95vh;
    border-radius: 12px;
  }
  .modal__body {
    padding: 20px 18px 8px;
  }
  .modal__footer {
    flex-direction: column-reverse;
  }
  .modal__footer .btn {
    width: 100%;
    text-align: center;
  }
}
// ============ MODAL TERMOS DE USO ============
const modalTermos   = document.getElementById('modalTermos');
const btnAbrirTermos = document.getElementById('btnAbrirTermos');
const modalFechar   = document.getElementById('modalFechar');
const modalOverlay  = document.getElementById('modalOverlay');
const modalRecusar  = document.getElementById('modalRecusar');
const modalAceitar  = document.getElementById('modalAceitar');
const checkTermos   = document.getElementById('aceitoTermos');

// Abre o modal
btnAbrirTermos.addEventListener('click', () => {
  modalTermos.hidden = false;
  document.body.style.overflow = 'hidden'; // trava scroll da página
  modalTermos.querySelector('.modal__body').scrollTop = 0;
});

// Fecha o modal (botões e overlay)
function fecharModal() {
  modalTermos.hidden = true;
  document.body.style.overflow = '';
}

modalFechar.addEventListener('click', fecharModal);
modalOverlay.addEventListener('click', fecharModal);
modalRecusar.addEventListener('click', fecharModal);

// Aceitar — marca o checkbox automaticamente e fecha
modalAceitar.addEventListener('click', () => {
  checkTermos.checked = true;
  fecharModal();
});

// Fecha com ESC
document.addEventListener('keydown', e => {
  if (e.key === 'Escape' && !modalTermos.hidden) fecharModal();
});
/* ============ LOGO COM T (padrão index) ============ */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #c9a961, #a8863a);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.35);
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo__text strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;        /* branco pois está no header escuro */
  letter-spacing: 0.5px;
}

.logo__text small {
  font-size: 0.7rem;
  font-weight: 500;
  color: #c9a961;
  letter-spacing: 2px;
  text-transform: uppercase;
}

