@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

:root {
  --bg:           #0e0e0e;
  --bg2:          #141414;
  --bg3:          #1a1a1a;
  --border:       #252525;
  --brand:        #D4537E;
  --brand-alpha:  rgba(212,83,126,0.10);
  --brand-border: rgba(212,83,126,0.28);
  --text:         #FFFFFF;
  --muted:        #c8c8c8;
  --dim:          #aaa;
  --radius:       10px;
}

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

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: none; cursor: pointer; font-family: inherit;
  font-weight: 600; transition: opacity .15s, transform .1s;
}
.btn:hover  { opacity: .87; }
.btn:active { transform: scale(.97); }

.btn-brand {
  background: var(--brand); color: #fff;
  border-radius: var(--radius); padding: 14px 28px;
  font-size: 14px; width: 100%; text-align: center;
}
.btn-outline-dark {
  background: var(--bg2); color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 20px; font-size: 13px;
}

/* ── INDEX ──────────────────────────────── */
.page-wrap {
  max-width: 480px; margin: 0 auto; padding: 0 24px;
  min-height: 100vh; display: flex; flex-direction: column;
}

.idx-logo-wrap { padding: 36px 0 28px; text-align: center; }
.idx-logo { height: 120px; width: auto; }

.idx-hero { text-align: center; padding: 8px 0 28px; }
.idx-hero h1 { font-size: 30px; font-weight: 900; line-height: 1.25; margin-bottom: 14px; }
.idx-hero h1 .accent { color: var(--brand); }
.idx-hero p  { font-size: 16px; color: #fff; line-height: 1.6; }

.idx-icons {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 28px;
}
.idx-icon-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 18px 8px; text-align: center;
}
.idx-icon-card .ico { font-size: 26px; margin-bottom: 8px; display: block; }
.idx-icon-card p  { font-size: 13px; color: #fff; line-height: 1.35; }

.idx-cta       { margin-bottom: 12px; }
.idx-microcopy { text-align: center; font-size: 15px; color: #fff; margin-bottom: 24px; }

/* Quiz modality cards (when both enabled) */
.idx-modality-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.idx-modality-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  text-decoration: none; transition: border-color .15s;
}
.idx-modality-card:hover { border-color: var(--brand); }
.idx-modality-card .mc-icon { font-size: 28px; flex-shrink: 0; }
.idx-modality-card .mc-info { flex: 1; }
.idx-modality-card .mc-info strong { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.idx-modality-card .mc-info span   { font-size: 12px; color: var(--muted); }
.idx-modality-card .mc-arrow { font-size: 16px; color: var(--brand); flex-shrink: 0; }

.idx-footer {
  margin-top: auto; background: #111; border-top: 1px solid #1e1e1e;
  height: 140px; position: relative; overflow: hidden;
  margin-left: -24px; margin-right: -24px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding-top: 14px;
}
.idx-footer-label {
  font-size: 9px; color: #2a2a2a; letter-spacing: .08em;
  z-index: 1; position: relative;
}
.idx-footer-img {
  height: 200px; width: auto; object-fit: contain;
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  animation: paranoide-peek 8s ease-in-out infinite;
}

@keyframes paranoide-peek {
  0%          { transform: translateX(-50%) translateY(100%); }
  10%         { transform: translateX(-50%) translateY(70%); }
  22%         { transform: translateX(-50%) translateY(44%); }
  40%         { transform: translateX(-50%) translateY(44%); }
  50%         { transform: translateX(-50%) translateY(63%); }
  60%         { transform: translateX(-50%) translateY(63%); }
  70%         { transform: translateX(-50%) translateY(42%); }
  84%         { transform: translateX(-50%) translateY(42%); }
  94%         { transform: translateX(-50%) translateY(100%); }
  100%        { transform: translateX(-50%) translateY(100%); }
}

@media (min-width: 600px) {
  .idx-hero h1 { font-size: 38px; }
  .idx-hero p  { font-size: 18px; }
  .idx-icon-card p { font-size: 14px; }
  .idx-microcopy   { font-size: 16px; }
  .idx-modality-card .mc-info strong { font-size: 16px; }
  .idx-modality-card .mc-info span   { font-size: 14px; }

  .idx-footer      { height: 200px; }
  .idx-footer-img  { height: 300px; }
}

/* ── QUIZ ───────────────────────────────── */
.quiz-wrap { padding: 24px 20px 48px; max-width: 420px; margin: 0 auto; }

.quiz-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.quiz-tag   { font-size: 10px; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.quiz-count { font-size: 11px; color: var(--muted); }

.quiz-progress { height: 3px; background: #1e1e1e; border-radius: 99px; margin-bottom: 28px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }

.question-box  { display: none; }
.question-box.active { display: block; }
.question-text { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 20px; line-height: 1.5; }

/* Capture form */
.capture-intro { margin-bottom: 24px; }
.capture-intro h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.capture-intro p  { font-size: 12px; color: var(--muted); line-height: 1.5; }

.field-group { margin-bottom: 14px; }
.field-group label {
  display: block; font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px;
}
.field-group input {
  width: 100%; background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 12px 14px; color: var(--text);
  font-family: inherit; font-size: 14px; outline: none; transition: border-color .2s;
}
.field-group input:focus { border-color: var(--brand); }
.field-group input::placeholder { color: #666; }

/* Likert cards */
.likert-cards  { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.likert-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 12px 14px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.likert-card:has(input:checked) { background: #1a1212; border-color: rgba(212,83,126,.33); }

.likert-card input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #333; flex-shrink: 0;
  transition: border-color .15s, background .15s;
}
.likert-card input[type="radio"]:checked {
  border-color: var(--brand); background: var(--brand);
  box-shadow: inset 0 0 0 3px var(--bg2);
}
.likert-label  { flex: 1; }
.likert-label strong { display: block; font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.likert-label span   { font-size: 10px; color: var(--dim); line-height: 1.4; }

/* Quiz nav */
.quiz-nav { display: flex; gap: 10px; }
.btn-prev {
  background: var(--bg2); color: var(--muted); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; font-size: 13px;
  font-weight: 600; flex: 0 0 auto; width: 80px; cursor: pointer;
  font-family: inherit; transition: opacity .15s;
}
.btn-prev:hover { opacity: .7; }
.btn-next-q, .btn-submit-q {
  background: var(--brand); color: #fff; border: none;
  border-radius: var(--radius); padding: 14px; font-size: 13px;
  font-weight: 700; flex: 1; cursor: pointer; font-family: inherit;
}
.btn-submit-q { width: 100%; }
.btn-prev[hidden], .btn-next-q[hidden], .btn-submit-q[hidden] { display: none; }

/* ── RESULTADO ──────────────────────────── */
.result-page { max-width: 520px; margin: 0 auto; }

.result-hero {
  position: relative; width: 100%; height: 160px;
  background: var(--bg2); border-bottom: 1px solid #1e1e1e; overflow: hidden;
}
.result-hero img { width: 100%; height: 100%; object-fit: contain; }
.result-hero-tag {
  position: absolute; top: 12px; left: 14px;
  background: rgba(212,83,126,.12); border: 1px solid rgba(212,83,126,.27);
  color: #ED93B1; font-size: 9px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px;
}

.result-body { padding: 18px 20px; }
.result-nome  { font-size: 30px; font-weight: 900; color: var(--brand); margin-bottom: 4px; }
.result-frase { font-size: 11px; font-style: italic; color: #c8c8c8; margin-bottom: 10px; }
.result-desc  { font-size: 12px; color: #e0e0e0; line-height: 1.6; margin-bottom: 20px; }

/* Video */
.result-video {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px;
  aspect-ratio: 16/9; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.result-video iframe, .result-video video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.video-ph { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.video-ph-play {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(212,83,126,.12);
  display: flex; align-items: center; justify-content: center;
}
.video-ph-play::after {
  content: ''; width: 0; height: 0; border-style: solid;
  border-width: 7px 0 7px 14px;
  border-color: transparent transparent transparent var(--brand);
  margin-left: 3px;
}
.video-ph-label { font-size: 10px; color: var(--dim); text-align: center; }
.video-ph-dur   { position: absolute; bottom: 8px; right: 10px; font-size: 9px; color: var(--dim); }

.result-divider { height: 1px; background: #1e1e1e; margin: 0 0 20px; }

/* CTA */
.btn-cta-primary {
  display: block; background: var(--brand); color: #fff;
  text-align: center; font-size: 13px; font-weight: 700;
  padding: 14px 20px; border-radius: var(--radius);
  margin-bottom: 24px; border: none; cursor: pointer; font-family: inherit; width: 100%;
}

/* Share */
.result-share        { padding-bottom: 32px; }
.result-share-label  { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; text-align: center; }
.share-cards         { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.share-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: border-color .15s;
  width: 100%; text-align: left; font-family: inherit;
}
.share-card:hover { border-color: #25D366; }
.share-icon {
  width: 36px; height: 36px; background: rgba(37,211,102,.1);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.share-info strong { display: block; font-size: 12px; color: var(--text); margin-bottom: 2px; }
.share-info span   { font-size: 10px; color: var(--muted); }

.btn-refazer {
  display: block; width: 100%; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px; color: var(--muted); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit; text-align: center;
}

/* Modals */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.82);
  z-index: 9999; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: #111; border-radius: 18px 18px 0 0; width: 100%;
  max-width: 480px; padding: 8px 20px 40px;
  border-top: 1px solid #1e1e1e; position: relative;
}
.modal-handle { width: 36px; height: 3px; background: #2a2a2a; border-radius: 99px; margin: 12px auto 20px; }
.modal-preview-img {
  width: 100%; height: 130px; object-fit: contain;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; margin-bottom: 14px;
}
.modal-nome  { font-size: 16px; font-weight: 900; color: var(--brand); margin-bottom: 4px; }
.modal-msg   {
  font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 20px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
}
.btn-wpp-modal {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: #25D366; color: #fff; border: none;
  border-radius: var(--radius); padding: 14px; font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px; line-height: 1;
}

@media (min-width: 480px) {
  .modal-overlay  { align-items: center; }
  .modal-sheet    { border-radius: 18px; max-height: 85vh; overflow-y: auto; }
}

/* ── DESKTOP FONT SCALE ─────────────────── */
@media (min-width: 600px) {
  .quiz-wrap        { padding: 36px 32px 60px; }
  .capture-intro h2 { font-size: 24px; }
  .capture-intro p  { font-size: 14px; }
  .field-group label { font-size: 13px; }
  .field-group input { font-size: 16px; padding: 14px 16px; }
  .question-text    { font-size: 18px; }
  .likert-label strong { font-size: 15px; }
  .likert-label span   { font-size: 12px; }
  .btn-next-q, .btn-submit-q, .btn-prev { font-size: 15px; padding: 16px; }
  .quiz-tag   { font-size: 12px; }
  .quiz-count { font-size: 13px; }

  .result-page  { max-width: clamp(400px, 50vw, 640px); }
  .result-nome  { font-size: 38px; }
  .result-frase { font-size: 14px; }
  .result-desc  { font-size: 14px; }
  .result-hero  { height: 220px; }
  .result-video { min-height: 260px; }
  .btn-cta-primary { font-size: 16px; padding: 18px 24px; }
  .share-info strong { font-size: 15px; }
  .share-info span   { font-size: 13px; }
  .result-share-label { font-size: 12px; }
  .btn-refazer  { font-size: 15px; }
  .modal-nome   { font-size: 20px; }
  .modal-msg    { font-size: 15px; }
}
