/* Quiz de aplicação NM Society. Mesma paleta e fontes da landing (css/styles.css). */

:root {
  --dark: #202b25;
  --dark-2: #19221d;
  --sand: #e0d4b9;
  --accent: #9dab57;
  --accent-soft: #c3cd8e;
  --white: #ffffff;
  --off-white: #f9f7f7;
  --ink: #0f1214;
  --error: #f2a7a0;
  --grad: linear-gradient(110deg, #9eaa57 0%, #202b25 100%);

  --serif: "Gloock", Georgia, "Times New Roman", serif;
  --sans: "Google Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui: "Poppins", var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--dark);
  color: var(--white);
  font: 400 16px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
/* Sem isto, regras de display (botão, barra) ganham do atributo hidden */
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }

/* ---------- Cabeçalho e progresso ---------- */
.q-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: 22px 16px 10px;
}
.q-logo img { width: 150px; }
.q-progress { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 260px; }
.q-progress__label { font: 500 12px/1 var(--ui); letter-spacing: 2px; color: var(--accent); white-space: nowrap; }
.q-progress__bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.q-progress__bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s ease; }

/* ---------- Cartão ---------- */
.q-main { flex: 1; display: flex; justify-content: center; padding: 12px 16px 40px; }
.q-card { width: 100%; max-width: 640px; display: flex; flex-direction: column; }
#screen { outline: none; }
#screen :focus { outline: none; }

.q-eyebrow { margin-bottom: 14px; font: 500 12px/1.4 var(--ui); letter-spacing: 4px; text-transform: uppercase; color: var(--accent); }
.q-title {
  font: 400 30px/1.12 var(--serif);
  letter-spacing: 1.5px;
  -webkit-text-stroke: .02em currentColor;
  text-wrap: balance;
}
.q-title--intro { font-size: 36px; }
.q-title em { font-style: normal; color: var(--accent); }
.q-lede { margin-top: 14px; font-size: 17px; color: rgba(255,255,255,.85); }

/* ---------- Opções ---------- */
.q-options { display: grid; gap: 10px; margin-top: 26px; border: 0; padding: 0; }
.q-option { position: relative; display: block; cursor: pointer; }
.q-option input { position: absolute; opacity: 0; pointer-events: none; }
.q-option span {
  display: flex; align-items: center; gap: 14px;
  min-height: 58px; padding: 14px 18px;
  border: 1px solid rgba(157, 171, 87, .4);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  font-size: 16px; line-height: 1.3;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.q-option span::before {
  content: ""; flex: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  transition: background .15s ease, box-shadow .15s ease;
}
.q-option:hover span { border-color: var(--accent); background: rgba(157, 171, 87, .08); }
.q-option input:focus-visible + span { outline: 2px solid var(--off-white); outline-offset: 2px; }
.q-option input:checked + span { background: var(--grad); border-color: var(--accent); }
.q-option input:checked + span::before { background: var(--accent); box-shadow: inset 0 0 0 4px var(--dark); }

/* ---------- Campos ---------- */
.q-fields { display: grid; gap: 16px; margin-top: 26px; }
.q-field { display: grid; gap: 8px; font: 500 14px/1.3 var(--sans); color: rgba(255,255,255,.9); }
.q-field input, .q-field textarea {
  width: 100%;
  min-height: 54px; padding: 14px 16px;
  border: 1px solid rgba(157, 171, 87, .45);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  font-size: 17px; font-weight: 400;
  transition: border-color .15s ease, background .15s ease;
}
.q-field textarea { min-height: 110px; resize: vertical; line-height: 1.4; }
.q-field input::placeholder, .q-field textarea::placeholder { color: rgba(255,255,255,.38); }
.q-field input:focus, .q-field textarea:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,.08); }
.q-field[data-invalid] input, .q-field[data-invalid] textarea { border-color: var(--error); }
.q-count { justify-self: end; font-size: 12px; color: rgba(255,255,255,.45); }

.q-check { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.85); cursor: pointer; }
.q-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.q-check[data-invalid] { color: var(--error); }

/* ---------- Navegação ---------- */
.q-error { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: rgba(242, 167, 160, .12); color: var(--error); font-size: 14px; }
.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; }
.q-back { padding: 10px 4px; border: 0; background: none; color: rgba(255,255,255,.7); font: 500 15px/1 var(--ui); cursor: pointer; }
.q-back:hover { color: var(--white); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 200px; height: 54px; margin-left: auto;
  padding: 0 28px;
  border: 0; border-radius: 50px;
  background: var(--grad);
  color: var(--white);
  font: 500 16px/1.3 var(--ui);
  text-decoration: none;
  cursor: pointer;
  filter: drop-shadow(0 7px 15px rgba(0, 0, 0, .25));
  transition: background-color .25s ease-out, color .25s ease-out;
}
.btn:hover { background: var(--accent); color: var(--ink); }
.btn:focus-visible { outline: 3px solid var(--off-white); outline-offset: 3px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Abertura e resultado ---------- */
.q-intro-list { display: grid; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.q-intro-list li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 15px; }
.q-intro-list b { font: 700 13px/1 var(--ui); color: var(--accent); }

.q-result { text-align: center; padding-top: 12px; }
.q-result .q-title { font-size: 34px; }
.q-result .q-lede { max-width: 30em; margin-left: auto; margin-right: auto; }
/* Cal.com em tema escuro. A altura inicial é só até o Cal.com avisar a altura real do conteúdo
   (mensagem __dimensionChanged, tratada em js/quiz.js). */
.q-agenda { margin: 28px -16px 0; border-radius: 16px; overflow: hidden; background: #101010; }
.q-agenda iframe { display: block; width: 100%; height: 900px; border: 0; transition: height .2s ease; }
@media (min-width: 768px) { .q-agenda { margin-left: 0; margin-right: 0; } .q-agenda iframe { height: 760px; } }
.q-pendente {
  margin-top: 28px; padding: 22px;
  border: 1px dashed var(--accent); border-radius: 14px;
  color: var(--accent-soft); font-size: 14px; text-align: left;
}
.q-noscript { padding: 24px; text-align: center; }

@media (min-width: 768px) {
  .q-header { padding-top: 36px; }
  .q-logo img { width: 190px; }
  .q-main { align-items: flex-start; padding-top: 48px; }
  .q-title { font-size: 38px; }
  .q-title--intro, .q-result .q-title { font-size: 46px; }
  .q-option span { min-height: 62px; font-size: 17px; }
}

/* ---------- Dentro do pop-up da landing ---------- */
.embed .q-logo { pointer-events: none; }
.embed .q-header { padding-top: 6px; }
.embed .q-main { padding-top: 8px; }
@media (min-width: 768px) {
  .embed .q-header { padding-top: 10px; }
  .embed .q-main { padding-top: 24px; }
  .embed .q-logo img { width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
