/* ===========================================================
   BancoScan AI — Página pública de captura
   Mobile-first | Azul-escuro + Verde-esmeralda
   =========================================================== */

:root {
  /* Brand */
  --c-bg-1: #07142B;
  --c-bg-2: #0B1E3F;
  --c-bg-3: #122A57;
  --c-emerald: #10B981;
  --c-emerald-2: #34D399;
  --c-emerald-deep: #047857;

  /* Surfaces */
  --c-card: #FFFFFF;
  --c-card-soft: #F8FAFC;
  --c-border: #E2E8F0;
  --c-border-strong: #CBD5E1;

  /* Text */
  --c-text: #0F172A;
  --c-text-muted: #475569;
  --c-text-on-dark: #E2E8F0;
  --c-text-on-dark-muted: #94A3B8;

  /* Feedback */
  --c-error: #DC2626;
  --c-error-soft: #FEE2E2;

  /* Geometry */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --shadow-card: 0 6px 24px rgba(2, 8, 23, 0.10);
  --shadow-btn:  0 4px 12px rgba(16, 185, 129, 0.25);

  --tap: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--c-text);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--c-bg-3) 0%, var(--c-bg-2) 40%, var(--c-bg-1) 100%);
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  /* sutil grade de pontos no fundo escuro */
  content: "";
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 18px 40px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}

/* ---------------- Header ---------------- */
.hero { color: var(--c-text-on-dark); margin-bottom: 18px; }

.brand-text {
  display: inline-flex; align-items: baseline;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.8rem; letter-spacing: -0.5px;
  user-select: none; margin-bottom: 16px;
}
.brand-banco { color: #8CC63F; font-weight: 800; }
.brand-scan  { color: #ffffff; font-weight: 300; }

.hero-title {
  font-size: 22px; line-height: 1.25; margin: 4px 0 8px;
  font-weight: 700;
}
.hero-sub {
  margin: 0; font-size: 14px; line-height: 1.55;
  color: var(--c-text-on-dark-muted);
}

.trust-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.trust-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--c-emerald-2);
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.trust-pill svg { color: var(--c-emerald-2); }

/* ---------------- Cards ---------------- */
.card {
  background: var(--c-card);
  border-radius: var(--r-xl);
  padding: 22px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.card-title {
  margin: 0 0 14px; font-size: 17px; font-weight: 700;
}

/* ---------------- Form fields ---------------- */
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--c-text); margin-bottom: 6px;
}

input[type="text"],
input[type="tel"],
select {
  width: 100%;
  height: var(--tap);
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-card-soft);
  font-size: 16px;        /* evita zoom no iOS */
  color: var(--c-text);
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}

input:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--c-emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

