/* Briefing LPG — mesma linguagem do site: azul-noite, Bricolage Grotesque, linhas finas, cantos quase retos e os três estágios
   (Lançamento amarelo, Progresso vermelho, Crescimento verde) como trilha de progresso. Tokens vêm de /css/tokens.css. */

:root {
  --pad: clamp(20px, 5vw, 32px);
  --measure: 680px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --stage: var(--launch);
  --field: rgba(10, 34, 80, 0.55);
  --err-text: #ff7a70;
}
body[data-stage="launch"] { --stage: var(--launch); }
body[data-stage="progress"] { --stage: var(--progress); }
body[data-stage="growth"], body[data-stage="send"] { --stage: var(--growth); }
body[data-stage="intro"] { --stage: var(--launch); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; scrollbar-color: var(--lpg-blue-dark) var(--bg); }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--font-display);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  caret-color: var(--lpg-blue-light);
}
[hidden] { display: none !important; }   /* o display:flex da barra de baixo vencia o hidden: ela aparecia na abertura ao puxar a página */
::selection { background: var(--lpg-blue); color: var(--lpg-white); }
input, textarea, button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--lpg-blue-light); outline-offset: 3px; border-radius: var(--radius); }
h1, h2, h3, p, dl, dd { margin: 0; }

/* assinatura: três pesos, uma palavra (a mesma do site) */
.wm { display: inline-block; white-space: nowrap; line-height: 1; letter-spacing: -0.015em; font-kerning: none; }
.wm-1 { font-weight: 760; font-stretch: 82%; letter-spacing: 0.03em; margin-right: 0.02em; color: var(--lpg-blue-light); }
.wm-2 { font-weight: 300; font-stretch: 100%; }
.wm-3 { font-weight: 600; font-stretch: 88%; color: var(--lpg-blue-light); }

/* ---------- brilhos de fundo: mudam de cor com o estágio ---------- */
.glows { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glows i { position: absolute; inset: -10%; opacity: 0; transition: opacity 1s var(--ease-out); }
.gb { opacity: 1 !important; background: radial-gradient(44% 46% at 82% 18%, rgba(0, 90, 228, 0.30), transparent 72%); }
.gl { background: radial-gradient(46% 50% at 14% 88%, rgba(239, 165, 26, 0.20), transparent 70%); }
.gp { background: radial-gradient(46% 50% at 14% 88%, rgba(224, 66, 55, 0.20), transparent 70%); }
.gg { background: radial-gradient(46% 50% at 14% 88%, rgba(29, 160, 108, 0.22), transparent 70%); }
body[data-stage="intro"] .gl, body[data-stage="launch"] .gl { opacity: 1; }
body[data-stage="intro"] .gg { opacity: 0.8; }
body[data-stage="progress"] .gp { opacity: 1; }
body[data-stage="growth"] .gg, body[data-stage="send"] .gg { opacity: 1; }

.app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Topbar + trilha de progresso ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(4, 22, 58, 0.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-t);
}
.topbar-inner {
  max-width: calc(var(--measure) + 2 * var(--pad)); margin: 0 auto;
  padding: 0 var(--pad); min-height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-wm { font-size: 1.1rem; }
.step-count { font-size: 0.86rem; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-track { position: absolute; left: 0; right: 8px; bottom: -1px; height: 2px; background: transparent; }
.progress-fill {
  position: relative; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--launch), var(--progress) 50%, var(--growth)) 0 0 / 100vw 100% no-repeat;   /* o degradê cobre a largura toda: a fatia revelada muda de cor ao avançar */
  transition: width 0.7s var(--ease-expo);
}
.progress-fill::after {
  content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: var(--stage); box-shadow: 0 0 0 4px rgba(4, 22, 58, 0.9); transition: background-color 0.5s var(--ease-out);
}

/* ---------- Telas ---------- */
main { flex: 1; display: flex; flex-direction: column; }
.screen { display: none; flex: 1; }
.screen.active { display: flex; flex-direction: column; }
.screen-inner { max-width: calc(var(--measure) + 2 * var(--pad)); width: 100%; margin: 0 auto; padding: 36px var(--pad) 48px; }

