* {
  box-sizing: border-box;
}

:root {
  --navy: #071527;
  --navy-2: #0d223b;
  --gold: #d8a931;
  --gold-dark: #b88b1f;
  --white: #ffffff;
  --paper: #f5f7fb;
  --ink: #172033;
  --muted: #6d7788;
  --line: #e4e8f0;
  --success: #1f8a4c;
  --danger: #b42318;
  --shadow: 0 20px 60px rgba(7, 21, 39, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--white);
  border-bottom: 4px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.header-content {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px;
}

.logo-pm {
  width: 78px;
  height: 78px;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 800;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.hero {
  background:
    radial-gradient(circle at 20% 10%, rgba(216, 169, 49, 0.22), transparent 34%),
    linear-gradient(135deg, #08182d, #102a48);
  color: var(--white);
  padding: 76px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 32px;
  align-items: center;
}

.badge {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(216, 169, 49, 0.45);
  border-radius: 999px;
  color: #ffe09a;
  background: rgba(216, 169, 49, 0.1);
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.02;
  max-width: 780px;
  margin-bottom: 18px;
}

.hero p {
  color: #d9e3f3;
  max-width: 680px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #f3cf66);
  color: #1a1404;
  box-shadow: 0 14px 30px rgba(216, 169, 49, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
}

.btn-large {
  min-width: 220px;
}

.score-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.score-label {
  color: #d9e3f3;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.score-card strong {
  display: block;
  font-size: 3rem;
  margin-bottom: 14px;
}

.progress {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress div {
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.25s ease;
}

.score-card small {
  color: #d9e3f3;
  line-height: 1.5;
}

.instructions,
.exam-shell {
  margin-top: 34px;
}

.instructions {
  background: var(--white);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 10px 35px rgba(7, 21, 39, 0.08);
  border: 1px solid var(--line);
}

.instructions h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.instructions ul {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-title {
  margin: 44px 0 20px;
}

.section-title p {
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 900;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.section-title h3 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.questions-list {
  display: grid;
  gap: 18px;
}

.question-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 12px 34px rgba(7, 21, 39, 0.07);
}

.question-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.question-number {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.subject {
  color: var(--gold-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-text {
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.question-image-wrap {
  margin: 16px 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #f8fafc;
}

.question-image {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.option:hover {
  border-color: rgba(216, 169, 49, 0.65);
  background: #fffaf0;
}

.option input {
  margin-top: 3px;
  accent-color: var(--gold-dark);
}

.option:has(input:checked) {
  border-color: var(--gold-dark);
  background: #fff7df;
}

.submit-area {
  text-align: center;
  padding: 34px 0 64px;
}

.finish-message {
  margin-top: 14px;
  color: var(--success);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(7, 21, 39, 0.66);
  z-index: 100;
}

.modal-overlay.active {
  display: grid;
}

.modal {
  width: min(430px, 100%);
  background: var(--white);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.3);
  position: relative;
  animation: pop 0.2s ease;
}

.result-modal {
  width: min(520px, 100%);
  text-align: center;
}

@keyframes pop {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 0;
  background: #eef2f7;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-kicker {
  color: var(--gold-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 900;
  margin-bottom: 8px;
}

.modal h3 {
  font-size: 1.55rem;
  margin-bottom: 8px;
}

.modal-copy {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.result-score {
  margin: 18px auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--white);
  display: grid;
  place-items: center;
  align-content: center;
  border: 5px solid var(--gold);
  box-shadow: 0 16px 45px rgba(7, 21, 39, 0.2);
}

.result-score span {
  font-size: 3.3rem;
  font-weight: 950;
  line-height: 1;
}

.result-score small {
  color: #d9e3f3;
  font-weight: 800;
}

.result-main-text {
  color: var(--ink);
  font-weight: 850;
  font-size: 1.03rem;
}

.result-study-text {
  margin-bottom: 20px;
}

.whatsapp-result-btn {
  background: linear-gradient(135deg, #25d366, #8df0b2);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.25);
}

#leadForm {
  display: grid;
  gap: 12px;
}

#leadForm label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  font-size: 0.88rem;
}

#leadForm input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 0.96rem;
  outline: none;
}

#leadForm input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 4px rgba(216, 169, 49, 0.14);
}

#leadForm small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.modal-submit {
  width: 100%;
  margin-top: 4px;
}

.lead-error {
  color: var(--danger);
  font-size: 0.84rem;
  margin: 0;
  font-weight: 800;
}

.floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 80;
  background: #25d366;
  color: #052b16;
  text-decoration: none;
  font-weight: 950;
  border-radius: 999px;
  padding: 14px 18px;
  box-shadow: 0 16px 45px rgba(7, 21, 39, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-whatsapp::before {
  content: "✆";
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.55);
}

.floating-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 55px rgba(7, 21, 39, 0.32);
}

footer {
  background: var(--navy);
  color: #d9e3f3;
  padding: 24px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.footer-content p {
  margin: 0;
}

@media (max-width: 780px) {
  .header-content {
    min-height: 82px;
  }

  .logo {
    width: 58px;
    height: 58px;
  }

  .logo-pm {
    width: 62px;
    height: 62px;
  }

  .hero {
    padding: 48px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .question-card {
    padding: 18px;
  }

  .option {
    grid-template-columns: 20px 1fr;
  }

  .floating-whatsapp {
    right: 14px;
    bottom: 14px;
    padding: 12px 14px;
  }

  .floating-whatsapp span {
    display: none;
  }

  .result-score {
    width: 132px;
    height: 132px;
  }
}


.option-correct {
  border-color: #1f8a4c !important;
  background: #eaf8f0 !important;
}

.option-correct span::after {
  content: " ✓ Correta";
  color: #1f8a4c;
  font-weight: 950;
  margin-left: 8px;
}

.option-wrong {
  border-color: #b42318 !important;
  background: #fff1f0 !important;
}

.option-wrong span::after {
  content: " ✕ Sua resposta";
  color: #b42318;
  font-weight: 950;
  margin-left: 8px;
}

.question-explanation {
  margin-top: 16px;
  border-left: 5px solid var(--gold);
  background: #fffaf0;
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--ink);
  line-height: 1.6;
}

.question-explanation strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
}

.question-explanation p {
  margin: 0;
  color: var(--muted);
}

.correction-action {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.correction-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.exam-shell.correction-mode .option {
  cursor: default;
}


/* Ajustes para experiência PWA em celular */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .topbar {
    position: sticky;
    top: 0;
  }
}
