/* ============================================================
   VOGEL DIGITAL — Formulário Diagnóstico Estratégico
   Estilo Typeform com identidade Vogel
   ============================================================ */

/* -------- FONTES -------- */
@font-face {
  font-family: 'Couture';
  src: url('assets/fonts/Couture-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Couture';
  src: url('assets/fonts/Couture-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* -------- VARIÁVEIS DA MARCA -------- */
:root {
  --vogel-black: #000000;
  --vogel-deep: #18175C;
  --vogel-blue: #2D2BAE;
  --vogel-vivid: #3432C9;
  --vogel-white: #FFFFFF;
  --vogel-gray-700: #374151;
  --vogel-gray-500: #6B7280;
  --vogel-gray-300: #D1D5DB;
  --vogel-gray-100: #F5F5F8;
  --vogel-gray-50: #FAFAFC;
  --vogel-success: #10B981;
  --vogel-warning: #F59E0B;

  --gradient-hero: linear-gradient(135deg, #000000 0%, #18175C 50%, #3432C9 100%);
  --gradient-soft: linear-gradient(135deg, #18175C 0%, #3432C9 100%);

  --font-display: 'Couture', 'Raleway', sans-serif;
  --font-body: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 1px 2px rgba(24, 23, 92, 0.06);
  --shadow-md: 0 4px 12px rgba(24, 23, 92, 0.1);
  --shadow-lg: 0 12px 32px rgba(24, 23, 92, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* -------- RESET -------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--vogel-gray-700);
  background: var(--vogel-white);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* -------- ESTRUTURA -------- */
.app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* -------- BARRA DE PROGRESSO -------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--vogel-gray-100);
  z-index: 100;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: var(--gradient-soft);
  transition: width .4s cubic-bezier(.65, 0, .35, 1);
}

/* -------- HEADER (logo + bloco atual) -------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 24px 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  pointer-events: none;
}
.header__logo {
  height: 36px;
  width: auto;
  pointer-events: auto;
}
.header__block-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vogel-gray-500);
  pointer-events: auto;
}
.header__block-label .header__block-num {
  color: var(--vogel-vivid);
  font-weight: 700;
}

/* -------- TELAS -------- */
.screens {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 8vw 100px;
  opacity: 0;
  transform: translateX(60px);
  pointer-events: none;
  transition: opacity .35s ease, transform .45s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}
.screen.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.screen.is-leaving {
  opacity: 0;
  transform: translateX(-60px);
}

.screen__inner {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

/* -------- TELA DE BOAS-VINDAS (intro) -------- */
.screen--intro {
  background: var(--gradient-hero);
  color: var(--vogel-white);
  padding: 60px 8vw;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.screen--intro .intro__logo {
  width: 88px;
  height: auto;
  margin-bottom: 32px;
  opacity: 0.95;
}
.screen--intro .intro__eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}
.screen--intro .intro__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--vogel-white);
  text-transform: uppercase;
}
.screen--intro .intro__lead {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  max-width: 580px;
  margin: 0 auto 40px;
  color: rgba(255, 255, 255, 0.85);
}
.screen--intro .intro__meta {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 48px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.screen--intro .intro__meta-item { display: flex; align-items: center; gap: 8px; }
.screen--intro .intro__meta-item::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--vogel-vivid); }

/* -------- PERGUNTAS -------- */
.question__counter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--vogel-vivid);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.counter__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 6px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--vogel-gray-500);
  background: var(--vogel-gray-100);
  cursor: pointer;
  transition: all .2s ease;
}
.counter__back svg { width: 12px; height: 12px; }
.counter__back:hover:not(:disabled) {
  background: var(--vogel-deep);
  color: var(--vogel-white);
}
.counter__back:disabled { opacity: 0.3; cursor: not-allowed; }
.counter__divider { color: var(--vogel-gray-300); }

.question__label {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--vogel-deep);
  margin-bottom: 16px;
  text-transform: uppercase; /* força UPPER pra acentos não caírem em minúsculo */
}
.question__label .req {
  color: var(--vogel-vivid);
  font-weight: 700;
}

.question__helper {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--vogel-gray-500);
  margin-bottom: 32px;
  font-style: italic;
}
.question__helper ul {
  margin-top: 8px;
  padding-left: 20px;
  font-style: normal;
  font-size: 15px;
}
.question__helper ul li { margin: 4px 0; }

/* -------- INPUTS -------- */
.input,
.textarea,
.select {
  width: 100%;
  padding: 16px 0;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  color: var(--vogel-deep);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--vogel-gray-300);
  outline: none;
  transition: border-color .25s ease;
}
.input:focus,
.textarea:focus,
.select:focus {
  border-bottom-color: var(--vogel-vivid);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--vogel-gray-300);
  font-weight: 400;
}
.textarea {
  resize: none;
  line-height: 1.4;
  min-height: 80px;
  max-height: 240px;
  overflow-y: auto;
}

