/* =====================================================================
   A.C.R.C — Quiz de Diagnóstico Elétrico · dark neon, layout limpo
   ===================================================================== */

:root {
  --bg: #07070d;
  --ink: #f4f2ea;
  --ink-dim: rgba(244, 242, 234, 0.62);
  --ink-faint: rgba(244, 242, 234, 0.38);
  --accent: #f5b301;
  --accent-hot: #ffd94d;
  --accent-soft: rgba(245, 179, 1, 0.12);
  --line: rgba(244, 242, 234, 0.09);
  --card: rgba(14, 14, 22, 0.55);
  --faixa: #f5b301;              /* muda por JS conforme resultado */
  --radius: 22px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- camadas fixas ---------- */

#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#flash {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 231, 150, 0.95), rgba(245, 179, 1, 0.35) 45%, transparent 75%);
  mix-blend-mode: screen;
}

.brand {
  position: fixed;
  top: 28px;
  left: 36px;
  z-index: 20;
  display: flex;
  align-items: baseline;
  gap: 10px;
  visibility: hidden; /* revelado por JS */
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}
.brand-tag {
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  color: var(--accent);
}

/* ---------- telas ---------- */

main { position: relative; z-index: 10; height: 100dvh; }

.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.screen.is-active { display: flex; }
.screen > * { margin: auto; }
.screen-scroll { align-items: flex-start; }

[hidden] { display: none !important; }

/* ---------- landing ---------- */

.hero {
  text-align: center;
  max-width: 1120px;
  width: 100%;
}

.hero-kicker {
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: clamp(18px, 3vh, 34px);
  visibility: hidden;
}

.hero-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(10px, 3vw, 44px);
}

.hero-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8.2vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.hero-word-left { text-align: right; }
.hero-word-right { text-align: left; color: var(--ink); }
.hero-word-right .hw-inner {
  color: transparent;
  -webkit-text-stroke: 2px rgba(244, 242, 234, 0.85);
}

.hw-line { display: block; overflow: hidden; }
.hw-inner { display: inline-block; will-change: transform; }

.hero-plug { width: clamp(84px, 11vw, 150px); }
.hero-plug svg { width: 100%; height: auto; display: block; }

