/* Spark Maxx Quiz — Chrome Lab (Redesign 2026.04) */
@import url('design-system.css');

*, *::before, *::after { box-sizing: border-box; }

/* ── APP SHELL ────────────────────────────────── */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  position: relative;
  overflow-x: hidden;
}

.app-dot-grid {
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(179,197,216,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

.app-glow {
  position: fixed; left: 0; right: 0; top: 0;
  height: 80%;
  background: radial-gradient(ellipse 900px 500px at 50% 0%, rgba(95,125,158,0.20), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── PROGRESS LINE ───────────────────────────── */
.progress-container {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(95,125,158,0.12);
  z-index: 100;
}
.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--sm-steel), var(--sm-offwhite));
  box-shadow: 0 0 16px rgba(223,232,242,0.4);
  transition: width 0.6s var(--ease-emphasis);
}

/* ── HEADER ──────────────────────────────────── */
.quiz-header {
  position: sticky; top: 0; z-index: 50;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border-1);
  background: rgba(18,28,43,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: space-between;
}

.quiz-wordmark {
  display: inline-flex; align-items: center;
  text-decoration: none; color: var(--fg-1);
}
.quiz-logo {
  height: 28px; width: auto; display: block;
  filter: brightness(0) invert(1);
}

.quiz-step-count {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-3);
}

.quiz-domain {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); text-decoration: none;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: color var(--dur-base);
}
.quiz-domain:hover { color: var(--fg-2); }

/* ── MAIN ────────────────────────────────────── */
.quiz-main {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 24px;
  position: relative; z-index: 1;
}

.quiz-content {
  width: 100%; max-width: 580px;
}

/* ── STEP ANIMATION ──────────────────────────── */
.step.active { animation: stepIn 0.5s var(--ease-emphasis); }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── LEAD FORM — HERO ────────────────────────── */
.lead-hero {
  display: flex; justify-content: center;
  margin-bottom: 26px;
}
.lead-hero img {
  width: 140px; height: 140px; object-fit: contain;
  animation: smFloat 10s ease-in-out infinite;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.5));
}
@keyframes smFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(8deg); }
}

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

/* ── TAG ─────────────────────────────────────── */
.sm-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(95,125,158,0.10);
  border: 1px solid rgba(95,125,158,0.22);
  border-radius: 100px;
  font-family: var(--font-mono); font-size: 10.5px;
  font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sm-mist);
  margin-bottom: 18px;
}

/* ── STEP TAG (question eyebrow) ─────────────── */
.step-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 24px; /* Aumentado de 18px */
}
.step-tag::before {
  content: ""; width: 18px; height: 1px;
  background: var(--border-strong); display: inline-block;
}

/* ── TITLES ──────────────────────────────────── */
.quiz-title {
  font-family: var(--font-display);
  font-size: 42px; line-height: 1.05;
  letter-spacing: -0.03em; font-weight: 400;
  margin: 0 0 16px; color: var(--fg-1); /* Aumentado de 12px */
  text-transform: uppercase;
}
.quiz-title em {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 300;
  text-transform: none;
}

.step-title {
  font-family: var(--font-display);
  font-size: 34px; line-height: 1.2;
  letter-spacing: -0.025em; font-weight: 400;
  margin: 0 0 16px; color: var(--fg-1); /* Aumentado de 10px */
  text-transform: uppercase;
}
.step-title em {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 300;
  text-transform: none;
}

.quiz-subtitle, .step-subtitle {
  font-size: 16px; color: var(--fg-2);
  max-width: 480px; line-height: 1.6; 
  margin: 0 0 32px; /* Adicionado margin-bottom 32px */
}
.quiz-subtitle { margin: 0 auto; }
.quiz-subtitle em { font-family: var(--font-serif); font-weight: 400; }

