/* Cores padrão — config.js sobrescreve as principais */
:root {
  --background: #0a0610;
  --foreground: #f3f0f9;
  --card: #130d1c;
  --primary: #9a65ff;
  --primary-foreground: #fcfcfc;
  --secondary: #1f192a;
  --muted-foreground: #b9b5c1;
  --border: #332647;
  --lavender: #b492ff;
  --top-background: #251c35;
  --review-background: #060b0d;
  --overlay: rgba(1, 0, 3, .85);
  --dot: #494551;
  --purchase-gradient: linear-gradient(110deg, var(--lavender), var(--primary), var(--lavender));
  --page-gradient: linear-gradient(180deg, var(--top-background) 0, var(--background) 570px);
  --glow: 0 14px 36px -20px var(--lavender);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: inherit; font-size: inherit; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
[hidden] { display: none !important; }

.icon { display: inline-grid; place-items: center; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; }

.sales-page {
  background: var(--page-gradient);
  min-height: 100vh;
  padding: 0 20px;
}

/* Faixa do contador */
.promotion {
  background: var(--background);
  max-width: 482px;
  height: 45px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: 13px;
}
.promotion .icon { width: 16px; height: 16px; color: var(--primary); }
.promotion strong { color: var(--lavender); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Topo */
.intro { text-align: center; max-width: 482px; margin: 0 auto; padding-top: 22px; }
.brand-logo { object-fit: contain; width: 170px; height: 33px; margin: 0 auto 17px; }
.novel-poster {
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 29px;
  width: 289px;
  height: auto;
  aspect-ratio: auto 2 / 3; /* reserva o espaço antes de carregar; depois segue o formato da arte */
  margin: 0 auto;
  background: var(--card);
}
.intro h1 { color: var(--primary); margin-top: 27px; font-size: 36px; font-weight: 800; line-height: 1.3; }
.eyebrow { letter-spacing: 3.5px; font-size: 13px; line-height: 1.8; }
.intro .eyebrow { color: var(--muted-foreground); margin-top: 9px; }
.novel-video {
  aspect-ratio: 9 / 16;
  background: var(--background);
  border-radius: 8px;
  width: 100%;
  max-width: 320px;
  margin: 24px auto 0;
  overflow: hidden;
}
.novel-video video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.novel-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.novel-video.is-embed { aspect-ratio: auto; background: none; }
.synopsis { color: var(--muted-foreground); margin-top: 25px; font-size: 16px; line-height: 27px; }

/* Oferta */
.offer-section { max-width: 482px; margin: 43px auto 0; }
.offer {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--glow);
  text-align: center;
  border-radius: 29px;
  padding: 28px;
}
.price {
  color: var(--primary);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.08;
}
.offer .eyebrow + .price { margin-top: 4px; }
.price-caption { color: var(--muted-foreground); margin-top: 9px; font-size: 14px; }
.benefits { text-align: left; display: grid; gap: 17px; margin: 30px 0 34px; }
.benefits li { display: flex; align-items: flex-start; gap: 14px; font-size: 16px; line-height: 25px; }
.check-circle {
  background: var(--purchase-gradient);
  width: 24px;
  height: 24px;
  color: var(--primary-foreground);
  border-radius: 50%;
  margin-top: 1px;
}
.check-circle svg { width: 16px; height: 16px; }

.purchase-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--purchase-gradient);
  width: 100%;
  min-height: 54px;
  color: var(--primary-foreground);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  border-radius: 100px;
  padding: 12px 18px;
  line-height: 1.4;
  transition: filter .2s, transform .2s;
}
.purchase-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.purchase-button:focus-visible, .decline-button:focus-visible, .faq-item button:focus-visible, .carousel-dot:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}
.secure {
  color: var(--muted-foreground);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  font-size: 11px;
}
.secure .icon { width: 14px; height: 14px; }

/* Depoimentos */
.testimonials { text-align: center; max-width: 482px; margin: 52px auto 0; }
.testimonials h2, .faq-section h2, .guarantee-section h2 { font-size: 24px; font-weight: 700; }
.testimonials h2 { display: flex; justify-content: center; align-items: center; gap: 8px; }
.testimonials h2 .icon { width: 18px; height: 18px; color: var(--lavender); }
.review-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 26px;
  margin-top: 26px;
  padding: 19px;
}
.review-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: 24px;
}
.review-track::-webkit-scrollbar { display: none; }
.review-track img {
  flex: 0 0 100%;
  scroll-snap-align: center;
  object-fit: contain;
  background: var(--review-background);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  height: 470px;
}
.carousel-controls { display: flex; justify-content: center; align-items: center; gap: 9px; height: 24px; margin-top: 32px; }
.carousel-dot {
  background: var(--dot);
  border-radius: 100px;
  width: 10px;
  height: 10px;
  transition: width .2s;
}
.carousel-dot[aria-pressed="true"] { background: var(--purchase-gradient); width: 24px; }