/* -------- ESCOLHAS (radio/checkbox) -------- */
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 2px solid var(--vogel-gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .2s ease;
  font-size: 16px;
  font-weight: 500;
  background: var(--vogel-white);
  position: relative;
}
.choice:hover {
  border-color: var(--vogel-blue);
  background: var(--vogel-gray-50);
  transform: translateX(4px);
}
.choice.is-selected {
  border-color: var(--vogel-vivid);
  background: linear-gradient(135deg, rgba(52, 50, 201, 0.06) 0%, rgba(45, 43, 174, 0.04) 100%);
  color: var(--vogel-deep);
}
.choice__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--vogel-gray-100);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--vogel-gray-500);
  letter-spacing: 0.05em;
  transition: all .2s ease;
}
.choice.is-selected .choice__key {
  background: var(--vogel-vivid);
  color: var(--vogel-white);
}
.choice__text { flex: 1; }
.choice__check {
  width: 22px; height: 22px;
  border: 2px solid var(--vogel-gray-300);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.choice--radio .choice__check { border-radius: 50%; }
.choice.is-selected .choice__check {
  background: var(--vogel-vivid);
  border-color: var(--vogel-vivid);
}
.choice.is-selected .choice__check::after {
  content: "";
  width: 8px; height: 8px;
  background: var(--vogel-white);
  border-radius: 50%;
}
.choice--checkbox.is-selected .choice__check::after { border-radius: 2px; }

/* -------- CAMPOS CONDICIONAIS (sim/não + extras) -------- */
.conditional__extras {
  margin-top: 24px;
  padding-left: 18px;
  border-left: 3px solid var(--vogel-vivid);
  display: none;
}
.conditional__extras.is-visible { display: block; }
.conditional__extras .input { font-size: 18px; padding: 10px 0; }
.conditional__field { margin-bottom: 16px; }
.conditional__field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--vogel-gray-500);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -------- BOTÕES -------- */
.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all .2s ease;
  border: 0;
  cursor: pointer;
}
.btn--primary {
  background: var(--gradient-soft);
  color: var(--vogel-white);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: transparent;
  color: var(--vogel-gray-500);
  padding: 14px 16px;
}
.btn--ghost:hover { color: var(--vogel-deep); }
.btn--cta {
  padding: 18px 36px;
  font-size: 18px;
}

.actions__hint {
  font-size: 13px;
  color: var(--vogel-gray-500);
}
.actions__hint kbd {
  display: inline-block;
  padding: 2px 8px;
  background: var(--vogel-gray-100);
  border: 1px solid var(--vogel-gray-300);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--vogel-deep);
  box-shadow: 0 2px 0 var(--vogel-gray-300);
}

/* -------- NAVEGAÇÃO LATERAL (anterior/próximo flutuante) -------- */
.nav {
  position: fixed;
  bottom: 24px;
  right: 32px;
  display: flex;
  gap: 8px;
  z-index: 80;
  background: var(--vogel-white);
  padding: 6px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--vogel-gray-100);
}
.nav__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--vogel-deep);
  background: var(--vogel-gray-100);
  transition: all .2s ease;
}
.nav__btn:hover:not(:disabled) {
  background: var(--gradient-soft);
  color: var(--vogel-white);
}
.nav__btn:disabled { opacity: 0.3; cursor: not-allowed; }
.nav__btn svg { width: 16px; height: 16px; }

/* -------- TELA DE BLOCO (intervalos motivacionais) -------- */
.screen--block {
  background: var(--gradient-hero);
  color: var(--vogel-white);
  text-align: center;
  align-items: center;
}
.screen--block .block__num {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.screen--block .block__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.screen--block .block__lead {
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto 40px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
}

/* -------- TELA DE CONCLUSÃO -------- */
.screen--done {
  background: var(--gradient-hero);
  color: var(--vogel-white);
  text-align: center;
  align-items: center;
  justify-content: center;
}
.screen--done .done__icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  backdrop-filter: blur(8px);
}
.screen--done .done__icon svg {
  width: 40px; height: 40px;
  stroke: var(--vogel-white);
  stroke-width: 3;
  fill: none;
}
.screen--done .done__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.screen--done .done__lead {
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
}
.screen--done .done__signoff {
  margin-top: 48px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* -------- ERRO -------- */
.error-message {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--vogel-warning);
  color: #92400e;
  font-size: 14px;
  border-radius: 6px;
}
.error-message.is-visible { display: block; }

/* -------- LOADING -------- */
.loader {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--vogel-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------- TOAST "SALVO" -------- */
.saved-toast {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--vogel-success);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(-4px);
  transition: all .25s ease;
  pointer-events: none;
}
.saved-toast.is-visible { opacity: 1; transform: translateY(0); }
.saved-toast svg { width: 12px; height: 12px; }

