/* =========================================================
   FLASH DIGITAL · Onboarding I.A
   Paleta oficial (Brandbook · Escala de Cinza Azulado):
     #E9EBEE  #DEE1E6  #CED3DA  #ACB5BC  #6C757C  #485056  #343940
   Tipografia oficial: Campton (sans), Adapter Mono (mono),
                       Mencken Narrow (display/serif).
   Substitutos free usados aqui: Manrope (Campton),
                                  JetBrains Mono (Adapter Mono),
                                  Mencken Std (arquivo enviado pelo cliente).
   ========================================================= */

@font-face {
  font-family: 'Mencken Std Head';
  src: url('assets/fonts/MenckenStdHead-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mencken Std Head';
  src: url('assets/fonts/MenckenStdHead-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mencken Std Narrow';
  src: url('assets/fonts/MenckenStdNarrow-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Mencken Std Narrow';
  src: url('assets/fonts/MenckenStdNarrow-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* paleta oficial */
  --c-100: #E9EBEE;
  --c-200: #DEE1E6;
  --c-300: #CED3DA;
  --c-400: #ACB5BC;
  --c-500: #6C757C;
  --c-600: #485056;
  --c-700: #343940;
  --c-800: #2A2E34;
  --c-900: #1F2227;

  /* aliases semânticos */
  --bg: var(--c-700);
  --bg-deep: var(--c-800);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(206, 211, 218, 0.18);
  --border-strong: rgba(206, 211, 218, 0.35);
  --text: var(--c-100);
  --text-dim: var(--c-400);
  --text-mute: var(--c-500);

  /* única cor fora da escala — pedido explícito do cliente p/ disclaimers */
  --warn: #FF7A1A;
  --warn-bg: rgba(255, 122, 26, 0.10);
  --warn-border: rgba(255, 122, 26, 0.45);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);

  --font-display: 'Mencken Std Head', 'Mencken Std Narrow', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 30% 0%, rgba(206, 211, 218, 0.07), transparent 60%),
    url('assets/img/bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(52,57,64,0.75) 0%, rgba(42,46,52,0.92) 100%);
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.brand img {
  height: 32px;
  width: auto;
  display: block;
}
.topbar__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- stage ---------- */
.stage {
  max-width: 720px;
  margin: 24px auto 60px;
  padding: 0 24px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 44px 40px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card.hidden { display: none; }

/* ---------- typography helpers ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 18px;
}
h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 18px;
}
h1 { font-size: clamp(28px, 4.5vw, 40px); }
h2 { font-size: clamp(22px, 3.4vw, 30px); }
.hl { color: var(--c-100); border-bottom: 2px solid var(--c-400); padding-bottom: 2px; }
.lead {
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 0 24px;
  max-width: 60ch;
}

/* ---------- welcome ---------- */
.welcome .bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.welcome .bullets li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-left: 2px solid var(--border-strong);
  padding-left: 12px;
}
@media (max-width: 540px) {
  .welcome .bullets { grid-template-columns: 1fr; }
}

/* ---------- question card ---------- */
.question__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.block-tag, .counter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
}

.progress {
  position: relative;
  height: 3px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}
.progress__bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--c-400), var(--c-100));
  transition: width 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.question__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 32px);
  margin: 0 0 12px;
  line-height: 1.2;
}
.question__hint {
  color: var(--text-mute);
  font-size: 14px;
  margin: 0 0 22px;
  font-style: italic;
}

.question__field { margin-bottom: 8px; }

/* intro screen */
.intro-field .intro-body {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.65;
  padding: 6px 0 4px;
}

/* checklist (multi-select) */
.check-group { display: flex; flex-direction: column; gap: 10px; }
.check-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
  transition: all 0.18s;
  font-size: 15px;
}
.check-option:hover { border-color: var(--c-300); background: var(--surface-strong); }
.check-option input { display: none; }
.check-option .box {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--c-400);
  flex-shrink: 0;
  position: relative;
}
.check-option input:checked + .box {
  background: var(--c-100);
  border-color: var(--c-100);
}
.check-option input:checked + .box::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid var(--c-800);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-option:has(input:checked) { border-color: var(--c-300); background: var(--surface-strong); }
#other-text { margin-top: 4px; }
#other-text:disabled { opacity: 0.4; cursor: not-allowed; }