/* Áudio */
.audio-section { max-width: 482px; margin: 30px auto 0; }
.audio-card {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--glow);
  border-radius: 28px;
  padding: 26px 23px;
}
.audio-card h2 { display: flex; align-items: center; gap: 20px; margin: 0 9px 24px; font-size: 21px; font-weight: 700; }
.audio-card h2 .icon { width: 18px; height: 18px; color: var(--primary); }
.audio-card h2 .icon svg { fill: var(--primary); }
.audio-player {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 19px;
}
.play-button { border-radius: 50%; width: 57px; min-height: 57px; height: 57px; padding: 0; flex-shrink: 0; }
.play-button .icon { width: 23px; height: 23px; }
.audio-track { flex: 1; min-width: 0; }
.audio-label { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 9px; font-variant-numeric: tabular-nums; }
.audio-label span:first-child { letter-spacing: 2px; color: var(--lavender); }
.audio-progress { cursor: pointer; background: rgba(255, 255, 255, .12); border-radius: 10px; height: 7px; overflow: hidden; }
.audio-progress-fill { background: var(--purchase-gradient); border-radius: 10px; width: 0; height: 100%; transition: width .2s linear; }
.audio-caption { text-align: center; color: var(--muted-foreground); margin-top: 16px; font-size: 11px; }

/* Garantia */
.guarantee-section {
  text-align: center;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 28px;
  max-width: 482px;
  margin: 56px auto 0;
  padding: 30px 28px;
}
.guarantee-icon { width: 42px; height: 42px; color: var(--primary); margin-bottom: 16px; }
.guarantee-section p { color: var(--muted-foreground); margin-top: 12px; font-size: 16px; line-height: 26px; }
.guarantee-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 19px; }
.guarantee-tags span {
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  border-radius: 100px;
  padding: 5px 13px;
  font-size: 10px;
}

/* FAQ */
.faq-section { max-width: 482px; margin: 58px auto 0; }
.faq-section h2 { text-align: center; margin-bottom: 26px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  margin-bottom: 10px;
  padding: 0 20px;
}
.faq-item button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 57px;
  padding: 16px 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}
.faq-item button:hover { text-decoration: underline; }
.faq-item button .icon { width: 16px; height: 16px; color: var(--primary); transition: transform .2s; }
.faq-item button[aria-expanded="true"] .icon { transform: rotate(180deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease-out; }
.faq-answer > div { overflow: hidden; }
.faq-answer p { color: var(--muted-foreground); font-size: 14px; line-height: 24px; padding-bottom: 16px; }
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }

footer { text-align: center; color: var(--muted-foreground); padding: 55px 0 22px; font-size: 10px; }

/* Pop-up de upgrade */
.sales-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fade-in .2s ease-out;
}
.sales-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 51;
  transform: translate(-50%, -50%);
  width: calc(100% - 36px);
  max-width: 456px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--glow);
  text-align: center;
  border-radius: 28px;
  padding: 28px 29px;
  animation: pop-in .2s ease-out;
}
.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  border-radius: 8px;
}
.dialog-close:hover { background: var(--secondary); color: var(--foreground); }
.dialog-close .icon { width: 16px; height: 16px; }
.premium-badge {
  display: inline-block;
  background: var(--purchase-gradient);
  color: var(--primary-foreground);
  letter-spacing: 1px;
  border-radius: 20px;
  margin-bottom: 17px;
  padding: 6px 16px;
  font-size: 10px;
  font-weight: 600;
}
.dialog-title { font-size: 24px; font-weight: 700; line-height: 1.3; }
.sales-dialog .price { font-size: 56px; }
.premium-benefits {
  border: 1px solid var(--border);
  text-align: left;
  border-radius: 24px;
  display: grid;
  gap: 13px;
  margin: 24px 0;
  padding: 18px;
  font-size: 16px;
  line-height: 23px;
}
.premium-benefits li { display: flex; align-items: flex-start; gap: 12px; }
.premium-benefits .icon { width: 19px; height: 22px; color: var(--primary); }
.decline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted-foreground);
  font-size: 16px;
  font-weight: 300;
  transition: background .2s;
}
.decline-button:hover { background: var(--secondary); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }

@media (max-width: 520px) {
  .sales-page { padding: 0 18px; }
  .intro h1 { font-size: 29px; }
  .intro .synopsis { font-size: 15px; }
  .offer { padding: 26px 22px; }
  .novel-poster { width: 270px; }
  .review-track img { aspect-ratio: .93 / 1; height: auto; }
  .review-card { padding: 16px; }
  .sales-dialog { padding: 28px 22px; }
  .sales-dialog .purchase-button { font-size: 14px; }
  .premium-benefits { padding: 16px; font-size: 14px; }
  .guarantee-section { padding: 28px 20px; }
  .faq-item button { font-size: 15px; }
  .audio-player { gap: 14px; padding: 15px; }
  .audio-label { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
