/* Quiz funnel — scoped so styles.css stays untouched. */
/* NOTE: the site is dark-themed (body bg = var(--ink-dark), text = var(--text-white)),
   so this file matches that palette rather than a generic light-card look. */

/* Minimal funnel chrome: centered logo bar, no nav, no footer (spec §1). */
.quiz-topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.quiz-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.quiz-section { padding: 56px 0 96px; min-height: 70vh; }
/* Wide container for the intro hero; individual quiz screens re-constrain to
   a readable 720px column below. */
.quiz-section .container { max-width: 1080px; }
.quiz-question, .quiz-interstitial, .quiz-gate, .quiz-result, .quiz-loading,
#quiz-root > .quiz-step-label, #quiz-root > .quiz-progress {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b6c0ff;
  background: rgba(140, 156, 255, 0.14);
  border: 1px solid rgba(140, 156, 255, 0.28);
  border-radius: 99px;
  padding: 6px 12px;
  margin-bottom: 18px;
}
.quiz-intro h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-white);
  margin: 0 0 16px;
}
.quiz-sub { color: var(--text-muted); font-size: 17px; line-height: 1.55; max-width: 560px; }
.quiz-intro .btn { margin-top: 28px; }
.quiz-meta { color: rgba(255, 255, 255, 0.55); font-size: 13px; margin-top: 14px; }

.quiz-progress { height: 4px; background: rgba(255, 255, 255, 0.12); border-radius: 2px; margin-bottom: 32px; }
.quiz-progress-bar { height: 100%; background: var(--brand); border-radius: 2px; transition: width .3s ease; }
.quiz-step-label { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }

.quiz-question h2 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-white);
  margin-bottom: 24px;
}
.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid rgba(140, 156, 255, 0.12);
  border-radius: var(--radius-card);
  background: linear-gradient(-21.5deg, rgba(21, 25, 95, 0.85) 48.571%, rgba(16, 19, 71, 0.85) 90.759%);
  color: var(--text-white);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.quiz-option:hover { border-color: rgba(140, 156, 255, 0.4); transform: translateY(-1px); }
