/* Páginas /ebooks: lista e landing do piloto. Camada extra, só nestas páginas. */

.ebook-page { background: var(--void); }
.ebook-page .header {
  background: #030303f2;
  border-bottom-color: #ffffff14;
}
@supports (animation-timeline: scroll()) {
  .ebook-page .header { animation: none; }
}

.ebooks-main { padding: 132px 0 80px; }
.ebooks-intro { max-width: 720px; margin-bottom: 56px; }
.ebooks-intro h1 { font-size: clamp(52px, 8vw, 92px); letter-spacing: -.02em; line-height: .9; max-width: 16ch; margin-bottom: 22px; }
.ebooks-intro h1 span { color: var(--accent); }
.ebooks-intro > p:not(.eyebrow) { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 46ch; margin: 0; }

.ebooks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}
.ebook-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #141417, #0c0c0e);
  border: 1px solid #414147;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px #ffffff0d;
}
.ebook-card-soon {
  justify-content: center;
  min-height: 280px;
  padding: 36px 32px;
  border-style: dashed;
  border-color: #5a5a64;
  background: #121216;
  color: #c4c4cc;
}
.ebook-card-soon h2 { font-size: 32px; margin: 0 0 12px; text-transform: uppercase; }
.ebook-card-soon p { margin: 0; max-width: 36ch; }
.ebook-cover-link {
  display: block;
  aspect-ratio: 3 / 4;
  max-height: 220px;
  overflow: hidden;
  background: #09090b;
}
.ebook-card[data-ebook="supabase"] .ebook-cover-link { aspect-ratio: 2 / 3; }
/* Bloco neutro se a capa for retirada. Capa atual: /ebooks/supabase-capa.png (2:3, 640×960). */
.ebook-cover-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  aspect-ratio: 2 / 3;
  padding: 20px 22px;
  background:
    linear-gradient(165deg, #1c1c22 0%, #101014 58%, #0b0b0e 100%);
  color: #d8d8de;
  pointer-events: none;
}
.ebook-cover-kicker {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #9a9aa3;
}
.ebook-cover-title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1;
}
.ebook-cover-meta {
  font-size: 13px;
  color: #8f8f98;
}
.ebook-cover-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.ebook-cover img {
  display: block;
  width: 100%;
  height: auto;
}
.ebook-card-body { display: flex; flex-direction: column; flex: 1; padding: 28px 28px 0; }
.ebook-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 14px;
  padding: 4px 10px;
  border: 1px solid #3e3e46;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #c8c8d0;
}
.ebook-badge-paid {
  color: #f0f0f4;
  border-color: #7a7a84;
  background: #ffffff0a;
}
.ebook-card-body h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.05; margin: 0 0 12px; text-transform: uppercase; }
.ebook-card-body h2 a { color: inherit; }
.ebook-card-body > p { color: #b5b5bf; font-size: 16px; line-height: 1.7; margin: 0 0 8px; }
.ebook-price {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 16px;
}
.ebook-price-now {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #ececf0;
}
.ebook-price-note {
  color: #9c9ca6;
  font-size: 14px;
  line-height: 1.55;
}
.ebook-price-note s { color: #7e7e86; }
.ebook-price code {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .12em;
  padding: 1px 6px;
  border: 1px solid #4a4a52;
  border-radius: 3px;
  color: #ececf0;
}
.ebook-card .card-link { margin-top: auto; grid-row: auto; grid-column: auto; }
.ebook-card .card-link.ebook-buy-soon {
  cursor: not-allowed;
  opacity: .55;
}
.ebook-card .card-link.ebook-buy-soon:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.ebook-landing {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: start;
}
.ebook-cover-frame {
  position: sticky;
  top: 110px;
  max-width: 420px;
  margin: 0 auto;
  transform: rotate(-1.5deg);
  border: 1px solid #5e5e66;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 12px 14px 0 #0b0b0d, 13px 15px 0 #34343a;
  background: #09090b;
}
.ebook-copy h1 { font-size: clamp(44px, 5.4vw, 68px); line-height: .95; max-width: 14ch; margin-bottom: 20px; }
.ebook-lede { font-size: 18px; color: #dedee1; line-height: 1.65; margin-bottom: 16px; }
.ebook-copy > p:not(.eyebrow):not(.ebook-lede):not(.privacy-notice):not(.form-error) { color: var(--muted); margin-bottom: 16px; }
.ebook-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 8px 0 28px; }
.ebook-meta span {
  font-size: 12px;
  color: #b3b3b9;
  border: 1px solid #343438;
  padding: 4px 8px;
  border-radius: 4px;
}

.ebook-form-panel {
  margin-top: 8px;
  padding: 32px 28px 28px;
  background: linear-gradient(160deg, #19191c, #0c0c0e 60%);
  border: 1px solid #47474e;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #ffffff06, 0 24px 80px #00000080;
}
.ebook-form-panel h2 { font-size: 28px; line-height: 1.1; text-transform: uppercase; margin: 0 0 8px; }
.ebook-form-panel .eyebrow { margin-bottom: 10px; }
.ebook-form-panel .privacy-notice { margin: 12px 0 4px; }
.ebook-form-panel .consent + .consent { margin-top: 12px; }
#ebook-success-view { text-align: left; }
#ebook-success-view h2 { margin-bottom: 12px; }
#ebook-success-view > p { color: var(--muted); margin: 0 0 20px; }
#ebook-success-view .button { width: 100%; justify-content: space-between; }
#ebook-intake-warn { margin-top: 16px; }

.ebook-page .site-footer { margin-top: 24px; }

@media (max-width: 1100px) {
  .ebooks-main { padding-top: 120px; }
  .ebook-landing { gap: 48px; }
}
@media (max-width: 900px) {
  .ebooks-grid, .ebook-landing { grid-template-columns: 1fr; }
  .ebook-cover-frame { position: relative; top: auto; transform: none; max-width: 360px; }
  .ebooks-intro h1 { font-size: clamp(44px, 14vw, 64px); }
}
@media (max-width: 760px) {
  .ebooks-main { padding: 108px 0 56px; }
  .ebooks-intro { margin-bottom: 36px; }
  .ebook-card-body { padding: 22px 22px 0; }
  .ebook-form-panel { padding: 24px 18px 20px; }
  .ebook-card-soon { min-height: 0; padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ebook-cover-frame { transform: none; }
}
