/* ============================================================
 * style.css — Design acolhedor, leve, moderno (mobile-first)
 * Inspirações: Headspace, Typeform, Calm
 * ============================================================ */

/* ----- Variáveis de design ----- */
:root {
  --bg: #f7f5f1;            /* areia clara, acolhedora */
  --bg-card: #ffffff;
  --ink: #2b2b35;
  --ink-soft: #5a5a68;
  --muted: #9aa0aa;
  --brand: #7c9a92;         /* verde sálvia */
  --brand-2: #f4b393;       /* pêssego suave */
  --accent: #6d83b8;        /* azul calmo */
  --danger: #d97777;
  --ok: #5fa78a;
  --border: #ece8e1;
  --shadow: 0 10px 30px rgba(40, 40, 60, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: 240ms cubic-bezier(.2,.7,.2,1);
}

/* ----- Reset suave ----- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select, button { font-family: inherit; font-size: 1rem; color: inherit; }

/* ----- Topbar ----- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: rgba(247,245,241,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.logo-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 0 0 4px rgba(124,154,146,0.15);
}
.brand-name { font-size: .95rem; letter-spacing: .2px; }

.nav { display: none; gap: 6px; }
.nav-btn {
  background: transparent; border: none; padding: 10px 14px;
  border-radius: 999px; color: var(--ink-soft);
  transition: var(--transition);
}
.nav-btn:hover { background: #fff; color: var(--ink); }
.nav-btn.active { background: var(--ink); color: #fff; }

.menu-toggle {
  background: transparent; border: none; font-size: 1.4rem; color: var(--ink);
}

/* Mobile drawer */
.nav.open {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; top: 64px; right: 12px;
  background: #fff; padding: 10px; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
}

@media (min-width: 760px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
}

/* ----- App container ----- */
.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px 80px;
  min-height: calc(100vh - 120px);
}

/* ----- Cards / Steps ----- */
.step {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: fadeUp .35s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.step h1, .step h2 { margin: 0 0 6px; font-weight: 700; letter-spacing: -.01em; }
.step h1 { font-size: 1.6rem; }
.step h2 { font-size: 1.3rem; }
.step .hint { color: var(--ink-soft); margin: 0 0 18px; }

/* ----- Progress ----- */
.progress {
  height: 6px; background: #eee7df; border-radius: 999px; overflow: hidden;
  margin-bottom: 16px;
}
.progress > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width var(--transition);
}

/* ----- Inputs ----- */
label.field { display: block; margin: 14px 0; }
label.field > span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: .92rem; }

input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  padding: 14px 16px;
  background: #faf8f4;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(124,154,146,0.15);
}
textarea { resize: vertical; min-height: 120px; }

/* ----- Checkboxes / Radios (chips) ----- */
.options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  background: #faf8f4; border: 1px solid var(--border);
  cursor: pointer; transition: var(--transition);
  user-select: none;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { background: #fff; }
.chip.selected {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

/* ----- Sliders ----- */
.slider-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border);
}
.slider-row:last-child { border-bottom: none; }
.slider-row label { color: var(--ink-soft); font-size: .95rem; }
.slider-row .val {
  min-width: 32px; text-align: center;
  background: #faf8f4; border-radius: 999px; padding: 4px 10px;
  font-weight: 600;
}
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  grid-column: 1 / -1; width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) var(--p,0%), #eee7df var(--p,0%));
  outline: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); cursor: pointer;
}

/* ----- Buttons ----- */
.actions {
  display: flex; justify-content: space-between; gap: 10px; margin-top: 22px;
}
.btn {
  border: none; padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600;
  transition: var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn.brand { background: linear-gradient(135deg, var(--brand), var(--accent)); }
.btn.danger { background: var(--danger); }
.btn.full { width: 100%; }

/* ----- Review ----- */
.review-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.review-item:last-child { border: none; }
.review-item h3 { margin: 0 0 4px; font-size: 1rem; }
.review-item p { margin: 0; color: var(--ink-soft); white-space: pre-wrap; }
.review-item button { float: right; }

/* ----- Toast ----- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow);
  z-index: 99; animation: fadeUp .25s ease;
}
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }

/* ----- Dashboard ----- */
.cards-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 18px;
}
@media (min-width: 600px) { .cards-grid { grid-template-columns: repeat(4, 1fr); } }
.metric {
  background: #fff; padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.metric .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.metric .value { font-size: 1.6rem; font-weight: 700; margin-top: 4px; }

canvas { width: 100% !important; height: auto !important; }

/* ----- Welcome ----- */
.welcome { text-align: center; padding: 40px 20px; }
.welcome h1 { font-size: 2rem; margin-bottom: 10px; }
.welcome p { color: var(--ink-soft); max-width: 480px; margin: 0 auto 24px; }

.footer {
  text-align: center; padding: 18px; color: var(--muted);
}