/* entrada em cascata, no mesmo ritmo do site */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes mask-in { from { transform: translateY(112%); } to { transform: none; } }
.screen.active .screen-inner > * { animation: rise 0.85s var(--ease-expo) both; animation-delay: calc(var(--n, 0) * 70ms + 60ms); }
.screen-inner > :nth-child(1) { --n: 0; } .screen-inner > :nth-child(2) { --n: 1; } .screen-inner > :nth-child(3) { --n: 2; }
.screen-inner > :nth-child(4) { --n: 3; } .screen-inner > :nth-child(5) { --n: 4; } .screen-inner > :nth-child(6) { --n: 5; }
.screen-inner > :nth-child(7) { --n: 6; } .screen-inner > :nth-child(8) { --n: 7; } .screen-inner > :nth-child(n+9) { --n: 8; }

/* ---------- Abertura ---------- */
.intro { min-height: 100dvh; }
.intro-inner {
  flex: 1; display: flex; flex-direction: column; width: 100%;
  max-width: calc(var(--measure) + 2 * var(--pad)); margin: 0 auto;
  padding: calc(clamp(16px, 3svh, 28px) + var(--safe-t)) var(--pad) calc(clamp(16px, 3svh, 28px) + var(--safe-b));
}
.intro-wm { font-size: 1.2rem; animation: rise 0.9s var(--ease-expo) both; }
.intro-body { margin-block: auto; padding-block: clamp(12px, 3svh, 36px); }
.intro-h {
  font-size: clamp(2.6rem, min(13.4vw, 10.6svh), 6.4rem); font-weight: 800; font-stretch: 78%;
  letter-spacing: -0.02em; line-height: 0.92; color: var(--lpg-white);
}
.intro-h .m { display: block; overflow: clip; padding: 0.12em 0.08em 0.2em; margin: -0.12em -0.08em -0.2em; }
.intro-h .m > span { display: block; animation: mask-in 1.05s var(--ease-expo) both; }
.intro-h .m:nth-child(1) > span { animation-delay: 0.15s; }
.intro-h .m:nth-child(2) > span { animation-delay: 0.27s; }
.intro-h .m:nth-child(3) > span { animation-delay: 0.39s; }
.fx { position: relative; display: inline-block; font-weight: 300; font-stretch: 100%; letter-spacing: -0.03em; color: var(--lpg-blue-light); }
.fx .sw { position: absolute; left: 0; top: 0; color: var(--launch); clip-path: inset(0 100% 0 0); animation: band 1.1s var(--ease-silk) 1.05s forwards; pointer-events: none; }
@keyframes band { to { clip-path: inset(0 0 0 0); } }
.intro-text { margin-top: clamp(16px, 3.4svh, 36px); max-width: 34ch; font-size: clamp(1rem, 2.4svh, 1.1rem); line-height: 1.55; color: var(--lpg-neutral-200); animation: rise 0.9s var(--ease-expo) 0.7s both; }
.intro-rail { position: relative; height: 14px; margin: clamp(18px, 4svh, 44px) 0 clamp(16px, 3svh, 32px); max-width: 220px; animation: rise 0.9s var(--ease-expo) 0.85s both; }
.ir-line { position: absolute; left: 6px; right: 6px; top: 6px; height: 1px; background: linear-gradient(90deg, var(--launch), var(--progress), var(--growth)); transform-origin: left; animation: line-draw 1.3s var(--ease-silk) 1.1s both; }
@keyframes line-draw { from { transform: scaleX(0); } }
.ir-dot { position: absolute; top: 1px; width: 12px; height: 12px; border-radius: 50%; animation: dot-pop 0.6s var(--ease-expo) both; }
.ir-1 { left: 0; background: var(--launch); animation-delay: 1.1s; }
.ir-2 { left: calc(50% - 6px); background: var(--progress); animation-delay: 1.7s; }
.ir-3 { right: 0; background: var(--growth); animation-delay: 2.3s; }
@keyframes dot-pop { from { transform: scale(0); } }
.intro .btn-lg { animation: rise 0.9s var(--ease-expo) 1s both; }
.intro-meta { margin-top: clamp(10px, 2svh, 18px); font-size: 0.92rem; color: var(--muted); animation: rise 0.9s var(--ease-expo) 1.1s both; }

/* ---------- Tipografia ---------- */
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.eyebrow::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--stage); }
h2 {
  font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 760; font-stretch: 84%;
  letter-spacing: -0.02em; line-height: 1.02; color: var(--lpg-white); margin-bottom: 14px;
  text-wrap: balance;
}
.qn { color: var(--stage); font-weight: 300; font-stretch: 100%; margin-right: 0.12em; }
.q-sub { font-size: clamp(1.45rem, 5.4vw, 1.9rem); font-weight: 740; font-stretch: 86%; letter-spacing: -0.015em; line-height: 1.08; color: var(--lpg-white); margin-bottom: 10px; text-wrap: balance; }
.hint { color: var(--muted); font-size: 1rem; line-height: 1.6; max-width: 56ch; margin-bottom: 26px; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 40px 0 32px; }

