/*
 * Fonte oficial: Bree. Os arquivos não estão no site atual, então usamos Nunito.
 * Para usar a Bree: coloque os .woff2 em assets/fonts/ e descomente o bloco abaixo.
 *
 * @font-face { font-family: "Bree"; src: url("../fonts/Bree-Regular.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
 * @font-face { font-family: "Bree"; src: url("../fonts/Bree-Bold.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
 */

:root {
  --bg: #0f0f0f;
  --surface: #2d2d2d;
  --surface-2: #383838;
  --line: #4a4a4a;
  --green: #9ec453;
  --green-2: #518d51;
  --text: #ffffff;
  --muted: #c9c9c9;
  --on-green: #0f0f0f;
  --danger: #ff8a80;
  --radius: 18px;
  --font: "Bree", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 10px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: var(--on-green); padding: 10px 14px; border-radius: 10px; z-index: 50; font-weight: 800; }
.skip:focus { left: 8px; }

/* ---------- Topo: voltar + progresso ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(var(--bg) 75%, transparent);
  max-width: 560px; margin: 0 auto;
}
.btn-back {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 48px; padding: 0 12px 0 6px;
  background: var(--surface); border: 0; border-radius: 999px;
  font-weight: 700; font-size: 15px; cursor: pointer;
}
.btn-back:hover { background: var(--surface-2); }
.progress { flex: 1; }
.progress__label { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.progress__track { height: 8px; background: var(--surface); border-radius: 99px; overflow: hidden; }
.progress__fill { height: 100%; width: 25%; background: var(--green); border-radius: inherit; transition: width .45s var(--ease); }

/* ---------- Telas ---------- */
.stage { max-width: 560px; margin: 0 auto; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); overflow-x: clip; }
.screen { display: none; flex-direction: column; gap: 14px; }
.screen.is-active { display: flex; animation: enter .4s var(--ease) both; }
.screen.is-back.is-active { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .screen.is-active { animation: fade .2s both; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .progress__fill { transition: none; }
}
form.screen { padding-top: 12px; }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding-top: max(16px, env(safe-area-inset-top)); font-weight: 800; font-size: 18px; }
.brand img { height: 44px; width: auto; }
.brand--sm { justify-content: center; }
.brand--sm img { height: 96px; }

/* ---------- Tela inicial ---------- */
.hero { position: relative; margin: 4px 0 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 3; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(15,15,15,.55)); }
.hero__tag {
  position: absolute; z-index: 1; left: 12px; top: 12px;
  background: var(--bg); color: var(--green);
  font-weight: 900; letter-spacing: .14em; font-size: 13px;
  padding: 7px 12px; border-radius: 99px; border: 2px solid var(--green);
}
.intro__title { margin: 6px 0 0; font-size: clamp(27px, 7.4vw, 36px); line-height: 1.12; font-weight: 900; letter-spacing: -.01em; }
.intro__title em { font-style: normal; color: var(--green); }
.deals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.deal { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 12px 14px; }
.deal__badge {
  flex: none; display: grid; place-items: center; text-align: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--green); color: var(--on-green); line-height: 1;
  transform: rotate(-8deg);
}
.deal__badge b { font-size: 26px; font-weight: 900; display: block; }
.deal__badge small { font-size: 13px; font-weight: 900; letter-spacing: .08em; }
.deal__text { font-weight: 700; font-size: 16px; }
.intro__text { margin: 2px 0; color: var(--muted); font-size: 17px; }
.intro__foot { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 22px; border-radius: 14px; border: 0;
  font-weight: 800; font-size: 18px; text-decoration: none; cursor: pointer;
  transition: background-color .2s, transform .1s, box-shadow .2s;
}
.btn:active { transform: scale(.98); }
.btn--xl { width: 100%; min-height: 60px; font-size: 19px; }
/* Texto escuro sobre o verde: branco sobre #9EC453 não tem contraste suficiente */
.btn--primary { background: var(--green); color: var(--on-green); box-shadow: 0 6px 24px rgba(158,196,83,.25); }
.btn--primary:hover { background: #b2d46e; }
.btn--primary:disabled { opacity: .6; cursor: progress; }
.btn--ghost { background: transparent; color: var(--green); border: 2px solid var(--green-2); min-height: 52px; font-size: 16px; }
.btn--ghost:hover { background: rgba(81,141,81,.18); }
.btn--wa { margin-top: 6px; }

/* ---------- Perguntas ---------- */
.q { display: block; font-size: clamp(25px, 6.6vw, 32px); font-weight: 900; line-height: 1.15; margin: 8px 0 2px; padding: 0; }
.q--sm { font-size: 19px; margin-top: 4px; }
.help { margin: -4px 0 4px; color: var(--muted); }
.field {
  width: 100%; min-height: 60px; padding: 14px 16px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px;
  font-size: 20px; font-weight: 700; outline: none;
  transition: border-color .2s;
}
.field::placeholder { color: #8d8d8d; font-weight: 600; }
.field:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(158,196,83,.25); }
.field[aria-invalid="true"], .field[aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: none; }
.field:disabled { opacity: .45; }
.field--date::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .8; cursor: pointer; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%239EC453' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 48px; }
.err { min-height: 0; margin: 0; color: var(--danger); font-weight: 700; font-size: 15px; }
.err:empty { display: none; }

.check, .opt-help {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  min-height: 56px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 2px solid transparent; font-weight: 700;
}
.check input, .opt-help input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted); display: grid; place-items: center; }
.check input:checked + .check__box { background: var(--green); border-color: var(--green); }
.check input:checked + .check__box::after { content: ""; width: 7px; height: 13px; border: solid var(--on-green); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.check:has(input:checked), .opt-help:has(input:checked) { border-color: var(--green); }
.check:has(input:focus-visible), .opt-help:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 3px; }
.month { display: flex; flex-direction: column; gap: 8px; animation: enter .3s var(--ease) both; }