/* compound (multi-field) */
.compound-group { display: flex; flex-direction: column; gap: 16px; }
.compound-row { display: flex; flex-direction: column; gap: 6px; }
.compound-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* inputs */
input[type='text'],
input[type='email'],
input[type='tel'],
input[type='url'],
textarea,
select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
textarea {
  min-height: 130px;
  resize: vertical;
  font-family: var(--font-body);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--c-300);
  background: var(--surface-strong);
  box-shadow: 0 0 0 4px rgba(206, 211, 218, 0.10);
}
input::placeholder, textarea::placeholder { color: var(--text-mute); }

/* radio group */
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
  transition: all 0.18s;
  font-size: 15px;
}
.radio-option:hover { border-color: var(--c-300); background: var(--surface-strong); }
.radio-option input { display: none; }
.radio-option .dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--c-400);
  flex-shrink: 0;
  position: relative;
}
.radio-option input:checked + .dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--c-100);
}
.radio-option input:checked ~ span:last-child { color: var(--c-100); }
.radio-option:has(input:checked) { border-color: var(--c-300); background: var(--surface-strong); }

/* checkbox-aware "negocio digital" */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.checkbox-row input { accent-color: var(--c-300); }

/* ---------- alerts ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.5;
}
.alert--warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn);
  color: #FFD7B3;
}
.alert--warn strong { color: var(--warn); display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--font-mono); }
.alert--info {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
}
.alert--info strong { color: var(--c-200); display: block; margin-bottom: 6px; }
.alert--info ul { margin: 6px 0 0; padding-left: 18px; }
.alert--info li { margin: 2px 0; }

/* ---------- error ---------- */
.error {
  color: #FF8787;
  font-size: 13px;
  margin: 10px 0 0;
  min-height: 18px;
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn--primary {
  background: var(--c-100);
  color: var(--c-800);
  border-color: var(--c-100);
}
.btn--primary:hover { background: #fff; transform: translateY(-1px); }
.btn--primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border-strong);
}
.btn--ghost:hover { color: var(--c-100); border-color: var(--c-300); }
.btn--small { padding: 10px 18px; font-size: 13px; }
.btn--add {
  background: transparent;
  color: var(--c-200);
  border: 1px dashed var(--border-strong);
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}
.btn--add:hover { border-color: var(--c-300); color: var(--c-100); }

.question__foot, .review__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---------- users loop ---------- */
.users-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.user-chip__name { color: var(--c-100); font-weight: 600; }
.user-chip__meta { color: var(--text-mute); font-size: 12px; font-family: var(--font-mono); }
.user-chip button {
  background: transparent;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.user-chip button:hover { color: #FF8787; }

/* alert grande (warning na review) */
.alert--big { font-size: 15px; line-height: 1.55; padding: 18px 22px; margin-bottom: 20px; }
.alert--big strong { font-size: 12px; }

.review__foot--top {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  margin-bottom: 24px;
}

/* ---------- review ---------- */
.review__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px 0 8px;
}
.review-block { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.review-block__title {
  background: var(--surface);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-200);
  border-bottom: 1px solid var(--border);
}
.review-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.review-row:last-child { border-bottom: none; }
.review-row__q { color: var(--text-dim); }
.review-row__a { color: var(--c-100); white-space: pre-wrap; word-break: break-word; }
@media (max-width: 540px) {
  .review-row { grid-template-columns: 1fr; gap: 4px; }
  .review-row__q { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
}

/* ---------- thanks ---------- */
.thanks { text-align: center; }
.thanks__kicker { text-align: center; margin: 0 0 22px; }
.thanks__symbol {
  width: 84px;
  height: 84px;
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thanks__symbol img { width: 100%; height: auto; opacity: 0.95; display: block; }
.thanks h2 { text-align: center; }
.thanks .lead { margin-left: auto; margin-right: auto; }
.thanks__sign {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 28px;
}

/* ---------- footer ---------- */
.footer {
  max-width: 1200px;
  margin: 40px auto 24px;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
@media (max-width: 540px) {
  .footer { flex-direction: column; gap: 6px; text-align: center; }
  .topbar { padding: 18px 20px; }
  .card { padding: 30px 24px; }
  .question__foot { flex-wrap: wrap; }
  .question__foot .btn { flex: 1; justify-content: center; }
}

/* hidden util */
.hidden { display: none !important; }
