/* ─────────────────────────────────────────────
   BLOCO 3 — QUEBRA DE REALIDADE
   Section dark ink. Headline serif gigante white.
   2 colunas (Simulado vs Prova real) com 10 quadradinhos cada.
   ───────────────────────────────────────────── */

.quebra {
  position: relative;
  background: var(--ink);
  color: var(--text-on-ink);
  padding: clamp(80px, 10vw, 140px) 0;
  overflow: hidden;
  isolation: isolate;
}

/* Mesh atmosférico no fundo (purple/teal/terracota muito sutil) */
.quebra::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(226, 82, 45, 0.10) 0%, transparent 45%);
  pointer-events: none;
  z-index: -1;
}

/* Brilho de entrada/saída pra integrar com seções vizinhas */
.quebra::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(124, 58, 237, 0.5) 30%, rgba(226, 82, 45, 0.5) 70%, transparent 100%);
}

.quebra__eyebrow {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 20px;
}

.quebra__eyebrow::before {
  content: "● ";
  color: var(--terracota);
}

.quebra h2 {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 84px);
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--text-on-ink);
  max-width: 980px;
  margin: 0 auto 18px;
}

.quebra h2 .serif-italic {
  /* Reaproveita o gradient do hero pra manter consistência tipográfica */
  background: linear-gradient(120deg, #B388FF 0%, var(--terracota) 90%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.quebra__sub {
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(251, 250, 247, 0.6);
  max-width: 540px;
  margin: 0 auto 70px;
}

/* ─── Comparação 2 colunas ─────────────────────── */

.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: stretch;
  max-width: 880px;
  margin: 0 auto;
  position: relative;
}

.compare__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.compare__divider {
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.18) 30%, rgba(255, 255, 255, 0.18) 70%, transparent 100%);
}

.compare__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251, 250, 247, 0.55);
  font-weight: 500;
}

/* Grid de quadradinhos 5×2 */
.compare__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 280px;
}

.compare__cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out), background 240ms var(--ease-out), border-color 240ms;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.compare__cell.is-revealed {
  opacity: 1;
  transform: scale(1);
}

.compare__cell.is-correct {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
}

.compare__cell.is-correct::after {
  content: "";
  width: 40%;
  height: 40%;
  border: 2px solid var(--pulse-green);
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(2px, -2px);
  opacity: 0;
  animation: drawCheck 360ms var(--ease-out) forwards;
}

.compare__cell.is-wrong {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
}

.compare__cell.is-wrong::before,
.compare__cell.is-wrong::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 2px;
  background: var(--pulse-red);
  border-radius: 1px;
  opacity: 0;
  animation: drawX 320ms var(--ease-out) forwards;
}

.compare__cell.is-wrong::before { transform: rotate(45deg); }
.compare__cell.is-wrong::after { transform: rotate(-45deg); animation-delay: 80ms; }

@keyframes drawCheck {
  from { opacity: 0; transform: rotate(-45deg) translate(2px, -2px) scale(0.4); }
  to   { opacity: 1; transform: rotate(-45deg) translate(2px, -2px) scale(1); }
}

@keyframes drawX {
  from { opacity: 0; width: 0; }
  to   { opacity: 1; width: 50%; }
}

/* Tooltip por célula */
.compare__cell[data-tooltip]::before {
  /* Usado só no .is-wrong, então aqui sobrescrevo pro hover quando NÃO é wrong */
}

.compare__cell:not(.is-wrong)[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--bg);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 5;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.4);
  animation: none;
  width: auto;
  height: auto;
  border: 0;
  opacity: 1;
}

.compare__num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(56px, 7vw, 88px);
  font-weight: 380;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-on-ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}

.compare__num small {
  font-family: var(--font-mono);
  font-size: 0.32em;
  color: rgba(251, 250, 247, 0.5);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.compare__num--red { color: var(--pulse-red); }

/* Switcher de prova abaixo da comparação */
.compare__switcher {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compare__pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(251, 250, 247, 0.55);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 200ms, background 200ms, border-color 200ms;
}

.compare__pill:hover {
  color: var(--text-on-ink);
  background: rgba(255, 255, 255, 0.08);
}

.compare__pill.is-active {
  color: var(--text-on-ink);
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 14px -2px rgba(124, 58, 237, 0.4);
}

/* Verdict — frase final centralizada */
.quebra__verdict {
  text-align: center;
  margin: 80px auto 0;
  max-width: 720px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  line-height: 1.25;
  color: rgba(251, 250, 247, 0.85);
  letter-spacing: -0.01em;
}

.quebra__verdict .serif-italic {
  background: linear-gradient(120deg, #B388FF 0%, var(--terracota) 90%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Responsivo ─────────────────────── */

@media (max-width: 720px) {
  .compare {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .compare__divider {
    display: none;
  }
  .compare__grid {
    max-width: 240px;
  }
  .quebra__sub {
    margin-bottom: 48px;
  }
  .quebra__verdict {
    margin-top: 56px;
  }
}