/* ---------- Cards de modelo ---------- */
.models { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.models__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.model {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 3px solid transparent; cursor: pointer; transition: border-color .2s, transform .2s;
}
.model:hover { border-color: var(--green-2); }
.model:has(input:checked) { border-color: var(--green); }
.model:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 3px; }
.model input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.model__img { aspect-ratio: 1; object-fit: cover; width: 100%; background: #1a1a1a; }
.model__badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--green); color: var(--on-green); font-weight: 900; font-size: 13px;
  padding: 4px 9px; border-radius: 99px;
}
.model__check {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(15,15,15,.75); border: 2px solid #fff; display: grid; place-items: center;
}
.model:has(input:checked) .model__check { background: var(--green); border-color: var(--green); }
.model:has(input:checked) .model__check::after { content: ""; width: 7px; height: 13px; border: solid var(--on-green); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.model__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.model__name { font-size: 21px; font-weight: 900; }
.model__desc { font-size: 14px; color: var(--muted); line-height: 1.35; flex: 1; }
.model__video {
  margin-top: 8px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: 2px solid var(--line); border-radius: 12px; font-weight: 800; font-size: 15px; cursor: pointer;
}
.model__video:hover { border-color: var(--green-2); color: var(--green); }
.opt-help__dot { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--muted); }
.opt-help input:checked + .opt-help__dot { border: 8px solid var(--green); }

.hp { position: absolute; left: -9999px; }
.privacy { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.privacy svg { flex: none; color: var(--green); margin-top: 1px; }
.send-error { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(255,138,128,.1); border: 2px solid var(--danger); }
.send-error strong { color: var(--danger); }

/* ---------- Obrigado ---------- */
.screen--done { text-align: center; align-items: center; padding-top: 8px; }
.done__icon { margin-top: 24px; animation: pop .5s var(--ease) .1s both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.done__title { font-size: clamp(28px, 7.6vw, 36px); line-height: 1.15; font-weight: 900; margin: 6px 0 0; outline: none; }
.done__text { color: var(--muted); margin: 0 0 6px; }

/* ---------- Modais ---------- */
.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100svh - 32px);
  padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--text);
  overflow: auto;
}
.modal::backdrop { background: rgba(0,0,0,.78); }
.modal[open] { animation: enter-up .3s var(--ease) both; }
@keyframes enter-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.modal__head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 10px 18px; background: var(--surface); z-index: 1; }
.modal__head h2 { margin: 0; font-size: 21px; font-weight: 900; }
.modal__close { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 28px; line-height: 1; cursor: pointer; }
.modal__close:hover { background: var(--line); }
.modal__body { padding: 0 18px 20px; }
.video-box { aspect-ratio: 9 / 16; max-height: calc(100svh - 120px); background: #000; display: grid; place-items: center; margin: 0 auto; }
.video-box.is-wide { aspect-ratio: 16 / 9; }
.video-box iframe, .video-box video { width: 100%; height: 100%; border: 0; }
.video-box p { padding: 20px; text-align: center; color: var(--muted); }

.cmp { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 15px; margin: 8px 0 14px; overflow-wrap: anywhere; }
.cmp th, .cmp td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { color: var(--green); font-size: 16px; font-weight: 900; }
.cmp tbody th { font-weight: 700; color: var(--muted); width: 34%; }
.fit { background: var(--bg); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.fit b { color: var(--green); }

/* ---------- Telas maiores ---------- */
@media (min-width: 720px) {
  .stage { padding-top: 24px; }
  .topbar { padding-top: 24px; }
}