/* -------- TELA DE REVISÃO -------- */
.screen--review {
  background: var(--vogel-gray-50);
  padding: 80px 4vw 60px;
  justify-content: flex-start;
  overflow-y: auto;
}
.screen__inner--wide {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

.review__header { margin-bottom: 40px; }
.review__eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gradient-soft);
  color: var(--vogel-white);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.review__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--vogel-deep);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.review__lead {
  font-size: 16px;
  color: var(--vogel-gray-500);
  line-height: 1.55;
  max-width: 620px;
  margin-bottom: 16px;
}
.review__lead strong { color: var(--vogel-deep); }
.review__counts {
  display: inline-block;
  padding: 8px 16px;
  background: var(--vogel-white);
  border: 1px solid var(--vogel-gray-300);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--vogel-gray-700);
}
.review__counts strong { color: var(--vogel-vivid); font-weight: 700; }

.review__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.review__block {
  background: var(--vogel-white);
  border: 1px solid var(--vogel-gray-100);
  border-radius: var(--radius-lg);
  padding: 28px 28px 16px;
  box-shadow: var(--shadow-sm);
}
.review__block-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--vogel-deep);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--vogel-gray-100);
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.review__block-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gradient-soft);
  color: var(--vogel-white);
  font-size: 13px;
}
.review__block-qs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review__qa {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--vogel-gray-100);
}
.review__qa:last-child { border-bottom: 0; }
.review__qa-text { flex: 1; min-width: 0; }
.review__qa-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--vogel-gray-500);
  margin-bottom: 4px;
  line-height: 1.4;
}
.review__qa-answer {
  font-size: 15px;
  color: var(--vogel-deep);
  line-height: 1.5;
  word-break: break-word;
}
.review__qa--empty .review__qa-answer { color: var(--vogel-gray-300); font-style: italic; }
.review__qa-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--vogel-gray-100);
  color: var(--vogel-gray-700);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  flex-shrink: 0;
}
.review__qa-edit svg { width: 13px; height: 13px; }
.review__qa-edit:hover {
  background: var(--vogel-vivid);
  color: var(--vogel-white);
}

.review__actions {
  position: sticky;
  bottom: 16px;
  margin-top: 32px;
  padding: 16px;
  background: var(--vogel-white);
  border: 1px solid var(--vogel-gray-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.review__actions .btn--ghost {
  background: var(--vogel-gray-100);
  color: var(--vogel-deep);
}
.review__actions .btn--ghost:hover {
  background: var(--vogel-deep);
  color: var(--vogel-white);
}

.review__print-header { display: none; }

/* -------- @MEDIA PRINT (Salvar como PDF) -------- */
.print-only { display: none; }
@media print {
  @page {
    size: A4;
    margin: 18mm 14mm;
  }
  body { background: #fff; overflow: visible !important; }
  .app { position: static !important; height: auto !important; }
  .screens { overflow: visible !important; }
  .screen { position: static !important; opacity: 1 !important; transform: none !important; padding: 0 !important; overflow: visible !important; }
  .screen:not(.screen--review) { display: none !important; }
  .screen--review { background: #fff !important; padding: 0 !important; }
  .screen__inner--wide { max-width: 100% !important; }

  .no-print, .progress, .header, .nav, .review__qa-edit { display: none !important; }
  .print-only { display: block !important; }

  .review__print-header {
    text-align: left;
    padding-bottom: 16pt;
    margin-bottom: 16pt;
    border-bottom: 2px solid #18175C;
  }
  .review__print-title {
    font-family: var(--font-display);
    color: #18175C;
    font-size: 24pt;
    margin: 0 0 4pt;
    text-transform: uppercase;
  }
  .review__print-meta {
    color: #6B7280;
    font-size: 10pt;
    margin: 0;
  }

  .review__block {
    border: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 18pt;
    page-break-inside: avoid;
  }
  .review__block-title {
    font-size: 12pt;
    color: #18175C;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6pt;
    margin-bottom: 10pt;
  }
  .review__block-num {
    background: #18175C !important;
    color: #fff !important;
    width: 24pt; height: 24pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .review__qa {
    padding: 6pt 0;
    page-break-inside: avoid;
    border-bottom: 1px dotted #e5e7eb;
  }
  .review__qa-label { font-size: 9pt; color: #6B7280; }
  .review__qa-answer { font-size: 10pt; color: #000; }
}

/* -------- MOBILE -------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .header { padding: 16px 20px 0; }
  .header__logo { height: 28px; }
  .header__block-label { font-size: 11px; }
  .screen { padding: 70px 6vw 90px; }
  .question__label { font-size: clamp(22px, 6vw, 28px); }
  .input, .textarea, .select { font-size: 20px; }
  .nav { bottom: 16px; right: 16px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions__hint { display: none; }
  .btn { justify-content: center; }
  .screen--intro .intro__meta { flex-direction: column; gap: 12px; }
  .saved-toast { margin-left: 0; font-size: 11px; }
  .screen--review { padding: 70px 4vw 60px; }
  .review__block { padding: 20px 16px 12px; border-radius: var(--radius-md); }
  .review__qa { flex-direction: column; align-items: stretch; gap: 8px; }
  .review__qa-edit { align-self: flex-start; }
  .review__actions { flex-direction: column-reverse; padding: 12px; }
  .review__actions .btn { width: 100%; }
}
