/* ==========================================================================
   ESSENCIAL STUDIO — questionário público de florais
   Página independente: sem dependências externas, mobile-first.
   ========================================================================== */

:root {
  --plum-900: #1e0b28;
  --plum-800: #2b0f38;
  --plum-700: #3a1650;
  --plum-600: #4a1a5c;
  --plum-500: #5f2a77;
  --gold: #c9a44c;
  --gold-2: #e3c37a;
  --gold-soft: #f2e3bd;
  --cream: #faf6f1;
  --paper: #fffdf9;
  --ink: #2a1f30;
  --muted: #6d5f74;
  --line: #e7dce9;
  --ok: #2f7a56;
  --danger: #a33b4a;
  --shadow: 0 18px 40px -24px rgba(58, 22, 80, .45);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 12% -10%, #f6eef8 0%, transparent 60%),
    radial-gradient(900px 480px at 100% 0%, #f8f1e5 0%, transparent 55%),
    var(--cream);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--plum-800);
  line-height: 1.2;
  margin: 0 0 .35em;
}

p { margin: 0 0 .9em; }

a { color: var(--plum-600); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--plum-800);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- topo ---------- */
.top {
  background: linear-gradient(150deg, var(--plum-900), var(--plum-700) 62%, var(--plum-500));
  color: #f7eefb;
  padding: 18px 0;
  border-bottom: 1px solid rgba(227, 195, 122, .35);
}
.top .wrap { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand-mark { color: var(--gold-2); font-size: 14px; }
.brand-name {
  font-family: Georgia, serif;
  font-size: 18px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
}
.brand-sub {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------- estrutura ---------- */
.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 18px;
}

main { padding: 28px 0 48px; outline: none; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--plum-500);
  font-weight: 600;
}

.lead { font-size: 17px; color: #3e3146; }

.facts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
}
.facts li {
  flex: 1 1 120px;
  background: #f7f1f9;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
}
.facts strong { display: block; font-size: 20px; color: var(--plum-700); }

.note {
  border-left: 3px solid var(--gold);
  background: #fbf7ee;
  border-radius: 0 12px 12px 0;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 14.5px;
}
.note p:last-child { margin-bottom: 0; }

.fine, .tiny { font-size: 12.5px; color: var(--muted); }
.fine { margin-top: 14px; }

/* ---------- botões ---------- */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--plum-700);
  font: inherit;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 46px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { border-color: var(--plum-500); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(201, 164, 76, .55); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: wait; }

.btn-primary {
  background: linear-gradient(140deg, var(--plum-700), var(--plum-500));
  border-color: var(--plum-700);
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(140deg, var(--plum-600), var(--plum-500)); }
.btn-ghost { background: transparent; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row .spacer { flex: 1; }

/* ---------- progresso ---------- */
.quiz-head { margin-bottom: 16px; }
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.bar {
  height: 8px;
  border-radius: 999px;
  background: #efe6f1;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width .3s ease;
}

h2.group-title { font-size: 24px; margin-top: 6px; }
.group-desc { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }

/* ---------- escala ---------- */
.scale-key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 11.5px;
  color: var(--muted);
  background: #f7f1f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 18px;
}
.scale-key span { white-space: nowrap; }
.scale-key b { color: var(--plum-700); }

.q {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 6px;
  padding: 16px 0;
}
.q:last-of-type { border-bottom: 0; }
.q legend {
  font-size: 15.5px;
  color: var(--ink);
  padding: 0;
  margin-bottom: 12px;
  float: left;
  width: 100%;
}
.q legend + * { clear: both; }

.q.invalid legend { color: var(--danger); }

.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.opt { position: relative; display: block; }
.opt input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.opt .num {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--plum-700);
  font-weight: 600;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.opt:hover .num { border-color: var(--plum-500); }
.opt input:checked + .num {
  background: var(--plum-700);
  border-color: var(--plum-700);
  color: #fff;
}
.opt input:focus-visible + .num {
  outline: 3px solid rgba(201, 164, 76, .6);
  outline-offset: 2px;
}
.q.invalid .opt .num { border-color: #e3bcc3; }

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 14px 0;
}
.alert-error { background: #fdf1f2; border: 1px solid #efc9ce; color: var(--danger); }
.alert-info { background: #f2f7f4; border: 1px solid #cfe5d9; color: var(--ok); }

/* ---------- formulário de contato ---------- */
.fields { display: grid; gap: 14px; margin: 18px 0 6px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--plum-700); margin-bottom: 6px; }
.field .opt-label { font-weight: 400; color: var(--muted); }
.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.input:focus { outline: none; border-color: var(--plum-500); box-shadow: 0 0 0 3px rgba(95, 42, 119, .14); }
.input[aria-invalid="true"] { border-color: var(--danger); }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fbf7ee;
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  padding: 14px;
  margin: 18px 0;
  font-size: 13.5px;
  color: #4a3a52;
}
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--plum-600); }
.consent.invalid { border-color: var(--danger); background: #fdf1f2; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- concluído ---------- */
.done { text-align: center; padding: 34px 26px; }
.done .seal {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--plum-700);
  color: var(--gold-2);
  font-size: 30px;
}
.done h1 { font-size: 28px; }
.done .lead { max-width: 460px; margin-left: auto; margin-right: auto; }

/* ---------- rodapé ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 13px;
}
.foot p { margin: 0 0 6px; }

@media (max-width: 520px) {
  .card { padding: 20px 16px; border-radius: 16px; }
  main { padding-top: 18px; }
  h2.group-title { font-size: 21px; }
  .scale { gap: 6px; }
  .opt .num { height: 46px; }
  .scale-key { font-size: 10.5px; gap: 2px 10px; }
  .btn { width: 100%; }
  .row.end .btn, .row.between .btn { width: auto; }
}

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

@media print {
  .top, .foot, .btn { display: none; }
  .card { box-shadow: none; border-color: #ccc; }
}
