/* ==========================================================================
   A Frequência da Prosperidade — estilos
   Direção: dark luxury (preto profundo + dourado), tipografia editorial.
   Mobile-first, breakpoint 768px. Animações só em transform/opacity.
   ========================================================================== */

:root {
  /* Cores */
  --cor-fundo: #090909;
  --cor-fundo-elevado: #121110;
  --cor-dourado: #c9a84c;
  --cor-dourado-claro: #e4cf8a;
  --cor-texto: #e8e0d0;
  --cor-texto-suave: #a39b8b;
  --cor-borda: rgba(201, 168, 76, 0.22);

  /* Tipografia */
  --fonte-titulo: "Playfair Display", Georgia, serif;
  --fonte-corpo: "Lato", system-ui, sans-serif;
  --texto-base: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --texto-headline: clamp(2rem, 1.2rem + 3.6vw, 3.75rem);
  --texto-secao: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);

  /* Espaçamento e ritmo */
  --espaco-secao: clamp(2.5rem, 2rem + 3vw, 5rem);
  --largura-max: 960px;
  --raio: 14px;

  /* Movimento */
  --dur: 320ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--cor-fundo);
  /* Atmosfera: leve brilho dourado no topo */
  background-image: radial-gradient(
    110% 60% at 50% -10%,
    rgba(201, 168, 76, 0.12),
    transparent 60%
  );
  color: var(--cor-texto);
  font-family: var(--fonte-corpo);
  font-size: var(--texto-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--largura-max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================= TOPO ============================= */

.topo {
  max-width: var(--largura-max);
  margin: 0 auto;
  padding: clamp(2rem, 1rem + 5vw, 4rem) 16px 1.5rem;
  text-align: center;
}

.headline {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: var(--texto-headline);
  line-height: 1.1;
  margin: 0 0 0.6em;
  color: var(--cor-texto);
  letter-spacing: -0.01em;
}

.subheadline {
  max-width: 44ch;
  margin: 0 auto;
  color: var(--cor-texto-suave);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
}

/* Headline oculta até a config (variante A/B) chegar. Se o JS falhar,
   a animação a revela sozinha depois de 2,5 s. */
.js-carregando .topo {
  visibility: hidden;
  animation: revelar-topo 0s 2.5s forwards;
}

@keyframes revelar-topo {
  to {
    visibility: visible;
  }
}

/* ============================= PLAYER ============================= */

.player-wrap {
  margin: clamp(1rem, 0.5rem + 2vw, 2rem) 0;
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.9);
}

.player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

/* Overlay para ativar o som */
.overlay-som {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(9, 9, 9, 0.55);
  backdrop-filter: blur(2px);
  color: var(--cor-texto);
  font-family: var(--fonte-corpo);
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.3rem);
  cursor: pointer;
  transition: opacity var(--dur) var(--ease);
}

.overlay-som:hover,
.overlay-som:focus-visible {
  background: rgba(9, 9, 9, 0.4);
  outline: none;
}

.overlay-icone {
  font-size: 2.6rem;
  animation: pulsar 2s infinite;
}

.overlay-texto {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--cor-dourado);
  border-radius: 999px;
  color: var(--cor-dourado-claro);
}

@keyframes pulsar {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.8;
  }
}

/* Barra de progresso somente leitura */
.barra-progresso {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none; /* sem seek */
}

.barra-preenchida {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cor-dourado), var(--cor-dourado-claro));
  transition: width 250ms linear;
}

/* ============================= CTA ============================= */

.cta-block {
  text-align: center;
  padding: var(--espaco-secao) 0 1rem;
}

.botao-cta {
  display: inline-block;
  min-height: 56px;
  padding: 1rem 2.4rem;
  background: linear-gradient(135deg, var(--cor-dourado), var(--cor-dourado-claro));
  color: #1a1403;
  font-family: var(--fonte-corpo);
  font-weight: 700;
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.3rem);
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 12px 30px -8px rgba(201, 168, 76, 0.55);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.botao-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 40px -8px rgba(201, 168, 76, 0.7);
}

.botao-cta:active {
  transform: translateY(0) scale(0.99);
}

.botao-cta:focus-visible {
  outline: 3px solid var(--cor-dourado-claro);
  outline-offset: 3px;
}

.cta-microcopy {
  margin: 1rem 0 0;
  color: var(--cor-texto-suave);
  font-size: 0.95rem;
}

/* ============================= OFERTA (Parte 2) ============================= */

.oferta {
  padding: var(--espaco-secao) 0;
  border-top: 1px solid var(--cor-borda);
}

.secao-titulo {
  font-family: var(--fonte-titulo);
  font-size: var(--texto-secao);
  text-align: center;
  margin: 0 0 1.5rem;
}

.secao-subtitulo {
  font-family: var(--fonte-titulo);
  font-size: 1.3rem;
  margin: 0 0 0.6rem;
  color: var(--cor-dourado-claro);
}

.lista-entregaveis,
.lista-bonus {
  max-width: 34rem;
  margin: 0 auto 2rem;
  padding: 0;
  list-style: none;
}

.lista-entregaveis li,
.lista-bonus li {
  position: relative;
  padding: 0.6rem 0 0.6rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lista-entregaveis li::before,
.lista-bonus li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--cor-dourado);
}

/* Capa 3D do livro (só CSS) */
.livro-3d {
  perspective: 1200px;
  display: flex;
  justify-content: center;
  margin: 2.5rem 0;
}