/* ---------- Campos ---------- */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 10px; color: var(--lpg-neutral-200); }
.req { color: var(--launch); }
.opt { color: var(--lpg-neutral-600); font-weight: 500; font-size: 0.88em; }

input[type="text"], input[type="tel"], input[type="url"], textarea {
  width: 100%; padding: 16px 16px 15px; font: 500 1.1rem/1.4 var(--font-display); font-stretch: 96%;
  color: var(--lpg-white); -webkit-appearance: none; appearance: none;
  background: linear-gradient(var(--lpg-blue-light), var(--lpg-blue-light)) no-repeat 0 100% / 0 2px, var(--field);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: background-size 0.6s var(--ease-expo), border-color 0.25s, box-shadow 0.25s;
}
input::placeholder, textarea::placeholder { color: var(--lpg-neutral-600); font-weight: 400; }
input:focus, textarea:focus {
  outline: none; border-color: var(--lpg-blue-light);
  background-size: 100% 2px, auto;
  box-shadow: 0 0 0 4px rgba(106, 166, 255, 0.14);
}
input.invalid, textarea.invalid { border-color: var(--error); }
textarea { resize: vertical; min-height: 104px; }
.error { color: var(--err-text); font-size: 0.9rem; margin-top: 8px; }
.error:empty { display: none; }
.conditional { margin-top: -6px; }

.notice {
  margin-top: 8px; padding: 16px 18px; font-size: 0.97rem; line-height: 1.55; color: var(--lpg-neutral-200);
  background: rgba(0, 90, 228, 0.12); border: 1px solid var(--border); border-left: 2px solid var(--lpg-blue-light); border-radius: var(--radius);
}
.notice strong { color: var(--lpg-white); }

/* ---------- Opções (caixas de seleção) ---------- */
.radio-group, .checkbox-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; margin-bottom: 14px; }
.radio-pill, .checkbox-pill {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 18px 10px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--field);
  font: 500 1.02rem/1.25 var(--font-display); color: var(--lpg-neutral-100); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: border-color 0.25s, background-color 0.25s, color 0.25s, transform 0.2s var(--ease-out);
}
.radio-pill::before, .checkbox-pill::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--lpg-neutral-600); transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.radio-pill input, .checkbox-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
@media (hover: hover) and (pointer: fine) { .checkbox-pill:hover, .radio-pill:hover { border-color: var(--lpg-blue-light); } }
.checkbox-pill:active { transform: scale(0.985); }
.radio-pill:has(input:checked), .checkbox-pill:has(input:checked) { border-color: var(--lpg-blue-light); background: rgba(0, 90, 228, 0.26); color: var(--lpg-white); }
.radio-pill:has(input:checked)::before, .checkbox-pill:has(input:checked)::before {
  background: var(--stage); border-color: var(--stage); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08); animation: pop 0.45s var(--ease-expo);
}
@keyframes pop { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }
.radio-pill:has(input:focus-visible), .checkbox-pill:has(input:focus-visible) { outline: 2px solid var(--lpg-blue-light); outline-offset: 3px; }
.checkbox-pill--wide { display: flex; width: 100%; margin: 12px 0 24px; }
.checkbox-pill--exclusive { border-style: dashed; }

