/* Formulário de parceiros da Elo Jurídico (forms.elojuridico.com.br).
   Uma pergunta por tela, no estilo Typeform. Paleta e fontes de marca/design-guide.md. */

@font-face { font-family: 'Libre Caslon Text'; src: url('libre-caslon-text-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; size-adjust: 94%; }
@font-face { font-family: 'Libre Caslon Text'; src: url('libre-caslon-text-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; size-adjust: 94%; }
@font-face { font-family: 'Libre Caslon Text'; src: url('libre-caslon-text-700.woff2') format('woff2'); font-weight: 500 900; font-style: normal; font-display: swap; size-adjust: 88%; }

:root {
  --navy:         #0C1428;
  --navy-mid:     #152035;
  --accent:       #8D9DB3;
  --accent-light: #A8B9CA;
  --light:        #EDF3F8;
  --gray-400:     #8A9AAA;
  --error:        #E8A0A0;

  --font-serif: 'Libre Caslon Text', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  background: radial-gradient(120% 90% at 85% 0%, var(--navy-mid) 0%, var(--navy) 60%);
  background-color: var(--navy);
  color: var(--light);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Barra de progresso */
.progress { position: fixed; inset: 0 0 auto 0; height: 4px; background: rgba(141,157,179,.18); z-index: 20; }
.progress-bar { height: 100%; width: 0; background: var(--accent-light); transition: width .4s ease; }

.topbar { position: fixed; top: 0; left: 0; right: 0; padding: 22px 32px; z-index: 10; }
.logo img { display: block; height: auto; width: 96px; }

/* Etapas */
.tf { position: relative; height: 100vh; height: 100dvh; }

.step {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 96px 32px 96px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(40px);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1), visibility 0s linear .45s;
  overflow-y: auto;
}
.step.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
.step.is-above  { transform: translateY(-40px); }

.step-inner { width: 100%; max-width: 680px; position: relative; }

.eyebrow {
  display: inline-block; margin-bottom: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-light);
}

.q-num {
  position: absolute; left: -64px; top: 6px;
  font-size: 15px; font-weight: 500; color: var(--accent-light);
  display: inline-flex; gap: 6px; align-items: center;
}
.q-num .arrow { font-size: 13px; }

.q-title {
  display: block; margin: 0;
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(24px, 3.2vw, 32px); line-height: 1.3;
  color: var(--light);
  text-wrap: balance;
}
.q-title-xl { font-weight: 700; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.18; }

.q-help { margin: 12px 0 0; font-size: 17px; line-height: 1.55; color: var(--accent-light); font-weight: 300; }

/* Campo de texto: só a linha de baixo, como no Typeform */
.field {
  display: block; width: 100%; margin-top: 30px;
  background: transparent; border: 0; border-bottom: 1px solid rgba(168,185,202,.45);
  color: var(--light); font-family: var(--font-sans); font-size: clamp(20px, 2.6vw, 26px); font-weight: 300;
  padding: 8px 0 10px; outline: none; border-radius: 0;
  transition: border-color .2s ease;
}
.field::placeholder { color: rgba(168,185,202,.45); }
.field:focus { border-bottom: 2px solid var(--accent-light); padding-bottom: 9px; }
.field-area { resize: none; line-height: 1.45; min-height: 3em; }

/* Opções */
.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; max-width: 460px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; cursor: pointer; user-select: none;
  background: rgba(141,157,179,.10); border: 1px solid rgba(141,157,179,.45); border-radius: 6px;
  font-size: 18px; color: var(--light);
  transition: background .15s ease, border-color .15s ease;
}
.choice:hover { background: rgba(141,157,179,.2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .key {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 1px solid rgba(168,185,202,.6); border-radius: 4px;
  font-size: 12px; font-weight: 600; color: var(--accent-light); background: rgba(12,20,40,.4);
}
.choice:has(input:checked) { background: rgba(141,157,179,.32); border-color: var(--accent-light); }
.choice:has(input:checked) .key { background: var(--accent-light); color: var(--navy); border-color: var(--accent-light); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.choice.blink { animation: blink .32s ease 2; }
@keyframes blink { 50% { background: rgba(141,157,179,.08); } }

/* Botões */
.actions { display: flex; align-items: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--accent); color: var(--navy);
  font-family: var(--font-sans); font-size: 18px; font-weight: 600;
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--accent-light); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-arrow { font-weight: 400; }

.hint { font-size: 13px; color: var(--gray-400); }
kbd { font-family: var(--font-sans); font-weight: 600; color: var(--accent-light); }

.error { min-height: 0; margin: 12px 0 0; font-size: 15px; color: var(--error); }
.error:empty { display: none; }

.privacy { margin-top: 28px; font-size: 13px; color: var(--gray-400); }
.privacy a { color: var(--accent-light); }

/* Navegação no canto */
.stepnav { position: fixed; right: 24px; bottom: 24px; display: flex; gap: 2px; z-index: 10; }
.stepnav button {
  width: 40px; height: 36px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
}
.stepnav button:first-child { border-radius: 6px 0 0 6px; }
.stepnav button:last-child  { border-radius: 0 6px 6px 0; }
.stepnav button:hover { background: var(--accent-light); }
.stepnav button:disabled { opacity: .35; cursor: default; }

.hp { position: absolute; left: -9999px; }

@media (max-width: 860px) {
  .q-num { position: static; display: flex; margin-bottom: 10px; }
}

@media (max-width: 600px) {
  .topbar { padding: 18px 16px; }
  .logo img { width: 80px; }
  .step { padding: 88px 16px 96px; align-items: flex-start; }
  .step-inner { margin-top: 6vh; }
  .hint { display: none; }
  .choices { max-width: none; }
  .choice { font-size: 17px; }
  .stepnav { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .step, .progress-bar { transition: none; }
  .choice.blink { animation: none; }
}
