/* Achou Ganhou! landing — paleta oficial On+ Fibra */
:root {
  --purple:      #3E1847;  /* roxo principal On+ (ON / FIBRA) */
  --purple-dark: #2C0F33;
  --purple-soft: #5A2D6B;
  --orange:      #F97316;  /* laranja principal (MAIS+) */
  --orange-dark: #D95A00;
  --yellow:      #FBBF24;  /* gradient end do MAIS+ */
  --ink:         #1a1a1a;
  --dark:        #1a1a1a;
  --muted:       #666;
  --bg:          #FAF8FC;  /* off-white com leve tom roxo */
  --white:       #fff;
  --error:       #d32f2f;
  --radius:      14px;
  --shadow:      0 2px 12px rgba(62, 24, 71, 0.08);
  --primary:     #00a859;  /* verde On+ Fibra — gate de código */
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

main { max-width: 520px; margin: 0 auto; padding: 0 16px 40px; }

/* ───────── Hero com fundo roxo + logo dark ───────── */
.hero {
  text-align: center;
  padding: 32px 20px 80px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-radius: 0 0 28px 28px;
  margin: 0 -16px 0;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 40%);
  pointer-events: none;
}
.logo { margin-bottom: 20px; position: relative; z-index: 1; }
.logo img { max-height: 68px; max-width: 280px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }

.hero h1 {
  font-size: 40px;
  color: var(--yellow);
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: relative; z-index: 1;
}
.subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.95);
  margin-bottom: 22px;
  padding: 0 8px;
  position: relative; z-index: 1;
}
.subtitle strong {
  color: var(--orange);
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.codigo-box {
  background: var(--yellow);
  color: var(--purple-dark);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(251,191,36,0.3);
  position: relative; z-index: 1;
}
.codigo-box strong {
  font-family: "SF Mono", Menlo, monospace;
  letter-spacing: 1px;
  font-size: 15px;
  color: var(--purple-dark);
}

/* ───────── Form card ───────── */
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  margin-top: -32px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(62, 24, 71, 0.08);
}

form label { display: block; margin-bottom: 16px; }
form label > span:first-child {
  display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--purple);
}

input[type="text"], input[type="tel"], select, input[type="email"] {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #e4e1e8; border-radius: 10px;
  font-size: 16px; background: var(--white); color: var(--ink);
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(62, 24, 71, 0.12);
}

.row { display: flex; gap: 12px; }
.flex1 { flex: 1; min-width: 0; }

fieldset { border: none; margin-bottom: 16px; padding: 0; }
fieldset legend { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--purple); }

.radio, .check {
  display: inline-flex; align-items: center;
  padding: 9px 14px; margin: 4px 8px 4px 0;
  background: #f5f1f7; border-radius: 10px;
  font-size: 14px; cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.radio input, .check input { margin-right: 8px; accent-color: var(--purple); }
.radio:has(input:checked), .check:has(input:checked) {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}
.check:has(input:checked) { background: linear-gradient(135deg, var(--purple), var(--purple-soft)); }

button[type="submit"] {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 100%);
  color: var(--white);
  border: none; border-radius: var(--radius);
  font-size: 17px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  margin-top: 8px;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
  letter-spacing: 0.3px;
}
button[type="submit"]:hover {
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.5);
  transform: translateY(-1px);
}
button[type="submit"]:active { transform: scale(0.98); }
button[type="submit"]:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
  background: #ccc; box-shadow: none;
}

.legal {
  font-size: 12px; color: var(--muted);
  text-align: center; margin-top: 14px;
}

/* ───────── OTP Screen ───────── */
.otp-section {
  text-align: center;
  padding: 8px 4px 12px;
}
.otp-section h2 {
  color: var(--purple);
  font-size: 26px;
  margin-bottom: 10px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.otp-sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.45;
}
.otp-sub strong {
  color: var(--purple);
  font-family: "SF Mono", Menlo, monospace;
  font-size: 16px;
  display: inline-block;
  margin-top: 4px;
  padding: 4px 12px;
  background: #f5f1f7;
  border-radius: 8px;
}

.otp-input-wrap {
  margin-bottom: 18px;
}
.otp-input-wrap > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 10px;
}
#otpInput {
  width: 100%;
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 14px;
  padding: 18px 12px 18px 26px; /* compensa letter-spacing pra centralizar */
  font-family: "SF Mono", Menlo, monospace;
  color: var(--purple-dark);
  border: 2px solid var(--purple-soft);
  border-radius: var(--radius);
  background: #faf6fc;
}
#otpInput:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
  background: var(--white);
}
#otpInput::placeholder {
  color: #d5cede;
  letter-spacing: 14px;
}

.otp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.link-btn {
  background: none;
  border: none;
  color: var(--purple);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
.link-btn:hover:not(:disabled) {
  background: #f5f1f7;
}
.link-btn:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}
.link-btn.secondary {
  color: var(--muted);
}
.link-btn #otpCountdown {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
  margin-left: 2px;
}

/* info (reenvio ok) — reusa .error box com cor verde */
.error.info {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}

