/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --primary:   #6366f1;
  --secondary: #8b5cf6;
}

/* ── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
/* ── Demo Disclaimer Bar & Badge ───────────────────────────── */
.demo-disclaimer-bar {
  background: #fef3c7;
  color: #92400e;
  border-bottom: 2px solid #f59e0b;
  padding: 10px 16px;
  font-size: 13px;
  position: relative;
  z-index: 99;
}
.demo-disclaimer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  text-align: center;
}
.demo-disclaimer-badge {
  background: #d97706;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}
.demo-disclaimer-text {
  font-weight: 500;
}
.demo-disclaimer-link {
  font-weight: 700;
  color: #b45309;
  text-decoration: underline;
  white-space: nowrap;
}
.demo-disclaimer-link:hover {
  color: #78350f;
}

.hero-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(145deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  text-align: center;
  padding: 40px 20px 50px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: #f8fafc;
  clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-logo {
  width: clamp(110px, 22vw, 150px);
  height: clamp(110px, 22vw, 150px);
  border-radius: 24px;
  margin: 0 auto 18px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.hero-title {
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.hero-subtitle {
  font-size: clamp(14px, 3vw, 18px);
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 500;
}
.hero-description {
  font-size: 14px;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Upload section ─────────────────────────────────────────────────────────── */
.upload-section {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 20px;
}

.upload-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 18px 18px 22px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid rgba(226, 232, 240, 0.8);
  width: 100%;
}
.upload-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}
.upload-card.drag-over {
  border-color: var(--primary);
  background: #f8fafc;
  transform: scale(1.01);
}
.upload-card input[type=file] {
  display: none;
}

.btn-select-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}
.btn-select-photo:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}
.btn-select-photo .btn-icon {
  font-size: 18px;
  display: inline-flex;
}

.frame-preview-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.frame-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.frame-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-weight: 500;
  font-size: 14px;
}
.upload-hint {
  font-size: 12px; color: #94a3b8; margin-top: 12px;
}

/* ── Editor Modal ───────────────────────────────────────────────────────────── */
.editor-modal {
  display: none;
  position: fixed; inset: 0;
  background: #000;
  z-index: 1000;
  flex-direction: column;
}
.editor-modal.open { display: flex; }

.editor-header {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,0,0,0.85);
  padding: 12px 16px;
  color: #fff;
  flex-shrink: 0;
  gap: 12px;
}
.editor-header span { font-size: 15px; font-weight: 600; flex: 1; text-align: center; }
.btn-back {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 14px;
  transition: background 0.15s;
}
.btn-back:hover { background: rgba(255,255,255,0.2); }
.btn-generate {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(16,185,129,0.4);
  transition: opacity 0.15s;
}
.btn-generate:hover { opacity: 0.9; }

.editor-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #111;
  padding: 8px;
}
#editorCanvas {
  max-width: 100%;
  max-height: 100%;
  cursor: grab;
  touch-action: none;
  border-radius: 4px;
}
#editorCanvas:active { cursor: grabbing; }

