/* ==========================================================================
   Marcos Berto · Motion
   Conceito: "acompanhamento ao vivo". A página se comporta como uma sessão
   de treino monitorada: pulso, diagnóstico, plano, evolução. Cada animação
   encena o que o texto ao lado está dizendo.
   ========================================================================== */

/* Evita o "pisca" do título antes do JS montar a animação.
   Se o JS falhar, .motion-fallback (head) devolve a visibilidade. */
.js #hero-title,
.js #hero-sub,
.js #hero-cta,
.js #hero-anywhere {
  visibility: hidden;
}
.motion-fallback #hero-title,
.motion-fallback #hero-sub,
.motion-fallback #hero-cta,
.motion-fallback #hero-anywhere {
  visibility: visible;
}

/* Linhas com máscara para textos que sobem de dentro de si mesmos */
.split-line {
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

/* ── Barra de progresso da página (o "treino" da visita) ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 70;
  background: linear-gradient(90deg, var(--color-closed-red), #e02a00);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(var(--color-open-red-alpha), 0.8);
}

/* ── Hero: palavra-chave com traço desenhado ── */
.hero-key {
  position: relative;
  display: inline-block;
}
/* vermelho mais claro que o da marca só aqui: contraste legível sobre o preto */
.hero-key-text {
  color: #ff3b1f;
}
.hero-key-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: 0.065em;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--color-open-red), #e02a00);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ── Hero: "Treine em casa / academia / parque / viagem" ── */
.anywhere-roll {
  display: inline-grid;
  height: 1.5em;
  overflow: hidden;
  vertical-align: bottom;
}
.anywhere-roll > span {
  grid-area: 1 / 1;
  line-height: 1.5em;
  white-space: nowrap;
}

/* ── Hero: HUD da sessão ao vivo sobre a foto ── */
.hud-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #ff2d1a;
  box-shadow: 0 0 0 0 rgba(255, 45, 26, 0.6);
  animation: hud-ping 1.6s ease-out infinite;
}
@keyframes hud-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 45, 26, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(255, 45, 26, 0);
  }
}
/* Contador de repetições: o personal acompanhando a série */
.rep-ex-wrap {
  height: 1.35em;
  overflow: hidden;
}
.rep-ex {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35em;
  color: #fff;
}
.rep-meta {
  font-size: 11px;
  color: #9ca3af;
}
.rep-set {
  color: #fff;
  font-weight: 600;
}
.rep-count {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 1.3ch;
  text-align: right;
}
.rep-total {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}
.rep-ticks {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-top: 10px;
}
.rep-tick {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  transform-origin: 50% 100%;
}
.rep-tick.is-done {
  background: #e02a00;
  box-shadow: 0 0 8px rgba(224, 42, 0, 0.6);
}
.rep-tracker.is-complete .rep-tick {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}
.rep-cue {
  height: 1.5em;
  margin-top: 8px;
  overflow: hidden;
}
.rep-cue-text {
  display: inline-block;
  font-size: 12px;
  line-height: 1.5em;
  color: #d1d5db;
}
.rep-cue-text::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 99px;
  background: #e02a00;
  vertical-align: 1px;
}
.rep-tracker.is-complete .rep-cue-text::before {
  background: #22c55e;
}
.rep-tracker--mini .rep-count {
  font-size: 24px;
}

/* ── Letreiro: o JS assume o movimento (reage à rolagem) ── */
.motion-on .ticker-content {
  animation: none;
}
.ticker-content span {
  will-change: transform;
}

/* ── Sobre: marca-texto nas 3 palavras da personalização ── */
.mark-sweep {
  background-image: linear-gradient(
    90deg,
    rgba(var(--color-open-red-alpha), 0.55),
    rgba(var(--color-open-red-alpha), 0.55)
  );
  background-repeat: no-repeat;
  background-position: 0 90%;
  background-size: 0% 46%;
  padding: 0 0.12em;
  margin: 0 -0.12em;
  border-radius: 3px;
}

/* ── Como funciona: telas que encenam cada passo ── */
.process-scene {
  position: relative;
  height: 128px;
  border-radius: 14px;
  background:
    radial-gradient(
      120% 90% at 50% 0%,
      rgba(var(--color-open-red-alpha), 0.1),
      transparent 60%
    ),
    #0b0b0b;
  border: 1px solid #1c1c1c;
  overflow: hidden;
}
.process-scene svg {
  width: 100%;
  height: 100%;
  display: block;
}
.process-scene text {
  font-family: "Inter", sans-serif;
}
.process-scene .sc-fill,
.process-scene .sc-bar {
  transform-box: fill-box;
}
.process-scene .sc-fill {
  transform-origin: 0 50%;
}
.process-scene .sc-bar {
  transform-origin: 50% 100%;
}
.process-scene .sc-pop {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.process-scene-tag {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
  transition: color 0.4s ease;
}
.process-step.is-active .process-scene-tag {
  color: #e02a00;
}

/* ── Serviços: holofote que segue o cursor ── */
.spotlight {
  position: relative;
  isolation: isolate;
}
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, -40%),
    rgba(var(--color-open-red-alpha), 0.16),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: -1;
}
.spotlight:hover::before {
  opacity: 1;
}
.icon-rec {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.pin-ripple {
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(var(--color-open-red-alpha), 0.9);
  opacity: 0;
  pointer-events: none;
}

/* ── Bônus: presente que abre ── */
.gift-svg .gift-lid {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.gift-svg .gift-spark {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* ── Galeria: parallax dentro da moldura ── */
.motion-on .gallery-item img {
  transform: translate3d(0, var(--py, 0px), 0) scale(var(--gs, 1.12));
  transition: none;
}
.motion-on .gallery-item:hover img {
  --gs: 1.18;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── CTA final: eletrocardiograma ── */
/* ── CTA final: barra olímpica sendo carregada e levantada ── */
.cta-barbell svg {
  display: block;
  overflow: visible;
}
.cta-barbell .bb-bar {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.cta-barbell .bb-shadow {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* ── Movimento reduzido: tudo pronto, nada se mexe ── */
@media (prefers-reduced-motion: reduce) {
  .js #hero-title,
  .js #hero-sub,
  .js #hero-cta,
  .js #hero-anywhere {
    visibility: visible;
  }
  .hud-live-dot {
    animation: none;
  }
  .mark-sweep {
    background-size: 100% 46%;
  }
  .hero-key-line {
    transform: scaleX(1);
  }
  .motion-on .gallery-item img {
    transform: none;
  }
}