/* ═══════════════════════════════════════════════════ */
/* V2 GAMIFICAÇÃO — bloco indicações + prêmios + regulamento */
/* ═══════════════════════════════════════════════════ */
.indic-block {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1.5px solid var(--orange);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 18px 0;
}
.indic-block h3 {
  color: var(--purple);
  font-size: 18px;
  margin-bottom: 6px;
  font-weight: 800;
}
.indic-sub {
  color: var(--purple-dark);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.indic-help {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.indic-row {
  background: var(--white);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(249, 115, 22, 0.2);
}
.indic-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}
.indic-row input {
  margin-bottom: 6px;
}
.rm-btn {
  background: transparent;
  color: var(--error);
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 50%;
}
.rm-btn:hover { background: #ffebee; }
.ghost-btn {
  background: var(--white);
  color: var(--orange);
  border: 1.5px dashed var(--orange);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-size: 14px;
}
.ghost-btn:hover:not(:disabled) {
  background: var(--orange);
  color: var(--white);
  border-style: solid;
}
.ghost-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.indic-legal {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

/* Prêmios dinâmicos */
.premios-block {
  background: #f5f1f7;
  border-left: 4px solid var(--purple);
  padding: 14px 16px;
  border-radius: 10px;
  margin: 14px 0;
}
.premios-block h3 {
  font-size: 15px;
  color: var(--purple);
  margin-bottom: 10px;
  font-weight: 700;
}
.premios-block ul {
  list-style: none;
  padding: 0;
}
.premios-block li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px dashed rgba(62,24,71,0.1);
}
.premios-block li:last-child { border-bottom: none; }
.premios-legal { margin-top: 8px; }
.tag-pool {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--purple);
  color: var(--white);
  border-radius: 10px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}
.tag-pool.tag-onmais   { background: linear-gradient(90deg, var(--orange), var(--yellow)); color: var(--purple-dark); }
.tag-pool.tag-aquisicao{ background: #00a859; color: var(--white); }

/* Regulamento */
.regulamento {
  margin-top: 18px;
  padding: 0 4px;
}
.regulamento details {
  background: var(--white);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(62,24,71,0.1);
}
.regulamento summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--purple);
  font-size: 14px;
  padding: 4px 0;
  list-style: none;
}
.regulamento summary::-webkit-details-marker { display: none; }
.regulamento .reg-body {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink);
}
.regulamento .reg-body ul {
  padding-left: 20px;
  margin: 6px 0 10px;
}
.regulamento .reg-body em { color: var(--muted); font-size: 12px; }
.regulamento .reg-note {
  font-size: 12px;
  color: var(--purple-soft);
  margin-top: 8px;
  font-style: italic;
}

/* ───────── Success / Error ───────── */
.success {
  text-align: center; padding: 28px 20px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: var(--radius);
  border: 1.5px solid #81c784;
}
.success h2 { color: #2e7d32; margin-bottom: 10px; font-size: 24px; }
.success p { color: #558b2f; margin-bottom: 8px; }
.success .small { font-size: 12px; color: #7a9b3a; }

.error {
  background: #ffebee; color: var(--error);
  padding: 12px; border-radius: 10px;
  margin-top: 12px; font-size: 14px; text-align: center;
  border: 1.5px solid #ef9a9a;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(62,24,71,0.1);
}

/* ── Campo Instagram ─────────────────────────────────────────────────────── */
.field-opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.insta-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #e4e1e8;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
}
.insta-input-wrap:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(62, 24, 71, 0.12);
}
.insta-prefix {
  padding: 0 10px 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--purple-soft);
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}
.insta-input-wrap input {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding-left: 0 !important;
  flex: 1;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
}
.insta-input-wrap input:focus {
  outline: none;
  border: none !important;
  box-shadow: none !important;
}

/* ── Aceite do regulamento (PATCH-CAMPANHA-ACEITE 2026-04-22) ───────────── */
.aceite-wrap {
  background: #f5f1f7;
  border: 1.5px solid var(--purple-soft);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0 10px;
}
.aceite-label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 0 !important;
  font-weight: 500;
  line-height: 1.5;
}
.aceite-label input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  margin-top: 1px;
  accent-color: var(--purple);
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  padding: 0 !important;
  border: 2px solid var(--purple-soft) !important;
}
.aceite-link {
  color: var(--purple);
  text-decoration: underline;
  font-weight: 700;
}
.aceite-link:hover { color: var(--orange); }
.aceite-error {
  color: var(--error);
  font-size: 13px;
  margin-top: 8px;
  font-weight: 600;
}

/* ── Regulamento oficial — headings e layout interno ─────────────────────── */
.reg-title-main {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--purple);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(62,24,71,0.12);
  line-height: 1.4;
}
.reg-title-main span {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.reg-h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 18px 0 6px;
  padding: 6px 10px;
  background: rgba(62,24,71,0.06);
  border-radius: 6px;
  border-left: 3px solid var(--purple);
}
.reg-body p { margin-bottom: 6px; }

/* Ranking tag */
.tag-pool.tag-ranking {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #fff;
}

/* ── Gate de código (PATCH-CAMPANHA-GATE 2026-04-22) ─────────────────────── */
.gate-section {
  padding: 0 16px 8px;
}
.gate-box {
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  box-shadow: 0 4px 24px rgba(62,24,71,0.10);
  max-width: 480px;
  margin: 0 auto;
}
.gate-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 6px;
  text-align: center;
}
.gate-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px;
  text-align: center;
}
.gate-input-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.gate-input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid #ccc;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
}
.gate-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,168,89,0.15);
}
.gate-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.gate-btn:hover:not(:disabled) { background: #007a40; }
.gate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.gate-error {
  color: var(--error);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
}

@media (max-width: 400px) {
  .hero { padding: 24px 16px 70px; }
  .hero h1 { font-size: 30px; }
  .subtitle { font-size: 15px; }
  .row { flex-direction: column; gap: 0; }
  .logo img { max-height: 56px; }
  .gate-input-wrap { flex-direction: column; }
  .gate-btn { width: 100%; }
}
