/* ==========================================================================
   Performance — Diagnóstico de Interferência | Professor Sérgio
   ========================================================================== */

:root {
  --blue: #699AB8;
  --blue-dark: #4E7690;
  --blue-light: #E7EFF4;
  --ink: #12181C;
  --ink-soft: #4A5760;
  --ink-faint: #7C8892;
  --bg: #F7F9FB;
  --card: #FFFFFF;
  --border: #E3E8EC;
  --green: #3FA76B;
  --green-bg: #E9F6EF;
  --amber: #C98A2B;
  --amber-bg: #FBF2E3;
  --red: #D8604A;
  --red-bg: #FBEBE7;
  --purple: #7C6FE0;
  --shadow: 0 4px 24px rgba(18, 24, 28, 0.06);
  --shadow-lg: 0 12px 40px rgba(18, 24, 28, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0;
}

p { margin: 0; line-height: 1.55; }

/* ---------- Topbar & Footer ---------- */

.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar__logo { height: 34px; width: auto; }

.topbar__tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--blue-dark);
  text-transform: uppercase;
  background: var(--blue-light);
  padding: 6px 12px;
  border-radius: 100px;
}

.site-footer {
  text-align: center;
  padding: 40px 20px 60px;
  color: var(--ink-faint);
  font-size: 14px;
}

.site-footer p { margin-bottom: 4px; }
.site-footer__muted { font-style: italic; }

/* ---------- App shell ---------- */

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.screen {
  animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 100px;
  padding: 16px 30px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 16px 20px;
}
.btn-ghost:hover { color: var(--ink); }

.btn-block { width: 100%; }

/* ---------- Hero / Intro ---------- */

.hero {
  text-align: center;
}

.hero__eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 14px;
}

.hero__title {
  font-size: clamp(38px, 7vw, 58px);
  line-height: 1.02;
  margin-bottom: 18px;
}

.hero__title em {
  font-style: normal;
  color: var(--blue-dark);
}

.hero__lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 32px;
}

.formula {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 36px;
}

.formula__block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  min-width: 140px;
  box-shadow: var(--shadow);
}

.formula__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.formula__value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}

.formula__op {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink-faint);
}

.formula__block--potencial .formula__value { color: var(--green); }
.formula__block--interferencia .formula__value { color: var(--red); }
.formula__block--performance .formula__value { color: var(--blue-dark); }

.hero__note {
  font-size: 14px;
  color: var(--ink-faint);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero__note strong { color: var(--ink-soft); }

/* ---------- Cards ---------- */

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

/* ---------- Name avatar ---------- */

.name-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  margin: 0 auto 20px;
  transition: background 0.15s ease;
}

.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink);
}

.field input:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}

/* ---------- Quiz ---------- */

.progress-wrap {
  margin-bottom: 28px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 8px;
  font-weight: 600;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--blue);
  border-radius: 100px;
  transition: width 0.3s ease;
}

.quiz-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.quiz-question {
  font-size: clamp(24px, 4.5vw, 30px);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 32px;
}

.likert {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.likert__option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.likert__option:hover { border-color: var(--blue); }

.likert__option.is-selected {
  border-color: var(--blue);
  background: var(--blue-light);
  transform: scale(1.01);
}

.likert__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.likert__option.is-selected .likert__dot { background: var(--blue); }

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---------- Loading ---------- */

.loading-screen {
  text-align: center;
  padding: 80px 20px;
}

.loading-spinner {
  width: 46px;
  height: 46px;
  border: 4px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen p {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink-soft);
}

/* ---------- Results ---------- */

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

.results-header__hi {
  font-size: 15px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.results-header__title {
  font-size: clamp(30px, 6vw, 42px);
}

.gauge-card {
  text-align: center;
  margin-bottom: 24px;
}

.gauge-wrap { position: relative; margin: 0 auto 8px; width: 220px; height: 220px; max-width: 100%; }

.gauge-score {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-score__num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.gauge-score__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.band-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  margin: 12px 0 10px;
}

.gauge-message {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 440px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 16px;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-row__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 14px;
}

.bar-row__label { font-weight: 700; }
.bar-row__pct { font-weight: 700; color: var(--ink-faint); }

.bar-track {
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.bar-track__fill {
  height: 100%;
  border-radius: 100px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Plan ---------- */

.plan-intro {
  text-align: center;
  margin-bottom: 36px;
}

.plan-category {
  margin-bottom: 32px;
}

.plan-category__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.plan-category__badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plan-category__title { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.plan-category__intro { color: var(--ink-soft); margin: 8px 0 18px; }

.action-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.action-item__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--ink-faint);
  width: 28px;
  flex-shrink: 0;
}

.action-item__title { font-weight: 700; margin-bottom: 4px; }
.action-item__desc { color: var(--ink-soft); font-size: 15px; }

.plan-footer {
  text-align: center;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px dashed var(--border);
}

.plan-footer p { color: var(--ink-soft); margin-bottom: 20px; }

.actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.muted { color: var(--ink-faint); }

@media print {
  .topbar, .site-footer, .quiz-nav, .actions-row, .btn { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

@media (max-width: 560px) {
  .avatar-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 22px; }
  .formula { gap: 6px; }
  .formula__block { padding: 12px 14px; min-width: 100px; }
  .formula__value { font-size: 20px; }
}
