:root {
  --bg: #070b10;
  --surface: #0d131b;
  --surface-elevated: #121a24;
  --gold: #b89455;
  --gold-highlight: #d2b06e;
  --text: #f5f3ee;
  --muted: #a8a5a0;
  --border: rgba(184, 148, 85, 0.24);
  --whatsapp: #25d366;
  --error: #d97b6c;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

.icon svg {
  width: 100%;
  height: 100%;
}

.whatsapp-word {
  color: var(--whatsapp);
  font-weight: 600;
}

/* ===== Cabeçalho (marca) ===== */
.site-header {
  padding: 22px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  height: 34px;
  width: auto;
}

/* ===== Herói ===== */
.hero {
  display: flex;
  flex-direction: column;
}

.hero-photo {
  position: relative;
  height: 360px;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(0.1) contrast(1.05);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
  pointer-events: none;
}

.hero-content {
  padding: 36px 20px 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  margin: 0 0 14px;
}

.eyebrow-center {
  text-align: center;
}

.hero-text h1 {
  font-size: 1.7rem;
  line-height: 1.28;
  margin: 0 0 16px;
}

.hero-text .highlight {
  color: var(--gold-highlight);
}

.hero-subtitle {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 16px;
}

.authority-line {
  font-size: 0.85rem;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin: 0;
}

/* ===== Cartão do formulário ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  width: 100%;
}

.step-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.step-progress-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.step-progress-track {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-progress-track .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 243, 238, 0.18);
}

.step-progress-track .dot.active {
  background: var(--gold);
}

.step-progress-track .line {
  width: 16px;
  height: 1px;
  background: rgba(245, 243, 238, 0.14);
}

.card h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.card-subtitle {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.field {
  margin-bottom: 6px;
}

.field-icon {
  position: relative;
}

.field-icon-symbol {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.field-icon-symbol svg {
  width: 100%;
  height: 100%;
}

.field input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: rgba(245, 243, 238, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.field input::placeholder {
  color: var(--muted);
}

.field input:focus {
  border-color: var(--gold);
}

.field.has-error input {
  border-color: var(--error);
}

.error-message {
  display: block;
  min-height: 18px;
  color: var(--error);
  font-size: 0.78rem;
  margin: 2px 0 8px 4px;
}

.btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--bg);
  background: var(--gold);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, opacity 0.15s ease;
  margin-top: 8px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--gold-highlight);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.card-lock-note {
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
  margin: 12px 0 0;
}

/* ===== Etapa Perfil ===== */
.perfil-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.perfil-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(245, 243, 238, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.perfil-option:hover {
  border-color: var(--gold);
}

.perfil-option.selected {
  border-color: var(--gold);
  background: rgba(184, 148, 85, 0.08);
}

.perfil-option .check-icon {
  width: 15px;
  height: 15px;
  color: var(--gold);
  visibility: hidden;
}

.perfil-option.selected .check-icon {
  visibility: visible;
}

/* ===== Etapa Estado (busca + cards limpos) ===== */
.estado-combobox {
  position: relative;
  margin-bottom: 14px;
}

.estado-combobox input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: rgba(245, 243, 238, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.estado-combobox input::placeholder {
  color: var(--muted);
}

.estado-combobox input:focus {
  border-color: var(--gold);
}

.estado-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  z-index: 10;
}

.estado-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  background: rgba(245, 243, 238, 0.02);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  text-align: left;
  color: var(--text);
}

.estado-result-item:last-child {
  margin-bottom: 0;
}

.estado-result-item:hover,
.estado-result-item:focus {
  border-color: var(--gold);
}

.estado-result-uf {
  color: var(--muted);
  font-size: 0.78rem;
}

.estado-result-empty {
  padding: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.estado-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(184, 148, 85, 0.08);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.86rem;
}

.estado-selected .icon {
  color: var(--gold);
  flex-shrink: 0;
}

.estado-selected span:nth-child(2) {
  flex-grow: 1;
}

.link-button {
  background: none;
  border: none;
  color: var(--gold);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-cta {
  margin: 0;
}

.cta-helper {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

/* ===== Etapa Carregando ===== */
#etapa3-view {
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  gap: 16px;
}

#etapa3-view:not([hidden]) {
  display: flex;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0;
  text-align: center;
}

/* ===== Autoridade ===== */
.authority {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 20px;
  text-align: center;
}

.section-title-center {
  font-size: 1.5rem;
  line-height: 1.35;
  margin: 0 auto 18px;
  max-width: 560px;
}

.authority-intro {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ===== Pilares ===== */
.pillars {
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 20px 64px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.pillar {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.pillar-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: var(--gold);
  margin-bottom: 12px;
}

.pillar h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 8px;
}

.pillar p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.methodology-note {
  grid-column: 1 / -1;
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 18px;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}

/* ===== Como funciona ===== */
.how-it-works {
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 20px 96px;
  text-align: center;
}

.how-it-works .section-title-center {
  margin-bottom: 40px;
}

.steps-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  text-align: left;
}

.step-line-item {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.step-line-num {
  display: block;
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.step-line-item h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0 0 6px;
}

.step-line-item p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ===== Por que participar ===== */
.why-participate {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.why-participate-intro {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
  margin: 16px auto 40px;
}

.benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  text-align: left;
}

.benefit {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.benefit h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0 0 6px;
}

.benefit p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ===== CTA final ===== */
.final-cta {
  max-width: 560px;
  margin: 0 auto;
  padding: 72px 20px;
  text-align: center;
}

.final-cta h2 {
  font-size: 1.5rem;
  line-height: 1.35;
  margin: 0 0 16px;
}

.final-cta p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 28px;
}

.btn-final-cta {
  max-width: 340px;
  margin: 0 auto;
}

/* ===== Rodapé ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 40px 20px;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-logo {
  height: 40px;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0 0 20px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.footer-social a {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.footer-social a:hover {
  color: var(--gold);
}

.footer-social svg {
  width: 100%;
  height: 100%;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ===== Telas maiores ===== */
@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    min-height: 540px;
  }

  .hero-photo {
    height: auto;
    width: 42%;
    flex-shrink: 0;
  }

  .hero-photo::after {
    background:
      linear-gradient(to right, transparent 65%, var(--bg) 100%),
      linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
  }

  .hero-content {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    padding: 48px;
    flex: 1;
    max-width: 620px;
    margin: 0 auto;
  }

  .hero-text {
    max-width: 460px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .card {
    max-width: 460px;
    padding: 34px 32px;
    flex-shrink: 0;
  }

  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps-line {
    grid-template-columns: repeat(4, 1fr);
  }

  .benefits {
    grid-template-columns: repeat(3, 1fr);
  }
}