/* ── FORM FIELDS ─────────────────────────────── */
.lead-form { display: flex; flex-direction: column; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--sm-steel);
}
.form-group input, .form-group textarea {
  width: 100%; padding: 13px 16px;
  font-family: var(--font-body); font-size: 15px;
  color: var(--fg-1);
  background: rgba(39,53,81,0.45);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--dur-base), background var(--dur-base), box-shadow var(--dur-base);
}
.form-group input::placeholder { color: var(--fg-3); }
.form-group input:focus {
  border-color: var(--sm-steel);
  background: rgba(39,53,81,0.75);
  box-shadow: 0 0 0 4px rgba(95,125,158,0.10);
}

.field-error {
  font-size: 11px; color: var(--sm-danger);
  font-family: var(--font-mono); display: none;
}
.field-error.visible { display: block; }

.field-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

/* ── OPTIONS ─────────────────────────────────── */
.options-grid {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px;
}

.option-card {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  text-align: left;
  background: rgba(39,53,81,0.4);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s var(--ease-standard);
  color: var(--fg-1);
  font-family: var(--font-body);
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.option-card:hover {
  border-color: var(--border-strong);
  background: rgba(39,53,81,0.7);
}
.option-card.selected {
  background: rgba(223,232,242,0.06);
  border-color: var(--sm-mist);
  box-shadow: 0 0 0 3px rgba(179,197,216,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}

.option-letter {
  min-width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  background: transparent; color: var(--sm-mist);
  border-radius: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  transition: all 0.25s var(--ease-standard);
}
.option-card.selected .option-letter {
  border-color: var(--sm-offwhite);
  background: var(--sm-offwhite);
  color: var(--sm-bg-deep);
}

.option-icon { display: none; }

.option-text {
  flex: 1; font-size: 17px; font-weight: 400; line-height: 1.5;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px;
  background: var(--sm-offwhite); color: var(--sm-bg-deep);
  border: none; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
  white-space: nowrap; width: 100%;
}
.btn-primary:hover { background: var(--sm-white); }
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.btn-primary svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  background: transparent; border: none;
  border-radius: var(--radius-pill);
  color: var(--fg-2);
  font-family: var(--font-body); font-size: 14px;
  cursor: pointer;
  transition: color var(--dur-base), background var(--dur-base);
  white-space: nowrap; flex-shrink: 0;
}
.btn-secondary:hover { color: var(--fg-1); background: var(--bg-3); }

/* ── NAVIGATION ──────────────────────────────── */
.step-nav {
  display: flex; gap: 12px; align-items: center; margin-top: 8px;
}
.step-nav .btn-secondary { flex-shrink: 0; }
.step-nav .btn-primary   { flex: 1; width: auto; }

/* ── LOADING & PROGRESS ────────────────────────── */
.loading-screen {
  position: fixed; inset: 0; background: var(--bg-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 1000; padding: 40px; text-align: center;
}

.spinner-circle {
  width: 64px; height: 64px;
  border: 3px solid rgba(255,255,255,0.05);
  border-top-color: var(--sm-mist);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 40px;
}

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

.loading-title {
  font-family: var(--font-display);
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-1);
  margin-bottom: 20px;
  line-height: 1.2;
}

.loading-sub {
  font-size: 16px;
  color: var(--fg-3);
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 400px;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  max-width: 300px;
  margin: 0 auto;
}

.loading-step {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg-3); opacity: 0.4; transition: all 0.4s;
}
.loading-step.active { opacity: 1; color: #10B981; font-weight: 600; }
.loading-step::before { 
  content: ""; width: 6px; height: 6px; border-radius: 50%; 
  background: currentColor; display: block; 
}

/* ── RESULT ──────────────────────────────────── */
.result-container { position: relative; }

.result-hero {
  position: absolute; right: -40px; top: -30px;
  width: 220px; height: 220px;
  pointer-events: none; opacity: 0.95; z-index: 0;
}
.result-hero img {
  width: 100%; height: 100%; object-fit: contain;
  animation: smFloat 10s ease-in-out infinite;
  filter: drop-shadow(0 40px 60px rgba(0,0,0,0.7));
}

.result-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--sm-mist);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 20px; position: relative; z-index: 1;
}
.result-badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--sm-success); box-shadow: 0 0 6px var(--sm-success);
}