.quiz-option.is-selected { border-color: var(--brand); background: rgba(38, 47, 210, 0.18); }
.quiz-option .key {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.quiz-interstitial { text-align: center; padding: 24px 0; }
.quiz-interstitial h2 { font-size: clamp(22px, 4vw, 30px); font-weight: 700; color: var(--text-white); margin-bottom: 12px; }
.quiz-interstitial p { color: var(--text-muted); max-width: 520px; margin: 0 auto 28px; }

.quiz-gate { text-align: center; padding: 24px 0; }
.quiz-gate h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 700; color: var(--text-white); margin-bottom: 8px; }
.quiz-gate .quiz-email-row { display: flex; gap: 10px; justify-content: center; margin: 24px auto 8px; max-width: 460px; }
.quiz-gate input[type="email"] {
  flex: 1;
  background: var(--text-white);
  color: var(--ink-deep);
  border: 1px solid #d0d5dd;
  border-radius: var(--radius-btn);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.quiz-gate input[type="email"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(38, 47, 210, 0.15); }
.quiz-consent {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: flex-start;
  max-width: 460px;
  margin: 8px auto;
  text-align: left;
}
.quiz-consent a { color: var(--text-white); text-decoration: underline; }
.quiz-error { color: #ff8a8a; font-size: 14px; min-height: 20px; }

.quiz-loading { text-align: center; padding: 64px 0; }
.quiz-loading .spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: quiz-spin 1s linear infinite;
}
@keyframes quiz-spin { to { transform: rotate(360deg); } }

.quiz-result .quiz-score { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.quiz-result .score-dial {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-white);
  background: conic-gradient(var(--brand) calc(var(--score) * 1%), rgba(255, 255, 255, 0.12) 0);
}
.quiz-result .score-dial span {
  background: var(--ink-dark);
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.quiz-waste {
  background: rgba(255, 219, 198, 0.1);
  border: 1px solid rgba(255, 219, 198, 0.35);
  color: var(--text-white);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 16px 0 28px;
  font-size: 15px;
}
.quiz-plan h3 { margin: 24px 0 6px; font-size: 19px; font-weight: 700; color: var(--text-white); }
.quiz-plan p { color: var(--text-muted); line-height: 1.65; }
.quiz-ctas { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.quiz-inbox-note { color: rgba(255, 255, 255, 0.55); font-size: 13px; margin-top: 12px; }

@media (max-width: 560px) {
  .quiz-gate .quiz-email-row { flex-direction: column; }
  .quiz-ctas { flex-direction: column; }
  .quiz-ctas .btn { width: 100%; text-align: center; }
}

/* ---------- visual polish pass (Sintra-parity) ---------- */

/* Screen entry animation — every quiz screen fades/slides in. */
@keyframes quiz-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.quiz-question, .quiz-interstitial, .quiz-gate, .quiz-result, .quiz-loading, .quiz-intro {
  animation: quiz-in 0.35s ease both;
}

/* Intro hero: copy left, diagnostic preview right. */
.quiz-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.quiz-hero-copy .quiz-sub { max-width: 480px; }

.quiz-proof { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.quiz-avatars { display: flex; list-style: none; margin: 0; padding: 0; }
.quiz-avatars li {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--ink-dark);
  margin-left: -10px;
  background: #1a1f6e;
}
.quiz-avatars li:first-child { margin-left: 0; }
.quiz-avatars img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quiz-proof p { color: rgba(255, 255, 255, 0.6); font-size: 13px; line-height: 1.4; max-width: 260px; margin: 0; }

.quiz-hero-visual { position: relative; min-height: 340px; display: grid; place-items: center; }
.quiz-wave { position: absolute; left: 50%; width: 620px; max-width: none; opacity: 0.55; pointer-events: none; }
.quiz-wave-1 { top: 12%; transform: translateX(-50%) rotate(-6deg); }
.quiz-wave-2 { bottom: 8%; transform: translateX(-50%) rotate(4deg); }

@keyframes quiz-float { from { transform: translateY(6px); } to { transform: translateY(-6px); } }
.quiz-preview-card {
  position: relative;
  width: min(360px, 100%);
  background: linear-gradient(-21.5deg, rgba(21, 25, 95, 0.92) 40%, rgba(16, 19, 71, 0.92) 95%);
  border: 1px solid rgba(140, 156, 255, 0.22);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(3, 8, 40, 0.55);
  animation: quiz-float 5s ease-in-out infinite alternate;
}
.quiz-preview-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 14px;
}
.quiz-preview-card .quiz-score { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.quiz-preview-card .score-dial {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-white);
  background: conic-gradient(var(--brand) calc(var(--score) * 1%), rgba(255, 255, 255, 0.12) 0);
}
.quiz-preview-card .score-dial span {
  background: #12164f;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.quiz-preview-card .quiz-eyebrow { margin-bottom: 4px; font-size: 10px; padding: 4px 9px; }
.quiz-preview-card h3 { color: var(--text-white); font-size: 19px; font-weight: 700; margin: 0; }
.quiz-preview-waste {
  background: rgba(255, 219, 198, 0.1);
  border: 1px solid rgba(255, 219, 198, 0.3);
  color: var(--text-white);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 14px;
}
.quiz-preview-mods { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz-chip {
  font-size: 12px;
  font-weight: 500;
  color: #b6c0ff;
  background: rgba(140, 156, 255, 0.12);
  border: 1px solid rgba(140, 156, 255, 0.25);
  border-radius: 99px;
  padding: 5px 11px;
}

/* Partner logo strip under the hero. */
.quiz-partners { margin-top: 72px; text-align: center; }
.quiz-partners-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 22px;
}
.quiz-partners-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 6vw, 64px);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.quiz-partners-list .partner-logo img {
  height: 26px;
  width: auto;
  opacity: 0.55;
  /* Same treatment as the homepage trusted-by row: uniform white silhouettes. */
  filter: brightness(0) invert(1);
  transition: opacity 0.2s ease;
}
.quiz-partners-list .partner-logo img:hover { opacity: 0.9; }
/* Trim the wider marks (Topo Centras, FPRO) so heights read evenly. */
.quiz-partners-list .partner-logo:nth-child(3) img,
.quiz-partners-list .partner-logo:nth-child(4) img { height: 20px; }

/* Interstitial illustration card. */
.quiz-interstitial-art {
  display: grid;
  place-items: center;
  background: linear-gradient(-21.5deg, rgba(21, 25, 95, 0.75) 40%, rgba(16, 19, 71, 0.75) 95%);
  border: 1px solid rgba(140, 156, 255, 0.16);
  border-radius: 14px;
  padding: 26px 20px;
  max-width: 440px;
  margin: 0 auto 26px;
}
.quiz-interstitial-art svg { width: 100%; max-width: 320px; height: auto; }

/* Gate trust row. */
.quiz-gate .quiz-proof { justify-content: center; margin-top: 26px; }

/* Result: recommended module cards. */
.quiz-mod-cards { margin-top: 32px; }
.quiz-mod-cards-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 14px;
}
.quiz-mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.quiz-mod-card {
  background: linear-gradient(-21.5deg, rgba(21, 25, 95, 0.85) 48%, rgba(16, 19, 71, 0.85) 91%);
  border: 1px solid rgba(140, 156, 255, 0.16);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.quiz-mod-card h4 { color: var(--text-white); font-size: 15px; font-weight: 700; margin: 0 0 5px; display: flex; align-items: center; gap: 8px; }
.quiz-mod-card h4 svg { flex: none; }
.quiz-mod-card p { color: var(--text-muted); font-size: 13px; line-height: 1.5; margin: 0; }

/* Responsive: stack the hero, hide the floating visual on small screens. */
@media (max-width: 900px) {
  .quiz-hero { grid-template-columns: 1fr; gap: 36px; }
  .quiz-hero-visual { min-height: 300px; order: -1; }
  .quiz-wave { width: 480px; }
}
@media (max-width: 560px) {
  .quiz-hero-visual { display: none; }
  .quiz-partners { margin-top: 48px; }
  .quiz-proof { flex-direction: column; align-items: flex-start; gap: 10px; }
}