input::placeholder { color: #94A3B8; }

.select-wrap { position: relative; }
.select-caret {
  position: absolute; right: 14px; top: 50%;
  width: 16px; height: 16px; transform: translateY(-50%);
  pointer-events: none; color: var(--c-text-muted);
}
select { padding-right: 38px; }

.field-error {
  display: block;
  font-size: 12px; color: var(--c-error);
  margin-top: 6px; min-height: 0;
}
.field.invalid input,
.field.invalid select { border-color: var(--c-error); background: var(--c-error-soft); }

/* ---------------- Dropzone ---------------- */
.dropzone {
  border: 2px dashed var(--c-border-strong);
  border-radius: var(--r-lg);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--c-card-soft);
  transition: border-color .15s, background .15s, transform .05s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dropzone:focus-visible {
  outline: none;
  border-color: var(--c-emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}
.dropzone.is-drag {
  border-color: var(--c-emerald);
  background: rgba(16, 185, 129, 0.08);
}
.dropzone:active { transform: scale(0.997); }

.dz-icon {
  width: 36px; height: 36px;
  color: var(--c-emerald);
  display: block; margin: 0 auto 6px;
}
.dz-title {
  margin: 0; font-weight: 700; font-size: 15px; color: var(--c-text);
}
.dz-sub {
  margin: 2px 0 0; font-size: 13px; color: var(--c-text-muted);
}
.dz-hint {
  font-size: 12px; color: #78716c; margin: 8px 0 0;
  font-weight: 500; text-align: center; line-height: 1.4;
}

.file-pill {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.30);
  color: var(--c-emerald-deep);
  font-size: 13px;
}
.file-pill .file-name {
  font-weight: 600; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-pill .file-size { color: var(--c-text-muted); font-weight: 500; }
.file-pill .file-remove {
  width: 26px; height: 26px; line-height: 24px;
  border-radius: 50%; border: none;
  background: rgba(220, 38, 38, 0.10);
  color: var(--c-error);
  font-size: 18px; font-weight: 700; cursor: pointer;
  display: grid; place-items: center;
}

/* ---------------- Consentimento ---------------- */
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; line-height: 1.5;
  padding: 12px; border-radius: var(--r-md);
  background: var(--c-card-soft);
  border: 1px solid var(--c-border);
  margin-top: 6px; color: var(--c-text);
}
.consent input[type="checkbox"] {
  flex-shrink: 0; margin-top: 2px;
  width: 20px; height: 20px;
  accent-color: var(--c-emerald);
  cursor: pointer;
}

/* ---------------- Botão primário ---------------- */
.btn-primary {
  margin-top: 18px;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c-emerald), var(--c-emerald-deep));
  color: #fff;
  font-size: 16px; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: var(--shadow-btn);
  transition: transform .05s, box-shadow .15s, opacity .15s;
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary.is-loading:disabled { opacity: 0.7; cursor: progress; pointer-events: none; }

.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-primary.is-loading .btn-spinner { display: inline-block; }
.btn-primary.is-loading .btn-label::after { content: "…"; }

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

.legal {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: var(--c-text-muted);
  text-align: center;
}

/* ---------------- Sucesso ---------------- */
.success { text-align: center; padding: 28px 20px; }
.success-icon {
  margin: 0 auto 14px;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(16, 185, 129, 0.12);
  color: var(--c-emerald);
}
.success-icon svg { width: 32px; height: 32px; }
.success h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.success p  { margin: 0; color: var(--c-text-muted); line-height: 1.55; font-size: 14px; }

/* ---------------- Inelegível ---------------- */
.ineligible { text-align: center; padding: 28px 20px; }
.ineligible-icon {
  margin: 0 auto 14px;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(234, 179, 8, 0.14);
  color: #B45309;
}
.ineligible-icon svg { width: 32px; height: 32px; }
.ineligible h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.ineligible p  { margin: 0 0 16px; color: var(--c-text-muted); line-height: 1.55; font-size: 14px; }

.btn-secondary {
  display: inline-block;
  height: 44px; padding: 0 20px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-border-strong);
  background: #fff;
  color: var(--c-text);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-secondary:hover { border-color: var(--c-emerald); background: var(--c-card-soft); }

/* ---------------- Footer ---------------- */
.footer {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--c-text-on-dark-muted);
}
.footer .dot { margin: 0 6px; opacity: 0.6; }

/* ---------------- Breakpoints ---------------- */
@media (min-width: 480px) {
  .hero-title { font-size: 26px; }
  .card { padding: 26px 24px; }
}

/* ===========================================================
   Seção de Vídeo de Vendas
   =========================================================== */
.video-section {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 32px;
  text-align: center;
}
.video-heading {
  color: var(--c-text-on-dark);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  background: #000;
}
.video-wrap iframe,
.video-wrap video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}
.video-cta {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  min-height: 48px;
  line-height: 1;
}

@media (min-width: 720px) {
  .shell { padding: 40px 24px 56px; }
  .hero-title { font-size: 30px; }
  .card { padding: 30px 28px; }
  .video-heading { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