.plug-stroke {
  stroke: var(--accent);
  stroke-width: 13;
  fill: none;
  filter: url(#plugGlow);
}
.plug-stroke.thin { stroke-width: 10; }
.plug-fill { fill: var(--accent); filter: url(#plugGlow); }
.plug-arc {
  stroke: var(--accent-hot);
  stroke-width: 3.5;
  fill: none;
  stroke-linejoin: round;
  filter: url(#plugGlow);
  opacity: 0;
}

.hero-sub {
  margin-top: clamp(20px, 3.4vh, 38px);
  color: var(--ink-dim);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  visibility: hidden;
}

.hero-cta {
  margin-top: clamp(22px, 4vh, 42px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* ---------- botões ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  padding: 16px 42px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-hot), var(--accent));
  color: #131007;
  box-shadow:
    0 0 0 1px rgba(255, 226, 122, 0.55) inset,
    0 6px 28px rgba(245, 179, 1, 0.35),
    0 0 60px rgba(245, 179, 1, 0.18);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 236, 160, 0.8) inset,
    0 10px 36px rgba(245, 179, 1, 0.5),
    0 0 90px rgba(245, 179, 1, 0.3);
}
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-bolt { font-size: 0.95em; }

.btn-block { width: 100%; margin-top: 8px; }

.link-ghost {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}
.link-ghost:hover { color: var(--ink-dim); }

/* ---------- quiz ---------- */

.quiz-shell {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 56px;
  padding-bottom: 24px;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.btn-back {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.btn-back:hover { color: var(--ink); border-color: rgba(245, 179, 1, 0.4); }
.btn-back[disabled] { opacity: 0; pointer-events: none; }

.meter {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(244, 242, 234, 0.08);
  overflow: visible;
}
.meter-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  box-shadow: 0 0 14px rgba(245, 179, 1, 0.55);
  transform-origin: left center;
  transform: scaleX(0);
}
.meter-spark {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8dc 0%, var(--accent-hot) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  filter: blur(0.4px);
}

.quiz-count {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.qcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 4.5vw, 46px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.q-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  color: var(--accent);
  margin-bottom: 16px;
}
.q-eyebrow.accent { color: var(--accent); }

.q-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.q-hint {
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.q-options {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: rgba(244, 242, 234, 0.028);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 15px 18px;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease;
}
.opt:hover {
  border-color: rgba(245, 179, 1, 0.45);
  background: rgba(245, 179, 1, 0.05);
  transform: translateX(5px);
}
.opt.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 24px rgba(245, 179, 1, 0.18), 0 0 0 1px rgba(245, 179, 1, 0.35) inset;
}
.opt.is-dimmed { opacity: 0.35; }

.opt-key {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  transition: all 0.22s ease;
}
.opt:hover .opt-key { border-color: rgba(245, 179, 1, 0.5); color: var(--accent); }
.opt.is-selected .opt-key {
  background: var(--accent);
  border-color: var(--accent);
  color: #131007;
  box-shadow: 0 0 16px rgba(245, 179, 1, 0.6);
}

.btn-continue { margin-top: 24px; }

/* faíscas DOM (burst nas respostas) */
.spark-bit {
  position: fixed;
  z-index: 60;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  pointer-events: none;
  box-shadow: 0 0 8px currentColor;
}

/* ---------- lead ---------- */

.lead-shell { width: min(560px, 100%); }
.lead-card { width: 100%; }

.lead-sub { color: var(--ink-dim); margin-bottom: 26px; }

#lead-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.field label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.field input {
  background: rgba(244, 242, 234, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder { color: rgba(244, 242, 234, 0.25); }
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 179, 1, 0.14);
}

.field-row { display: flex; gap: 14px; }

.field-note { font-size: 0.78rem; color: var(--ink-faint); }
.field-note em { color: var(--accent); font-style: normal; }

.field-error {
  font-size: 0.82rem;
  color: #ff8080;
  border: 1px solid rgba(255, 64, 64, 0.35);
  background: rgba(255, 64, 64, 0.07);
  border-radius: 10px;
  padding: 10px 14px;
}

/* ---------- scan ---------- */

.scan-shell {
  width: min(520px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.scan-line {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  letter-spacing: 0.22em;
  color: var(--accent);
  min-height: 1.6em;
}

.scan-meter {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(244, 242, 234, 0.08);
  overflow: hidden;
}
.scan-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  box-shadow: 0 0 18px rgba(245, 179, 1, 0.6);
  transform-origin: left center;
  transform: scaleX(0);
}

.scan-pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.direct-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

/* ---------- resultado ---------- */

.result-shell {
  width: min(760px, 100%);
  margin: auto;
  padding: clamp(70px, 10vh, 110px) 0 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.r-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.r-eyebrow.accent { color: var(--accent); }

.r-faixa {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 6.4rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--faixa);
  text-shadow:
    0 0 18px color-mix(in srgb, var(--faixa) 55%, transparent),
    0 0 70px color-mix(in srgb, var(--faixa) 30%, transparent);
  margin-bottom: 26px;
}

.r-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  margin-bottom: 12px;
}

.r-sub {
  color: var(--ink-dim);
  max-width: 58ch;
  margin-bottom: 10px;
}

.r-focus {
  color: var(--ink-faint);
  font-size: 0.88rem;
  font-style: italic;
  margin-bottom: 6px;
}

.r-gauge { width: min(560px, 100%); margin: 34px 0 8px; }

.r-gauge-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2fe08c 0%, #f5b301 38%, #ff7a29 62%, #ff4040 100%);
  opacity: 0.9;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.4) inset;
}

.r-gauge-marker {
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--bg);
  box-shadow: 0 0 16px color-mix(in srgb, var(--faixa) 80%, transparent);
  transform: translate(-50%, -50%);
}

.r-marker-score {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  background: rgba(14, 14, 22, 0.85);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.r-gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.r-alerts {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
}
.r-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  background: rgba(255, 64, 64, 0.07);
  border: 1px solid rgba(255, 64, 64, 0.3);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: #ffc9c9;
}
.r-alert::before { content: '⚠'; color: #ff8080; }

.r-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.r-metric {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  font-size: 0.88rem;
  color: var(--ink-dim);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.r-metric strong { color: var(--accent); display: block; margin-bottom: 6px; font-size: 0.68rem; letter-spacing: 0.24em; }

.r-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.r-disclaimer {
  margin-top: 30px;
  font-size: 0.75rem;
  color: var(--ink-faint);
  max-width: 52ch;
}

/* ---------- responsivo ---------- */

@media (max-width: 720px) {
  .brand { left: 20px; top: 20px; }
  .hero-title { grid-template-columns: 1fr; gap: 6px; }
  .hero-word-left, .hero-word-right { text-align: center; }
  .hero-plug { margin: 6px auto; width: 72px; }
  .field-row { flex-direction: column; }
  .quiz-top { flex-wrap: wrap; }
  .screen { padding: 16px; }
  body { overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
