/* ==========================================================================
   AUTISTANDO JUNTOS — folha de estilos
   Paleta e tipografia pensadas para leitura calma e previsível:
   sem flashes, sem animações bruscas, contraste confortável.
   ========================================================================== */

:root {
  /* Cores da marca */
  --teal: #2E5E6E;
  --teal-dark: #1E3339;
  --green: #7CC77E;
  --green-dark: #4F9C55;

  /* Neutros de apoio (derivados da marca, para leitura confortável) */
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --border: #DCE6E4;
  --text-heading: #1E3339;
  --text-body: #3F5A60;
  --text-muted: #6B8288;

  /* Tipografia */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Escala e forma */
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 12px 32px rgba(30, 51, 57, 0.10);
  --max-width: 640px;

  --transition-fast: 180ms ease;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--teal);
  text-decoration-color: rgba(46, 94, 110, 0.35);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }

/* Foco visível sempre — importante para navegação por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ============================== LAYOUT ============================== */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================== CABEÇALHO ============================== */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.topbar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--teal-dark);
}

/* ============================== STEPPER ============================== */

.stepper ol {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.step-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.step-line {
  flex: 1 1 auto;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  margin-bottom: 20px;
  transition: background var(--transition-fast);
}

.step[aria-current="step"] .step-dot {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.step[aria-current="step"] .step-label { color: var(--teal-dark); }

.step.is-complete .step-dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.step-line.is-complete { background: var(--green); }

/* ============================== CARTÃO PRINCIPAL ============================== */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 22px;
  flex: 1 1 auto;
}

.screen {
  animation: fadeIn var(--transition-fast);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  * { transition: none !important; }
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin: 0 0 8px;
}

.title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--text-heading);
  margin: 0 0 14px;
}

.lead {
  margin: 0 0 20px;
  color: var(--text-body);
}

.event-pill {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  background: rgba(124, 199, 126, 0.16);
  color: var(--teal-dark);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 20px;
}

.prose p { margin: 0 0 16px; }
.prose-emphasis {
  font-weight: 600;
  color: var(--teal-dark);
}
.prose-highlight {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-dark);
  font-size: 1.15rem;
}

/* ============================== BOTÕES ============================== */

.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.actions-single { justify-content: flex-start; }

.btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  min-height: 48px;
}
.btn:active { transform: scale(0.98); }

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--text-heading); }

.btn-outline {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
  padding: 10px 16px;
  min-height: 44px;
  white-space: nowrap;
}
.btn-outline:hover { background: var(--teal); color: #fff; }

.btn-outline.is-copied {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.btn-whatsapp { width: 100%; }

@media (min-width: 480px) {
  .actions:not(.actions-single) { justify-content: space-between; }
  .btn-whatsapp { width: auto; }
}

/* ============================== PAGAMENTO / QR ============================== */

.qr-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.qr-card-small { margin-top: 14px; margin-bottom: 0; }

.qr-image {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: var(--radius-sm);
  background: #fff;
}

.qr-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pix-box { margin-bottom: 8px; }

.pix-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.pix-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.pix-code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--text-heading);
  line-height: 1.5;
}

.pix-beneficiary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 10px 0 0;
}

@media (min-width: 480px) {
  .pix-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ============================== FORMULÁRIO ============================== */

.form { margin-top: 4px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-heading);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: var(--teal);
  background: #fff;
}

.field input:invalid.was-validated,
.field textarea:invalid.was-validated {
  border-color: #C25450;
}

.form-hint {
  min-height: 1.2em;
  font-size: 0.88rem;
  color: #C25450;
  margin: 10px 0 0;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}

/* ============================== DETALHES / LEMBRETE PIX ============================== */

.pix-reminder {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: var(--bg);
}
.pix-reminder summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--teal);
  font-size: 0.92rem;
}
.pix-reminder[open] summary { margin-bottom: 12px; }

/* ============================== BANNER DE CONFIRMAÇÃO ============================== */

.guarantee-banner {
  margin-top: 22px;
  background: rgba(124, 199, 126, 0.16);
  border: 1.5px solid var(--green);
  color: var(--teal-dark);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ============================== RODAPÉ ============================== */

.site-footer {
  text-align: center;
  padding-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer p { margin: 0 0 8px; }

.footer-datetime {
  font-weight: 700;
  color: var(--teal-dark);
}

.footer-line a { color: var(--teal); font-weight: 600; }

.footer-credit {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.85;
}

/* ============================== TELAS MAIORES ============================== */

@media (min-width: 720px) {
  body {
    background:
      radial-gradient(600px circle at 8% 15%, rgba(46, 94, 110, 0.07), transparent 60%),
      radial-gradient(600px circle at 95% 85%, rgba(124, 199, 126, 0.10), transparent 60%),
      var(--bg);
  }
  .page { padding-top: 40px; padding-bottom: 60px; }
  .card { padding: 40px 48px; }
  .title { font-size: 1.9rem; }
  .logo-badge { width: 64px; height: 64px; }
  .topbar-title { font-size: 1.4rem; }
}