.editor-controls {
  background: rgba(0,0,0,0.85);
  padding: 12px 16px;
  color: #fff;
  flex-shrink: 0;
}
.control-group {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.control-group label { font-size: 13px; min-width: 40px; }
.control-group input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  outline: none;
}
.control-group input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.control-buttons {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.control-buttons button {
  background: rgba(255,255,255,0.12);
  color: #fff; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 6px 14px; font-size: 13px;
  transition: background 0.15s;
}
.control-buttons button:hover { background: rgba(255,255,255,0.22); }

/* ── Result section ─────────────────────────────────────────────────────────── */
.result-section {
  display: none;
  text-align: center;
  padding: 32px 20px;
  max-width: 560px;
  margin: 0 auto;
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-section h2 {
  font-size: 22px; font-weight: 700;
  margin-bottom: 16px;
}
.result-preview {
  margin-bottom: 24px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}
.result-preview img {
  width: 100%;
  display: block;
}
.result-actions {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 320px; margin: 0 auto 24px;
}
.btn-download {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 16px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(16,185,129,0.35);
  transition: opacity 0.15s, transform 0.1s;
  width: 100%;
}
.btn-download:hover { opacity: 0.92; }
.btn-download:active { transform: translateY(1px); }
.btn-new {
  background: #f1f5f9;
  color: #475569;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  width: 100%;
  transition: background 0.15s;
}
.btn-new:hover { background: #e2e8f0; }

/* ── Share section ──────────────────────────────────────────────────────────── */
.share-section {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.share-section p {
  font-size: 14px; color: #64748b; margin-bottom: 12px; font-weight: 500;
}
.share-buttons {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.btn-whatsapp, .btn-facebook, .btn-copy {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
  flex: 1; min-width: 120px; justify-content: center;
}
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-facebook { background: #1877F2; color: #fff; }
.btn-copy     { background: #64748b; color: #fff; }
.btn-whatsapp:hover, .btn-facebook:hover, .btn-copy:hover { opacity: 0.9; }
.btn-whatsapp:active, .btn-facebook:active, .btn-copy:active { transform: translateY(1px); }

/* ── Counter section ────────────────────────────────────────────────────────── */
.counter-section {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  margin-top: 20px;
}
.counter-number {
  font-size: clamp(40px, 10vw, 72px);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.counter-label {
  font-size: 16px;
  opacity: 0.9;
  font-weight: 500;
}

/* ── Aux text ───────────────────────────────────────────────────────────────── */
.aux-text {
  text-align: center;
  padding: 16px 20px;
  font-size: 14px;
  color: #64748b;
}
.aux-text span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 8px 16px;
  border-radius: 999px;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.landing-footer {
  text-align: center;
  padding: 28px 20px 20px;
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.landing-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
}
.landing-footer-nav a {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  transition: color 0.15s;
}
.landing-footer-nav a:hover {
  color: #475569;
}

/* ── 404 / Inactive pages ───────────────────────────────────────────────────── */
.error-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  padding: 20px;
}
.error-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 48px 32px;
  text-align: center;
  max-width: 440px;
  width: 100%;
}
.error-code {
  font-size: 80px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1; margin-bottom: 12px;
}
.error-icon { font-size: 56px; margin-bottom: 12px; }
.error-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.error-card p { color: #64748b; margin-bottom: 24px; line-height: 1.6; }
.error-card a {
  display: inline-flex;
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .upload-section { padding: 48px 20px 32px; }
  .upload-zone { padding: 56px 40px; }
  .upload-zone h2 { font-size: 24px; }
  .result-section { padding: 48px 20px; }
  .share-buttons { gap: 12px; }
}

/* ── Landing Details Block (Layout: Copy Link + Supporters + Como vai ficar) ── */
.landing-details-block {
  margin-top: 28px;
  text-align: center;
}

.link-copy-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.link-copy-hint {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.url-copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  color: #1e1b4b;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  max-width: 90vw;
  overflow: hidden;
}
.url-copy-pill:hover {
  background: #e2e8f0;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.url-copy-pill .pill-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supporters-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #1e293b;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
}

/* ── "Como vai ficar" Card ─────────────────────────────────────────────────── */
.how-it-works-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  text-align: center;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

/* ── Criado por ApoioPro ─────────────────────────────────────────────────── */
.brand-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 0 8px;
}
.brand-footer-label {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand-footer-logo {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.brand-footer-link {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

.how-title {
  font-size: clamp(18px, 4.5vw, 20px);
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.how-subtitle {
  font-size: clamp(12px, 3.2vw, 13px);
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.5;
  padding: 0 4px;
}

.how-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.5vw, 10px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

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

/* Container com tamanho fixo e overflow hidden */
.how-thumb {
  width: clamp(72px, 22vw, 125px);
  height: clamp(72px, 22vw, 125px);
  border-radius: clamp(10px, 3.5vw, 18px);
  overflow: hidden;
  position: relative;       /* pai do absolute */
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

/* Todas as imagens dentro do thumb: absolutas, cobrindo 100% */
.how-thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Moldura PNG (frame): contain para não cortar bordas transparentes */
.how-thumb.frame-thumb img {
  object-fit: contain;
}

/* Placeholder sem moldura */
.frame-placeholder-box {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.how-operator {
  font-size: clamp(15px, 4vw, 24px);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 22px;
  padding: 0 1px;
  flex-shrink: 0;
}

.how-label {
  font-size: clamp(10px, 2.7vw, 13px);
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

/* ── Social Share Block ───────────────────────────────────── */
.social-share-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}
.social-share-label {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.social-share-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.social-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.social-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.social-badge.badge-facebook {
  background: #1877F2;
}
.social-badge.badge-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.social-badge.badge-whatsapp {
  background: #25D366;
}

@media (max-width: 480px) {
  .social-badge { font-size: 11px; padding: 6px 12px; }
}

/* ── Floating Scroll-to-Top Button ───────────────────────── */
.btn-scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, filter 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  outline: none;
}
.btn-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.btn-scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  filter: brightness(1.1);
}
.btn-scroll-top:active {
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .btn-scroll-top {
    bottom: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
  }
}