.livro-capa {
  position: relative;
  width: 200px;
  height: 290px;
  transform-style: preserve-3d;
  transform: rotateY(-22deg);
  background: linear-gradient(135deg, #1b1710, #2a2314);
  border-radius: 4px 8px 8px 4px;
  box-shadow: 14px 20px 40px -10px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Lombada do livro */
.livro-capa::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 100%;
  background: linear-gradient(90deg, #000, #15110a);
  transform: translateX(-14px) rotateY(90deg);
  transform-origin: right;
  border-radius: 4px 0 0 4px;
}

.livro-titulo {
  font-family: var(--fonte-titulo);
  font-size: 1.05rem;
  text-align: center;
  color: var(--cor-dourado-claro);
  border: 1px solid var(--cor-dourado);
  padding: 1rem 0.6rem;
  line-height: 1.2;
}

/* Bloco de preço */
.preco-bloco {
  text-align: center;
  margin: 2.5rem auto;
  padding: 2rem 1.5rem;
  max-width: 30rem;
  background: var(--cor-fundo-elevado);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
}

.preco-de {
  margin: 0;
  color: var(--cor-texto-suave);
  font-size: 1.1rem;
}

.preco-por {
  margin: 0.2rem 0 1.5rem;
  font-size: 1.4rem;
}

.preco-por strong {
  font-family: var(--fonte-titulo);
  font-size: clamp(2.5rem, 1.5rem + 4vw, 3.5rem);
  color: var(--cor-dourado-claro);
  display: block;
  line-height: 1.1;
}

.bonus {
  max-width: 34rem;
  margin: 2.5rem auto;
}

/* Garantia */
.garantia {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  max-width: 34rem;
  margin: 2.5rem auto 0;
  padding: 1.5rem;
  background: var(--cor-fundo-elevado);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
}

.garantia-selo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--cor-dourado);
  font-family: var(--fonte-titulo);
  font-size: 1.8rem;
  color: var(--cor-dourado-claro);
}

/* ============================= PROVA SOCIAL ============================= */

.prova-social {
  padding: var(--espaco-secao) 0;
  border-top: 1px solid var(--cor-borda);
}

.depoimentos {
  display: grid;
  gap: 1.2rem;
}

.depoimento {
  margin: 0;
  padding: 1.5rem;
  background: var(--cor-fundo-elevado);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
  border-left: 3px solid var(--cor-dourado);
}

.depoimento p {
  margin: 0 0 0.8rem;
  font-style: italic;
}

.depoimento footer {
  color: var(--cor-dourado-claro);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ============================= FAQ ============================= */

.faq {
  padding: var(--espaco-secao) 0;
  border-top: 1px solid var(--cor-borda);
}

.faq details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0;
}

.faq summary {
  cursor: pointer;
  padding: 0.8rem 0;
  font-weight: 700;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--cor-dourado);
}

.faq details[open] summary::after {
  content: "−";
}

.faq p {
  margin: 0 0 0.8rem;
  color: var(--cor-texto-suave);
}

/* ============================= RODAPÉ ============================= */

.rodape {
  text-align: center;
  padding: var(--espaco-secao) 16px 2rem;
  color: var(--cor-texto-suave);
  font-size: 0.85rem;
  border-top: 1px solid var(--cor-borda);
}

.rodape-aviso {
  max-width: 44ch;
  margin: 0.5rem auto 0;
  opacity: 0.7;
}

/* ============================= NOSCRIPT ============================= */

.noscript {
  max-width: var(--largura-max);
  margin: 2rem auto;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
}

/* ============================= ANIMAÇÃO DE UNLOCK ============================= */

.fade-in {
  animation: aparecer 600ms var(--ease) both;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= CHECKOUT (modal PIX) ============================= */

.co-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  animation: aparecer 200ms var(--ease) both;
}

.co-caixa {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  background: var(--cor-fundo-elevado);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}

.co-fechar {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--cor-texto-suave);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}

.co-fechar:hover {
  color: var(--cor-texto);
}

.co-titulo {
  font-family: var(--fonte-titulo);
  font-size: 1.5rem;
  margin: 0 0 0.4rem;
  text-align: center;
}

.co-titulo.co-ok {
  color: var(--cor-dourado-claro);
}

.co-sub {
  margin: 0 0 1.2rem;
  text-align: center;
  color: var(--cor-texto-suave);
  font-size: 0.95rem;
}

.co-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.co-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--cor-texto-suave);
}

.co-input {
  padding: 0.7rem 0.8rem;
  background: #0b0b0b;
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  color: var(--cor-texto);
  font-size: 1rem;
  font-family: var(--fonte-corpo);
}

.co-input:focus {
  outline: 2px solid var(--cor-dourado);
  outline-offset: 0;
}

.co-erro {
  margin: 0;
  color: #ff8a8a;
  font-size: 0.9rem;
  text-align: center;
}

.co-submit {
  margin-top: 0.4rem;
}

.co-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.co-qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto 1rem;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
}

.co-copypaste {
  width: 100%;
  padding: 0.6rem;
  background: #0b0b0b;
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  color: var(--cor-texto);
  font-family: monospace;
  font-size: 0.8rem;
  resize: none;
  margin-bottom: 0.8rem;
}

.co-copiar {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.co-status {
  text-align: center;
  color: var(--cor-dourado-claro);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================= RESPONSIVO ============================= */

@media (min-width: 768px) {
  .depoimentos {
    grid-template-columns: repeat(3, 1fr);
  }

  .livro-capa {
    width: 240px;
    height: 340px;
  }
}

/* ============================= REDUÇÃO DE MOVIMENTO ============================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