/* ---------- Botões ---------- */
.btn {
  appearance: none; border: 0; border-radius: var(--radius); cursor: pointer; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 0 26px;
  font: 600 1.02rem/1 var(--font-display); font-stretch: 92%; letter-spacing: 0.01em; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s, transform 0.2s var(--ease-out), opacity 0.2s;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn::after { content: ""; }
.btn-primary { background: var(--primary); color: var(--lpg-white); }
.btn-primary::after { content: "→"; display: inline-block; font-weight: 500; transition: transform 0.4s var(--ease-expo); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--hover); } .btn-primary:hover::after { transform: translateX(6px); } }
.btn-secondary { background: transparent; color: var(--lpg-neutral-100); border: 1px solid var(--border); }
.btn-secondary::before { content: "←"; display: inline-block; font-weight: 500; transition: transform 0.4s var(--ease-expo); }
@media (hover: hover) and (pointer: fine) { .btn-secondary:hover { border-color: var(--lpg-blue-light); } .btn-secondary:hover::before { transform: translateX(-5px); } }
.btn-secondary:disabled { opacity: 0.35; }
.btn-ghost { background: transparent; color: var(--muted); min-height: 44px; padding: 0; justify-content: flex-start; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.btn-ghost:hover { color: var(--lpg-white); }
.btn-lg { width: 100%; min-height: 62px; font-size: 1.12rem; justify-content: space-between; padding: 0 24px; }

/* ---------- Barra de navegação (Voltar / Continuar) ---------- */
.navbar {
  position: sticky; bottom: 0; z-index: 20;
  background: rgba(4, 22, 58, 0.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
  padding: 14px max(var(--pad), calc((100% - var(--measure)) / 2)) calc(14px + var(--safe-b));
  display: flex; gap: 12px;
}
.navbar .btn-secondary { flex: 0 0 auto; }
.navbar .btn-primary { flex: 1; justify-content: space-between; }

/* ---------- Revisão ---------- */
.review-list { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.review-card { background: var(--field); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.review-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.review-card-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-stretch: 90%; font-size: 1.05rem; color: var(--lpg-white); }
.review-card-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--stage); }
.review-edit { background: none; border: 0; padding: 8px 0 8px 12px; min-height: 40px; color: var(--lpg-blue-light); font-weight: 600; font-size: 0.92rem; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.review-edit:hover { color: var(--lpg-white); }
.review-row { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; font-size: 1rem; line-height: 1.5; }
.review-row:last-child { margin-bottom: 0; }
.review-row dt { color: var(--muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.review-row dd { margin: 0; color: var(--lpg-neutral-100); font-weight: 500; overflow-wrap: anywhere; }
.review-empty { color: var(--lpg-neutral-600); font-style: italic; font-size: 0.95rem; }
@media (min-width: 560px) { .review-row { flex-direction: row; gap: 16px; } .review-row dt { flex: 0 0 38%; padding-top: 3px; } }

/* ---------- Envio ---------- */
.send-inner { text-align: left; padding-top: clamp(40px, 9vh, 88px); }
.send-icon { width: 76px; height: 76px; border: 1px solid var(--growth); border-radius: 50%; color: var(--growth); background: rgba(29, 160, 108, 0.12); display: flex; align-items: center; justify-content: center; margin: 0 0 28px; }
.send-icon path:last-child { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.9s var(--ease-silk) 0.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.send-inner h2 span { color: var(--growth); }
.send-inner .hint { margin-bottom: 14px; }
.send-inner .hint strong { color: var(--lpg-white); }
.send-inner .btn-lg { margin: 22px 0 12px; }
.send-inner .btn-secondary { width: 100%; justify-content: center; margin-top: 10px; }
.send-inner .btn-secondary::before { content: none; }
.send-inner .btn-inline { margin: 0 0 4px; }
.send-fallback { margin: 20px 0 6px; font-size: 0.97rem; }
#sendPasteHint { padding: 14px 16px; border: 1px solid var(--border); border-left: 2px solid var(--lpg-blue-light); border-radius: var(--radius); background: rgba(0, 90, 228, 0.12); color: var(--lpg-neutral-200); }
#sendPasteHint.attn { border-color: var(--launch); background: rgba(239, 165, 26, 0.12); }
.send-inner .btn-ghost { margin-top: 6px; }

/* ---------- Aviso e retomada ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%) translateY(12px);
  background: var(--surface); color: var(--lpg-white); border: 1px solid var(--lpg-blue-light); padding: 14px 20px; border-radius: var(--radius);
  font-size: 0.95rem; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.5s var(--ease-expo); z-index: 70; max-width: min(92vw, 420px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.restore-banner {
  position: fixed; left: var(--pad); right: var(--pad); top: calc(14px + var(--safe-t)); z-index: 60; max-width: var(--measure); margin: 0 auto;
  background: var(--surface); border: 1px solid var(--lpg-blue-light); border-radius: var(--radius); padding: 16px 18px;
  font-size: 0.97rem; line-height: 1.45; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.8);
  animation: rise 0.8s var(--ease-expo) 0.4s both;
}
.restore-banner > span:last-child { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.restore-banner button { background: none; border: 0; padding: 6px 0; min-height: 40px; color: var(--lpg-blue-light); font-weight: 600; font-size: 0.97rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; cursor: pointer; }
.restore-banner button:hover { color: var(--lpg-white); }

@media (min-width: 720px) {
  .screen-inner { padding-top: 56px; padding-bottom: 72px; }
}
@media (max-height: 700px) { .btn-lg { min-height: 54px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; }
  .fx .sw { clip-path: inset(0 0 0 0); }
}
