/* Rich Club · formulario. Identidade PlenaMente Rica em tratamento escuro ("clube"). */
@font-face { font-family: "Cormorant Garamond"; font-weight: 300; font-style: normal; font-display: swap; src: url(/fonts/cormorant-garamond-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 300; font-style: italic; font-display: swap; src: url(/fonts/cormorant-garamond-latin-300-italic.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 300; font-display: swap; src: url(/fonts/jost-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url(/fonts/jost-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url(/fonts/jost-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #101010;
  --surface: #181716;
  --ink: #f5f4f4;
  --muted: #b9b6b2;
  --faint: #8a8783;
  --line: rgba(255, 255, 255, .36); /* contorno de campo/opcao: >= 3:1 sobre o fundo */
  --rule: rgba(255, 255, 255, .18); /* linhas decorativas */
  --line-strong: rgba(255, 255, 255, .5);
  --error: #f0b8a8;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
/* luz quente, discreta, presa a tela (background-attachment: fixed falha no iOS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(110% 60% at 50% -8%, rgba(120, 100, 80, .16), transparent 60%),
    radial-gradient(80% 50% at 100% 110%, rgba(120, 100, 80, .07), transparent 60%);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
em { font-style: italic; }
[hidden] { display: none !important; }
::selection { background: rgba(245, 244, 244, .85); color: #101010; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[tabindex="-1"]:focus-visible { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- moldura ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255, 255, 255, .08);
  z-index: 20;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .6s var(--ease);
}

.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: calc(18px + var(--safe-t)) calc(24px + var(--safe-r)) 0 calc(24px + var(--safe-l));
  z-index: 10;
  pointer-events: none;
}
.mark { display: block; width: 84px; height: auto; opacity: .92; }

main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    calc(92px + var(--safe-t)) calc(24px + var(--safe-r))
    calc(104px + var(--safe-b)) calc(24px + var(--safe-l));
}
.step { width: 100%; max-width: 640px; margin: auto; } /* margin auto: centra sem cortar quando passa da altura */
.step.center { text-align: center; display: flex; flex-direction: column; align-items: center; }

/* ---------- tipografia ---------- */
.label {
  margin: 0 0 22px;
  font: 400 11px/1.4 var(--sans);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
}
.display {
  margin: 0;
  font: 300 clamp(36px, 10.6vw, 68px)/1.06 var(--serif);
  letter-spacing: -.01em;
}
.lede { margin: 20px 0 0; color: var(--muted); font-size: 16px; }
.num {
  margin: 0 0 18px;
  font: 500 12px/1 var(--sans);
  letter-spacing: .2em;
  color: var(--muted);
}
.num svg { width: 13px; height: 13px; margin-left: 4px; vertical-align: -2px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.q {
  margin: 0;
  font: 300 clamp(31px, 8.4vw, 46px)/1.14 var(--serif);
  letter-spacing: -.005em;
  text-wrap: balance;
}
.q label { cursor: default; }
.q.small { font-size: clamp(26px, 6.6vw, 34px); }
.sub { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.thanks {
  margin: 0;
  max-width: 22ch;
  font: 300 clamp(28px, 7vw, 40px)/1.2 var(--serif);
  text-wrap: balance;
}
.sign {
  margin: 28px 0 0;
  font: italic 300 22px/1 var(--serif);
  color: var(--muted);
}

/* ---------- logo ---------- */
.logo { display: block; width: min(300px, 74vw); height: auto; margin: 0 auto 30px; }
.logo.small { width: min(200px, 56vw); margin-bottom: 26px; }

/* ---------- campos ---------- */
.line {
  display: block;
  width: 100%;
  margin-top: 34px;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font: 300 24px/1.3 var(--sans);
  caret-color: var(--ink);
  transition: border-color .25s ease;
  -webkit-appearance: none;
  appearance: none;
}
.line::placeholder { color: rgba(245, 244, 244, .5); }
.line:focus { border-bottom-color: var(--ink); outline: none; }
.line[aria-invalid="true"] { border-bottom-color: var(--error); }

.err {
  min-height: 0;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--error);
}
.err:empty { display: none; }
.err::before { content: "! "; font-weight: 500; }

/* ---------- botoes ---------- */
.actions { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }
.center .actions { justify-content: center; margin-top: 36px; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #101010;
  font: 500 13px/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: 0 0 0 6px rgba(245, 244, 244, .08);
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease;
}
.pill:active { transform: scale(.97); }
.pill[disabled], .pill[aria-disabled="true"] { opacity: .6; cursor: progress; }
.pill.wide { width: 100%; margin-top: 22px; }
.hint { font-size: 12px; color: var(--faint); letter-spacing: .02em; }
.hint b { font-weight: 500; color: var(--muted); }

.choices { display: grid; gap: 12px; margin-top: 34px; max-width: 380px; }
.choice {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 0 18px 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .03);
  font: 300 19px/1.2 var(--sans);
  text-align: left;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.choice kbd {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px; height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font: 500 12px/1 var(--sans);
  letter-spacing: 0;
  color: var(--muted);
  transition: inherit;
}
.choice[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #101010; }
.choice[aria-pressed="true"] kbd { border-color: #101010; background: #101010; color: var(--ink); }
.choice.blink { animation: blink .32s steps(2, jump-none) 1; }
.choice[aria-disabled="true"] { cursor: progress; }
@keyframes blink { 50% { opacity: .35; } }
@media (hover: hover) and (pointer: fine) {
  .choice:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .06); }
  .choice[aria-pressed="true"]:hover { background: var(--ink); }
  .pill:hover { box-shadow: 0 0 0 7px rgba(245, 244, 244, .14); }
}
@media (hover: none), (pointer: coarse) { .hint { display: none; } }

/* ---------- estado de envio ---------- */
.status { margin-top: 18px; font-size: 15px; color: var(--muted); }
.status:empty { display: none; }
.status.error { color: var(--error); }
.status .retry {
  display: inline-flex; align-items: center;
  min-height: 48px; margin-top: 6px; padding: 0;
  border: 0; background: none;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); text-decoration: underline; text-underline-offset: 6px;
}
.spin {
  width: 14px; height: 14px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.status > .spin { display: inline-block; vertical-align: -2px; margin-right: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- welcome ---------- */
.privacy {
  max-width: 34ch;
  margin: 44px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.6;
  color: var(--faint);
}

/* ---------- navegacao ---------- */
.nav {
  position: fixed;
  right: calc(20px + var(--safe-r));
  bottom: calc(20px + var(--safe-b));
  display: flex;
  z-index: 10;
}
.nav button {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid var(--line);
  background: rgba(16, 16, 16, .7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.nav button:first-child { border-radius: 4px 0 0 4px; }
.nav button:last-child { border-radius: 0 4px 4px 0; border-left: 0; }
.nav button[disabled] { opacity: .35; cursor: default; }
.nav button:active:not([disabled]), .close:active { background: rgba(255, 255, 255, .12); }
.status .retry:active { opacity: .6; }
.nav svg, .close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* ---------- honeypot ---------- */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- dialogo ---------- */
dialog {
  width: min(560px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  max-height: calc(var(--vvh, 100dvh) - 24px);
  /* centrado na area visivel (visualViewport): o teclado do iOS nao cobre o envio */
  top: var(--vvt, 0px);
  bottom: var(--kb, 0px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(5, 5, 5, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: dlg-in .38s var(--ease); }
dialog[open]::backdrop { animation: fade .3s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes fade { from { opacity: 0; } }
dialog[open] { display: flex; flex-direction: column; }
.sheet { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding: 30px 24px 24px; }
.sheet > * { flex: none; }
.sheet .label { margin-bottom: 16px; padding-right: 48px; }
.close {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
}
textarea, .sheet > textarea {
  display: block;
  width: 100%;
  flex: 0 1 140px;
  min-height: 72px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, .25);
  font: 300 17px/1.5 var(--sans);
  resize: vertical;
  caret-color: var(--ink);
  transition: border-color .2s ease;
}
textarea::placeholder { color: rgba(245, 244, 244, .5); }
textarea:focus { border-color: rgba(255, 255, 255, .55); outline: none; }
textarea[aria-invalid="true"] { border-color: var(--error); }
.meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.meta .err { margin-top: 10px; }
.count { flex: none; margin: 10px 0 0 auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* ---------- telas maiores ---------- */
@media (min-width: 720px) {
  .top { padding-top: calc(28px + var(--safe-t)); padding-left: max(40px, calc(16px + var(--safe-l))); }
  .mark { width: 96px; }
  main { padding-left: max(48px, calc(16px + var(--safe-l))); padding-right: max(48px, calc(16px + var(--safe-r))); }
  .sheet { padding: 40px 40px 32px; }
  .pill.wide { width: auto; align-self: flex-end; }
  .nav { right: max(32px, calc(16px + var(--safe-r))); bottom: max(32px, calc(16px + var(--safe-b))); }
}
@media (max-height: 680px) {
  main { padding-top: calc(84px + var(--safe-t)); padding-bottom: calc(88px + var(--safe-b)); }
  .step.center { padding-top: 0; }
  main:has(> .step.center:not([hidden])) { padding-top: calc(28px + var(--safe-t)); }
  .mark { width: 72px; }
  .logo { width: min(220px, 62vw); margin-bottom: 22px; }
  .privacy { margin-top: 32px; }
  .choices, .line { margin-top: 26px; }
}

/* celular: pergunta no topo (sem centralizar), assim teclado nao cobre campo, erro e OK */
@media (max-width: 719px), (pointer: coarse) {
  .step:not(.center) { margin: 0 auto auto; }
}
/* area visivel baixa (teclado aberto ou paisagem): classe .short posta pelo app.js via visualViewport */
.short main { padding-top: calc(22px + var(--safe-t)); padding-bottom: calc(76px + var(--kb, 0px) + var(--safe-b)); }
.short main:has(> .step.center:not([hidden])) { padding-top: calc(22px + var(--safe-t)); }
.short .step:not(.center) { margin: 0 auto auto; }
.short .top, .short .num { display: none; }
.short .q { font-size: 26px; }
.short .line, .short .choices { margin-top: 14px; }
.short .line { padding-top: 6px; padding-bottom: 8px; }
.short .sub { margin-top: 8px; font-size: 14px; line-height: 1.4; }
.short .err { margin-top: 8px; }
.short .actions { margin-top: 14px; }
.short .sheet { padding: 14px 18px 16px; }
.short .sheet .label, .short .sheet .sub { display: none; }
.short .sheet .q { padding-right: 40px; font-size: 22px; }
.short textarea { margin-top: 12px; }
.short .pill.wide { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