.result-head {
  position: relative; z-index: 1;
  max-width: 380px; margin-bottom: 32px;
}

.result-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sm-steel); margin-bottom: 10px;
}

.result-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 46px); line-height: 1;
  letter-spacing: -0.035em; font-weight: 400;
  margin: 0 0 18px;
  text-transform: uppercase;
  background: var(--grad-chrome);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.result-description {
  font-size: 15.5px; color: var(--fg-2);
  line-height: 1.6; margin: 0;
}

/* Chrome metric card */
.result-metric {
  display: grid; grid-template-columns: auto 1fr;
  gap: 20px; align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--border-2); border-radius: 14px;
  background: rgba(39,53,81,0.35);
  margin-bottom: 24px;
}
.result-metric-value {
  font-family: var(--font-display);
  font-size: 52px; line-height: 0.95;
  letter-spacing: -0.03em; font-weight: 700;
  background: var(--grad-chrome);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.result-metric-info {
  border-left: 1px solid var(--border-2); padding-left: 18px;
}
.result-metric-tag {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sm-steel); margin-bottom: 4px;
}
.result-metric-label {
  font-size: 14px; color: var(--fg-1); font-weight: 500;
}
.result-metric-sub {
  font-size: 13px; color: var(--fg-2); margin-top: 3px;
}

/* Solutions / bullets */
.result-solutions {
  display: grid; gap: 1px;
  margin-bottom: 32px;
  border: 1px solid var(--border-2); border-radius: 14px;
  overflow: hidden; background: var(--border-1);
}
.solution-card {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 20px;
  background: var(--bg-2);
}
.solution-check {
  color: var(--sm-mist); flex-shrink: 0;
  display: flex; align-items: center;
}
.solution-check svg {
  width: 15px; height: 15px;
  stroke-width: 1.6; stroke: currentColor; fill: none;
}
.solution-name {
  font-size: 14px; color: var(--fg-1);
}

/* CTAs */
.result-cta { display: grid; gap: 10px; }

.btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px;
  background: var(--sm-offwhite); color: var(--sm-bg-deep);
  border: none; border-radius: var(--radius-pill); text-decoration: none;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-base), transform var(--dur-fast);
}
.btn-cta:hover { background: var(--sm-white); }
.btn-cta:active { transform: translateY(1px) scale(0.99); }
.btn-cta svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; }

.btn-secondary-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px;
  background: rgba(39,53,81,0.4); 
  color: var(--fg-1);
  border: 1px solid var(--border-2); 
  border-radius: var(--radius-pill); 
  text-decoration: none;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-base), transform var(--dur-fast), border-color var(--dur-base);
}
.btn-secondary-cta:hover { 
  background: rgba(39,53,81,0.7); 
  border-color: var(--border-strong);
}
.btn-secondary-cta:active { transform: translateY(1px) scale(0.99); }
.btn-secondary-cta svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-restart {
  background: transparent; border: 0; padding: 10px;
  color: var(--fg-3); font-family: var(--font-body); font-size: 13px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  text-align: center; width: 100%;
}
.btn-restart:hover { color: var(--fg-2); }

/* ── FOOTER ──────────────────────────────────── */
.quiz-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border-1);
  background: rgba(18,28,43,0.7);
  backdrop-filter: blur(12px);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-3); position: relative; z-index: 1;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 640px) {
  .quiz-header { padding: 16px 20px; }
  .quiz-domain { display: none; }
  .quiz-main { padding: 40px 16px 60px; }
  .quiz-title { font-size: 30px; }
  .step-title { font-size: 26px; }
  .result-hero { display: none; }
  .result-title { font-size: 30px; }
  .field-grid-2 { grid-template-columns: 1fr; }
  .quiz-footer { padding: 16px 20px; flex-direction: column; gap: 4px; text-align: center; }
  .lead-hero img { width: 110px; height: 110px; }
}
