:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --ink: #1b1815;
  --muted: #5d554c;
  --teal: #0d7973;
  --teal-bright: #24c6a0;
  --terra: #e26b2d;
  --terra-soft: #f27d3b;
  --gold: #c4922c;
  --border: rgba(27, 24, 21, 0.12);
  --shadow: 0 18px 42px rgba(24, 18, 12, 0.08);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  line-height: 1.55;
}
.container {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-bright) 0%, var(--teal) 48%, var(--terra-soft) 52%, var(--terra) 100%);
  box-shadow: 0 6px 16px rgba(13, 121, 115, 0.25);
}
.brand strong { display: block; font-size: 15.5px; line-height: 1.2; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-primary, .btn-secondary, .btn-outline, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.btn-primary {
  border: 0;
  padding: 13px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  box-shadow: 0 10px 24px rgba(13, 121, 115, 0.24);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary {
  border: 1px solid var(--border);
  padding: 12px 18px;
  color: var(--ink);
  background: var(--surface);
}
.btn-outline {
  border: 1px solid var(--teal);
  padding: 9px 15px;
  color: var(--teal);
  background: transparent;
}
.btn-ghost {
  border: 0;
  padding: 9px 12px;
  color: var(--ink);
  background: transparent;
}
.btn-full { width: 100%; }

.hero {
  padding: 52px 0 36px;
  background: radial-gradient(circle at 12% 18%, rgba(36, 198, 160, 0.14), transparent 42%),
              radial-gradient(circle at 88% 22%, rgba(242, 125, 59, 0.14), transparent 44%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 36px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(13, 121, 115, 0.12);
  color: var(--teal);
  margin-bottom: 14px;
}
.eyebrow-warm {
  background: rgba(226, 107, 45, 0.14);
  color: #b44714;
}
.hero h1 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero-lead {
  margin: 0 0 24px;
  font-size: 16.5px;
  color: var(--muted);
  max-width: 620px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.hero-stack {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack-img {
  width: 190px;
  border-radius: 12px;
  box-shadow: 0 22px 44px rgba(15, 22, 26, 0.28);
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.stack-img.s1 { transform: translateX(-86px) rotate(-7deg); z-index: 1; }
.stack-img.s2 { transform: translateY(-10px) scale(1.06); z-index: 3; }
.stack-img.s3 { transform: translateX(86px) rotate(7deg); z-index: 2; }

.section-block { padding: 34px 0; }
.section-head { margin-bottom: 24px; }
.section-head h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 34px);
}
.section-head p { margin: 0; color: var(--muted); max-width: 680px; }

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
}
.book-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.book-card.destaque {
  border: 2px solid var(--teal);
  box-shadow: 0 22px 50px rgba(13, 121, 115, 0.16);
}
.book-cover {
  position: relative;
  background: linear-gradient(155deg, #132125, #1f2d31);
  padding: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 320px;
}
.book-cover img {
  max-height: 100%;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}
.vol-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(13, 121, 115, 0.92);
  color: #ffffff;
}
.book-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.book-body h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.25;
}
.book-sub {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}
.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.book-price {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(36, 198, 160, 0.09);
  margin-bottom: 14px;
}
.book-price strong { font-size: 22px; color: var(--teal); }
.book-price small { display: block; font-size: 12.5px; color: var(--muted); }
.book-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trilogy-banner {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 28px;
  padding: 34px;
  border-radius: 26px;
  background: linear-gradient(135deg, #121c20, #1c2a2e);
  color: #f6f3ec;
  box-shadow: 0 24px 56px rgba(14, 20, 24, 0.22);
}
.trilogy-banner h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 34px);
}
.trilogy-banner p { color: rgba(246, 243, 236, 0.84); }
.check-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: rgba(246, 243, 236, 0.92);
}
.check-list li { margin-bottom: 8px; }
.trilogy-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.price-label { display: block; font-size: 12.5px; color: #66e4db; font-weight: 700; }
.price-main { display: block; font-size: 40px; line-height: 1.1; margin: 6px 0; color: #ffffff; }
.price-alt { display: block; font-size: 14px; color: rgba(246, 243, 236, 0.8); margin-bottom: 18px; }
.small-note { font-size: 12px; color: rgba(246, 243, 236, 0.72); margin: 12px 0 0; }

.bridge-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.bridge-card h3 { margin: 0 0 6px; font-size: 20px; }
.bridge-card p { margin: 0; max-width: 660px; color: var(--muted); font-size: 14.5px; }

.site-footer {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 13.5px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--teal); text-decoration: none; font-weight: 600; }

/* Modais */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 20, 24, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  position: relative;
  width: min(500px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.3);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.modal-card h3 { margin: 0 0 6px; font-size: 22px; }
.modal-sub { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.pay-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.pay-tab {
  border: 1px solid var(--border);
  background: #f5f2eb;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.pay-tab.ativo {
  border-color: var(--teal);
  background: rgba(13, 121, 115, 0.12);
  color: var(--teal);
}
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.field input, .field select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(27, 24, 21, 0.22);
  font-size: 15px;
}
.form-msg {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(226, 107, 45, 0.12);
  color: #9e350d;
  font-size: 13.5px;
  font-weight: 600;
}
.pix-box {
  text-align: center;
  padding: 14px;
  border-radius: 14px;
  background: #f8f6f0;
  border: 1px solid var(--border);
}
.pix-box img { max-width: 220px; border-radius: 10px; margin: 10px auto; display: block; }
.pix-code {
  width: 100%;
  font-family: monospace;
  font-size: 12px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 8px 0;
}

/* Leitor Online */
.reader-main { padding: 28px 0 64px; }
.loading-box { text-align: center; padding: 48px 16px; color: var(--muted); }
.reader-shell {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fbf8f1;
  box-shadow: var(--shadow);
}
.reader-shell[data-surface="sepia"] { background: #f3e8d2; color: #2b2118; }
.reader-shell[data-surface="noite"] { background: #14181f; color: #e9edf3; border-color: rgba(255, 255, 255, 0.12); }
.reader-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.03);
}
.reader-ctrls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rbtn {
  border: 1px solid rgba(128, 110, 96, 0.34);
  background: transparent;
  color: inherit;
  border-radius: 9px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.rbtn.ativo { background: var(--teal); color: #ffffff; border-color: var(--teal); }
.reader-stage {
  position: relative;
  min-height: 540px;
  padding: 36px clamp(18px, 5vw, 72px) 44px;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
.wm-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: space-around;
  justify-items: center;
  opacity: 0.085;
}
.wm-item {
  transform: rotate(-24deg);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.reader-text {
  position: relative;
  z-index: 3;
  max-width: 740px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.78;
  white-space: pre-wrap;
}
.reader-cover-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.reader-cover-page img {
  max-width: 320px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}
.sample-gate {
  margin-top: 26px;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13, 121, 115, 0.14), rgba(242, 125, 59, 0.14));
  border: 1px solid rgba(13, 121, 115, 0.3);
  text-align: center;
}
.reader-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
@media (max-width: 860px) {
  .hero-grid, .trilogy-banner { grid-template-columns: 1fr; }
  .hero-stack { min-height: 260px; }
  .stack-img { width: 136px; }
  .stack-img.s1 { transform: translateX(-64px) rotate(-6deg); }
  .stack-img.s3 { transform: translateX(64px) rotate(6deg); }
}
@media print {
  .reader-body, .reader-shell, .reader-stage { display: none !important; }
}
