/* ─────────────────────────────────────────────
   BLOCO 5 — PIVOT
   Section warm bg (break dramático após Mecanismo dark).
   Frase serif Fraunces gigante centralizada com strike animado em "disciplina"
   e itálico WONK gradient em "direção". ECG ghost batendo no fundo.
   ───────────────────────────────────────────── */

.pivot {
  position: relative;
  background: var(--bg);
  padding: clamp(80px, 10vw, 130px) 0 clamp(28px, 3.5vw, 48px);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

/* ECG ghost batendo de fundo (opacity baixa, animação de pulse cardíaco) */
.pivot__ecg {
  position: absolute;
  inset: 50% 0 auto 0;
  height: 220px;
  transform: translateY(-50%);
  width: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  display: flex;
  align-items: center;
}

.pivot__ecg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pivot__ecg .ecg-line {
  fill: none;
  stroke: var(--terracota);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  animation: ecgDraw 3.6s linear infinite;
  filter: drop-shadow(0 0 8px rgba(226, 82, 45, 0.4));
}

@keyframes ecgDraw {
  0%   { stroke-dashoffset: 3000; }
  60%  { stroke-dashoffset: 0; }
  85%  { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -3000; opacity: 0; }
}

/* Frase central */
.pivot__phrase {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 88px);
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 940px;
  margin: 0 auto;
}

.pivot__phrase .strike {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.pivot__phrase .strike::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 56%;
  height: 5px;
  background: var(--text);
  border-radius: 999px;
  transform: scaleX(0) rotate(-3deg);
  transform-origin: left center;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.pivot.is-revealed .pivot__phrase .strike::after {
  transform: scaleX(1) rotate(-3deg);
}

.pivot__phrase .direction {
  display: inline-block;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  background: linear-gradient(120deg, var(--purple) 0%, var(--terracota) 90%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  cursor: default;
  transition: filter 320ms var(--ease-out);
}

.pivot__phrase .direction::after {
  /* Glow sutil ao hover */
  content: "";
  position: absolute;
  inset: -8px -12px;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.28), rgba(226, 82, 45, 0.22), transparent 75%);
  z-index: -1;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 320ms var(--ease-out);
  filter: blur(12px);
}

.pivot__phrase .direction:hover::after {
  opacity: 1;
}

.pivot__phrase .direction:hover {
  filter: brightness(1.15) saturate(1.1);
}

/* Pulso pequeno embaixo da frase (transição visual pra próxima section) */
.pivot__pulse {
  margin-top: 56px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  position: relative;
  z-index: 1;
}

.pivot__pulse::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracota);
  animation: pulse 2.4s ease-out infinite;
}

/* Animação ao scrollar — entra com fade-up sutil */
.pivot__phrase {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}

.pivot.is-revealed .pivot__phrase {
  opacity: 1;
  transform: translateY(0);
}

.pivot__pulse {
  opacity: 0;
  transition: opacity 800ms var(--ease-out) 800ms;
}

.pivot.is-revealed .pivot__pulse {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pivot__ecg .ecg-line,
  .pivot__pulse::before { animation: none !important; }
  .pivot__phrase .strike::after { transform: scaleX(1) rotate(-3deg); }
}
