/* ============================
   VARIABLES & RESET
============================ */
:root {
  --burgundy:    #440403;
  --burgundy2:   #5d0f0d;
  --gold:        #d4a84b;
  --gold-light:  #d9c48a;
  --cream:       #f4f0e8;
  --cream-dark:  #e8e2d4;
  --text-dark:   #1a0a09;
  --text-mid:    #5a3a38;
  --white:       #ffffff;
  --shadow:      0 8px 40px rgba(68,4,3,0.12);
  --radius:      16px;
  --transition:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================
   SCREENS
============================ */
.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  animation: fadeIn 0.4s ease forwards;
}
.screen.active { display: flex; }

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

/* ============================
   TYPOGRAPHY
============================ */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
p  { font-size: 1rem; line-height: 1.7; color: var(--text-mid); }
em { font-style: italic; color: var(--gold); }

/* ============================
   BADGE
============================ */
.badge {
  display: inline-block;
  background: var(--gold);
  color: var(--burgundy);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

/* ============================
   BUTTONS
============================ */
.btn-primary {
  display: inline-block;
  background: var(--burgundy);
  color: var(--cream);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 40px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(68,4,3,0.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--burgundy2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(68,4,3,0.35);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-back {
  background: transparent;
  color: var(--text-mid);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 20px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-back:hover { border-color: var(--burgundy); color: var(--burgundy); }

/* ============================
   WELCOME SCREEN
============================ */
.welcome-inner {
  max-width: 620px;
  text-align: center;
}
.welcome-inner h1 { margin-bottom: 20px; color: var(--text-dark); }
.welcome-inner .subtitle {
  font-size: 1.15rem;
  margin-bottom: 32px;
  color: var(--text-mid);
}
.promise-list {
  list-style: none;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.promise-list li {
  font-size: 0.95rem;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.promise-list li::before {
  content: "✓";
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
}

/* ============================
   QUIZ SCREEN
============================ */
.quiz-container {
  max-width: 680px;
  width: 100%;
}

.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--cream-dark);
  border-radius: 100px;
  margin-bottom: 12px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--burgundy), var(--gold));
  border-radius: 100px;
  transition: width 0.5s ease;
  width: 6.25%;
}
.progress-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 40px;
  letter-spacing: 0.05em;
}

.question-wrap {
  min-height: 320px;
}
.bloco-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.question-text {
  margin-bottom: 32px;
  color: var(--text-dark);
}

.options-grid {
  display: grid;
  gap: 12px;
}
.option-card {
  background: var(--white);
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 18px 24px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  text-align: left;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(68,4,3,0.04);
}
.option-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(68,4,3,0.1);
}
.option-card.selected {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: var(--cream);
  box-shadow: 0 4px 20px rgba(68,4,3,0.25);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--cream-dark);
}

/* ============================
   EMAIL SCREEN
============================ */
.email-container {
  max-width: 520px;
  width: 100%;
  text-align: center;
  background: var(--white);
  border-radius: 24px;
  padding: 56px 48px;
  box-shadow: var(--shadow);
}
.email-icon { font-size: 3rem; margin-bottom: 20px; }
.email-container h2 { margin-bottom: 12px; }
.email-container p { margin-bottom: 32px; }

#email-form { display: flex; flex-direction: column; gap: 14px; }
.form-group input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--cream);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus { border-color: var(--burgundy); }
.form-group input::placeholder { color: #b0a090; }

.form-error {
  color: #c0392b;
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 20px;
}

.privacy-note {
  font-size: 0.8rem;
  color: #b0a090;
  margin-top: 16px;
}

/* ============================
   LOADING SCREEN
============================ */
.loading-container {
  text-align: center;
  max-width: 400px;
}
.loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--cream-dark);
  border-top-color: var(--burgundy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 32px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-container h2 { margin-bottom: 12px; }

/* ============================
   RESULTS SCREEN
============================ */
.results-container {
  max-width: 780px;
  width: 100%;
}

.results-header {
  text-align: center;
  margin-bottom: 48px;
}
.results-header h2 {
  margin-bottom: 24px;
  color: var(--text-dark);
}

.score-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--burgundy);
  color: var(--cream);
  border-radius: 20px;
  padding: 24px 48px;
  box-shadow: var(--shadow);
}
.score-number {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.score-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-top: 8px;
}

.totais-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.total-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(68,4,3,0.06);
  border: 2px solid transparent;
}
.total-card.destaque {
  border-color: var(--gold);
  background: var(--burgundy);
}
.total-card.destaque .total-value { color: var(--gold); }
.total-card.destaque .total-label { color: var(--gold-light); }
.total-icon { font-size: 1.8rem; margin-bottom: 10px; }
.total-value {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--burgundy);
  margin-bottom: 6px;
}
.total-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.areas-section { margin-bottom: 48px; }
.areas-section h3 { margin-bottom: 20px; text-align: center; }
.areas-grid { display: grid; gap: 12px; }
.area-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(68,4,3,0.05);
  border-left: 4px solid var(--gold);
}
.area-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.area-detail {
  font-size: 0.82rem;
  color: var(--text-mid);
}
.area-numbers { text-align: right; }
.area-euros {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--burgundy);
}
.area-horas {
  font-size: 0.8rem;
  color: var(--text-mid);
  margin-top: 2px;
}

.report-cta {
  background: var(--white);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--cream-dark);
}
.report-icon { font-size: 2.5rem; margin-bottom: 16px; }
.report-cta h3 { margin-bottom: 10px; }
.report-cta p { margin-bottom: 16px; }
.divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 100px;
  margin: 32px auto;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 640px) {
  body { align-items: flex-start; }

  .screen { padding: 24px 16px; min-height: 100dvh; }

  /* Welcome */
  .welcome-inner { text-align: left; }
  .promise-list li { justify-content: flex-start; }
  .welcome-inner .btn-primary { width: 100%; text-align: center; }

  /* Quiz */
  .quiz-container { padding-bottom: 24px; }
  .progress-label { margin-bottom: 24px; }
  .question-text { font-size: 1.2rem; margin-bottom: 20px; }
  .option-card { padding: 16px 18px; font-size: 0.9rem; }
  .quiz-nav { flex-direction: column-reverse; gap: 10px; margin-top: 24px; }
  .btn-primary, .btn-back { width: 100%; text-align: center; }

  /* Email */
  .email-container { padding: 32px 20px; border-radius: 20px; }

  /* Results */
  .results-container { padding-bottom: 32px; }
  .score-block { padding: 20px 32px; }
  .score-number { font-size: 2.8rem; }
  .totais-block { grid-template-columns: 1fr; gap: 12px; }
  .total-card { padding: 20px 16px; }
  .total-card.destaque { order: -1; }
  .area-card { grid-template-columns: 1fr; gap: 8px; }
  .area-numbers { text-align: left; }
  .report-cta { padding: 28px 20px; }
  .report-cta .btn-primary { width: 100%; text-align: center; }
}
