@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Instrument+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Paleta oficial Komfort House (Brand Bible 2026) */
  --color-primary: #0a0a0a;       /* Preto Profundo */
  --color-primary-dark: #000000;
  --color-accent: #a0693a;        /* Bronze — o unico acento, usar com moderacao */
  --color-accent-dark: #85552d;
  --color-success: #2f6b4f;       /* variacao neutra p/ estado de sucesso (nao faz parte da paleta oficial) */
  --color-bg: #f4f1ec;            /* Off-White Quente */
  --color-card: #ffffff;
  --color-text: #2b2825;          /* Grafite */
  --color-text-muted: #7a746c;
  --color-border: #d8d2c7;        /* Greige */
  --color-error: #b3261e;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 14px rgba(10, 10, 10, 0.08);
  --tap-min: 44px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 14px 48px;
}

.header {
  text-align: center;
  margin-bottom: 16px;
}

.header .logo {
  height: 34px;
  width: auto;
  margin-bottom: 10px;
}

.header h1 {
  color: var(--color-primary);
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.subtitle {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
}

.screen { display: none; }
.screen.active { display: block; }

#intro-screen p { margin: 0 0 12px; font-size: 0.97rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  font-size: 0.98rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: var(--tap-min);
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-bg); }

#intro-screen .btn-primary { width: 100%; margin-top: 6px; }

.progress {
  height: 6px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar {
  height: 100%;
  background: var(--color-accent);
  width: 20%;
  transition: width 0.25s ease;
}

.step-indicator {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  margin: 0 0 18px;
}

.honeypot { position: absolute; left: -9999px; top: -9999px; }

#question-container {
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin: 0 0 14px;
  font-weight: 600;
}

.hint {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin: -6px 0 16px;
}

.field { margin-bottom: 20px; }

.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
  min-height: var(--tap-min);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(160, 105, 58, 0.15);
}

textarea { resize: vertical; min-height: 90px; }

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: var(--tap-min);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.radio-option:hover { border-color: var(--color-accent); }

.radio-option input {
  accent-color: var(--color-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.radio-option:has(input:checked) {
  border-color: var(--color-accent);
  background: rgba(160, 105, 58, 0.07);
}

.likert-scale {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.likert-scale label {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.likert-scale input {
  display: none;
}

.likert-scale span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all 0.15s ease;
}

.likert-scale input:checked + span {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* pergunta de escala 1-5 ocupando a tela sozinha: alvos de toque maiores */
.big-scale {
  gap: 8px;
  margin-top: 20px;
}
.big-scale span {
  min-height: 64px;
  font-size: 1.15rem;
  border-radius: var(--radius-sm);
}

.nps-field { margin-top: 24px; }

.nps-scale {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
}

.nps-scale label { cursor: pointer; }
.nps-scale input { display: none; }

.nps-scale span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.nps-scale input:checked + span {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.nps-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.error-msg {
  color: var(--color-error);
  font-size: 0.85rem;
  margin: 6px 0 0;
  display: none;
}
.error-msg.visible { display: block; }

.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.submit-error {
  color: var(--color-error);
  background: #fbeceb;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 16px;
  font-size: 0.9rem;
}

.thanks-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

#thanks-screen {
  text-align: center;
}

.footer {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  margin-top: 22px;
}

/* ---- Mobile first refinements ---- */
@media (max-width: 480px) {
  .page { padding: 14px 10px 40px; }
  .card { padding: 18px 14px; border-radius: 12px; }
  .header h1 { font-size: 1.3rem; }

  .nps-scale { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .nps-scale span { height: 42px; font-size: 0.9rem; }

  .likert-scale span { min-height: 44px; font-size: 0.9rem; }

  .nav-buttons {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .nav-buttons .btn {
    width: 100%;
  }
  #btn-prev {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-weight: 600;
    padding: 8px;
    min-height: auto;
  }
}

@media (min-width: 481px) {
  .nav-buttons .btn { min-width: 130px; }
}
